diff --git a/fmpp/BUILD.txt b/fmpp/BUILD.txt deleted file mode 100644 index 2d88c6d..0000000 --- a/fmpp/BUILD.txt +++ /dev/null @@ -1,90 +0,0 @@ -To build FMPP, you will need JDK (Java Development Kit) and Apache Ant to -be installed. - - -Building the binary -------------------- - -For reproducible builds, it's recommended to copy build.properties.sample into -build.properties and edit it. - -To build lib/fmpp.jar: `ant` -To run test suite: `ant test` -To remove earlier build output: `ant clean` - - -Building the documentation --------------------------- - -Preparation (needed only once): -1. Ensure that the "For documentation building" section in build.properties - is filled properly. -2. Go to http://nodejs.org/ and install node.js (tried with v0.10.32) -3. Go to the FMPP project directory and issue `npm install` - Possible problems an solutions: - - "Error: ENOENT, stat ": create that directory manually, - then retry. - - If the system doesn't find `npm`: Open a new terminal (command window) so - that it pick up the "path" environment variable changes. Adjust it if necessary. - -To build the docs: `ant docs` -The output will be be in `build/docs`! - -To re-build the FMPP generated part only: `fmpp -C docs.fmpp` -To re-build the Gulp generated part only: `ant docs.gulp` - - -Making a release ----------------- - -1. Release to sourcefoge.net: - -* Ensure that the version numbers in src/main/java/fmpp/version.properties are - up to date. - -* Ensure that all properties in build.properties are set correctly. - (Copy build.properties.sample if you don't have build.properties yet.) - -* Ensure that the proper version of the dependencies are in the lib - directory. - -* `ant clean test` must pass successfully. - -* An extracted FreeMarker release of the proper version must be - at the location deduced from the build.properties (see - freemarkerDocs.path in build.xml), as that's where we will - copy the FreeMarker documentation from. - -* Ensure that you haven't polluted the FMPP directories with some - temporary files (your ad-hoc tests, backups, etc.). Note that typical - noise like *.bak, *.~*, SVN files, etc. should be filtered out - automatically by Ant. - -* Run "ant clean dist" - -* Release the generated tar.gz and zip on sourceforge.net. - Check their content before that, of course. - -2. Release to to the Maven Central Repository - -* Run `ant maven-dist`. - - Note that unlike sourceforge.net releases, Maven Central Repository - releases can't ever be redone, so double check everything. - -3. Update the Web site: - -* The site generation will use the FMPP version number and also - build/dist/fmpp_x.x.x.tar.gz and zip, so be sure that these are - there correct. If have just built the release with `ant dist`, then it - shouldn't be a problem. - - Note: The download link will use the download system of sourceforge.net. - That is, you do not upload the tar.gz and zip to the WWW site, but do an - FMPP release on SourceForge with the correct version number. - -* Run `ant site` - -* Upload the generated site. - -4. Make the announcements where appropriate diff --git a/fmpp/LICENSE.txt b/fmpp/LICENSE.txt index 355b06d..2b01ebc 100644 --- a/fmpp/LICENSE.txt +++ b/fmpp/LICENSE.txt @@ -45,9 +45,10 @@ inside the distribution archive. "lib/imageinfo.jar" is a binary distribution of ImageInfo, a software developed by Marco Schmidt, who has contributed it to the Public Domain. - "lib/freemarker.jar" is a binary distribution of FreeMarker. - FreeMarker is under Apache License 2.0 (since FreeMarker 2.3.21). - Read LICENSE_FREEMARKER.txt for more information. + "lib/freemarker.jar" is a binary distribution of Apache FreeMarker. + Apache FreeMarker is under Apache License 2.0, and is owned by the + Apache Software Foundation. Read LICENSE_FREEMARKER.txt for more + information. "lib/test/junit.jar" is a binary distribution of JUnit 3.8. JUnit 3.8 is under Common Public License Version 1.0. @@ -64,6 +65,41 @@ inside the distribution archive. http://scripts.sil.org/OFL. Note that the fonts are only used as part of the FMPP documentation and the FMPP Web site, thus aren't needed for the operation of the FMPP application. + + In FMPP distribution, the content of the "docs/freemarker" directory is + copied from the Apache FreeMarker binary distribution, for convenience only. + As such, it's under the same license as Apache FreeMarker itself + (LICENSE_FREEMARKER.txt), except, as it's described in the Apache + FreeMarker binary distribution LICENSE.txt, it contains some files with + different licensing: + + The documentation includes a selection of icons from various icon sets + (fonts), stored together inside these files, which were generated with + https://icomoon.io/app/: + + docs/freemarker/docgen-resources/fonts/icomoon.eot + docs/freemarker/docgen-resources/fonts/icomoon.svg + docs/freemarker/docgen-resources/fonts/icomoon.ttf + docs/freemarker/docgen-resources/fonts/icomoon.woff + + The name, license, and attribution of each icon sets (fonts) used follows: + + - The documentation includes icons from Entypo pictograms, version 2.0, + by Daniel Bruce (http://www.entypo.com/, http://www.danielbruce.se/), + licensed under Creative Commons Attribution-ShareAlike 3.0 (CC BY-SA 3.0) + (http://creativecommons.org/licenses/by-sa/3.0/legalcode) and under SIL + Open Font License 1.1 (http://scripts.sil.org/OFL). + + - The documentation includes icons from Font Awesome by Dave Gandy + (http://fontawesome.io), licensed under SIL Open Font License 1.1 + (http://scripts.sil.org/OFL). + + - The documentation includes icons from Material Design icons by Google + (http://google.github.io/material-design-icons/), licensed under + Creative Common Attribution 4.0 International License (CC-BY 4.0) + (https://creativecommons.org/licenses/by/4.0/). + + End of docs/freemarker/ license information. "lib/fmpp.jar" doesn't contain parts that belong under a different license or to a different copyright owner than the main license and copyright owner of diff --git a/fmpp/LICENSE_FREEMARKER.txt b/fmpp/LICENSE_FREEMARKER.txt index 2ac874b..d645695 100644 --- a/fmpp/LICENSE_FREEMARKER.txt +++ b/fmpp/LICENSE_FREEMARKER.txt @@ -1,49 +1,202 @@ -Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -============================================================================== -END LICENSE - - -FreeMarker subcomponents with different copyright owners --------------------------------------------------------- - -FreeMarker, both in its source code and binary form (freemarker.jar) -includes a number of files that are licensed by the Apache Software -Foundation under the Apache License, Version 2.0. This is the same -license as the license of FreeMaker, but the copyright owner is the -Apache Software Foundation. These files are: - - freemarker/ext/jsp/web-app_2_2.dtd - freemarker/ext/jsp/web-app_2_3.dtd - freemarker/ext/jsp/web-app_2_4.xsd - freemarker/ext/jsp/web-app_2_5.xsd - freemarker/ext/jsp/web-jsptaglibrary_1_1.dtd - freemarker/ext/jsp/web-jsptaglibrary_1_2.dtd - freemarker/ext/jsp/web-jsptaglibrary_2_0.xsd - freemarker/ext/jsp/web-jsptaglibrary_2_1.xsd - - -Historical notes ----------------- - -FreeMarker 1.x was released under the LGPL license. Later, by -community consensus, we have switched over to a BSD-style license. As -of FreeMarker 2.2pre1, the original author, Benjamin Geer, has -relinquished the copyright in behalf of Visigoth Software Society. - -With FreeMarker 2.3.21 the license has changed to Apache License, -Version 2.0, and the owner has changed from Visigoth Software Society -to three of the FreeMarker 2.X developers, Attila Szegedi, Daniel -Dekany, and Jonathan Revusky. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/fmpp/LICENSE_HAMCREST.txt b/fmpp/LICENSE_HAMCREST.txt new file mode 100644 index 0000000..0bf6264 --- /dev/null +++ b/fmpp/LICENSE_HAMCREST.txt @@ -0,0 +1,27 @@ +BSD License + +Copyright (c) 2000-2015 www.hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. \ No newline at end of file diff --git a/fmpp/README.txt b/fmpp/README.txt index 1244b19..997d804 100644 --- a/fmpp/README.txt +++ b/fmpp/README.txt @@ -1,10 +1,10 @@ FMPP - FreeMarker-based file PreProcessor ========================================= -This is the README file that comes with the FMPP 0.9.15 distribution. +This is the README file that comes with the FMPP @VERSION@ distribution. For the latest version, visit the FMPP website: -http://fmpp.freemarker.net/ +http://fmpp.sourceforge.net/ What is FMPP? diff --git a/fmpp/TODO.txt b/fmpp/TODO.txt deleted file mode 100644 index 0d3c957..0000000 --- a/fmpp/TODO.txt +++ /dev/null @@ -1,165 +0,0 @@ -Before next release -------------------- - -. Re-run test on Java 1.4 -. Run FMPP manually on some projects -. Test Maven artifact - - -Roadmap -------- - -- Use mountable vfs-es, at least for sources. This would deprecate - freemarerLinks, and would work not only for #include but for pp too. - - Add zip (jar) vfs. - -- UN*X FS awareness - - `copyPermissions` setting (copies mod+owner+group) - - Symlink handling (follow symlinks without confusing source paths, copy symlinks) - -- Stream filtering mode - -- Filters - - On output (for Markdown, Haml, Jade to HTML conversation, LESS, minification, etc.) - - On input: for template transformations (will need FM improvements) - -- Persistent output file dependency tracking (including #include/#import - dependencies, also "data" dependency as far as possible). Why: - - Dependency-aware incremental updates - - Smart/safe output directory cleaning (only deletes files created by FMPP) - - -Sideband --------- - -These are the things that aren't on the road map and usually can be fixed in any order. - -Tooling (most efficient places for contributions!): -- Check existing Maven task, contribute/fork if necessary -- Check Gardle support -- Improve JEdit FreeMarker support and JBoss FreeMarker IDE (Eclipse) support - (This actually belongs to the FreeMarker project.) - -High: -- emptyOutputRootAfterCheckingIfExists= // "." for no check -- Allow UN*X tools to be invoked as FreeMarke transforms -- More convenient way of putting OS environment variables into the data-model -- Excel and Calc data loader -- sql(...) data-loader. See below in the Drafts section... -- Add logging via SLF4J as a possible ProgressListener. -- TDD inheritance deep-merging: - - Idea for the solution: "merging hash" type should be introduced. In TDD - a merging hash should be constructed with ~ prefix (~exp) when exp is a hash. - When a value has to be replaced with a merging hash during hash merging, - the merging hash should copy the items of the replaced value into itself that - were not present in the merging hash. During this copying, item values that - are to be replaced with a merging hash value should be merged too. - - Where are the places where this should be handled: - - Merging of setting layers: - data: { someConfig: ~{ a: 1 } } <-inherit- data: { someConfig: { a: 2, b: 3 }} - => - data: { someConfig: ~{ a: 1, b :3 } } - - Local data layers with each-other - - Local data merging with session level data. - - TDD hash additions: - { { a: {x: 1} }, { a: ~{ y: 2 } } } - => - { { a: { x: 1, y: 2 } } } - - `~seq` creates a merging sequence. - ~[1, 2] <-inherit- [3, 4] - => - ~[1, 2, 3, 4] - - `!~` operator creates a non-merging sequence or hash - Now "freemarkerLinks" could use merging sequence by default, - but user could use `!~` to prevent merging. -- Inheriting multiple configuration files - -Medium: -- Add FreeMarker feature for position mapping -- Console charset detection on Windows (extract from `mode con` output) -- Ant task: The "logger" setting is missing (it should be like objectWrapper). - -Low: -- Native Windows exe instead of fmpp.bat+lcp.bat -- GUI front-end -- Add add(...) data-loader for string and sequence concatenation, and arithmetical addition. -- Add bsh(...) data loader: Evaluates a BSH file. - -Lowest: -- DB schema data source -- W3C XML Schema and Relax NG validation, pre-loaded schema validation -- Add xmlDir data-loader (loads all XML files in a directory) - -- Improve pp directive error messages so that they write out if the parameter was null - (instead of complaining that it was missing or not of the proper type) -- Add new processing mode that processes the file with an user written class. -- @pp.warning and @pp.debug should print the location too (file name, line). - However, maybe they should be core FM directives. -- pp.compressHtml - - -==================================================================================== -DRAFTS -==================================================================================== - -The SQL data loader (JDBC data loader) --------------------------------------- - -Maybe the best would be to introduce a new setting, "sqlDataSources": - - sqlDataSources: { - default: {driver: com.exampe.jdbc.Driver, url: jdbc://someurl, user: joe, password: secret} - foo: {driver: com.exampe.jdbc.Driver, url: jdbc://someurl2, user: fred, password: blah} - } - -Then, the sql data loader would look as: - - sql(sqlSentence, substitutions...) - -It should use the "default" data source, unless the SQL sentence starts -with dataLoaderName+':', for example 'foo: select * from foo' - -As pp.loadData('sql', 'select * from foo') is too verbose, a shorthand -form could be introduced: pp.sql('select * from foo') - -The return value should be a list-of-maps for SELECT-s. This list-of-map -should be a copy of the ResultSet content, so the ResultSet can be -released immediately. Thus, FMPP user doesn't have to deal with fetching -and releasing ResultSet-s. Also, it's crucial in the "data" setting, since -there is no way to do explicit fetching/releasing there. - -The map in the list-of-maps should also function as a list-of-lists, -where the 2nd index is the index of the column. - -If the result set contains only a single cell, then the list-of-maps -should also serve as a scalar, so things like -${pp.loadData('sql', 'select max(price) from products)'} will work. - -If the result set contains only a single row, then it should also -function as a map, that reads the columns of the 1st row. The ?size -buit-in for these vars must return the size of the list. -(Unfortunately, because of the ambiguities, for reading columns by -column index, the result[0][index] form must be used. - -As the SQL data loading is certainly frequently used, a short-cut should be -added to the pp hash: pp.sql(...). - -The result set should function as a map that stores the "headers" key. -As with the CSV reader, it returns the sequence of column names. - -The values of binary data should be wrapped as hash that has a -"storeInto" method. Example: - -<#list pp.sql('select id, title, data from photos') as photo> -

- <#assign fileName = 'img/${photo.id}.jpg'> - <@photo.data.storeInto(fileName) /> - ${title} -
${title} -

- - - -Add these to the TemplateEnvironment: -java.sql.Connection getSqlConnection() -java.sql.Connection getSqlConnection(String dataSourceName) \ No newline at end of file diff --git a/fmpp/bin/fmpp b/fmpp/bin/fmpp index 35cdd33..1cce276 100755 --- a/fmpp/bin/fmpp +++ b/fmpp/bin/fmpp @@ -36,15 +36,8 @@ case "`uname`" in esac if [ -z "$FMPP_HOME" ] ; then - # try to find FMPP - if [ -d /opt/fmpp ] ; then - FMPP_HOME=/opt/fmpp - fi - - if [ -d "${HOME}/opt/fmpp" ] ; then - FMPP_HOME="${HOME}/opt/fmpp" - fi - + # Try to detect FMPP_HOME: + ## resolve links - $0 may be a link to FMPP's home PRG="$0" progname=`basename "$0"` @@ -52,23 +45,34 @@ if [ -z "$FMPP_HOME" ] ; then # need this for relative symlinks cd `dirname "$PRG"` - + while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '.*/.*' > /dev/null; then - PRG="$link" + PRG="$link" else - PRG=`dirname "$PRG"`"/$link" + PRG=`dirname "$PRG"`"/$link" fi done - + FMPP_HOME=`dirname "$PRG"`/.. cd "$saveddir" # make it fully qualified FMPP_HOME=`cd "$FMPP_HOME" && pwd` + + if ! [ -f "$FMPP_HOME/lib/fmpp.jar" ]; then + # Standard fallback directories: + if [ -f "${HOME}/opt/fmpp/lib/fmpp.jar" ] ; then + FMPP_HOME="${HOME}/opt/fmpp" + elif [ -f /opt/fmpp/lib/fmpp.jar ] ; then + FMPP_HOME=/opt/fmpp + elif [ -f /usr/lib/fmpp/lib/fmpp.jar ] ; then + FMPP_HOME=/usr/lib/fmpp + fi + fi fi # For Cygwin, ensure paths are in UNIX format before anything is touched @@ -89,10 +93,13 @@ else FMPP_LIB="${ANT_HOME}/lib" else echo "Can't find lib/fmpp.jar. Please either:" - echo " - set the FMPP_HOME correctly, so that FMPP_HOME/lib/fmpp.jar exists." - echo " The current FMPP_HOME was: ${FMPP_HOME}" - echo " - set the ANT_HOME correctly, and copy jar-s required for" - echo " FMPP into the ANT_HOME/lib directory." + echo "- Ensure that FMPP_HOME is correct, so that \$FMPP_HOME/lib/fmpp.jar exists." + echo " FMPP_HOME is set automatically if you put FMPP to a standard location:" + echo " \"/../\", \"~/opt/fmpp/\", \"/opt/fmpp/\", \"/usr/lib/fmpp/\"." + echo " For other locations set and export the FMPP_HOME environment variable." + echo " The attempted FMPP_HOME was: ${FMPP_HOME}" + echo "- If you are also using FMPP with Apache Ant, set ANT_HOME correctly, and" + echo " copy the jar-s coming with FMPP into the \$ANT_HOME/lib directory." exit 1 fi fi diff --git a/fmpp/build.properties.sample b/fmpp/build.properties.sample deleted file mode 100644 index 580bb31..0000000 --- a/fmpp/build.properties.sample +++ /dev/null @@ -1,29 +0,0 @@ -# Points to the rt.jar of Java 1.4 (if you target that minimum version). -# Can be commented out, but for building releases it definitely should be set. -bootclasspath.path=C:/Program Files (x86)/Java/j2re1.4.0_04/lib/rt.jar - -# Points to the ant.jar of Ant 1.5 (if you target that minimum version). -# Can be commented out, but for building releases it definitely should be set. -ant.jar.path=C:/Program Files (x86)/jars/ant-1.5.jar - -# Must be the same as the version number of lib/freemarker.jar -dependency.freemarker.version=2.3.21 -dependency.bsh.version=2.0b4 -dependency.xmlResolver.version=1.2 -dependency.imageinfo.version=1.9 - -# ---------------------------------------------------------------------------- -# For Maven dist: - -# Points to the Maven 3 executable: -mvnCommand=C:/Program Files (x86)/maven3/bin/mvn.bat - -# ---------------------------------------------------------------------------- -# For documentation building: - -# The directory that contains extracted FreeMarker releases in directories -# named as freemarker-${version} . Only needed for copying the FreeMarker -# documentation into the distribution archive: -freemarkerReleases.path=C:/Users/En/Downloads -# Path to the node.js executable: -nodeJsCommand=C:/Program Files/nodejs/node.exe \ No newline at end of file diff --git a/fmpp/build.xml b/fmpp/build.xml deleted file mode 100644 index 0a8b47d..0000000 --- a/fmpp/build.xml +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The "boot.classpath" property value (${bootclasspath.path}) seems to be an incorrect boot classpath. Please fix it in the <projectDir>/build.properties file, or wherever you set it. - - - - Compling classes using boot classpath ${bootclasspath.path} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - freemarkerReleases.path wasn't set; check build.properties - dependency.freemarker.version wasn't set; check build.properties - FreeMarker documentation wasn't found here: ${freemarkerDocs.path} - - - - - - - - - - - - - - - - - - - - - CSS file not found: ${file} - Fixing JDK 8 CSS in ${file} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - dependency.freemarker.version wasn't set; check build.properties - dependency.bsh.version wasn't set; check build.properties - dependency.xmlResolver.version wasn't set; check build.properties - dependency.imageinfo.version wasn't set; check build.properties - - - - 4.0.0 - - - org.sonatype.oss - oss-parent - 9 - - - net.sourceforge.fmpp - fmpp - ${mavenVersion} - - jar - - FMPP - General-purpose text file preprocessor tool that uses FreeMarker templates. - http://fmpp.sourceforge.net - - - Apache License, Version 2.0 - http://fmpp.sourceforge.net/license.html - - - - scm:git:git@github.com:freemarker/fmpp.git - scm:git:git@github.com:freemarker/fmpp.git - git@github.com:freemarker/fmpp.git - - - - - org.freemarker - freemarker - ${dependency.freemarker.version} - - - org.beanshell - bsh - ${dependency.bsh.version} - - - xml-resolver - xml-resolver - ${dependency.xmlResolver.version} - - - org.devlib.schmidt - imageinfo - ${dependency.imageinfo.version} - - - -]]> - - - - - - - - - - - - - - - - - - You are about uploading - ${dist.dir}/lib/fmpp.jar - and its attachments to this Maven repository: - ${maven-repository-url} - with Maven artifact version number ${mavenVersion}. - Note that it's assumed that you have run `ant dist` just before this. - Proceed? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ***************************************************************** - Check the above lines for any Maven errors! - Now you have to release the staged repo on - https://oss.sonatype.org/. - ***************************************************************** - - - - - - This will copy the .jar files required for FMPP ${version} from the ${basedir}/lib directory into the ${env.ANT_HOME}/lib directory. Note that if the same java packages are already installed, but with different jar file names as in the FMPP lib directory (like freemarker-2.3.21.jar instead of freemarker.jar), then it's indeterminable if the newly installed or old classes will be visible, so you must delete the old .jar-s manually. Do you want to continue? - - - - Installation aborted by user. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${jarName} already exists in the Ant lib directory. Do you want to overwrite it with the version in the FMPP lib directory? - - - - - - - - - - - - - - - - ************************************************************* - Copying ${jarName} into the Ant lib directory... - ************************************************************* - - - - - ************************************************************* - You have skipped the copying of ${jarName}. - ************************************************************* - - - \ No newline at end of file diff --git a/fmpp/docs.fmpp b/fmpp/docs.fmpp deleted file mode 100644 index c40d765..0000000 --- a/fmpp/docs.fmpp +++ /dev/null @@ -1,125 +0,0 @@ -<#-- -FMPP command-line tool coniguration file, used by the FMPP Ant build -"fmppgdoc" task (FMPP Generated parts of the DOCumentation). - -Note that normally you should use the fmpp Ant task in Ant builds, but this -is an exceptional situation, because of the class loading issues caused by -that we (re)build fmpp.jar, and also because documentation building should -work without installing FMPP for Ant. ---> - -sourceRoot: src/docs -outputRoot: build/docs -logFile: build/docs.fmpp.log - -turns: [turn(2, **/*_T2.*), turn(3, **/*_T3.*)] -removePostfixes: [_T2, _T3] -modes: [ - # Information for FMPP developers: - ignore(**/README-BUILD.txt) - # Saved IcoMoon App selection - not used for anything: - ignore(style/fonts/selection.json) - - # LESS file go through LESS to CSS conversion before FMPP: - ignore(style/*.less) - - copy(style/fonts/**) -] - -borders: [ - border( - '<#include "/include/site.ftl"><#escape x as x?html>', '' - **/*.html - ) -] - -data: { - basedir: eval('System.getProperties().getProperty("fmpp.home")') - license: text(../../LICENSE.txt) - html: htmlUtils() - stdSettings: eval(' - Map res = new HashMap(); - Iterator it = fmpp.setting.Settings.getStandardSettingNames(); - while (it.hasNext()) { - res.put(it.next(), ""); - } - return res; - ') - online: false - - # Files described with hashes are auto-generated Table of Contents pages. - # Other entries are already existing HTML pages, that must use <@page> directive. - manualFiles: - [{title:"FMPP Manual", file:manual.html, - preToc: '

Updated for FMPP ${pp.version} - (requires FreeMarker - ${pp.freemarkerVersion} or later compatible) -

Note: The FMPP Manual only covers the framework that FMPP builds around FreeMarker. - FreeMarker is a template engine that is independent of FMPP. - For using FMPP you need to <@fma>know the FreeMarker template language.

' - postToc: '<@reportBugs />' - keywords: 'manual, help, guide, tutorial, documentation'} - installing.html - [{title:Basics, file:basics.html} - qtour.html - overview.html - ] - [{title:"Core Details", file:details.html} - settings.html - configfile.html - pphash.html - dataloader.html - ] - [{title:Front-ends, file:frontends.html} - commandline.html - ant.html - writefrontend.html - ] - [{title:"Languages (formats) used", file:languages.html} - tdd.html - pathpattern.html - ftl.html - bsh.html - properties.html - ] - [{title:Miscellaneous, file:miscellaneous.html} - versions.html - reportbug.html - tips.html - license.html - ] - ] - - # Flat list of manual files in ToC order. - flattenedManualFiles: eval(r' - flatten(List src, List dst) { - ln = src.size(); - for (int i = 0; i < ln; i++) { - o = src.get(i); - if (o instanceof List) { - flatten(o, dst); - } else { - if (o instanceof Map) { - o2 = o.get("file"); - if (o2 == null) { - throw new Exception("Key \"file\" is missing from hash " + o); - } - o = o2; - } - dst.add(o); - } - } - } - - ffs = new ArrayList(); - flatten(mfs, ffs); - return ffs; - ', - {mfs:get(manualFiles)} - ) -} - -freemarkerIncompatibleImprovements: 2.3.21 -skipUnchanged: static -timeZone: GMT -quiet diff --git a/fmpp/docs/LICENSE_ANT.txt b/fmpp/docs/LICENSE_ANT.txt deleted file mode 100644 index b279c7a..0000000 --- a/fmpp/docs/LICENSE_ANT.txt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 2000-2002 The Apache Software Foundation. All - * rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Ant" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation. For more information on the - * Apache Software Foundation, please see . - * - */ diff --git a/fmpp/docs/LICENSE_FREEMARKER.txt b/fmpp/docs/LICENSE_FREEMARKER.txt deleted file mode 100644 index 2ac874b..0000000 --- a/fmpp/docs/LICENSE_FREEMARKER.txt +++ /dev/null @@ -1,49 +0,0 @@ -Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -============================================================================== -END LICENSE - - -FreeMarker subcomponents with different copyright owners --------------------------------------------------------- - -FreeMarker, both in its source code and binary form (freemarker.jar) -includes a number of files that are licensed by the Apache Software -Foundation under the Apache License, Version 2.0. This is the same -license as the license of FreeMaker, but the copyright owner is the -Apache Software Foundation. These files are: - - freemarker/ext/jsp/web-app_2_2.dtd - freemarker/ext/jsp/web-app_2_3.dtd - freemarker/ext/jsp/web-app_2_4.xsd - freemarker/ext/jsp/web-app_2_5.xsd - freemarker/ext/jsp/web-jsptaglibrary_1_1.dtd - freemarker/ext/jsp/web-jsptaglibrary_1_2.dtd - freemarker/ext/jsp/web-jsptaglibrary_2_0.xsd - freemarker/ext/jsp/web-jsptaglibrary_2_1.xsd - - -Historical notes ----------------- - -FreeMarker 1.x was released under the LGPL license. Later, by -community consensus, we have switched over to a BSD-style license. As -of FreeMarker 2.2pre1, the original author, Benjamin Geer, has -relinquished the copyright in behalf of Visigoth Software Society. - -With FreeMarker 2.3.21 the license has changed to Apache License, -Version 2.0, and the owner has changed from Visigoth Software Society -to three of the FreeMarker 2.X developers, Attila Szegedi, Daniel -Dekany, and Jonathan Revusky. diff --git a/fmpp/docs/LICENSE_RESOLVER.txt b/fmpp/docs/LICENSE_RESOLVER.txt deleted file mode 100644 index b916c3e..0000000 --- a/fmpp/docs/LICENSE_RESOLVER.txt +++ /dev/null @@ -1,14 +0,0 @@ -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/fmpp/docs/ant.html b/fmpp/docs/ant.html deleted file mode 100644 index ac29e1c..0000000 --- a/fmpp/docs/ant.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - -The Ant Task - FMPP - - - - - - - - - - - - - - - -
-

The Ant Task

- -
-
-

Page contents

- -
-
-
- - -

Description

- -

If you need the FMPP Ant task in a project xml (build.xml), use the taskdef core task:

- -
<taskdef name="fmpp" classname="fmpp.tools.AntTask" />
- -

Then you can use the <fmpp ...> task further down. You may remember the 4th step of Quick Tour. This is an Ant equivalent:

- -
<project name="FMPP test" default="build">
-    <taskdef name="fmpp" classname="fmpp.tools.AntTask" />
-    
-    <target name="build">
-        <fmpp
-              sourceRoot="src" outputRoot="out"
-              data="tdd(data/style.tdd), birds:csv(data/birds.csv)"
-        />
-    </target>
-</project>
-

Almost all parameters of the Ant task correspond to the FMPP settings. If the setting value is of scalar type (as string, boolean, number) then just enter the value simply with Ant-ish syntax, not with TDD syntax. If the setting value is of more tricky type, as hash or sequence, then use TDD syntax for it. For hash settings the value is hash mode TDD, and for sequence setting it is sequence mode TDD, so the brackets should be omitted, as with data above.

- -

The configuration base for the setting values given with Ant parameters is the Ant project base directory. That is, if you enter sourceRoot="src", then src is interpreted relatively to the project base directory.

- -

There is no parameter that directly corresponds to the sources setting. The sources are chosen with nested <fileset>-style parameters and nested elements (as include and exclude). However, if you use the outputFile setting, you can't use <fileset>-style stuff, and sources will be specified with the sourceFile parameter. - -

Alternatively, the data, localData, borders, modes, turns, xmlRenderings and freemarkerLinks settings can be specified with nested elements instead of parameters. For example, this is equivalent with the above example:

- -
<project name="FMPP test" default="build">
-    <taskdef name="fmpp" classname="fmpp.tools.AntTask" />
-    
-    <target name="build">
-        <fmpp sourceRoot="src" outputRoot="out">
-            <data>
-                 tdd(data/style.tdd)
-                 birds: csv(data/birds.csv)
-            </data>
-        </fmpp>
-    </target>
-</project>
-

This can be useful, if the setting value is long. The content of the element can be a CDATA section, which is useful if the setting value contains HTML or XML fragments. Unlike with attributes, Ant property interpolations (${foo}) in the text are not expanded, unless you force that with the expandProperties attribute of the element (<data expandProperties="yes">...).

- -

About the support and interpretation of FMPP settings:

- - -

To access the Ant properties and other Ant specific data in the templates, you can use data loaders such as antProperty(), antProperties(), antProject() and antTask(). Read the chapter about data loaders for more details.

- - - - -

Parameters

- -

The FMPP task accepts the following parameters:

-
    -
  • All FMPP settings except sources, ignoreCvsFiles, ignoreSvnFiles, ignoreTemporaryFiles, echoFormat, printStackTrace, snip and columns. If the setting value is of scalar type (as string, boolean, number) then just enter the value simply with Ant-ish syntax, not with TDD syntax. If the setting value is of more tricky type, as hash or sequence, then use TDD syntax for it. For hash settings the value is hash mode TDD, and for sequence setting it is sequence mode TDD, so the brackets should be omitted. The configuration base for the setting values is the Ant project base directory.
  • - -
  • To follow the Ant conventions, srcdir and destdir attribute names can be optionally used instead of sourceRoot and outputRoot attribute names. These are just alias names.
  • - -
  • Configuration file handling: -
      -
    • configuration: Loads a configuration file. The setting values given with the parameters has higher precedence.
    • - -
    • configurationBase: Emulates that configurationBase meta setting is present in configuration file with the given value.
    • - -
    • inheritConfiguration: Emulates that inheritConfiguration meta setting is present in configuration file with the given value.
    • -
    -
  • - -
  • Ant <fileset>-style attributes (see the Ant documentation for more details). Used for specifing the value of the sources setting: -
      -
    • dir: The directory that the patterns are relative to. If this attribute is omitted, then the FMPP source root will be used as the base. Note that regardless of the value of this attribute, all source files must be inside the source root. -
    • casesensitive: Sets case sensitivity of the file names. (Same as the FMPP setting) -
    • defaultexcludes: Indicates whether default excludes should be used or not ("yes" or "no"); default excludes are used when omitted. -
    • excludes: comma- or space-separated list of patterns of files that must be excluded; no files (except default excludes) are excluded when omitted. -
    • excludesfile: the name of a file; each line of this file is taken to be an exclude pattern. -
    • followsymlinks: Shall symbolic links be followed? Defaults to true. -
    • includes: Comma- or space-separated list of patterns of files that must be included; all files are included when omitted. Note that be default all files of the source root directory are included. -
    • includesfile: The name of a file; each line of this file is taken to be an include pattern. -
    -
  • - -
  • sourceFile: It can be used only if the outputFile setting is specified. It specifies the value of the sources setting, as a simple string (not a comma separated list) that specifies the path of a single file. <fileset>-style attributes/elements will be ignored.
  • - -
  • antTaskFailOnError: Specifies if the Ant task should fail if there were errors during the execution of the processing session. Defaults to true. It has nothing to do with the stopOnError setting. If this parameter is true, the Ant task will fail if there were any failed file processing during the processing session, even if it was skipped because stopOnError was true (so the session wasn't aborted). If this parameter is false, then the Ant task will be successful regardless of the failed file processings or other errors during the processing session, even if the processing session was aborted. But, it never suppresses errors occurred during the initialization of the FMPP engine (i.e. errors occurred before the processing session could be stated).
  • -
- -

Either the configuration parameter, or sourceRoot+outputRoot parameters, or sourceFile+outputFile parameters are required. All other parameters are optional. When you use configuration, any Ant task parameters can become optional, when the value of the coressponding settings are given in the configuration file.

- -

Attention! When you specify the sources setting in a configuration file, its value will be added to the set of files and directories that the Ant task itself selects, which is, following the Ant tradition, by default all files and directories inside the source root. Thus, usually you will want to exclude all files in the Ant task, so only those specified in the configuration file will remain: -

<fmpp configuration="config-with-sources-setting.fmpp" excludes="**/*" />
- - - -

Nested elements

- -

The FMPP task accepts the following nested elements: -

    -
  • Elements for attribute substitution: Using these elements is the same as if you were use the attributes (parameters) with the same name, and with the same value as the nested text (or CDATA section) of the elements. Ant property values (${foo}) are not expanded by default, but you can override this with a expandProperties="yes" attribute. Note that you etiher give a certain setting with attribute, or with element, but not both. -
      -
    • data -
    • localData -
    • borders -
    • modes -
    • turns -
    • xmlRenderings -
    • freemarkerLinks -
    -
  • <fileset>-style elements (see the Ant documentation for more details): -
      -
    • patternset -
    • include: Note that be default all files inside the source root directory are included. -
    • exclude -
    • includesfile -
    • excludesfile -
    -
- - - - -

Examples

- -

Run processing session with the settings stored in <projectBaseDir>/config.fmpp (or fmpp.cfg):

-
<fmpp configuration="." />
-

As the previous, but override outputEncoding:

-
<fmpp configuration="." outputEncoding="UTF-8" />
-

Processes all files in src/www and stores the output in build/www:

-
<fmpp sourceRoot="src/www" outputRoot="build/www" />
-

Same as the previous, but processes files with extension ftl only:

-
<fmpp
-    sourceRoot="src/www" outputRoot="build/www"
-    includes="**/*.ftl"
-/>
-

Same as the previous:

-
<fmpp sourceRoot="src/www" outputRoot="build/www">
-    <include name="**/*.ftl" />
-</fmpp>
-

Run processing session with the settings stored in <projectBaseDir>/src/wwwconfig.fmpp, but process files with extension ftl only:

-
<fmpp configuration="src/wwwconfig.fmpp" includes="**/*.ftl" />
-

Processes a single file:

-
<fmpp sourceFile="src/test.txt" outputFile="build/test.txt" />
-

Exposes Ant properties foo, bar and baaz for the templates:

-
<fmpp sourceRoot="src/www" outputRoot="build/www"
-        data="antProperties(foo, bar, baaz)"
-/>
-

Just to show something more complex...:

-
<fmpp sourceRoot="src/www" outputRoot="build/www"
-        replaceExtension="ftl, html"
-        modes="copy(**/*.html, **/*.htm)"
->
-    <borders><![CDATA[
-        border('<#escape x as x?html>', '</#escape>', **/*.ftl)
-    ]]></borders>
-    <data>
-        bgColor: white
-        fgColor: black
-        antProps: antProperties()
-    </data>
-</fmpp>
- - -
-
-
-
- - - \ No newline at end of file diff --git a/fmpp/docs/api/allclasses-frame.html b/fmpp/docs/api/allclasses-frame.html deleted file mode 100644 index ebf655a..0000000 --- a/fmpp/docs/api/allclasses-frame.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - -All Classes (FMPP 0.9.15 API) - - - - - -

All Classes

-
- -
- - diff --git a/fmpp/docs/api/allclasses-noframe.html b/fmpp/docs/api/allclasses-noframe.html deleted file mode 100644 index 90a0e3c..0000000 --- a/fmpp/docs/api/allclasses-noframe.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - -All Classes (FMPP 0.9.15 API) - - - - - -

All Classes

-
- -
- - diff --git a/fmpp/docs/api/constant-values.html b/fmpp/docs/api/constant-values.html deleted file mode 100644 index e512239..0000000 --- a/fmpp/docs/api/constant-values.html +++ /dev/null @@ -1,1184 +0,0 @@ - - - - - - -Constant Field Values (FMPP 0.9.15 API) - - - - - - - - -
- - - - - - - -
- - -
-

Constant Field Values

-

Contents

- -
-
- - -

fmpp.*

- - - - -

fmpp.dataloaders.*

- - - - -

fmpp.models.*

- - - - -

fmpp.setting.*

- - - - -

fmpp.tdd.*

- - - - -

fmpp.tools.*

- - - - -

fmpp.util.*

- -
- -
- - - - - - - -
- - - - diff --git a/fmpp/docs/api/deprecated-list.html b/fmpp/docs/api/deprecated-list.html deleted file mode 100644 index 20947c7..0000000 --- a/fmpp/docs/api/deprecated-list.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - -Deprecated List (FMPP 0.9.15 API) - - - - - - - - -
- - - - - - - -
- - - - - -
- - - - - - - -
- - - - diff --git a/fmpp/docs/api/fmpp/DataModelBuildingException.html b/fmpp/docs/api/fmpp/DataModelBuildingException.html deleted file mode 100644 index d5d6f98..0000000 --- a/fmpp/docs/api/fmpp/DataModelBuildingException.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -DataModelBuildingException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp
-

Class DataModelBuildingException

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable
    -
    -
    -
    -
    public class DataModelBuildingException
    -extends ExceptionCC
    -
    Error while trying to build the data-model for a template. - Usually you meet this exception as the root cause of a - ProcessingException
    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        DataModelBuildingException

        -
        public DataModelBuildingException(Throwable cause)
        -
      • -
      - - - -
        -
      • -

        DataModelBuildingException

        -
        public DataModelBuildingException(String message)
        -
      • -
      - - - -
        -
      • -

        DataModelBuildingException

        -
        public DataModelBuildingException(String message,
        -                                  Throwable cause)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/Engine.html b/fmpp/docs/api/fmpp/Engine.html deleted file mode 100644 index 425f9b9..0000000 --- a/fmpp/docs/api/fmpp/Engine.html +++ /dev/null @@ -1,3063 +0,0 @@ - - - - - - -Engine (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp
-

Class Engine

-
-
- -
-
    -
  • -
    -
    -
    public class Engine
    -extends Object
    -
    The bare-bone, low-level preprocessor engine. Since FMPP 0.9.0 you should - rather use a Settings object instead of directly using - this class. - -

    fmpp.Engine vs Settings: - The design of the Engine object API is driven by the internal - architecture of FMPP system. It doesn't consider front-ends, doesn't know - configuration files or similar high-level stuff. Settings - wraps the Engine object, and implements end-user (front-end) centric - concepts, as the settings and configuration files described in the FMPP - Manual. The API of Engine is more natural and convenient - than the API of a Map-like object as a - Settings object. But Settings are far easier - to use if you want FMPP behave as described in the FMPP Manual from the - viewpoint of end-user. In principle, if FMPP is used embedded in a way - that the end-user will never face FMPP (doesn't use the FMPP Manual, - etc.), using the Engine object directly can be a good - solution. But, since the Java programmers get know FMPP through the - higher-level concepts (they try it with the command-line tool, etc.), I - say, just use Settings always. The resource usage overhead - is negligible, and all capabilities of the Engine will be - available, plus some extra features (as configuration files). So basically, - the introduction of Settings has degraded Engine to - an internally used object. - -

    Engine parameters: - Engine parameters are very similar to "settings" discussed in the - FMPP Manual. You will usually find trivial one-to-one correspondence between - settings and engine parameters, but not always. Settings use the - front-end/end-user's viewpoint, and are mostly built on the top of engine - parameters, while engine parameters use FMPP system implementation driven - approach. -
    The value of engine parameters can't be set while a processing session is - executing. An attempt to do so will result in - IllegalStateException. Thus, for example, you can't change - an engine parameter from an executing template. Also, you should not change - the objects stored as "data" (i.e. the variables that are visible for all - templates) while the processing session is executing, even though it's not - prevented technically (because it can't be...). - -

    Life-cycle: The engine object can be used for multiple processing - sessions. However, the typical usage is that it is used - only for a single processing session. The state of the engine object possibly - changes during sessions because of the engine attributes (see - setAttribute(String, Object)), and because plugged long-lived - objects as local data builders and progress listeners can maintain state - through multiple sessions. These objects should behave so that the output - files of a session is not influenced by earlier sessions.

    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        PMODE_NONE

        -
        public static final int PMODE_NONE
        -
        Processing mode: N/A
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        PMODE_EXECUTE

        -
        public static final int PMODE_EXECUTE
        -
        Processing mode: Execute the file as template
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        PMODE_COPY

        -
        public static final int PMODE_COPY
        -
        Processing mode: Copy the file as-is (binary copy).
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        PMODE_IGNORE

        -
        public static final int PMODE_IGNORE
        -
        Processing mode: Ignore the file.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        PMODE_RENDER_XML

        -
        public static final int PMODE_RENDER_XML
        -
        Processing mode: Render XML with an FTL template.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        SKIP_NONE

        -
        public static final int SKIP_NONE
        -
        Used with the "skipUnchnaged" engine parameter: never skip files
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        SKIP_STATIC

        -
        public static final int SKIP_STATIC
        -
        Used with the "skipUnchanged" engine parameter: skip unchanged static - files
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        SKIP_ALL

        -
        public static final int SKIP_ALL
        -
        Used with the "skipUnchanged" engine parameter: skip all unchanged - files
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        PARAMETER_VALUE_SOURCE

        -
        public static final String PARAMETER_VALUE_SOURCE
        -
        A commonly used reserved parameter value: "source".
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        PARAMETER_VALUE_OUTPUT

        -
        public static final String PARAMETER_VALUE_OUTPUT
        -
        A commonly used reserved parameter value: "source".
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        PARAMETER_VALUE_HOST

        -
        public static final String PARAMETER_VALUE_HOST
        -
        A commonly used reserved parameter value: "host".
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        XPATH_ENGINE_DONT_SET

        -
        public static final String XPATH_ENGINE_DONT_SET
        -
        Used as the value of the "xmlEngine" engine parameter: keep the current - JVM level setting.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        XPATH_ENGINE_DEFAULT

        -
        public static final String XPATH_ENGINE_DEFAULT
        -
        Used as the value of the "xmlEngine" engine parameter: Let FreeMarker - choose.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        XPATH_ENGINE_XALAN

        -
        public static final String XPATH_ENGINE_XALAN
        -
        Used as the value of the "xmlEngine" engine parameter: Force the usage - of Xalan.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        XPATH_ENGINE_JAXEN

        -
        public static final String XPATH_ENGINE_JAXEN
        -
        Used as the value of the "xmlEngine" engine parameter: Force the usage - of Jaxen.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - - - - - - - - - -
        -
      • -

        Engine

        -
        public Engine(BeansWrapper beansWrapper,
        -              Version fmIncompImprovements)
        -
        Creates a new FMPP engine instance. - Use the setter methods (as setProgressListener) to configure - the new instance.
        -
        -
        Parameters:
        -
        beansWrapper - the FreeMarker beans-wrapper that this instance - will use. Just use null if you don't know what's this. - If you do know what's this, note that FMPP by default (when this - parameter is null) uses a BeansWrapper with - simpleMapWrapper set to true.
        -
        fmIncompImprovements - Sets the "incompatible improvements" version of FreeMarker. You should set this to - the current FreeMarker version in new projects. See Configuration.Configuration(Version) for details. - If it's at least 2.3.21 and beansWrapper is null, the default will be created using - BeansWrapperBuilder instead of new BeansWrapper(), which means that that the resulting - BeansWrapper will be a shared singleton with read-only settings.
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        process

        -
        public void process(File[] sources)
        -             throws ProcessingException
        -
        Processes a list of files. - -

        The source root and output root directory must be set (non-null) prior - to calling this method.

        -
        -
        Parameters:
        -
        sources - The list of files to process. All file must be inside - the source root. The files will be processed in the order as they - appear in the list, except that if you use multiple turns, they - are re-sorted based on the associated turns (the original order - of files is kept inside turns).
        -
        Throws:
        -
        ProcessingException - if Engine.process has - thrown any exception. The message of this exception holds nothing - interesting (just a static text). Call its getCause() - method to get the exception that caused the termination. Note that - all (so even non-checked exceptions) thrown be the engine are - catched and wrapped by this exeption.
        -
        See Also:
        -
        process(File, File)
        -
        -
      • -
      - - - -
        -
      • -

        process

        -
        public void process(File src,
        -                    File out)
        -             throws ProcessingException
        -
        Hack to processes a single file. - -

        If the source root and/or output root directory is not set, they - will be set for the time of this method call to the parent diretories of - the source and output files respectively.

        -
        -
        Parameters:
        -
        src - the source file (not directory). Can't be null.
        -
        out - the output file (not directory). Can't be null.
        -
        Throws:
        -
        ProcessingException - if Engine.process has - thrown any exception. The message of this exception holds nothing - interesting (just a static text). Call its getCause() - method to get the exception that caused the termination. Note that - all (so even non-checked exceptions) thrown be the engine are - catched and wrapped by this exception.
        -
        See Also:
        -
        process(File[])
        -
        -
      • -
      - - - -
        -
      • -

        getStopOnError

        -
        public boolean getStopOnError()
        -
      • -
      - - - -
        -
      • -

        setStopOnError

        -
        public void setStopOnError(boolean stopOnError)
        -
      • -
      - - - -
        -
      • -

        getOutputRoot

        -
        public File getOutputRoot()
        -
        Returns the output root directory. - This can be null. However, it is never null while a processing session is - running, since the output root must be specified for successfully start a - processing session. - -

        The returned File is always a canonical - File.

        -
      • -
      - - - -
        -
      • -

        setOutputRoot

        -
        public void setOutputRoot(File outputRoot)
        -                   throws IOException
        -
        Sets the root directory of output files. - If it is null, the output directory will be used if the output is a - directory, otherwise the parent directory of the output file. - Initially this engine parameter is null.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        getSourceRoot

        -
        public File getSourceRoot()
        -
        Returns the source root directory. - This can be null. However, it is never null while a processing session is - runing, since the source root must be specified for successfully start a - processing session. - -

        The returned File is always a canonical - File.

        -
      • -
      - - - -
        -
      • -

        setSourceRoot

        -
        public void setSourceRoot(File srcRoot)
        -                   throws IOException
        -
        Sets the root directory of source files. - If it is null, the source directory will be used if the source is a - directory, otherwise the parent directory of the source file.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        getDataRoot

        -
        public File getDataRoot()
        -
        Returns the directory used as data root directory. - This will be the source root, if the data directory was not set (null). - Note that the data-root can be null, when the source root is also null. - However, it is never null while a processing session is runing, since - the source root must be specified for successfully start a processing - session. - -

        The returned File is always a canonical - File.

        -
      • -
      - - - -
        -
      • -

        setDataRoot

        -
        public void setDataRoot(File dataRoot)
        -                 throws IOException
        -
        Sets the root directory of data files. - If it is "source" or null, then the source - directory will be used.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        addFreemarkerLink

        -
        public void addFreemarkerLink(String name,
        -                              File fileOrDir)
        -                       throws IOException
        -
        Adds a FreeMarker link. FreeMarker links are fake files/directories - visible in the source root directory. They are visible for the predefined - FreeMarker directives only (thus, not for pp variables). - A FreeMarker link acts as an alias or hard-link to another file or - directory. This is a hack that allows you to - <#include ...> or <#import ...> files - that are outside the source root directory. - -

        The link is visible as a file or directory in the source root - directory with name @name. For example, if the link name - is "inc", then it can be used as - <#include '/@inc/blah.ftl'> (assuming the link points - to a directory that contains file blah.ftl). - -

        In the generic case, a FreeMarker link is associated with a list of - files/directories, not just with a single file/directory. For example, - if inc is associated with /home/joe/inc1 and - /home/joe/inc2 (in this order), then - <#include '/@inc/blah.ftl'> will try to read - /home/joe/inc1/blah.ftl, and if that file is missing, - then /home/joe/inc2/blah.ftl. You can associate the name with - multiple files/directories by calling this method with the same name for - multiple times. The earlier you have added a file/directory, the higher - its priority is.

        -
        -
        Parameters:
        -
        name - the name of fake entry in the source root directory, minus - the @ prefix. To prevent confusion, the name can't start - with @.
        -
        fileOrDir - the file or directory the link will point to. It can be - a outside the source root directory.
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        getFreemarkerLink

        -
        public List getFreemarkerLink(String name)
        -
        Returns the list of files associated with a FreeMarker link name.
        -
        -
        Parameters:
        -
        name - the name of the link (do not use the @ preifx)
        -
        Returns:
        -
        the list of canonical files associated with this link, or - null, if no FreeMarker link with the given name exist.
        -
        -
      • -
      - - - - - - - -
        -
      • -

        addProgressListener

        -
        public void addProgressListener(ProgressListener listener)
        -
        Adds a progress listener to the list of progress listeners. - All progress listeners of the list will be invoked on the events of the - engine. - -

        If you want a local data loader or engine attribute to listen engine - events, do not add it with this method. It will be automatically - notified about events, they need not be added here. - -

        Note that if you try to add the same object for multiple times, the - object will added only in the first occasion.

        -
      • -
      - - - -
        -
      • -

        clearProgressListeners

        -
        public void clearProgressListeners()
        -
        Removes all progress listeners from the list of progress listeners that - were added with addProgressListener(fmpp.ProgressListener). It does not affect - other listening objects, as local data loaders or engine attributes.
        -
      • -
      - - - -
        -
      • -

        setTemplateDataModelBuilder

        -
        public void setTemplateDataModelBuilder(TemplateDataModelBuilder tdmBuilder)
        -
        Sets the class that will be instantiated to create the template specfic - variables.
        -
        -
        See Also:
        -
        TemplateDataModelBuilder
        -
        -
      • -
      - - - - - - - - - - - -
        -
      • -

        setSourceEncoding

        -
        public void setSourceEncoding(String encoding)
        -
        Sets the encoding (charset) of textual source files. - Note that according to FreeMarker rules, this can be overridden in a - template with &lt;#ftl encoding="...">. - -

        Initially the encoding is ISO-8859-1.

        -
        -
        Parameters:
        -
        encoding - The encoding, or "host" if the default - encoding (file.encoding system property) of the host - machine should be used. null is the same as - "host".
        -
        -
      • -
      - - - -
        -
      • -

        getSourceEncoding

        -
        public String getSourceEncoding()
        -
        Returns the source encoding used for the template files. - This is not null or "host"; this is always - a concrete encoding, such as "UTF-8".
        -
      • -
      - - - -
        -
      • -

        setLocale

        -
        public void setLocale(Locale locale)
        -
        Sets the locale (country, language). - -

        Initially the locale is en_US.

        -
        -
        Parameters:
        -
        locale - The locale, or null if the default locale of the host - machine should be used.
        -
        -
      • -
      - - - -
        -
      • -

        setLocale

        -
        public void setLocale(String locale)
        -
        Sets the locale (country, language). - -

        Initially the locale is en_US.

        -
        -
        Parameters:
        -
        locale - The locale, or "host" if the default locale of the host - machine should be used. Null is the same as "host".
        -
        -
      • -
      - - - -
        -
      • -

        getLocale

        -
        public Locale getLocale()
        -
        Returns the actual (non-null) locale in use.
        -
      • -
      - - - -
        -
      • -

        setOldTemplateSyntax

        -
        public void setOldTemplateSyntax(boolean oldSyntax)
        -
        Sets if the # is required in FTL tags or not. - In the old template syntax # was not required. - The default and recommended value for this engine parameter is - false.
        -
      • -
      - - - - - - - - - - - - - - - -
        -
      • -

        setOutputEncoding

        -
        public void setOutputEncoding(String outputEncoding)
        -
        Sets the encoding used for textural output (template generated files). - By default it is "source".
        -
        -
        Parameters:
        -
        outputEncoding - The name of encoding. If it is - "source", then the encoding of the source (template - file) will be used for the output. null is the same as - "source". If it is "host" then the - default encoding of the host machine will be used.
        -
        -
      • -
      - - - -
        -
      • -

        getOutputEncoding

        -
        public String getOutputEncoding()
        -
        Retruns the output encoding used; It can be "source" - (since that can't be resolved to a concrete charset), but never - null or "host".
        -
      • -
      - - - -
        -
      • -

        setUrlEscapingCharset

        -
        public void setUrlEscapingCharset(String urlEscapingCharset)
        -
        Sets the charset used for URL escaping. By default it is - "output".
        -
        -
        Parameters:
        -
        urlEscapingCharset - The name of charset (encoding) that is used - for URL escaping. If it is "output", then the encoding - of the output will be used. null is the same as - "output". If it is "host" then the - default encoding of the host machine will be used.
        -
        -
      • -
      - - - -
        -
      • -

        getUrlEscapingCharset

        -
        public String getUrlEscapingCharset()
        -
        Retruns the output encoding used; It can be "output" - (since that can't be resolved to a concrete charset), but never - null.
        -
      • -
      - - - -
        -
      • -

        setNumberFormat

        -
        public void setNumberFormat(String format)
        -
        Sets the number format used to convert numbers to strings, as defined - by Configurable.setNumberFormat(String). - At least on FreeMarker 2.3.21, this is a pattern as DecimalFormat defines it, - or the reserved values "number" or "currency".
        -
      • -
      - - - -
        -
      • -

        setBooleanFormat

        -
        public void setBooleanFormat(String format)
        -
        Sets the boolean format used to convert boolean to strings, as defined - by Configurable.setBooleanFormat(String). Note that it can't be "true,false"; for that you have - to print the boolean value with ${foo?c}.
        -
      • -
      - - - - - - - -
        -
      • -

        setDateFormat

        -
        public void setDateFormat(String format)
        -
        Sets the format used to convert date values (year + month + day) to - strings. - See Configurable.setDateFormat(String) in the FreeMarker API - for more information. - -

        The default is the format suggested by the underlying Java platform - implementation for the current locale.

        -
      • -
      - - - - - - - -
        -
      • -

        setTimeFormat

        -
        public void setTimeFormat(String format)
        -
        Sets the format used to convert time values (hour + minute + second - + millisecond) to strings. - See Configurable.setTimeFormat(String) in the FreeMarker API - for more information. - -

        The default is the format suggested by the underlying Java platform - implementation for the current locale.

        -
      • -
      - - - - - - - -
        -
      • -

        setDateTimeFormat

        -
        public void setDateTimeFormat(String format)
        -
        Sets the format used to convert date-time values (year + month + day + - hour + minute + second + millisecond) to strings. - See Configurable.setDateTimeFormat(String) in the FreeMarker API - for more information. - -

        The default is the format suggested by the underlying Java platform - implementation for the current locale.

        -
      • -
      - - - - - - - - - - - -
        -
      • -

        setTimeZone

        -
        public void setTimeZone(String zone)
        -
        Same as setTimeZone(TimeZone), but lets FreeMarker parse the value to time zone. If the value comes - from a string source anyway, it's recommended to use this instead of the other overload.
        -
      • -
      - - - - - - - -
        -
      • -

        setSQLDateAndTimeTimeZone

        -
        public void setSQLDateAndTimeTimeZone(String zone)
        -
        Same as setSQLDateAndTimeTimeZone(TimeZone), but lets FreeMarker parse the value to time zone. If - the value comes from a string source anyway, it's recommended to use this instead of the other overload.
        -
      • -
      - - - - - - - -
        -
      • -

        addModeChooser

        -
        public void addModeChooser(String pattern,
        -                           int pmode)
        -
        Adds a new entry to the end of path-pattern -> processing-mode - mapping list.
        -
        -
        Parameters:
        -
        pattern - a path pattern as "*.txt" or - "/docs/**/item_??.xml". - You have to use slash (/) or backslash (\) or the platform specific - separator to spearate directories.
        -
        pmode - the mode in which you want to process the files. Use the - PMODE_... constants.
        -
        -
      • -
      - - - - - - - -
        -
      • -

        addHeaderChooser

        -
        public void addHeaderChooser(int layer,
        -                             String pattern,
        -                             String footer)
        -
        Adds a new entry to the end of path-pattern -> header mapping list of the - given layer. Layers are indexed from 0. The lower the layer index is, - the earlier the header occurs in the text.
        -
      • -
      - - - - - - - -
        -
      • -

        addFooterChooser

        -
        public void addFooterChooser(int layer,
        -                             String pattern,
        -                             String footer)
        -
        Adds a new entry to the end of path-pattern -> footer mapping list of the - given layer. Layers are indexed from 0. The lower the layer index is, - the later the footer occurs in the text.
        -
      • -
      - - - -
        -
      • -

        addTurnChooser

        -
        public void addTurnChooser(String pattern,
        -                           int turn)
        -
        Adds a new entry to the end of path-pattern -> turn-number mapping list.
        -
      • -
      - - - -
        -
      • -

        clearModeChoosers

        -
        public void clearModeChoosers()
        -
        Removes all processing mode choosers. This is the initial state after - the instantiation of Engine (i.e. no processing mode - choosers).
        -
      • -
      - - - -
        -
      • -

        clearHeaderChoosers

        -
        public void clearHeaderChoosers()
        -
        Removes all header choosers.
        -
      • -
      - - - -
        -
      • -

        clearFooterChoosers

        -
        public void clearFooterChoosers()
        -
        Removes all footer choosers.
        -
      • -
      - - - -
        -
      • -

        clearTurnChoosers

        -
        public void clearTurnChoosers()
        -
        Removes all turn choosers.
        -
      • -
      - - - -
        -
      • -

        setCaseSensitive

        -
        public void setCaseSensitive(boolean cs)
        -
        Sets if the engine differentiates upper- and lower-case letters when it - compares paths or matches path patterns with paths. False by default - (ignores case).
        -
      • -
      - - - - - - - -
        -
      • -

        setExpertMode

        -
        public void setExpertMode(boolean expertMode)
        -
        Allows some features that are considerd dangerous. - These are currently: -
          -
        • The source and the output file is the same -
        -
      • -
      - - - - - - - -
        -
      • -

        addRemovePostfix

        -
        public void addRemovePostfix(String postfix)
        -
        Adds a postfix to the list of file name postfixes to remove. - If the source file name before the first dot ends with a string in the - list, then it will be removed from the output file name. For example, - if "_t" is in the list, then the output file for "example_t.html" will - be "example.html". If the file name does not contains dot, then it - still works: "example_t" will become to "example".
        -
        -
        Parameters:
        -
        postfix - the postfix to remove. Can't be null or empty - string, and can't contain dot.
        -
        -
      • -
      - - - -
        -
      • -

        addRemoveExtension

        -
        public void addRemoveExtension(String extension)
        -
        Adds an extension to the list of extensions to remove. - If the source file name ends with an extension in the list, then it will - be removed from the output file name. For example, - if "t" is in the list, then the output file for "example.html.t" will - be "example.html". The extension to remove can contain dots (as tar.gz).
        -
        -
        Parameters:
        -
        extension - the extension to remove without the dot. Can't be - null or empty string, and can't start with dot.
        -
        -
      • -
      - - - -
        -
      • -

        addReplaceExtension

        -
        public void addReplaceExtension(String oldExtension,
        -                                String newExtension)
        -
        Adds an old-exension -> new-extension pair to the list of - extension replacements. - If a source file name ends with the old extension, then it will - be replaced with the new extension in the output file name.
        -
        -
        Parameters:
        -
        oldExtension - the old extension without the preceding dot.
        -
        newExtension - the new extension without the preceding dot.
        -
        -
      • -
      - - - -
        -
      • -

        clearRemovePostfixes

        -
        public void clearRemovePostfixes()
        -
      • -
      - - - -
        -
      • -

        clearRemoveExtensions

        -
        public void clearRemoveExtensions()
        -
      • -
      - - - -
        -
      • -

        clearReplaceExtensions

        -
        public void clearReplaceExtensions()
        -
      • -
      - - - -
        -
      • -

        setDontTraverseDirectories

        -
        public void setDontTraverseDirectories(boolean dontTraverseDirs)
        -
        Sets the Engine should automatically process the files and - directories inside a directory whose processing was asked through the - public Engine API. Defaults to true. It is set to - false by front-ends that explicitly specify the list of - source files and source directories, rather than expecting the - Engine to discover them.
        -
      • -
      - - - -
        -
      • -

        getDontTraverseDirectories

        -
        public boolean getDontTraverseDirectories()
        -
      • -
      - - - -
        -
      • -

        setSkipUnchanged

        -
        public void setSkipUnchanged(int skipWhat)
        -
        Sets what source file can be skipped if it was not modified after the - last modification time of the output file. Also, if the output is not - existing, the source file will be processed. Note that this feature will - not work for templates that rename or drop the original output file - during the template execution. - -

        The initial value of this engine parameter is SKIP_NONE.

        -
        -
        Parameters:
        -
        skipWhat - a SKIP_... contant.
        -
        -
      • -
      - - - -
        -
      • -

        getSkipUnchanged

        -
        public int getSkipUnchanged()
        -
      • -
      - - - -
        -
      • -

        setAlwaysCreateDirectories

        -
        public void setAlwaysCreateDirectories(boolean enable)
        -
        Sets whether for source directories a corresponding output directory - will be created even if no file output went into it. Defaults to - false. - -

        Notes: -

          -
        • Even if this is set to true, if - a directory contains an ignoredir.fmpp file, it will not - create output directory. -
        • If the directory contains a file called createdir.fmpp, - the directory will be created even if this setting is - false. -
        -
      • -
      - - - -
        -
      • -

        getAlwaysCreateDirectories

        -
        public boolean getAlwaysCreateDirectories()
        -
      • -
      - - - -
        -
      • -

        setIgnoreCvsFiles

        -
        public void setIgnoreCvsFiles(boolean ignoreCvsFiles)
        -
        Sets if the CVS files inside the source root directory should be - ignored or not. This engine parameter is initially true. - -

        The CVS files are: **/.cvsignore, - **/CVS/** and **/.#*

        -
      • -
      - - - -
        -
      • -

        getIgnoreCvsFiles

        -
        public boolean getIgnoreCvsFiles()
        -
      • -
      - - - -
        -
      • -

        setIgnoreSvnFiles

        -
        public void setIgnoreSvnFiles(boolean ignoreSvnFiles)
        -
        Sets if the SVN files inside the source root directory should be - ignored or not. This engine parameter is initially true. - -

        The SVN files are: **/SVN/**

        -
      • -
      - - - -
        -
      • -

        getIgnoreSvnFiles

        -
        public boolean getIgnoreSvnFiles()
        -
      • -
      - - - -
        -
      • -

        setIgnoreTemporaryFiles

        -
        public void setIgnoreTemporaryFiles(boolean ignoreTemporaryFiles)
        -
        Set if well-known temporary files inside the source root directory should - be ignored or not. For the list of well-known temporary file patterns, - read the FMPP Manual.
        -
      • -
      - - - -
        -
      • -

        getIgnoreTemporaryFiles

        -
        public boolean getIgnoreTemporaryFiles()
        -
      • -
      - - - -
        -
      • -

        setXpathEngine

        -
        public void setXpathEngine(String xpathEngine)
        -
        Sets if which XPath engine should be used.
        -
        -
        Parameters:
        -
        xpathEngine - one of the XPATH_ENGINE_... constants, - or a class name.
        -
        -
      • -
      - - - -
        -
      • -

        getXpathEngine

        -
        public String getXpathEngine()
        -
      • -
      - - - -
        -
      • -

        setXmlEntityResolver

        -
        public void setXmlEntityResolver(Object xmlEntityResolver)
        -                          throws InstallationException
        -
        Sets the XML entiry resolver used for reading XML documents. - - The default value is null.
        -
        -
        Parameters:
        -
        xmlEntityResolver - it must implement - org.xml.sax.EntityResolver (it was declared as - Object to prevent linkage errors when XML related - features are not used on pre-1.4 Java), or it must be null.
        -
        Throws:
        -
        InstallationException
        -
        -
      • -
      - - - -
        -
      • -

        getXmlEntiryResolver

        -
        public Object getXmlEntiryResolver()
        -
        Gets the XML entiry resolver used for reading XML documents.
        -
        -
        Returns:
        -
        null of no resolver is used, or an - org.xml.sax.EntityResolver (it was declared as - Object to prevent linkage errors when XML related - features are not used on pre-1.4 Java).
        -
        -
      • -
      - - - -
        -
      • -

        setValidateXml

        -
        public void setValidateXml(boolean validateXml)
        -
        Sets if XML documents should be validated when they are loaded. - Defaults to true.
        -
      • -
      - - - -
        -
      • -

        getValidateXml

        -
        public boolean getValidateXml()
        -
      • -
      - - - -
        -
      • -

        addXmlRenderingConfiguration

        -
        public void addXmlRenderingConfiguration(XmlRenderingConfiguration xmlRendering)
        -
        Adds as XML rendering configuration.
        -
      • -
      - - - -
        -
      • -

        clearXmlRenderingConfigurations

        -
        public void clearXmlRenderingConfigurations()
        -
        Removes all XML rendering configurations.
        -
      • -
      - - - -
        -
      • -

        addData

        -
        public void addData(String name,
        -                    Object value)
        -
        Adds a variable that will be visible for all templates when the - processing session executes.
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        addData

        -
        public void addData(Map map)
        -
        Adds all entries with addData(String, Object). - The name of the variable will be the key of the map entry, - and its value will be the value of the map entry.
        -
      • -
      - - - - - - - -
        -
      • -

        getData

        -
        public Object getData(String name)
        -
        Gets the value of a variable. This method accesses the variables that - are visible for all templates. It corresponds to setting data. - -

        Warning! When the processing session is executing, you must - not modify the returned object.

        -
        -
        Returns:
        -
        null if no such variable exist. - Values are returned exactly as they were added, that is, without - FreeMarker's wrapping (but note that some variables initially use - FreeMarker TemplateModel types, such as variables created by - some of the data loaders).
        -
        See Also:
        -
        addData(String, Object)
        -
        -
      • -
      - - - -
        -
      • -

        removeData

        -
        public Object removeData(String name)
        -
        Removes a variable that would be visible for all templates when the - processing session executes. I does nothing if there is no variable - exists for the given name.
        -
        -
        Returns:
        -
        the removed value, or null if there was no value - stored for the given name.
        -
        See Also:
        -
        addData(String, Object)
        -
        -
      • -
      - - - -
        -
      • -

        clearSharedVariables

        -
        public void clearSharedVariables()
        -
        Deprecated. Use clearData() instead.
        -
      • -
      - - - -
        -
      • -

        addLocalDataBuilder

        -
        public void addLocalDataBuilder(int layer,
        -                                String pathPattern,
        -                                LocalDataBuilder builder)
        -
        Adds a local data builder. The local data builder will be invoked - directly before the execution of templates (if the - pathPattern matches the source file path).
        -
        -
        Parameters:
        -
        layer - the index of the layer, stating from 0. 0 is the layer with - the highest priority.
        -
        pathPattern - the path pattern of source files where this local - data builder will be used.
        -
        builder - the local data builder object.
        -
        -
      • -
      - - - - - - - -
        -
      • -

        getProgressListenerEventName

        -
        public static String getProgressListenerEventName(int event)
        -
        Converts an ProgressListener.EVENT_... constant to English - text.
        -
      • -
      - - - - - - - - - - - -
        -
      • -

        isTemplateEnvironmentAvailable

        -
        public boolean isTemplateEnvironmentAvailable()
        -
        Tells if getTemplateEnvironment() will throw exception or not.
        -
      • -
      - - - -
        -
      • -

        setAttribute

        -
        public Object setAttribute(String name,
        -                           Object value)
        -
        Adds/replaces an engine attribute. - Attributes are arbitrary key-value pairs that are associated with the - Engine object. FMPP reserves all keys starting with - fmpp. for its own use. Attributes are not understood by the - Engine, but by data loaders, local data builders, and tools that - create them. - -

        Attributes can be changed (replaced, removed, ...etc.) while the - processing session is executing.

        -
        -
        Parameters:
        -
        name - the name of the attribute. To prevent name - clashes, it should follow the naming convention of Java classes, e.g. - "com.example.someproject.something".
        -
        value - the value of the attribute. If it implements - ProgressListener, then it will receive notifications about - the events of the Engine. If attribute(s) with that value is - (are) removed, then the value object doesn't receive more - notifications.
        -
        Returns:
        -
        The previous value of the attribute, or null if - there was no attribute with the given name.
        -
        -
      • -
      - - - - - - - -
        -
      • -

        removeAttribute

        -
        public Object removeAttribute(String name)
        -
        Removes an attribute. It does nothing if the attribute does not exist.
        -
        -
        Returns:
        -
        The value of the removed attribute or null if there - was no attribute with the given name.
        -
        See Also:
        -
        setAttribute(String, Object)
        -
        -
      • -
      - - - - - - - -
        -
      • -

        getVersionNumber

        -
        public static String getVersionNumber()
        -
        Returns the FMPP version number string. FMPP version number string - follows the major.minor.sub or major.minor.sub.nightly - format, where each part (separated by dots) is an non-negative integer - number.
        -
      • -
      - - - -
        -
      • -

        getBuildInfo

        -
        public static String getBuildInfo()
        -
        Returns FMPP build info. This is usually the date of the build, but it - can be anything.
        -
      • -
      - - - -
        -
      • -

        getFreeMarkerVersionNumber

        -
        public static String getFreeMarkerVersionNumber()
        -
      • -
      - - - -
        -
      • -

        isXmlSupportAvailabile

        -
        public boolean isXmlSupportAvailabile()
        -
        Quickly tells if XML support is available.
        -
      • -
      - - - -
        -
      • -

        checkXmlSupportAvailability

        -
        public void checkXmlSupportAvailability(String requiredForThis)
        -                                 throws InstallationException
        -
        Checks if XML support is available. It can be quicker than - MiscUtil.checkXmlSupportAvailability(String), so rather use this.
        -
        -
        Parameters:
        -
        requiredForThis - a short sentence that describes for human reader - if for what do we need the XML support (e.g. - "Usage of xml data loader." or - "Set XML entity resolver."). This sentence is used - in error message of the InstallationException. - Can be null.
        -
        Throws:
        -
        InstallationException - if the XML support is not available.
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/LocalDataBuilder.html b/fmpp/docs/api/fmpp/LocalDataBuilder.html deleted file mode 100644 index 83e86ec..0000000 --- a/fmpp/docs/api/fmpp/LocalDataBuilder.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - -LocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp
-

Interface LocalDataBuilder

-
-
-
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        build

        -
        Map build(Engine eng,
        -          TemplateEnvironment env)
        -   throws Exception
        -
        Returns the variables that could be added to the local data.
        -
        -
        Returns:
        -
        the variables to add to the local data. Can be - null. The returned map will not be modified - (although technically, badly behaved 3rd party code can modify - the values soted in the map...).
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/ProcessingException.html b/fmpp/docs/api/fmpp/ProcessingException.html deleted file mode 100644 index c785a74..0000000 --- a/fmpp/docs/api/fmpp/ProcessingException.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - -ProcessingException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp
-

Class ProcessingException

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable
    -
    -
    -
    -
    public class ProcessingException
    -extends ExceptionCC
    -
    Error while performing the processing session.
    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ProcessingException

        -
        public ProcessingException(Engine e,
        -                           File sourceFile,
        -                           Throwable cause)
        -
        -
        Parameters:
        -
        sourceFile - can be null.
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        getSourceFile

        -
        public File getSourceFile()
        -
        Returns the source file the faliure relates to. - This is an absolute file (not relative). - It's null if no such information is available.
        -
      • -
      - - - -
        -
      • -

        getSourceRoot

        -
        public File getSourceRoot()
        -
        Returns the "sourceRoot" used during the processing session that failed. - It's maybe null, but only if getSourceFile() - returns null too.
        -
      • -
      - - - -
        -
      • -

        getMessage

        -
        public String getMessage()
        -
        Returns always the same text: "FMPP processing session failed."
        -
        -
        Overrides:
        -
        getMessage in class Throwable
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/ProgressListener.html b/fmpp/docs/api/fmpp/ProgressListener.html deleted file mode 100644 index ec07509..0000000 --- a/fmpp/docs/api/fmpp/ProgressListener.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - -ProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp
-

Interface ProgressListener

-
-
-
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        EVENT_BEGIN_PROCESSING_SESSION

        -
        static final int EVENT_BEGIN_PROCESSING_SESSION
        -
        Engine.process has started the work.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_END_PROCESSING_SESSION

        -
        static final int EVENT_END_PROCESSING_SESSION
        -
        Engine.process has finished the work.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_BEGIN_FILE_PROCESSING

        -
        static final int EVENT_BEGIN_FILE_PROCESSING
        -
        The processing of a single file has been started.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_END_FILE_PROCESSING

        -
        static final int EVENT_END_FILE_PROCESSING
        -
        The processing of a single file has been finished.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_IGNORING_DIR

        -
        static final int EVENT_IGNORING_DIR
        -
        A source directory has been ignored (skipped.)
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_CREATED_EMPTY_DIR

        -
        static final int EVENT_CREATED_EMPTY_DIR
        -
        An empty directory was created due to the copyEmptyDirs setting.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_WARNING

        -
        static final int EVENT_WARNING
        -
        A warning message has been received from a template or from the - engine.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_SOURCE_NOT_MODIFIED

        -
        static final int EVENT_SOURCE_NOT_MODIFIED
        -
        The processing of source was skipped because the output was generated - after the last modification of the source file.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        notifyProgressEvent

        -
        void notifyProgressEvent(Engine engine,
        -                         int event,
        -                         File src,
        -                         int pMode,
        -                         Throwable error,
        -                         Object param)
        -                  throws Exception
        -
        Method called be the engine to notify events. - -

        It is guaranteed that this method will not be called concurrently - as far as the listener is added to a single Engine instance - only.

        -
        -
        Parameters:
        -
        engine - The engine instance where the event has occurred.
        -
        event - The code of the event: an EVENT_... constant. - As new event types can be introduced with new FMPP versions (even if - it happens very seldom), a progress listener implementation should - survive events that it does not understand. That is, it must not stop - with an error, but it should silently ignore the event.
        -
        src - Depending on event the source file or null.
        -
        pMode - Depending on event the proccessing mode - (Engine.PMODE_... constant) or - Engine.PMODE_NONE. Note that new processing modes may - be added as FMPP evolvers, so values that are not known be the - progress listener should be handler nicely, and never cause error.
        -
        error - The error, or null if there was no error.
        -
        param - Extra information about the event. The class and meaning of - object depends on the concrete event: -
          -
        • For EVENT_WARNING it is a String that - describles the reason of warning. -
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/TemplateDataModelBuilder.html b/fmpp/docs/api/fmpp/TemplateDataModelBuilder.html deleted file mode 100644 index e7ba1d2..0000000 --- a/fmpp/docs/api/fmpp/TemplateDataModelBuilder.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - -TemplateDataModelBuilder (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp
-

Interface TemplateDataModelBuilder

-
-
-
-
    -
  • -
    -
    Deprecated.  -
    Use LocalDataBuilder instead.
    -
    -
    -
    public interface TemplateDataModelBuilder
    -
    Contains callback to build the data-model for a template execution.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        build

        -
        Map build(Engine e,
        -          Template template,
        -          File src)
        -   throws Exception
        -
        Deprecated. 
        -
        Returns the top-level variables that will be available for the template.
        -
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/TemplateEnvironment.html b/fmpp/docs/api/fmpp/TemplateEnvironment.html deleted file mode 100644 index 4566c92..0000000 --- a/fmpp/docs/api/fmpp/TemplateEnvironment.html +++ /dev/null @@ -1,875 +0,0 @@ - - - - - - -TemplateEnvironment (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp
-

Class TemplateEnvironment

-
-
- -
-
    -
  • -
    -
    -
    public class TemplateEnvironment
    -extends Object
    -
    The runtime FMPP environment of an executing template.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        getCurrentInstance

        -
        public static TemplateEnvironment getCurrentInstance()
        -
        Returns the TemplateEnvironment object used for the template - currently being executed by FMPP in the current thread. - The return value of the method is undefined if no such template execution - is in progress. - In practice it means that it can be safely called from a Java - method that is (indirectly) invoked by the executing template. For - example, in a TemplateTransformModel that is - used in the template with <@...>.
        -
      • -
      - - - -
        -
      • -

        getFreemarkerEnvironment

        -
        public Environment getFreemarkerEnvironment()
        -
        Returns the FreeMarker environment currently in use. - The FreeMarker environment can be used to set/get variables, among - others.
        -
        -
        Throws:
        -
        IllegalStateException - if the FreeMarker environment is not - available.
        -
        -
      • -
      - - - -
        -
      • -

        getEngine

        -
        public Engine getEngine()
        -
        Returns the FMPP engine object in use.
        -
      • -
      - - - -
        -
      • -

        getXmlDocument

        -
        public Object getXmlDocument()
        -
        Returns the processed XML document (pp.doc) as - Document. This will return non-null - if, and only if the current processing mode is "renderXml".
        -
        -
        See Also:
        -
        getWrappedXmlDocument()
        -
        -
      • -
      - - - - - - - -
        -
      • -

        getData

        -
        public Object getData(String name)
        -
        Similar to Engine.getData(java.lang.String), but it also sees file processing - specifict variables (local data).
        -
        -
        Parameters:
        -
        name - the name of the variable.
        -
        Returns:
        -
        the value of the variable, or null if no variable - with the given name exists.
        -
        -
      • -
      - - - -
        -
      • -

        getSourceFile

        -
        public File getSourceFile()
        -
        Returns the source file.
        -
      • -
      - - - -
        -
      • -

        getTemplate

        -
        public Template getTemplate()
        -
        Retuns the FreeMarker Template object for the source file.
        -
      • -
      - - - -
        -
      • -

        getOutputFile

        -
        public File getOutputFile()
        -                   throws IOException
        -
        Returns the output file. Note that this value can change during the - execution of template.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        getHomePath

        -
        public String getHomePath()
        -                   throws IOException
        -
        Returns URL-style path of the output root relative to the current output - file.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        getOutputEncoding

        -
        public String getOutputEncoding()
        -                         throws IOException
        -
        Returns the output encoding. Note that this value can change during the - execution of template.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        changeOutputFile

        -
        public void changeOutputFile(String name)
        -                      throws IOException
        -
        It does the same as the directive in the pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        changeOutputFile

        -
        public void changeOutputFile(String name,
        -                             boolean append)
        -                      throws IOException
        -
        It does the same as the directive in the pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        renameOutputFile

        -
        public void renameOutputFile(String name)
        -                      throws IOException
        -
        It does the same as the directive in the pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        dropOutputFile

        -
        public void dropOutputFile()
        -                    throws IOException
        -
        It does the same as the directive in the pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        restartOutputFile

        -
        public void restartOutputFile()
        -                       throws IOException
        -
        It does the same as the directive in the pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        beginNestedOutputFile

        -
        public void beginNestedOutputFile(String name)
        -                           throws IOException
        -
        It does the same as the begin tag of the corresponding directive of the - pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        beginNestedOutputFile

        -
        public void beginNestedOutputFile(String name,
        -                                  boolean append)
        -                           throws IOException
        -
        It does the same as the begin tag of the corresponding directive of the - pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        endNestedOutputFile

        -
        public void endNestedOutputFile()
        -                         throws IOException
        -
        It does the same as the end tag of the corresponding directive of the - pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        setOutputEncoding

        -
        public void setOutputEncoding(String encoding)
        -                       throws IOException
        -
        It does the same as the directive in the pp hash.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        warning

        -
        public void warning(String message)
        -
        It does the same as the directive in the pp hash.
        -
      • -
      - - - -
        -
      • -

        resolveSourcePath

        -
        public File resolveSourcePath(String path)
        -                       throws IOException
        -
        Resolves a source path to a File object. - Use this for your custom transforms that wants the path of a source file - as parameter. When it tries to find the file, paths as - foo.jpg will be interpreted relatively to the current source - file, while paths like /img/foo.jpg will be interpreted - relatively to source root directory. - -

        Note that an IOException will be thrown if the file is outside the - source root directory.

        -
        -
        Parameters:
        -
        path - the path in UN*X or native format.
        -
        Returns:
        -
        File object that points to the file.
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - - - - - -
        -
      • -

        toSourceRootRelativePath

        -
        public String toSourceRootRelativePath(String path)
        -                                throws IOException
        -
        Returns the path relative to the source root.
        -
        -
        Parameters:
        -
        path - the path in UN*X or native format. - The virtual root directory will be the source root, not the real - root directory of the host system.
        -
        Returns:
        -
        the source root relative path in UN*X format. - It does not start with slash.
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        toSourceRootRelativePath

        -
        public String toSourceRootRelativePath(File f)
        -                                throws IOException
        -
        Convets a file object to a source root relative UN*X style path.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - - - - - -
        -
      • -

        toOutputRootRelativePath

        -
        public String toOutputRootRelativePath(File f)
        -                                throws IOException
        -
        Convets a file object to an output root relative UN*X style path.
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        getPathTo

        -
        public String getPathTo(String dst)
        -                 throws IOException
        -
        Calculates the path of another output file relatively to current output - file, in UN*X format.
        -
        -
        Parameters:
        -
        dst - the path of the other output file in UN*X or native format. - The (virtual) root directory will be the output root directory, not - the real root directory of the host system.
        -
        Returns:
        -
        the path of dst relatively to the current output - file, in UN*X format. - It never starts with slash. It ends with slash if and only if - dst ends with slash, except if the return value would - be a single slash then, in which case the result will be an empty - string instead.
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/XmlRenderingConfiguration.html b/fmpp/docs/api/fmpp/XmlRenderingConfiguration.html deleted file mode 100644 index 3cdf54d..0000000 --- a/fmpp/docs/api/fmpp/XmlRenderingConfiguration.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - -XmlRenderingConfiguration (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp
-

Class XmlRenderingConfiguration

-
-
- -
-
    -
  • -
    -
    -
    public class XmlRenderingConfiguration
    -extends Object
    -
    Stores options that describe when and how to process an XML file in - "renderXml" processing mode. - -

    Do not change this object after you have added it to the - Engine. It's in principle - an immutable object, but to prevent too many constructor parameters and - later backward compatibility problems, you have to specify the options with - setter methods, rather than with constructor arguments. - -

    You must set a non-null template or set - copy to true. All other options are optional.

    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        XmlRenderingConfiguration

        -
        public XmlRenderingConfiguration()
        -
        Creates new object.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        setTemplate

        -
        public void setTemplate(String template)
        -
        Sets the renderer template.
        -
        -
        Parameters:
        -
        template - the source path of the template used for the - rendering of the XML file. Can't be null.
        -
        -
      • -
      - - - -
        -
      • -

        setCopy

        -
        public void setCopy(boolean copy)
        -
        Sets if the XML file should be copied as is, or renderd with a template. - If the value of this option is true, then the value of the - template option is insignificant.
        -
      • -
      - - - -
        -
      • -

        addDocumentElement

        -
        public void addDocumentElement(String xmlns,
        -                               String localName)
        -
        Adds an element to the list of document elements. The XML file will not - be processed according this configuration object if this list - doesn't contain the document element of the XML file. - If the list is empty, then this criteria will not be considered - (accepts XML documents regardels of their document element).
        -
        -
        Parameters:
        -
        xmlns - the name-space URL of the element. This should be - null or 0-length stirng if the element doesn't belong to - any XML name-space.
        -
        localName - the local (name-space preixless) name of the element.
        -
        -
      • -
      - - - - - - - -
        -
      • -

        addLocalDataBuilder

        -
        public void addLocalDataBuilder(LocalDataBuilder localDataBuilder)
        -
        Adds an extra local data builder that is invoked after all other - local data builders. The task of this builder is to do the - complex or resource eager parts of the XML processing that you don't - want to do in FTL, and expose the results as local data. - -

        The data loaders added earlier will be executed earlier. The data - loader executed later can replace earlier added local data variables.

        -
      • -
      - - - - - - - -
        -
      • -

        addSourcePathPattern

        -
        public void addSourcePathPattern(String pathPattern)
        -
        Adds a path to the list of source path patterns. The XML file will not be - processed according this configuration object if no path - in this list matches the source root relative path of the XML file. - If the list is empty, then this criteria will not be considered - (accepts XML documents regardels of their source file path).
        -
        -
        Parameters:
        -
        pathPattern - the path pattern of the source root relative path of - the XML file. It doesn't mater if it starts with / or not.
        -
        -
      • -
      - - - -
        -
      • -

        clearSourcePathPatterns

        -
        public void clearSourcePathPatterns()
        -
        Empties the list of source path patterns.
        -
        -
        See Also:
        -
        addSourcePathPattern(String)
        -
        -
      • -
      - - - -
        -
      • -

        addXmlDataLoaderOption

        -
        public void addXmlDataLoaderOption(String name,
        -                                   Object value)
        -
        Adds or replaces an option in the map of xml data loader - options. - The set of valid values are specified by the xml data loader - (see in the FMPP Manual), and they will not be validated until the data - loader is actually invoked, so when the processing of the XML file - starts. The only exception from this rule is the - "namespaceAware" option, for which false - value is not allowed.
        -
        -
        Parameters:
        -
        name - the name of the option. Option "namespaceAware" - is not allowed.
        -
        value - the value of the option
        -
        -
      • -
      - - - -
        -
      • -

        clearXmlDataLoaderOptions

        -
        public void clearXmlDataLoaderOptions()
        -
        Removes all xml data loader options.
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/class-use/DataModelBuildingException.html b/fmpp/docs/api/fmpp/class-use/DataModelBuildingException.html deleted file mode 100644 index f43b86a..0000000 --- a/fmpp/docs/api/fmpp/class-use/DataModelBuildingException.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - -Uses of Class fmpp.DataModelBuildingException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.DataModelBuildingException

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/class-use/Engine.html b/fmpp/docs/api/fmpp/class-use/Engine.html deleted file mode 100644 index 2eb4d52..0000000 --- a/fmpp/docs/api/fmpp/class-use/Engine.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - - - -Uses of Class fmpp.Engine (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.Engine

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/class-use/LocalDataBuilder.html b/fmpp/docs/api/fmpp/class-use/LocalDataBuilder.html deleted file mode 100644 index c1cab0a..0000000 --- a/fmpp/docs/api/fmpp/class-use/LocalDataBuilder.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - -Uses of Interface fmpp.LocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Interface
fmpp.LocalDataBuilder

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/class-use/ProcessingException.html b/fmpp/docs/api/fmpp/class-use/ProcessingException.html deleted file mode 100644 index 6a5948e..0000000 --- a/fmpp/docs/api/fmpp/class-use/ProcessingException.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - -Uses of Class fmpp.ProcessingException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.ProcessingException

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/class-use/ProgressListener.html b/fmpp/docs/api/fmpp/class-use/ProgressListener.html deleted file mode 100644 index 6aa7d4b..0000000 --- a/fmpp/docs/api/fmpp/class-use/ProgressListener.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - -Uses of Interface fmpp.ProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Interface
fmpp.ProgressListener

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/class-use/TemplateDataModelBuilder.html b/fmpp/docs/api/fmpp/class-use/TemplateDataModelBuilder.html deleted file mode 100644 index 85d899c..0000000 --- a/fmpp/docs/api/fmpp/class-use/TemplateDataModelBuilder.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - -Uses of Interface fmpp.TemplateDataModelBuilder (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Interface
fmpp.TemplateDataModelBuilder

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/class-use/TemplateEnvironment.html b/fmpp/docs/api/fmpp/class-use/TemplateEnvironment.html deleted file mode 100644 index 9559cec..0000000 --- a/fmpp/docs/api/fmpp/class-use/TemplateEnvironment.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -Uses of Class fmpp.TemplateEnvironment (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.TemplateEnvironment

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/class-use/XmlRenderingConfiguration.html b/fmpp/docs/api/fmpp/class-use/XmlRenderingConfiguration.html deleted file mode 100644 index aedadab..0000000 --- a/fmpp/docs/api/fmpp/class-use/XmlRenderingConfiguration.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Class fmpp.XmlRenderingConfiguration (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.XmlRenderingConfiguration

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/AbstractTextDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/AbstractTextDataLoader.html deleted file mode 100644 index 47d0a11..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/AbstractTextDataLoader.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - -AbstractTextDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class AbstractTextDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    Direct Known Subclasses:
    -
    SlicedTextDataLoader
    -
    -
    -
    -
    public abstract class AbstractTextDataLoader
    -extends FileDataLoader
    -
    Returns a string based on a plain text file.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AbstractTextDataLoader

        -
        public AbstractTextDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - - - - - -
        -
      • -

        parseText

        -
        protected abstract Object parseText(String text)
        -                             throws Exception
        -
        Parses the file content to the final object that the data loader - will return.
        -
        -
        Parameters:
        -
        text - the content of the text file
        -
        Returns:
        -
        the return value of the data loader
        -
        Throws:
        -
        Exception
        -
        -
      • -
      - - - -
        -
      • -

        parseExtraArguments

        -
        protected abstract String parseExtraArguments(List args)
        -                                       throws Exception
        -
        Parses the argument list, except the 1st (file name) argument.
        -
        -
        Parameters:
        -
        args - the arguments (all of them, starting from the 1st)
        -
        Returns:
        -
        the encoding given with the extra arguments, or - null if the encoding was not specified. In the latest - case the encoding will default to the source encoding engine - parameter (the sourceEncoding setting).
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/AntDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/AntDataLoader.html deleted file mode 100644 index 55c690c..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/AntDataLoader.html +++ /dev/null @@ -1,375 +0,0 @@ - - - - - - -AntDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class AntDataLoader

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        ATTRIBUTE_ANT_TASK

        -
        public static final String ATTRIBUTE_ANT_TASK
        -
        The name of the Engine attribute that must store the Ant task - object.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AntDataLoader

        -
        public AntDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        load

        -
        public Object load(Engine eng,
        -                   List args)
        -            throws Exception
        -
        Gets the Ant task object, and invoked load(Engine, List, Task).
        -
        -
        Specified by:
        -
        load in interface DataLoader
        -
        args - Arguments that the caller specifies for this directive call. - Not null. - The implementation should check if it understands all arguments, - and it should throw java.lang.IllegalArgumentException - if it doesn't.
        -
        Returns:
        -
        The object that will be accessed in FreeMarker templates. - The object can be of any type. FreeMarker will wrap the object so - that it is visible as an FTL variable. However, if the object - implements freemarker.template.TemplateModel, then it - will not be wrapped, as it is already an FTL variable.
        -
        Throws:
        -
        Exception
        -
        -
      • -
      - - - -
        -
      • -

        load

        -
        protected abstract Object load(Engine eng,
        -                               List args,
        -                               org.apache.tools.ant.Task task)
        -                        throws Exception
        -
        Override this method to implement your Ant related data loader.
        -
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/AntProjectDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/AntProjectDataLoader.html deleted file mode 100644 index eb416a8..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/AntProjectDataLoader.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - -AntProjectDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class AntProjectDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class AntProjectDataLoader
    -extends AntDataLoader
    -
    Returns the Ant project object.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AntProjectDataLoader

        -
        public AntProjectDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        load

        -
        public Object load(Engine eng,
        -                   List args,
        -                   org.apache.tools.ant.Task task)
        -
        Description copied from class: AntDataLoader
        -
        Override this method to implement your Ant related data loader.
        -
        -
        Specified by:
        -
        load in class AntDataLoader
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/AntPropertiesDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/AntPropertiesDataLoader.html deleted file mode 100644 index 0d358d8..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/AntPropertiesDataLoader.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - -AntPropertiesDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class AntPropertiesDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class AntPropertiesDataLoader
    -extends AntDataLoader
    -
    Returns the Map of all Ant properties, or of the selected Ant properties.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/AntPropertyDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/AntPropertyDataLoader.html deleted file mode 100644 index cc47214..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/AntPropertyDataLoader.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - -AntPropertyDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class AntPropertyDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class AntPropertyDataLoader
    -extends AntDataLoader
    -
    Returns the value of an Ant property.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/AntTaskDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/AntTaskDataLoader.html deleted file mode 100644 index a98dcda..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/AntTaskDataLoader.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - -AntTaskDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class AntTaskDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class AntTaskDataLoader
    -extends AntDataLoader
    -
    Returns the FMPP Ant task object.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AntTaskDataLoader

        -
        public AntTaskDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        load

        -
        public Object load(Engine eng,
        -                   List args,
        -                   org.apache.tools.ant.Task task)
        -
        Description copied from class: AntDataLoader
        -
        Override this method to implement your Ant related data loader.
        -
        -
        Specified by:
        -
        load in class AntDataLoader
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/CsvDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/CsvDataLoader.html deleted file mode 100644 index 3fbc9d7..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/CsvDataLoader.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - -CsvDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class CsvDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class CsvDataLoader
    -extends FileDataLoader
    -
    Data loaders that loads CSV (Column Separated Values) files or other files of - similar formats (as tab divided text), and returns a - fmpp.models.CsvSequence object. - -

    The format of the directive is: - csv(filename, option), - where option is a hash of options, such as - {encoding:'ISO-8859-3', separator:','}. - For the complete list of options please see the parameters of - CsvSequence constructors. - -

    Note: This class should be an - AbstractTextDataLoader subclass, but it is not that - for backward compatibility.

    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/EvalDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/EvalDataLoader.html deleted file mode 100644 index 0c9306d..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/EvalDataLoader.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - -EvalDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class EvalDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class EvalDataLoader
    -extends Object
    -implements DataLoader
    -
    Evaluates a BeanShell expression (looks like as Java). - The scrip has access to the Engine object by the - engine variable.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        EvalDataLoader

        -
        public EvalDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        load

        -
        public Object load(Engine e,
        -                   List args)
        -            throws Exception
        -
        -
        Specified by:
        -
        load in interface DataLoader
        -
        args - Arguments that the caller specifies for this directive call. - Not null. - The implementation should check if it understands all arguments, - and it should throw java.lang.IllegalArgumentException - if it doesn't.
        -
        Returns:
        -
        The object that will be accessed in FreeMarker templates. - The object can be of any type. FreeMarker will wrap the object so - that it is visible as an FTL variable. However, if the object - implements freemarker.template.TemplateModel, then it - will not be wrapped, as it is already an FTL variable.
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/FileDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/FileDataLoader.html deleted file mode 100644 index e6c031b..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/FileDataLoader.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - -FileDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class FileDataLoader

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        engine

        -
        protected Engine engine
        -
      • -
      - - - -
        -
      • -

        args

        -
        protected List args
        -
      • -
      - - - -
        -
      • -

        dataFile

        -
        protected File dataFile
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        FileDataLoader

        -
        public FileDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        load

        -
        public Object load(Engine engine,
        -                   List args)
        -            throws Exception
        -
        -
        Specified by:
        -
        load in interface DataLoader
        -
        args - Arguments that the caller specifies for this directive call. - Not null. - The implementation should check if it understands all arguments, - and it should throw java.lang.IllegalArgumentException - if it doesn't.
        -
        Returns:
        -
        The object that will be accessed in FreeMarker templates. - The object can be of any type. FreeMarker will wrap the object so - that it is visible as an FTL variable. However, if the object - implements freemarker.template.TemplateModel, then it - will not be wrapped, as it is already an FTL variable.
        -
        Throws:
        -
        Exception
        -
        -
      • -
      - - - -
        -
      • -

        load

        -
        protected abstract Object load(InputStream data)
        -                        throws Exception
        -
        FileDataLoader subclasess override this method to parse - the file.
        -
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/HtmlUtilsDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/HtmlUtilsDataLoader.html deleted file mode 100644 index 011632d..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/HtmlUtilsDataLoader.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - -HtmlUtilsDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class HtmlUtilsDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class HtmlUtilsDataLoader
    -extends Object
    -implements DataLoader
    -
    Returns a hash that contains useful directives for HTML generation. -
      -
    • img: Same as HTML img, but automatically calculates the width and/or - height attributes if they are missing. -
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        HtmlUtilsDataLoader

        -
        public HtmlUtilsDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        load

        -
        public Object load(Engine e,
        -                   List args)
        -            throws Exception
        -
        -
        Specified by:
        -
        load in interface DataLoader
        -
        args - Arguments that the caller specifies for this directive call. - Not null. - The implementation should check if it understands all arguments, - and it should throw java.lang.IllegalArgumentException - if it doesn't.
        -
        Returns:
        -
        The object that will be accessed in FreeMarker templates. - The object can be of any type. FreeMarker will wrap the object so - that it is visible as an FTL variable. However, if the object - implements freemarker.template.TemplateModel, then it - will not be wrapped, as it is already an FTL variable.
        -
        Throws:
        -
        Exception
        -
        -
      • -
      - - - -
        -
      • -

        setXHtml

        -
        public void setXHtml(boolean xHtml)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/JSONDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/JSONDataLoader.html deleted file mode 100644 index 9ed5050..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/JSONDataLoader.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - -JSONDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class JSONDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class JSONDataLoader
    -extends FileDataLoader
    -
    Creates a JSONNode based on a JSON file. The JSON file must contain a single JSON value on the top level, - such as JSON object (like { "a": 1, "b": 2 }), an array, or even just a string, number, boolean or - null.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/NowDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/NowDataLoader.html deleted file mode 100644 index 39aaa9c..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/NowDataLoader.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - -NowDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class NowDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class NowDataLoader
    -extends Object
    -implements DataLoader
    -
    Data loader that produces string from the current date. - It is maybe better to use pp.sessionStart or - pp.now instead of this data loader. - -

    The format of the directive is: - now(options), where options is a hash as: - {pattern:"yyyy-MM-dd HH:mm:ss"} or - {date:short, time:long, zone:"GMT+0"}.

    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        NowDataLoader

        -
        public NowDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        load

        -
        public Object load(Engine engine,
        -                   List args)
        -            throws Exception
        -
        -
        Specified by:
        -
        load in interface DataLoader
        -
        args - Arguments that the caller specifies for this directive call. - Not null. - The implementation should check if it understands all arguments, - and it should throw java.lang.IllegalArgumentException - if it doesn't.
        -
        Returns:
        -
        The object that will be accessed in FreeMarker templates. - The object can be of any type. FreeMarker will wrap the object so - that it is visible as an FTL variable. However, if the object - implements freemarker.template.TemplateModel, then it - will not be wrapped, as it is already an FTL variable.
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/PropertiesDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/PropertiesDataLoader.html deleted file mode 100644 index c9e7338..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/PropertiesDataLoader.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - -PropertiesDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class PropertiesDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class PropertiesDataLoader
    -extends FileDataLoader
    -
    Returns a Map based on a Java properties file.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/SlicedTextDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/SlicedTextDataLoader.html deleted file mode 100644 index 158ffd8..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/SlicedTextDataLoader.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - -SlicedTextDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class SlicedTextDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class SlicedTextDataLoader
    -extends AbstractTextDataLoader
    -
    Returns a sequence of strings based on a plain text file, where the specified - symbol is used as separator. For more information please read the FMPP - Manual.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        SlicedTextDataLoader

        -
        public SlicedTextDataLoader()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - - - - - -
        -
      • -

        postProcessItems

        -
        protected List postProcessItems(List items)
        -
        Override this if you want to post-process the items.
        -
        -
        Parameters:
        -
        items - the list of String-s that the standard - slicedText data loader would return.
        -
        Returns:
        -
        the final return value of the custom data loader.
        -
        -
      • -
      - - - -
        -
      • -

        parseExtraArguments

        -
        protected final String parseExtraArguments(List args)
        -                                    throws Exception
        -
        Description copied from class: AbstractTextDataLoader
        -
        Parses the argument list, except the 1st (file name) argument.
        -
        -
        Specified by:
        -
        parseExtraArguments in class AbstractTextDataLoader
        -
        Parameters:
        -
        args - the arguments (all of them, starting from the 1st)
        -
        Returns:
        -
        the encoding given with the extra arguments, or - null if the encoding was not specified. In the latest - case the encoding will default to the source encoding engine - parameter (the sourceEncoding setting).
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/TddDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/TddDataLoader.html deleted file mode 100644 index 99028fb..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/TddDataLoader.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - -TddDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class TddDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class TddDataLoader
    -extends FileDataLoader
    -
    Creates a Map based on a TDD file. The TDD file must contain a hash - or a hash addition such as:
    - foo:123, bar:456, properties(baaz.properties)
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/TddSequenceDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/TddSequenceDataLoader.html deleted file mode 100644 index 2e8c147..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/TddSequenceDataLoader.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - -TddSequenceDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class TddSequenceDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class TddSequenceDataLoader
    -extends FileDataLoader
    -
    Creates a List based on a TDD file. The TDD file must contain a - TDD sequence such as:
    - "Big Joe", 1, [11, 22, 33], properties(foo.properties)
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/TextDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/TextDataLoader.html deleted file mode 100644 index 51dcefb..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/TextDataLoader.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - -TextDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class TextDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class TextDataLoader
    -extends FileDataLoader
    -
    Returns a string based on a plain text file. - -

    Note: This class should be an - AbstractTextDataLoader subclass, but it is not that - for backward compatibility.

    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/XmlDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/XmlDataLoader.html deleted file mode 100644 index 10e2a6b..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/XmlDataLoader.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - -XmlDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class XmlDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    -
    public class XmlDataLoader
    -extends Object
    -implements DataLoader
    -
    Returns a variable that exposes the content of an XML file.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/XmlInfosetDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/XmlInfosetDataLoader.html deleted file mode 100644 index 128e54c..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/XmlInfosetDataLoader.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - -XmlInfosetDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.dataloaders
-

Class XmlInfosetDataLoader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    DataLoader
    -
    -
    -
    Deprecated.  -
    Use XmlDataLoader instead.
    -
    -
    -
    public class XmlInfosetDataLoader
    -extends FileDataLoader
    -
    Returns a variable that exposes the content of an XML file based on - the W3C XML infoset approach.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/AbstractTextDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/AbstractTextDataLoader.html deleted file mode 100644 index 7c85429..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/AbstractTextDataLoader.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.AbstractTextDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.AbstractTextDataLoader

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/AntDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/AntDataLoader.html deleted file mode 100644 index 58969de..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/AntDataLoader.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.AntDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.AntDataLoader

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/AntProjectDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/AntProjectDataLoader.html deleted file mode 100644 index ff25740..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/AntProjectDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.AntProjectDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.AntProjectDataLoader

-
-
No usage of fmpp.dataloaders.AntProjectDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/AntPropertiesDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/AntPropertiesDataLoader.html deleted file mode 100644 index 28e5a6f..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/AntPropertiesDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.AntPropertiesDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.AntPropertiesDataLoader

-
-
No usage of fmpp.dataloaders.AntPropertiesDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/AntPropertyDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/AntPropertyDataLoader.html deleted file mode 100644 index c4fbeda..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/AntPropertyDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.AntPropertyDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.AntPropertyDataLoader

-
-
No usage of fmpp.dataloaders.AntPropertyDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/AntTaskDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/AntTaskDataLoader.html deleted file mode 100644 index ce59a8e..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/AntTaskDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.AntTaskDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.AntTaskDataLoader

-
-
No usage of fmpp.dataloaders.AntTaskDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/CsvDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/CsvDataLoader.html deleted file mode 100644 index c1f2a79..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/CsvDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.CsvDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.CsvDataLoader

-
-
No usage of fmpp.dataloaders.CsvDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/EvalDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/EvalDataLoader.html deleted file mode 100644 index 05bb636..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/EvalDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.EvalDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.EvalDataLoader

-
-
No usage of fmpp.dataloaders.EvalDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/FileDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/FileDataLoader.html deleted file mode 100644 index c8cbe76..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/FileDataLoader.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.FileDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.FileDataLoader

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/HtmlUtilsDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/HtmlUtilsDataLoader.html deleted file mode 100644 index 3f6a616..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/HtmlUtilsDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.HtmlUtilsDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.HtmlUtilsDataLoader

-
-
No usage of fmpp.dataloaders.HtmlUtilsDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/JSONDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/JSONDataLoader.html deleted file mode 100644 index 296d1e4..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/JSONDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.JSONDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.JSONDataLoader

-
-
No usage of fmpp.dataloaders.JSONDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/NowDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/NowDataLoader.html deleted file mode 100644 index e6da49d..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/NowDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.NowDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.NowDataLoader

-
-
No usage of fmpp.dataloaders.NowDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/PropertiesDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/PropertiesDataLoader.html deleted file mode 100644 index 6210e1a..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/PropertiesDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.PropertiesDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.PropertiesDataLoader

-
-
No usage of fmpp.dataloaders.PropertiesDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/SlicedTextDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/SlicedTextDataLoader.html deleted file mode 100644 index b28bd1d..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/SlicedTextDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.SlicedTextDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.SlicedTextDataLoader

-
-
No usage of fmpp.dataloaders.SlicedTextDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/TddDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/TddDataLoader.html deleted file mode 100644 index bc698c7..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/TddDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.TddDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.TddDataLoader

-
-
No usage of fmpp.dataloaders.TddDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/TddSequenceDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/TddSequenceDataLoader.html deleted file mode 100644 index 2b73bb7..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/TddSequenceDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.TddSequenceDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.TddSequenceDataLoader

-
-
No usage of fmpp.dataloaders.TddSequenceDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/TextDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/TextDataLoader.html deleted file mode 100644 index 32da5c2..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/TextDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.TextDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.TextDataLoader

-
-
No usage of fmpp.dataloaders.TextDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/XmlDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/XmlDataLoader.html deleted file mode 100644 index 8f43510..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/XmlDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.XmlDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.XmlDataLoader

-
-
No usage of fmpp.dataloaders.XmlDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/class-use/XmlInfosetDataLoader.html b/fmpp/docs/api/fmpp/dataloaders/class-use/XmlInfosetDataLoader.html deleted file mode 100644 index cb72dff..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/class-use/XmlInfosetDataLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.dataloaders.XmlInfosetDataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.dataloaders.XmlInfosetDataLoader

-
-
No usage of fmpp.dataloaders.XmlInfosetDataLoader
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/package-frame.html b/fmpp/docs/api/fmpp/dataloaders/package-frame.html deleted file mode 100644 index 02e678c..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/package-frame.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -fmpp.dataloaders (FMPP 0.9.15 API) - - - - - -

fmpp.dataloaders

- - - diff --git a/fmpp/docs/api/fmpp/dataloaders/package-summary.html b/fmpp/docs/api/fmpp/dataloaders/package-summary.html deleted file mode 100644 index a24fdd5..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/package-summary.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - -fmpp.dataloaders (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp.dataloaders

-
-
fmpp.DataLoader implementations.
-
-

See: Description

-
-
- - - - -

Package fmpp.dataloaders Description

-

fmpp.DataLoader implementations.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/package-tree.html b/fmpp/docs/api/fmpp/dataloaders/package-tree.html deleted file mode 100644 index deb1987..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/package-tree.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - -fmpp.dataloaders Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp.dataloaders

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/dataloaders/package-use.html b/fmpp/docs/api/fmpp/dataloaders/package-use.html deleted file mode 100644 index f9f661a..0000000 --- a/fmpp/docs/api/fmpp/dataloaders/package-use.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - -Uses of Package fmpp.dataloaders (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp.dataloaders

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/BshLocalDataBuilder.html b/fmpp/docs/api/fmpp/localdatabuilders/BshLocalDataBuilder.html deleted file mode 100644 index eaaafbb..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/BshLocalDataBuilder.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - -BshLocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.localdatabuilders
-

Class BshLocalDataBuilder

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    LocalDataBuilder
    -
    -
    -
    -
    public class BshLocalDataBuilder
    -extends Object
    -implements LocalDataBuilder
    -
    Deduces the file name of a BeanShell scrip file from the source file - name, and executes that script to create local data. - -

    The script must return a java.util.Map, which stores the - variables that will be added to the local data. - -

    The following variables are accessible for the scripts: -

    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        BshLocalDataBuilder

        -
        public BshLocalDataBuilder()
        -
        Creates new instance.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - - - - - - - - - -
        -
      • -

        getEncoding

        -
        public String getEncoding()
        -
      • -
      - - - -
        -
      • -

        setEncoding

        -
        public void setEncoding(String encoding)
        -
        Sets the encoding of the script files. If it is null then - the value of the sourceEncoding setting will be used.
        -
      • -
      - - - -
        -
      • -

        getEnding

        -
        public String getEnding()
        -
      • -
      - - - -
        -
      • -

        setEnding

        -
        public void setEnding(String ending)
        -
        Sets the string appended at the end of the source file name. - Can't be 0 length string. It defaults to ".bsh".
        -
      • -
      - - - -
        -
      • -

        getIgnoreMissing

        -
        public boolean getIgnoreMissing()
        -
        Set if it will be ignored no script file found for the source file, - rather than throwing an exception. Defaults to false.
        -
      • -
      - - - -
        -
      • -

        setIgnoreMissing

        -
        public void setIgnoreMissing(boolean ignoreMissing)
        -
      • -
      - - - -
        -
      • -

        getRemoveExtension

        -
        public boolean getRemoveExtension()
        -
      • -
      - - - -
        -
      • -

        setRemoveExtension

        -
        public void setRemoveExtension(boolean removeExtension)
        -
        Sets if the extension from the source file name should be removed before - appending the ending. The extension is the part after the - last dot of the file name. The dot itself is also removed. - Defaults to false.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/CachingLocalDataBuilder.html b/fmpp/docs/api/fmpp/localdatabuilders/CachingLocalDataBuilder.html deleted file mode 100644 index 9259f29..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/CachingLocalDataBuilder.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - -CachingLocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.localdatabuilders
-

Class CachingLocalDataBuilder

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CachingLocalDataBuilder

        -
        public CachingLocalDataBuilder()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        build

        -
        public final Map build(Engine eng,
        -                       TemplateEnvironment env)
        -                throws Exception
        -
        Takes care of caching, and calls build(Engine) if no cached - result is available.
        -
        -
        Specified by:
        -
        build in interface LocalDataBuilder
        -
        Returns:
        -
        the variables to add to the local data. Can be - null. The returned map will not be modified - (although technically, badly behaved 3rd party code can modify - the values soted in the map...).
        -
        Throws:
        -
        Exception
        -
        -
      • -
      - - - -
        -
      • -

        notifyProgressEvent

        -
        public void notifyProgressEvent(Engine engine,
        -                                int event,
        -                                File src,
        -                                int pMode,
        -                                Throwable error,
        -                                Object param)
        -                         throws Exception
        -
        Discards the cached result on - ProgressListener.EVENT_END_PROCESSING_SESSION. - -

        The TemplateEnvironment is not passed, to ensure that the - returned Map doesn't depend on the source file the builder - is used for, so reusing the result for other source files is safe.

        -
        -
        Specified by:
        -
        notifyProgressEvent in interface ProgressListener
        -
        Parameters:
        -
        engine - The engine instance where the event has occurred.
        -
        event - The code of the event: an EVENT_... constant. - As new event types can be introduced with new FMPP versions (even if - it happens very seldom), a progress listener implementation should - survive events that it does not understand. That is, it must not stop - with an error, but it should silently ignore the event.
        -
        src - Depending on event the source file or null.
        -
        pMode - Depending on event the proccessing mode - (Engine.PMODE_... constant) or - Engine.PMODE_NONE. Note that new processing modes may - be added as FMPP evolvers, so values that are not known be the - progress listener should be handler nicely, and never cause error.
        -
        error - The error, or null if there was no error.
        -
        param - Extra information about the event. The class and meaning of - object depends on the concrete event: -
          -
        • For EVENT_WARNING it is a String that - describles the reason of warning. -
        -
        Throws:
        -
        Exception
        -
        -
      • -
      - - - -
        -
      • -

        build

        -
        protected abstract Map build(Engine eng)
        -                      throws Exception
        -
        Override this method in your local data builder class.
        -
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/MapLocalDataBuilder.html b/fmpp/docs/api/fmpp/localdatabuilders/MapLocalDataBuilder.html deleted file mode 100644 index 45610dd..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/MapLocalDataBuilder.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -MapLocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.localdatabuilders
-

Class MapLocalDataBuilder

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    LocalDataBuilder
    -
    -
    -
    -
    public class MapLocalDataBuilder
    -extends Object
    -implements LocalDataBuilder
    -
    Trivial local data builder that returns the Map passed to - its constructor.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        MapLocalDataBuilder

        -
        public MapLocalDataBuilder(Map map)
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        build

        -
        public Map build(Engine eng,
        -                 TemplateEnvironment env)
        -          throws Exception
        -
        Description copied from interface: LocalDataBuilder
        -
        Returns the variables that could be added to the local data.
        -
        -
        Specified by:
        -
        build in interface LocalDataBuilder
        -
        Returns:
        -
        the variables to add to the local data. Can be - null. The returned map will not be modified - (although technically, badly behaved 3rd party code can modify - the values soted in the map...).
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/TddHashLocalDataBuilder.html b/fmpp/docs/api/fmpp/localdatabuilders/TddHashLocalDataBuilder.html deleted file mode 100644 index 93bd39f..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/TddHashLocalDataBuilder.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - -TddHashLocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.localdatabuilders
-

Class TddHashLocalDataBuilder

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/class-use/BshLocalDataBuilder.html b/fmpp/docs/api/fmpp/localdatabuilders/class-use/BshLocalDataBuilder.html deleted file mode 100644 index 5f41e37..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/class-use/BshLocalDataBuilder.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - -Uses of Class fmpp.localdatabuilders.BshLocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.localdatabuilders.BshLocalDataBuilder

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/class-use/CachingLocalDataBuilder.html b/fmpp/docs/api/fmpp/localdatabuilders/class-use/CachingLocalDataBuilder.html deleted file mode 100644 index 67c2602..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/class-use/CachingLocalDataBuilder.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Class fmpp.localdatabuilders.CachingLocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.localdatabuilders.CachingLocalDataBuilder

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/class-use/MapLocalDataBuilder.html b/fmpp/docs/api/fmpp/localdatabuilders/class-use/MapLocalDataBuilder.html deleted file mode 100644 index 568bc94..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/class-use/MapLocalDataBuilder.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.localdatabuilders.MapLocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.localdatabuilders.MapLocalDataBuilder

-
-
No usage of fmpp.localdatabuilders.MapLocalDataBuilder
- - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/class-use/TddHashLocalDataBuilder.html b/fmpp/docs/api/fmpp/localdatabuilders/class-use/TddHashLocalDataBuilder.html deleted file mode 100644 index 1f0b094..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/class-use/TddHashLocalDataBuilder.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.localdatabuilders.TddHashLocalDataBuilder (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.localdatabuilders.TddHashLocalDataBuilder

-
-
No usage of fmpp.localdatabuilders.TddHashLocalDataBuilder
- - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/package-frame.html b/fmpp/docs/api/fmpp/localdatabuilders/package-frame.html deleted file mode 100644 index a63122b..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/package-frame.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - -fmpp.localdatabuilders (FMPP 0.9.15 API) - - - - - -

fmpp.localdatabuilders

- - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/package-summary.html b/fmpp/docs/api/fmpp/localdatabuilders/package-summary.html deleted file mode 100644 index 8b58b79..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/package-summary.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - -fmpp.localdatabuilders (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp.localdatabuilders

-
-
fmpp.LocalDataBuilder implementations.
-
-

See: Description

-
-
- - - - -

Package fmpp.localdatabuilders Description

-

fmpp.LocalDataBuilder implementations.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/package-tree.html b/fmpp/docs/api/fmpp/localdatabuilders/package-tree.html deleted file mode 100644 index 2e8a28b..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/package-tree.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - -fmpp.localdatabuilders Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp.localdatabuilders

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/localdatabuilders/package-use.html b/fmpp/docs/api/fmpp/localdatabuilders/package-use.html deleted file mode 100644 index fcd3a66..0000000 --- a/fmpp/docs/api/fmpp/localdatabuilders/package-use.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Package fmpp.localdatabuilders (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp.localdatabuilders

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/AddTransform.html b/fmpp/docs/api/fmpp/models/AddTransform.html deleted file mode 100644 index cf459e9..0000000 --- a/fmpp/docs/api/fmpp/models/AddTransform.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - -AddTransform (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class AddTransform

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/ClearTransform.html b/fmpp/docs/api/fmpp/models/ClearTransform.html deleted file mode 100644 index 650f189..0000000 --- a/fmpp/docs/api/fmpp/models/ClearTransform.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - -ClearTransform (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class ClearTransform

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/CopyWritableVariableMethod.html b/fmpp/docs/api/fmpp/models/CopyWritableVariableMethod.html deleted file mode 100644 index 015b7fe..0000000 --- a/fmpp/docs/api/fmpp/models/CopyWritableVariableMethod.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - -CopyWritableVariableMethod (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class CopyWritableVariableMethod

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/CsvSequence.html b/fmpp/docs/api/fmpp/models/CsvSequence.html deleted file mode 100644 index 958e6bb..0000000 --- a/fmpp/docs/api/fmpp/models/CsvSequence.html +++ /dev/null @@ -1,921 +0,0 @@ - - - - - - -CsvSequence (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class CsvSequence

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    TemplateHashModel, TemplateModel, TemplateSequenceModel
    -
    -
    -
    -
    public class CsvSequence
    -extends Object
    -implements TemplateSequenceModel, TemplateHashModel
    -
    Sequence variable implementation that wraps text of CSV or tab separated - values format, or any other format that is the same as CSV except that it - uses different column separator char. - -

    The sequence is the list of table rows, and each row is hash where you - can access the cells with the column name. The column names (headers) are - the values in the first row of cells in the CSV file. - -

    The values in the table will be always exposed as string variables, unless - you specify an other type in the header cell directly. This can be done - by using colon + a type identifier at the end of the header cell. The type - indetifier can be: n or number, b or - boolean, d or date, - t or time, dt or - dateTime, s or string. For example, if - the value of a header cell in the CSV file is "price:n", then the values of - the cell will be exposed as numberical variables, not string. - -

    CsvSequence is also a hash that contains one key: - headers. This is a sequence that stores the header names.

    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CsvSequence

        -
        public CsvSequence()
        -
        Creates a new instance.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - - - - - - - - - - - - - -
        -
      • -

        fixBoolean

        -
        protected String fixBoolean(String s)
        -
        Override this if you want to correct boolean values come from the file. - The default implementation removes leading and trailing white-space, - converts to lowe case, and reaplaces the alternative boolean values (if - set) with "true" and "false".
        -
        -
        Parameters:
        -
        s - the raw column value
        -
        Returns:
        -
        String fixed value
        -
        -
      • -
      - - - -
        -
      • -

        fixNumber

        -
        protected String fixNumber(String s)
        -
        Override this if you want to correct numerical values come from the - file. - The default implementation removes leading and trailing white-space, - removes grouping symbols (if set) and replaces decimal separator (if set) - with dot.
        -
        -
        Parameters:
        -
        s - the raw column value
        -
        Returns:
        -
        String fixed value
        -
        -
      • -
      - - - - - - - - - - - -
        -
      • -

        setExternalHeaderRow

        -
        public void setExternalHeaderRow(String[] externalHeaderRow)
        -
        If it is not null, then it is used as the header row - instead of the first row of the CSV file. Each value in the array - corresponds to a header row cell.
        -
      • -
      - - - -
        -
      • -

        getExternalHeaderRow

        -
        public String[] getExternalHeaderRow()
        -
      • -
      - - - -
        -
      • -

        setHasHeaderRow

        -
        public void setHasHeaderRow(boolean hasHeaderRow)
        -
        Specifies if the file contains header row or not. - If it is false, then the externalHeaderRow - property must not be null when calling - load(Reader). Defaults to true.
        -
      • -
      - - - -
        -
      • -

        getHasHeaderRow

        -
        public boolean getHasHeaderRow()
        -
      • -
      - - - -
        -
      • -

        setNormalizeHeaders

        -
        public void setNormalizeHeaders(boolean normalizeHeaders)
        -
        Specifies if the header names coming from the file will be normalized - or should be left as is. Normalization means: -
          -
        1. Remove the part between the first "(" and last - ")", before the header is parsed for column type - identifier (like ":n"). -
        2. After the type identifier was extracted and removed (if there was - any), the cell value is trimmed. (Trimming happens even if - header normalization is off.) -
        3. Then it's converted to lower case. -
        4. Then the following characters are replaced with "_": - space, comma, semicolon, colon.
        5. Then all "__" - and "___" and so on is replaced with a single - "_". -
        - - For example, "Price, old (category: A, B, F): n" will be - normailzed to "price_old", and the type identifier will be - n.
        -
      • -
      - - - -
        -
      • -

        getNormalizeHeaders

        -
        public boolean getNormalizeHeaders()
        -
      • -
      - - - -
        -
      • -

        setTrimCells

        -
        public void setTrimCells(boolean trimCells)
        -
        Specifies if all cells will be trimmed. - Trimming means the removal of all leading and trailing white-space. - Defaults to false.
        -
      • -
      - - - -
        -
      • -

        getTrimCells

        -
        public boolean getTrimCells()
        -
      • -
      - - - -
        -
      • -

        setEmptyValues

        -
        public void setEmptyValues(String[] emptyValues)
        -
        Specifies the list of cell values that will be replaced with an empty - (0 length) string. Typical such values are "-" or - "N/A". The comparison is case-sensitice. When - getTrimCells() is true, the comparison occurs - after the trimming. The replacement occurs before type conversions (for - typed columns). Header values will not be affected by this property. - Defaults to null, i.e., no replacement.
        -
      • -
      - - - -
        -
      • -

        getEmptyValues

        -
        public String[] getEmptyValues()
        -
      • -
      - - - -
        -
      • -

        getAltFalse

        -
        public String getAltFalse()
        -
      • -
      - - - -
        -
      • -

        setAltFalse

        -
        public void setAltFalse(String altFalse)
        -
        Alternative word used to indicate boolean false in the CSV file. - Use null if you don't need alternative value. - Defaults to null.
        -
      • -
      - - - -
        -
      • -

        getAltTrue

        -
        public String getAltTrue()
        -
      • -
      - - - -
        -
      • -

        setAltTrue

        -
        public void setAltTrue(String altTrue)
        -
        Alternative word used to indicate boolean true in the CSV file. - Use null if you don't need alternative value. - Defaults to null.
        -
      • -
      - - - -
        -
      • -

        getDateFormatPattern

        -
        public String getDateFormatPattern()
        -
      • -
      - - - - - - - -
        -
      • -

        getDateTimeFormatPattern

        -
        public String getDateTimeFormatPattern()
        -
      • -
      - - - - - - - -
        -
      • -

        getDecimalSeparator

        -
        public char getDecimalSeparator()
        -
      • -
      - - - -
        -
      • -

        setDecimalSeparator

        -
        public void setDecimalSeparator(char decimalSeparator)
        -
        Sets the alternative symbol used for the decimal dot in - the file for numbers. Note that dot will be always assumed as - decimal separator, except if groupingSeparator is set to dot.
        -
      • -
      - - - -
        -
      • -

        getGroupingSeparator

        -
        public char getGroupingSeparator()
        -
      • -
      - - - -
        -
      • -

        setGroupingSeparator

        -
        public void setGroupingSeparator(char groupingSeparator)
        -
        Set the grouping separator symbol used for grouping in the file - for numbers. Use 0 ('\0') if you don't use grouping. - Defaults to 0.
        -
      • -
      - - - -
        -
      • -

        getSeparator

        -
        public char getSeparator()
        -
      • -
      - - - -
        -
      • -

        setSeparator

        -
        public void setSeparator(char separator)
        -
        Separator char between cloumns. Defaults to semi-colon (;).
        -
      • -
      - - - -
        -
      • -

        getTimeFormatPattern

        -
        public String getTimeFormatPattern()
        -
      • -
      - - - - - - - -
        -
      • -

        getTimeZone

        -
        public TimeZone getTimeZone()
        -
      • -
      - - - -
        -
      • -

        setTimeZone

        -
        public void setTimeZone(TimeZone timeZone)
        -
        Sets the time zone used for parsing date/time/date-time that does not - specify a time zone explicitly. If null, the default time - zone of the computer is used.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/JSONArrayNode.html b/fmpp/docs/api/fmpp/models/JSONArrayNode.html deleted file mode 100644 index 7debfcd..0000000 --- a/fmpp/docs/api/fmpp/models/JSONArrayNode.html +++ /dev/null @@ -1,462 +0,0 @@ - - - - - - -JSONArrayNode (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class JSONArrayNode

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/JSONBooleanNode.html b/fmpp/docs/api/fmpp/models/JSONBooleanNode.html deleted file mode 100644 index 6880fb0..0000000 --- a/fmpp/docs/api/fmpp/models/JSONBooleanNode.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - -JSONBooleanNode (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class JSONBooleanNode

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/JSONNode.html b/fmpp/docs/api/fmpp/models/JSONNode.html deleted file mode 100644 index 7225454..0000000 --- a/fmpp/docs/api/fmpp/models/JSONNode.html +++ /dev/null @@ -1,466 +0,0 @@ - - - - - - -JSONNode (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class JSONNode

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/JSONNullNode.html b/fmpp/docs/api/fmpp/models/JSONNullNode.html deleted file mode 100644 index 873a06d..0000000 --- a/fmpp/docs/api/fmpp/models/JSONNullNode.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - -JSONNullNode (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class JSONNullNode

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/JSONNumberNode.html b/fmpp/docs/api/fmpp/models/JSONNumberNode.html deleted file mode 100644 index c024403..0000000 --- a/fmpp/docs/api/fmpp/models/JSONNumberNode.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - -JSONNumberNode (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class JSONNumberNode

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/JSONObjectNode.html b/fmpp/docs/api/fmpp/models/JSONObjectNode.html deleted file mode 100644 index 51582b5..0000000 --- a/fmpp/docs/api/fmpp/models/JSONObjectNode.html +++ /dev/null @@ -1,525 +0,0 @@ - - - - - - -JSONObjectNode (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class JSONObjectNode

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/JSONStringNode.html b/fmpp/docs/api/fmpp/models/JSONStringNode.html deleted file mode 100644 index 06503f4..0000000 --- a/fmpp/docs/api/fmpp/models/JSONStringNode.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - -JSONStringNode (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class JSONStringNode

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/NewWritableHashMethod.html b/fmpp/docs/api/fmpp/models/NewWritableHashMethod.html deleted file mode 100644 index ec6dbde..0000000 --- a/fmpp/docs/api/fmpp/models/NewWritableHashMethod.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - -NewWritableHashMethod (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class NewWritableHashMethod

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/NewWritableSequenceMethod.html b/fmpp/docs/api/fmpp/models/NewWritableSequenceMethod.html deleted file mode 100644 index ffe496c..0000000 --- a/fmpp/docs/api/fmpp/models/NewWritableSequenceMethod.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - -NewWritableSequenceMethod (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class NewWritableSequenceMethod

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/RemoveTransform.html b/fmpp/docs/api/fmpp/models/RemoveTransform.html deleted file mode 100644 index f60513f..0000000 --- a/fmpp/docs/api/fmpp/models/RemoveTransform.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - -RemoveTransform (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class RemoveTransform

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/SetTransform.html b/fmpp/docs/api/fmpp/models/SetTransform.html deleted file mode 100644 index b3aa6c5..0000000 --- a/fmpp/docs/api/fmpp/models/SetTransform.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - -SetTransform (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class SetTransform

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/StringArraySequence.html b/fmpp/docs/api/fmpp/models/StringArraySequence.html deleted file mode 100644 index c1d5896..0000000 --- a/fmpp/docs/api/fmpp/models/StringArraySequence.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - -StringArraySequence (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class StringArraySequence

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    TemplateModel, TemplateSequenceModel
    -
    -
    -
    -
    public class StringArraySequence
    -extends Object
    -implements TemplateSequenceModel
    -
    Sequence variable implementation that wraps a String[] with relatively low - resource utilization. Warning: it does not copy the wrapped array, so do - not modify that after the model was made!
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/TemplateModelArrayCollection.html b/fmpp/docs/api/fmpp/models/TemplateModelArrayCollection.html deleted file mode 100644 index 0524697..0000000 --- a/fmpp/docs/api/fmpp/models/TemplateModelArrayCollection.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - -TemplateModelArrayCollection (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class TemplateModelArrayCollection

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/TemplateModelListCollection.html b/fmpp/docs/api/fmpp/models/TemplateModelListCollection.html deleted file mode 100644 index 391dad8..0000000 --- a/fmpp/docs/api/fmpp/models/TemplateModelListCollection.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - -TemplateModelListCollection (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class TemplateModelListCollection

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/TemplateModelListSequence.html b/fmpp/docs/api/fmpp/models/TemplateModelListSequence.html deleted file mode 100644 index c634603..0000000 --- a/fmpp/docs/api/fmpp/models/TemplateModelListSequence.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - -TemplateModelListSequence (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class TemplateModelListSequence

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    TemplateModel, TemplateSequenceModel
    -
    -
    -
    -
    public class TemplateModelListSequence
    -extends Object
    -implements TemplateSequenceModel
    -
    Sequence that wraps a java.util.List of already wrapped objects - directly, with minimal resource usage. Warning! It does not copy the original - list.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/TemplateModelUtils.html b/fmpp/docs/api/fmpp/models/TemplateModelUtils.html deleted file mode 100644 index 1093f48..0000000 --- a/fmpp/docs/api/fmpp/models/TemplateModelUtils.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - -TemplateModelUtils (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class TemplateModelUtils

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/WritableHash.html b/fmpp/docs/api/fmpp/models/WritableHash.html deleted file mode 100644 index 807c362..0000000 --- a/fmpp/docs/api/fmpp/models/WritableHash.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - -WritableHash (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class WritableHash

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/WritableSequence.html b/fmpp/docs/api/fmpp/models/WritableSequence.html deleted file mode 100644 index edadbc6..0000000 --- a/fmpp/docs/api/fmpp/models/WritableSequence.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - -WritableSequence (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.models
-

Class WritableSequence

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/AddTransform.html b/fmpp/docs/api/fmpp/models/class-use/AddTransform.html deleted file mode 100644 index dd989a5..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/AddTransform.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.AddTransform (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.AddTransform

-
-
No usage of fmpp.models.AddTransform
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/ClearTransform.html b/fmpp/docs/api/fmpp/models/class-use/ClearTransform.html deleted file mode 100644 index 2fc523f..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/ClearTransform.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.ClearTransform (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.ClearTransform

-
-
No usage of fmpp.models.ClearTransform
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/CopyWritableVariableMethod.html b/fmpp/docs/api/fmpp/models/class-use/CopyWritableVariableMethod.html deleted file mode 100644 index 9752381..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/CopyWritableVariableMethod.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.CopyWritableVariableMethod (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.CopyWritableVariableMethod

-
-
No usage of fmpp.models.CopyWritableVariableMethod
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/CsvSequence.html b/fmpp/docs/api/fmpp/models/class-use/CsvSequence.html deleted file mode 100644 index 36bbebd..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/CsvSequence.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.CsvSequence (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.CsvSequence

-
-
No usage of fmpp.models.CsvSequence
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/JSONArrayNode.html b/fmpp/docs/api/fmpp/models/class-use/JSONArrayNode.html deleted file mode 100644 index dd9c449..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/JSONArrayNode.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.JSONArrayNode (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.JSONArrayNode

-
-
No usage of fmpp.models.JSONArrayNode
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/JSONBooleanNode.html b/fmpp/docs/api/fmpp/models/class-use/JSONBooleanNode.html deleted file mode 100644 index 58dfeee..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/JSONBooleanNode.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.JSONBooleanNode (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.JSONBooleanNode

-
-
No usage of fmpp.models.JSONBooleanNode
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/JSONNode.html b/fmpp/docs/api/fmpp/models/class-use/JSONNode.html deleted file mode 100644 index 9985751..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/JSONNode.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - -Uses of Class fmpp.models.JSONNode (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.JSONNode

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/JSONNullNode.html b/fmpp/docs/api/fmpp/models/class-use/JSONNullNode.html deleted file mode 100644 index f9fe53d..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/JSONNullNode.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.JSONNullNode (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.JSONNullNode

-
-
No usage of fmpp.models.JSONNullNode
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/JSONNumberNode.html b/fmpp/docs/api/fmpp/models/class-use/JSONNumberNode.html deleted file mode 100644 index cb6f6fd..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/JSONNumberNode.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.JSONNumberNode (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.JSONNumberNode

-
-
No usage of fmpp.models.JSONNumberNode
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/JSONObjectNode.html b/fmpp/docs/api/fmpp/models/class-use/JSONObjectNode.html deleted file mode 100644 index 20f78a8..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/JSONObjectNode.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.JSONObjectNode (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.JSONObjectNode

-
-
No usage of fmpp.models.JSONObjectNode
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/JSONStringNode.html b/fmpp/docs/api/fmpp/models/class-use/JSONStringNode.html deleted file mode 100644 index 66c0dc8..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/JSONStringNode.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.JSONStringNode (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.JSONStringNode

-
-
No usage of fmpp.models.JSONStringNode
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/NewWritableHashMethod.html b/fmpp/docs/api/fmpp/models/class-use/NewWritableHashMethod.html deleted file mode 100644 index b89f883..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/NewWritableHashMethod.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.NewWritableHashMethod (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.NewWritableHashMethod

-
-
No usage of fmpp.models.NewWritableHashMethod
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/NewWritableSequenceMethod.html b/fmpp/docs/api/fmpp/models/class-use/NewWritableSequenceMethod.html deleted file mode 100644 index 81c1099..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/NewWritableSequenceMethod.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.NewWritableSequenceMethod (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.NewWritableSequenceMethod

-
-
No usage of fmpp.models.NewWritableSequenceMethod
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/RemoveTransform.html b/fmpp/docs/api/fmpp/models/class-use/RemoveTransform.html deleted file mode 100644 index 85adc8c..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/RemoveTransform.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.RemoveTransform (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.RemoveTransform

-
-
No usage of fmpp.models.RemoveTransform
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/SetTransform.html b/fmpp/docs/api/fmpp/models/class-use/SetTransform.html deleted file mode 100644 index 63ea66d..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/SetTransform.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.SetTransform (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.SetTransform

-
-
No usage of fmpp.models.SetTransform
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/StringArraySequence.html b/fmpp/docs/api/fmpp/models/class-use/StringArraySequence.html deleted file mode 100644 index d39fd4a..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/StringArraySequence.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.StringArraySequence (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.StringArraySequence

-
-
No usage of fmpp.models.StringArraySequence
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/TemplateModelArrayCollection.html b/fmpp/docs/api/fmpp/models/class-use/TemplateModelArrayCollection.html deleted file mode 100644 index 4b2a324..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/TemplateModelArrayCollection.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.TemplateModelArrayCollection (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.TemplateModelArrayCollection

-
-
No usage of fmpp.models.TemplateModelArrayCollection
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/TemplateModelListCollection.html b/fmpp/docs/api/fmpp/models/class-use/TemplateModelListCollection.html deleted file mode 100644 index c896f3f..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/TemplateModelListCollection.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.TemplateModelListCollection (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.TemplateModelListCollection

-
-
No usage of fmpp.models.TemplateModelListCollection
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/TemplateModelListSequence.html b/fmpp/docs/api/fmpp/models/class-use/TemplateModelListSequence.html deleted file mode 100644 index b42dffb..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/TemplateModelListSequence.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.TemplateModelListSequence (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.TemplateModelListSequence

-
-
No usage of fmpp.models.TemplateModelListSequence
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/TemplateModelUtils.html b/fmpp/docs/api/fmpp/models/class-use/TemplateModelUtils.html deleted file mode 100644 index 95a8937..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/TemplateModelUtils.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Uses of Class fmpp.models.TemplateModelUtils (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.TemplateModelUtils

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/WritableHash.html b/fmpp/docs/api/fmpp/models/class-use/WritableHash.html deleted file mode 100644 index 60e07b0..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/WritableHash.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.WritableHash (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.WritableHash

-
-
No usage of fmpp.models.WritableHash
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/class-use/WritableSequence.html b/fmpp/docs/api/fmpp/models/class-use/WritableSequence.html deleted file mode 100644 index 0450767..0000000 --- a/fmpp/docs/api/fmpp/models/class-use/WritableSequence.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.models.WritableSequence (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.models.WritableSequence

-
-
No usage of fmpp.models.WritableSequence
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/package-frame.html b/fmpp/docs/api/fmpp/models/package-frame.html deleted file mode 100644 index 6688f0b..0000000 --- a/fmpp/docs/api/fmpp/models/package-frame.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -fmpp.models (FMPP 0.9.15 API) - - - - - -

fmpp.models

- - - diff --git a/fmpp/docs/api/fmpp/models/package-summary.html b/fmpp/docs/api/fmpp/models/package-summary.html deleted file mode 100644 index d465eea..0000000 --- a/fmpp/docs/api/fmpp/models/package-summary.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - -fmpp.models (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp.models

-
-
freemarker.template.TemplateModel implementations.
-
-

See: Description

-
-
- - - - -

Package fmpp.models Description

-

freemarker.template.TemplateModel implementations.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/package-tree.html b/fmpp/docs/api/fmpp/models/package-tree.html deleted file mode 100644 index 3662f4c..0000000 --- a/fmpp/docs/api/fmpp/models/package-tree.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - -fmpp.models Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp.models

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/models/package-use.html b/fmpp/docs/api/fmpp/models/package-use.html deleted file mode 100644 index b61c828..0000000 --- a/fmpp/docs/api/fmpp/models/package-use.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - -Uses of Package fmpp.models (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp.models

-
-
-
    -
  • - - - - - - - - - - - - -
    Packages that use fmpp.models 
    PackageDescription
    fmpp.models -
    freemarker.template.TemplateModel implementations.
    -
    -
  • -
  • - - - - - - - - - - - - - - - -
    Classes in fmpp.models used by fmpp.models 
    Class and Description
    JSONNode -
    Node in a hierarchy of JSON values.
    -
    TemplateModelUtils -
    Constains utility methods for transform and method variable implementation.
    -
    -
  • -
-
- - - - - - diff --git a/fmpp/docs/api/fmpp/package-frame.html b/fmpp/docs/api/fmpp/package-frame.html deleted file mode 100644 index bcb4047..0000000 --- a/fmpp/docs/api/fmpp/package-frame.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -fmpp (FMPP 0.9.15 API) - - - - - -

fmpp

- - - diff --git a/fmpp/docs/api/fmpp/package-summary.html b/fmpp/docs/api/fmpp/package-summary.html deleted file mode 100644 index b26dcbc..0000000 --- a/fmpp/docs/api/fmpp/package-summary.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - -fmpp (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp

-
-
The very core, the foundation of FMPP.
-
-

See: Description

-
-
-
    -
  • - - - - - - - - - - - - - - - - - - - - -
    Interface Summary 
    InterfaceDescription
    LocalDataBuilder -
    Contains callback to build the local data for a file processing.
    -
    ProgressListener -
    Interface to monitor the events of an Engine.
    -
    TemplateDataModelBuilderDeprecated -
    Use LocalDataBuilder instead.
    -
    -
  • -
  • - - - - - - - - - - - - - - - - - - - - -
    Class Summary 
    ClassDescription
    Engine -
    The bare-bone, low-level preprocessor engine.
    -
    TemplateEnvironment -
    The runtime FMPP environment of an executing template.
    -
    XmlRenderingConfiguration -
    Stores options that describe when and how to process an XML file in - "renderXml" processing mode.
    -
    -
  • -
  • - - - - - - - - - - - - - - - - -
    Exception Summary 
    ExceptionDescription
    DataModelBuildingException -
    Error while trying to build the data-model for a template.
    -
    ProcessingException -
    Error while performing the processing session.
    -
    -
  • -
- - - -

Package fmpp Description

-

The very core, the foundation of FMPP.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/package-tree.html b/fmpp/docs/api/fmpp/package-tree.html deleted file mode 100644 index e7192bd..0000000 --- a/fmpp/docs/api/fmpp/package-tree.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -fmpp Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp

-Package Hierarchies: - -
-
-

Class Hierarchy

- -

Interface Hierarchy

- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/package-use.html b/fmpp/docs/api/fmpp/package-use.html deleted file mode 100644 index d2b0c3c..0000000 --- a/fmpp/docs/api/fmpp/package-use.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - -Uses of Package fmpp (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/AntProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/AntProgressListener.html deleted file mode 100644 index d41a94f..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/AntProgressListener.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - -AntProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.progresslisteners
-

Class AntProgressListener

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AntProgressListener

        -
        public AntProgressListener(org.apache.tools.ant.Task antTask)
        -
        Output will be printed to the stdout.
        -
      • -
      - - - -
        -
      • -

        AntProgressListener

        -
        public AntProgressListener(org.apache.tools.ant.Task antTask,
        -                           boolean quiet)
        -
        -
        Parameters:
        -
        quiet - If true, only error and warning messages will be printed.
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        notifyProgressEvent

        -
        public void notifyProgressEvent(Engine engine,
        -                                int event,
        -                                File src,
        -                                int pMode,
        -                                Throwable error,
        -                                Object param)
        -
        Description copied from interface: ProgressListener
        -
        Method called be the engine to notify events. - -

        It is guaranteed that this method will not be called concurrently - as far as the listener is added to a single Engine instance - only.

        -
        -
        Specified by:
        -
        notifyProgressEvent in interface ProgressListener
        -
        Parameters:
        -
        engine - The engine instance where the event has occurred.
        -
        event - The code of the event: an EVENT_... constant. - As new event types can be introduced with new FMPP versions (even if - it happens very seldom), a progress listener implementation should - survive events that it does not understand. That is, it must not stop - with an error, but it should silently ignore the event.
        -
        src - Depending on event the source file or null.
        -
        pMode - Depending on event the proccessing mode - (Engine.PMODE_... constant) or - Engine.PMODE_NONE. Note that new processing modes may - be added as FMPP evolvers, so values that are not known be the - progress listener should be handler nicely, and never cause error.
        -
        error - The error, or null if there was no error.
        -
        param - Extra information about the event. The class and meaning of - object depends on the concrete event: -
          -
        • For EVENT_WARNING it is a String that - describles the reason of warning. -
        -
        -
      • -
      - - - -
        -
      • -

        getErrorCount

        -
        public int getErrorCount()
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/ConsoleProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/ConsoleProgressListener.html deleted file mode 100644 index b7ba3f7..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/ConsoleProgressListener.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - -ConsoleProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.progresslisteners
-

Class ConsoleProgressListener

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    ProgressListener
    -
    -
    -
    -
    public class ConsoleProgressListener
    -extends Object
    -implements ProgressListener
    -
    Designed to show the progress on console screen.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ConsoleProgressListener

        -
        public ConsoleProgressListener()
        -
        Output will be printed to the stdout.
        -
      • -
      - - - -
        -
      • -

        ConsoleProgressListener

        -
        public ConsoleProgressListener(OutputStream out)
        -
      • -
      - - - -
        -
      • -

        ConsoleProgressListener

        -
        public ConsoleProgressListener(PrintWriter out)
        -
      • -
      - - - -
        -
      • -

        ConsoleProgressListener

        -
        public ConsoleProgressListener(OutputStream out,
        -                               boolean quiet)
        -
        -
        Parameters:
        -
        quiet - Print warnings and skipped errors only
        -
        -
      • -
      - - - -
        -
      • -

        ConsoleProgressListener

        -
        public ConsoleProgressListener(PrintWriter out,
        -                               boolean quiet)
        -
        -
        Parameters:
        -
        quiet - Print warnings and skipped errors only
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        notifyProgressEvent

        -
        public void notifyProgressEvent(Engine engine,
        -                                int event,
        -                                File src,
        -                                int pMode,
        -                                Throwable error,
        -                                Object param)
        -
        Description copied from interface: ProgressListener
        -
        Method called be the engine to notify events. - -

        It is guaranteed that this method will not be called concurrently - as far as the listener is added to a single Engine instance - only.

        -
        -
        Specified by:
        -
        notifyProgressEvent in interface ProgressListener
        -
        Parameters:
        -
        engine - The engine instance where the event has occurred.
        -
        event - The code of the event: an EVENT_... constant. - As new event types can be introduced with new FMPP versions (even if - it happens very seldom), a progress listener implementation should - survive events that it does not understand. That is, it must not stop - with an error, but it should silently ignore the event.
        -
        src - Depending on event the source file or null.
        -
        pMode - Depending on event the proccessing mode - (Engine.PMODE_... constant) or - Engine.PMODE_NONE. Note that new processing modes may - be added as FMPP evolvers, so values that are not known be the - progress listener should be handler nicely, and never cause error.
        -
        error - The error, or null if there was no error.
        -
        param - Extra information about the event. The class and meaning of - object depends on the concrete event: -
          -
        • For EVENT_WARNING it is a String that - describles the reason of warning. -
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/LoggerProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/LoggerProgressListener.html deleted file mode 100644 index 7a4c086..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/LoggerProgressListener.html +++ /dev/null @@ -1,558 +0,0 @@ - - - - - - -LoggerProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.progresslisteners
-

Class LoggerProgressListener

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    ProgressListener
    -
    -
    -
    -
    public class LoggerProgressListener
    -extends Object
    -implements ProgressListener
    -
    Writes detailed information about errors and warning messages into a file - or into any character stream.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        LoggerProgressListener

        -
        public LoggerProgressListener()
        -
        Output will be printed to the stderr.
        -
      • -
      - - - -
        -
      • -

        LoggerProgressListener

        -
        public LoggerProgressListener(OutputStream out)
        -
      • -
      - - - -
        -
      • -

        LoggerProgressListener

        -
        public LoggerProgressListener(PrintWriter out)
        -
      • -
      - - - - - - - -
        -
      • -

        LoggerProgressListener

        -
        public LoggerProgressListener(File logFile,
        -                              boolean append)
        -                       throws IOException
        -
        -
        Throws:
        -
        IOException
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        notifyProgressEvent

        -
        public void notifyProgressEvent(Engine engine,
        -                                int event,
        -                                File src,
        -                                int pMode,
        -                                Throwable error,
        -                                Object param)
        -
        Description copied from interface: ProgressListener
        -
        Method called be the engine to notify events. - -

        It is guaranteed that this method will not be called concurrently - as far as the listener is added to a single Engine instance - only.

        -
        -
        Specified by:
        -
        notifyProgressEvent in interface ProgressListener
        -
        Parameters:
        -
        engine - The engine instance where the event has occurred.
        -
        event - The code of the event: an EVENT_... constant. - As new event types can be introduced with new FMPP versions (even if - it happens very seldom), a progress listener implementation should - survive events that it does not understand. That is, it must not stop - with an error, but it should silently ignore the event.
        -
        src - Depending on event the source file or null.
        -
        pMode - Depending on event the proccessing mode - (Engine.PMODE_... constant) or - Engine.PMODE_NONE. Note that new processing modes may - be added as FMPP evolvers, so values that are not known be the - progress listener should be handler nicely, and never cause error.
        -
        error - The error, or null if there was no error.
        -
        param - Extra information about the event. The class and meaning of - object depends on the concrete event: -
          -
        • For EVENT_WARNING it is a String that - describles the reason of warning. -
        -
        -
      • -
      - - - -
        -
      • -

        getPrintWriter

        -
        public PrintWriter getPrintWriter()
        -
        Returns the PrintWriter used for printing into the log.
        -
      • -
      - - - -
        -
      • -

        close

        -
        public void close()
        -
        Closes the PrintWriter used for printing into the log.
        -
      • -
      - - - -
        -
      • -

        flush

        -
        public void flush()
        -
        Flushes the PrintWriter used for printing into the log.
        -
      • -
      - - - -
        -
      • -

        printlnNW

        -
        public void printlnNW(String text)
        -
        Prints into the log without word-wrapping.
        -
      • -
      - - - -
        -
      • -

        printNW

        -
        public void printNW(String text)
        -
        Prints into the log without word-wrapping.
        -
      • -
      - - - -
        -
      • -

        println

        -
        public void println()
        -
        Prints line-break into the log.
        -
      • -
      - - - -
        -
      • -

        println

        -
        public void println(Object obj)
        -
        Prints into the log with word-wrapping.
        -
      • -
      - - - -
        -
      • -

        println

        -
        public void println(String text)
        -
        Prints into the log with word-wrapping.
        -
      • -
      - - - -
        -
      • -

        println

        -
        public void println(String text,
        -                    int indent)
        -
        Prints into the log with word-wrapping and indentation.
        -
      • -
      - - - -
        -
      • -

        printStackTrace

        -
        public void printStackTrace(Throwable exc)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/StatisticsProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/StatisticsProgressListener.html deleted file mode 100644 index a630f83..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/StatisticsProgressListener.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - -StatisticsProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.progresslisteners
-

Class StatisticsProgressListener

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    ProgressListener
    -
    -
    -
    -
    public class StatisticsProgressListener
    -extends Object
    -implements ProgressListener
    -
    Spins some counters regarding the work of the Engine. - All methods of this listener can be called from multiple threads. The current - state of counters can be read while the engine is working.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        StatisticsProgressListener

        -
        public StatisticsProgressListener()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        notifyProgressEvent

        -
        public void notifyProgressEvent(Engine engine,
        -                                int event,
        -                                File src,
        -                                int pMode,
        -                                Throwable error,
        -                                Object param)
        -
        Description copied from interface: ProgressListener
        -
        Method called be the engine to notify events. - -

        It is guaranteed that this method will not be called concurrently - as far as the listener is added to a single Engine instance - only.

        -
        -
        Specified by:
        -
        notifyProgressEvent in interface ProgressListener
        -
        Parameters:
        -
        engine - The engine instance where the event has occurred.
        -
        event - The code of the event: an EVENT_... constant. - As new event types can be introduced with new FMPP versions (even if - it happens very seldom), a progress listener implementation should - survive events that it does not understand. That is, it must not stop - with an error, but it should silently ignore the event.
        -
        src - Depending on event the source file or null.
        -
        pMode - Depending on event the proccessing mode - (Engine.PMODE_... constant) or - Engine.PMODE_NONE. Note that new processing modes may - be added as FMPP evolvers, so values that are not known be the - progress listener should be handler nicely, and never cause error.
        -
        error - The error, or null if there was no error.
        -
        param - Extra information about the event. The class and meaning of - object depends on the concrete event: -
          -
        • For EVENT_WARNING it is a String that - describles the reason of warning. -
        -
        -
      • -
      - - - -
        -
      • -

        reset

        -
        public void reset()
        -
        Rests all counters.
        -
      • -
      - - - -
        -
      • -

        getProcessingTime

        -
        public long getProcessingTime()
        -
        The duration of the last - BEGIN_ALL_PROCESSING-END_ALL_PROCESSING - in milliseconds, or -1 if that is not known.
        -
      • -
      - - - -
        -
      • -

        getCopied

        -
        public int getCopied()
        -
        Number of files successfully copied.
        -
      • -
      - - - -
        -
      • -

        getExecuted

        -
        public int getExecuted()
        -
        Number of files successfully executed (templates).
        -
      • -
      - - - -
        -
      • -

        getXmlRendered

        -
        public int getXmlRendered()
        -
        Number of XML files successfully rendered.
        -
      • -
      - - - -
        -
      • -

        getFailed

        -
        public int getFailed()
        -
        Number of files where processing was failed.
        -
      • -
      - - - -
        -
      • -

        getSuccesful

        -
        public int getSuccesful()
        -
        Number of files where processing was successfull.
        -
      • -
      - - - -
        -
      • -

        getAccessed

        -
        public int getAccessed()
        -
        Number of files that the engine has tried to process.
        -
      • -
      - - - -
        -
      • -

        getWarnings

        -
        public int getWarnings()
        -
        Total number of warnings.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/TerseConsoleProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/TerseConsoleProgressListener.html deleted file mode 100644 index a2dce03..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/TerseConsoleProgressListener.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - -TerseConsoleProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.progresslisteners
-

Class TerseConsoleProgressListener

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • fmpp.progresslisteners.TerseConsoleProgressListener
    • -
    -
  • -
-
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    ProgressListener
    -
    -
    -
    -
    public class TerseConsoleProgressListener
    -extends Object
    -implements ProgressListener
    -
    Designed to show the progress on console screen in a - very terse way (prints a symbol for each processed file).
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        TerseConsoleProgressListener

        -
        public TerseConsoleProgressListener()
        -
        Output will be printed to the stdout.
        -
      • -
      - - - -
        -
      • -

        TerseConsoleProgressListener

        -
        public TerseConsoleProgressListener(OutputStream out)
        -
      • -
      - - - -
        -
      • -

        TerseConsoleProgressListener

        -
        public TerseConsoleProgressListener(PrintWriter out)
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        notifyProgressEvent

        -
        public void notifyProgressEvent(Engine engine,
        -                                int event,
        -                                File src,
        -                                int pMode,
        -                                Throwable error,
        -                                Object param)
        -
        Description copied from interface: ProgressListener
        -
        Method called be the engine to notify events. - -

        It is guaranteed that this method will not be called concurrently - as far as the listener is added to a single Engine instance - only.

        -
        -
        Specified by:
        -
        notifyProgressEvent in interface ProgressListener
        -
        Parameters:
        -
        engine - The engine instance where the event has occurred.
        -
        event - The code of the event: an EVENT_... constant. - As new event types can be introduced with new FMPP versions (even if - it happens very seldom), a progress listener implementation should - survive events that it does not understand. That is, it must not stop - with an error, but it should silently ignore the event.
        -
        src - Depending on event the source file or null.
        -
        pMode - Depending on event the proccessing mode - (Engine.PMODE_... constant) or - Engine.PMODE_NONE. Note that new processing modes may - be added as FMPP evolvers, so values that are not known be the - progress listener should be handler nicely, and never cause error.
        -
        error - The error, or null if there was no error.
        -
        param - Extra information about the event. The class and meaning of - object depends on the concrete event: -
          -
        • For EVENT_WARNING it is a String that - describles the reason of warning. -
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/class-use/AntProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/class-use/AntProgressListener.html deleted file mode 100644 index 0d9ede4..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/class-use/AntProgressListener.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.progresslisteners.AntProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.progresslisteners.AntProgressListener

-
-
No usage of fmpp.progresslisteners.AntProgressListener
- - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/class-use/ConsoleProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/class-use/ConsoleProgressListener.html deleted file mode 100644 index c5e1fed..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/class-use/ConsoleProgressListener.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.progresslisteners.ConsoleProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.progresslisteners.ConsoleProgressListener

-
-
No usage of fmpp.progresslisteners.ConsoleProgressListener
- - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/class-use/LoggerProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/class-use/LoggerProgressListener.html deleted file mode 100644 index b93b32f..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/class-use/LoggerProgressListener.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.progresslisteners.LoggerProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.progresslisteners.LoggerProgressListener

-
-
No usage of fmpp.progresslisteners.LoggerProgressListener
- - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/class-use/StatisticsProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/class-use/StatisticsProgressListener.html deleted file mode 100644 index 3d1e96a..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/class-use/StatisticsProgressListener.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.progresslisteners.StatisticsProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.progresslisteners.StatisticsProgressListener

-
-
No usage of fmpp.progresslisteners.StatisticsProgressListener
- - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/class-use/TerseConsoleProgressListener.html b/fmpp/docs/api/fmpp/progresslisteners/class-use/TerseConsoleProgressListener.html deleted file mode 100644 index 2f4e515..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/class-use/TerseConsoleProgressListener.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.progresslisteners.TerseConsoleProgressListener (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.progresslisteners.TerseConsoleProgressListener

-
-
No usage of fmpp.progresslisteners.TerseConsoleProgressListener
- - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/package-frame.html b/fmpp/docs/api/fmpp/progresslisteners/package-frame.html deleted file mode 100644 index 91defe8..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/package-frame.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - -fmpp.progresslisteners (FMPP 0.9.15 API) - - - - - -

fmpp.progresslisteners

- - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/package-summary.html b/fmpp/docs/api/fmpp/progresslisteners/package-summary.html deleted file mode 100644 index 64548ff..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/package-summary.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -fmpp.progresslisteners (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp.progresslisteners

-
-
fmpp.ProgressListener implementations.
-
-

See: Description

-
-
-
    -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Class Summary 
    ClassDescription
    AntProgressListener -
    Designed to show the progress for Ant tasks.
    -
    ConsoleProgressListener -
    Designed to show the progress on console screen.
    -
    LoggerProgressListener -
    Writes detailed information about errors and warning messages into a file - or into any character stream.
    -
    StatisticsProgressListener -
    Spins some counters regarding the work of the Engine.
    -
    TerseConsoleProgressListener -
    Designed to show the progress on console screen in a - very terse way (prints a symbol for each processed file).
    -
    -
  • -
- - - -

Package fmpp.progresslisteners Description

-

fmpp.ProgressListener implementations.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/package-tree.html b/fmpp/docs/api/fmpp/progresslisteners/package-tree.html deleted file mode 100644 index 019cec3..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/package-tree.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - -fmpp.progresslisteners Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp.progresslisteners

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/progresslisteners/package-use.html b/fmpp/docs/api/fmpp/progresslisteners/package-use.html deleted file mode 100644 index 05cd4b3..0000000 --- a/fmpp/docs/api/fmpp/progresslisteners/package-use.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Package fmpp.progresslisteners (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp.progresslisteners

-
-
No usage of fmpp.progresslisteners
- - - - - - diff --git a/fmpp/docs/api/fmpp/setting/FileWithConfigurationBase.html b/fmpp/docs/api/fmpp/setting/FileWithConfigurationBase.html deleted file mode 100644 index b50930e..0000000 --- a/fmpp/docs/api/fmpp/setting/FileWithConfigurationBase.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - -FileWithConfigurationBase (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.setting
-

Class FileWithConfigurationBase

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable, Comparable<File>
    -
    -
    -
    -
    public class FileWithConfigurationBase
    -extends FileWithSettingValue
    -
    File that stores the current configuration base directory at - the time it was instantiated. This extra information is - needed if the path may need or need not be resolved relatively to the - configuration base later, depending on factors that are not known when - the setting value is set.
    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        FileWithConfigurationBase

        -
        public FileWithConfigurationBase(File configurationBase,
        -                                 String path,
        -                                 String settingValue)
        -
        Creates a new instance. - The path will not be resolved relatively to the - configurationBase. If it was a relative path, then - it remains that.
        -
      • -
      -
    • -
    - - -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/setting/FileWithSettingValue.html b/fmpp/docs/api/fmpp/setting/FileWithSettingValue.html deleted file mode 100644 index 8da8016..0000000 --- a/fmpp/docs/api/fmpp/setting/FileWithSettingValue.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - -FileWithSettingValue (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.setting
-

Class FileWithSettingValue

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable, Comparable<File>
    -
    -
    -
    Direct Known Subclasses:
    -
    FileWithConfigurationBase
    -
    -
    -
    -
    public class FileWithSettingValue
    -extends File
    -
    File that stores the original setting value (string) it was - constructed from. This extra information is needed, for example, to - display the content of a loaded configuration file for the user.
    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        FileWithSettingValue

        -
        public FileWithSettingValue(File parent,
        -                            String child,
        -                            String settingValue)
        -
      • -
      - - - -
        -
      • -

        FileWithSettingValue

        -
        public FileWithSettingValue(String path,
        -                            String settingValue)
        -
      • -
      - - - -
        -
      • -

        FileWithSettingValue

        -
        public FileWithSettingValue(String parent,
        -                            String child,
        -                            String settingValue)
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        getSettingValue

        -
        public String getSettingValue()
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/setting/SettingException.html b/fmpp/docs/api/fmpp/setting/SettingException.html deleted file mode 100644 index d41de63..0000000 --- a/fmpp/docs/api/fmpp/setting/SettingException.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - -SettingException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.setting
-

Class SettingException

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable
    -
    -
    -
    -
    public class SettingException
    -extends ExceptionCC
    -
    Bad setting or setting combination, or failure when trying to setup the - engine with the settings.
    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        SettingException

        -
        public SettingException(String s)
        -
      • -
      - - - -
        -
      • -

        SettingException

        -
        public SettingException(String s,
        -                        Throwable cause)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/setting/Settings.html b/fmpp/docs/api/fmpp/setting/Settings.html deleted file mode 100644 index 6e4229f..0000000 --- a/fmpp/docs/api/fmpp/setting/Settings.html +++ /dev/null @@ -1,2881 +0,0 @@ - - - - - - -Settings (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.setting
-

Class Settings

-
-
- -
-
    -
  • -
    -
    -
    public class Settings
    -extends Object
    -
    Stores FMPP settings, loads configuration files, provides other setting - handling related utilities. - -

    Settings are typed variables identified with their case-sensitive name. - When you set the value of a setting, the value object you supply must be - of the correct type. See the description of the TYPE_... - to see the available setting types. - -

    Methods that change setting values have a variation - that require String value(s) instead of Object(s). - These methods should be used when you get the setting values from text-only - sources, such as command-line option values, XML attributes or - .properties file. To demonstrate the difference, assume you have - string value "a, b, c". If you try to use this value for a - setting of type list, the normal setter method will interpret the value - as a list of length 1, that stores string "a, b, c". If you - try to use the same value with the string version of the same method, it - will interpret the string as a list of length 3, that stores 3 strings, - "a", "b", and "c". - -

    Notes: -

      -
    • All settings you want to set/get must be defined. See define(java.lang.String, fmpp.setting.Settings.SettingType, boolean, boolean). - Standard settings (the settings documented in the FMPP Manual) are - initially already defined. -
    • If you have used an object as the value of a setting, the object must - not be changed anymore. -
    • If a method throws SettingException, then it is ensured that - the method doesn't change the Settings object. For - example, with add(Map), either all settings in the map will be - successfully set, or neither will be set. -
    - -

    You can execute the processing session described by the setting with - execute().

    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS

        -
        public static final String NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        NAME_SQL_DATE_AND_TIME_TIME_ZONE

        -
        public static final String NAME_SQL_DATE_AND_TIME_TIME_ZONE
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        NAME_ALWAYS_CREATE_DIRECTORIES

        -
        public static final String NAME_ALWAYS_CREATE_DIRECTORIES
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        VALUE_OBJECTWRAPPER_SHARED_BEANS_WRAPPER

        -
        public static final String VALUE_OBJECTWRAPPER_SHARED_BEANS_WRAPPER
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        VALUE_TAG_SYNTAX_ANGLE_BRACKET

        -
        public static final String VALUE_TAG_SYNTAX_ANGLE_BRACKET
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        VALUE_TAG_SYNTAX_SQUARE_BRACKET

        -
        public static final String VALUE_TAG_SYNTAX_SQUARE_BRACKET
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - - - - - - - - - - - - - -
        -
      • -

        VALUE_XML_CATALOG_PREFER_PUBLIC

        -
        public static final String VALUE_XML_CATALOG_PREFER_PUBLIC
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        VALUE_XML_CATALOG_PREFER_SYSTEM

        -
        public static final String VALUE_XML_CATALOG_PREFER_SYSTEM
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - - - - - -
        -
      • -

        DEFAULT_CFG_FILE_NAME

        -
        public static final String DEFAULT_CFG_FILE_NAME
        -
        Primary default file name.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        DEFAULT_CFG_FILE_NAME_OLD

        -
        public static final String DEFAULT_CFG_FILE_NAME_OLD
        -
        Secondary (legacy) default file name.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        TYPE_ANY

        -
        public static final fmpp.setting.Settings.SettingType TYPE_ANY
        -
        Any object. -

        Input type: Object. -

        Output type: Object. -

        String input: any value, stored as is. -

        Merging: not supported.

        -
      • -
      - - - -
        -
      • -

        TYPE_STRING

        -
        public static final fmpp.setting.Settings.SettingType TYPE_STRING
        -
        String setting type. -

        Input type: String, Number, - Boolean. The last two is converted to string with - toString() -

        Output type: String. -

        String input: any value, stored as is. -

        Merging: not supported

        -
      • -
      - - - -
        -
      • -

        TYPE_INTEGER

        -
        public static final fmpp.setting.Settings.SettingType TYPE_INTEGER
        -
        Integer setting type. -

        Input type: Number that can be converted to - Integer without lost. -

        Output type: Integer. -

        String input: any value, that can be parsed to Integer - by Integer.parseInt after trimming. In additional, - redundant + sign is supported. -

        Merging: not supported

        -
      • -
      - - - -
        -
      • -

        TYPE_BOOLEAN

        -
        public static final fmpp.setting.Settings.SettingType TYPE_BOOLEAN
        -
        Boolean setting type. -

        Input type: Boolean. -

        Output type: Boolean. -

        String input: After trimming and converting to lower-case, - "true", "false" or empty - string are allowed. Empty string is interpreted as true - (consider a properties file that contains a key without value). -

        Merging: not supported

        -
      • -
      - - - -
        -
      • -

        TYPE_SEQUENCE

        -
        public static final fmpp.setting.Settings.SettingType TYPE_SEQUENCE
        -
        Sequence setting type. -

        Input type: List, any array, Vector. No - restriction regarding the type of the list items. -

        Output type: List. No restriction regarding the type of - the list items. -

        String input: TDD expression starting in list mode. If the result is - a list that contains a single list, then the contained list will - be used. This heuristic is used to fix this user mistake:
        - --some-list="[a, b, c]"
        - instead of:
        - --some-list="a, b, c" -

        Merging: the two lists are concatenated, with the default (inherited) - value coming last.

        -
      • -
      - - - -
        -
      • -

        TYPE_LOCAL_DATA_MODEL

        -
        public static final fmpp.setting.Settings.SettingType TYPE_LOCAL_DATA_MODEL
        -
        Local data model setting type. - This is the same as TYPE_SEQUENCE, just if the value is given as - text (string input), it defers the evaluation of the hash parameter of - the case function call, and stores that as - Fragment. This is required because that hash parameter - may uses data loaders, which shouldn't be executed until almost all - settings of the Engine are set. This also means that if - you set the setting value with Java, the last parameter to the - case FunctionCall must be a - Fragment instead of Map, if you want to use - data loaders in it.
        -
      • -
      - - - -
        -
      • -

        TYPE_HASH

        -
        public static final fmpp.setting.Settings.SettingType TYPE_HASH
        -
        Hash setting type. -

        Input type: Map, Dictionary. -

        Output type: Map. -

        String input: TDD expression, starting in hash mode. -

        Merging: the two maps are added (union)

        -
      • -
      - - - -
        -
      • -

        TYPE_CFG_RELATIVE_PATH

        -
        public static final fmpp.setting.Settings.SettingType TYPE_CFG_RELATIVE_PATH
        -
        "Configuration relative path" setting type. -

        Input type: String, FileWithSettingValue. - Plain File is not allowed. -

        Output type: FileWithSettingValue. -

        String input: Any value, trimmed before converting. -

        Merging: not supported

        -
      • -
      - - - -
        -
      • -

        TYPE_CFG_RELATIVE_PATHS

        -
        public static final fmpp.setting.Settings.SettingType TYPE_CFG_RELATIVE_PATHS
        -
        "Configuration relative paths" setting type. -

        Input type: Same as for TYPE_SEQUENCE, but all list items - must be string or FileWithSettingValue. -

        Output type: Same as for TYPE_SEQUENCE, but all list items - are FileWithSettingValue-s. -

        String input: Same as for TYPE_SEQUENCE, but all sequence - items must be strings. "force strings" option is on during the TDD - interpretation. -

        Merging: the two list are concatenated.

        -
      • -
      - - - -
        -
      • -

        TYPE_UNRESOLVED_CFG_RELATIVE_PATHS

        -
        public static final fmpp.setting.Settings.SettingType TYPE_UNRESOLVED_CFG_RELATIVE_PATHS
        -
        "Unresolved configuration relative paths" setting type. -

        Input type: Same as for TYPE_SEQUENCE, but all list items - must be string or FileWithConfigurationBase. -

        Output type: Same as for TYPE_SEQUENCE, but all list items - are FileWithConfigurationBase-s. -

        String input: Same as for TYPE_SEQUENCE, but all sequence - items must be strings. "force strings" option is on during the TDD - interpretation. -

        Merging: the two list are concatenated.

        -
      • -
      - - - -
        -
      • -

        TYPE_DATA_MODEL

        -
        public static final fmpp.setting.Settings.SettingType TYPE_DATA_MODEL
        -
        Data model setting type. -

        Input type: Map, Dictionary, - Fragment, - private class DataList. -

        Output type: private class DataList extends - ArrayList. The list may contains: - Map, String, Fragment. -

        String input: TDD expression, starting in hash mode. -

        Merging: The tow lists are concatenated. - -

        This type is used for the "data" setting. The hash value of that - setting can't be generated until the final value of all other setting is - set (because data loaders may use the other settings). This way, the - value of the "data" setting is a List that records the - changes made on the setting, and not a Map. The - Map will be built internally based on the list when you call - execute().

        -
      • -
      - - - -
        -
      • -

        TYPE_HASH_OF_SEQUENCE_OF_CFG_RELATIVE_PATHS

        -
        public static final fmpp.setting.Settings.SettingType TYPE_HASH_OF_SEQUENCE_OF_CFG_RELATIVE_PATHS
        -
        Hash-of-configuration-relative-paths setting type. -

        Input type: Map or Dictionary, that stores - a List or Vector or array, that stores - strings and/or FileWithSettingValue-s. Also, the map may - contains strings and/or FileWithSettingValue directly as - value (instead of a list of length 1 that stores the same value). -

        Output type: Map of List of - FileWithSettingValue-s. -

        String input: TDD expression, starting in hash mode. -

        Merging: the two maps are added (union)

        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        Settings

        -
        public Settings(File baseDir)
        -         throws SettingException
        -
        Creates a new instance. The standard settings will be already defined - in the new instance.
        -
        -
        Parameters:
        -
        baseDir - the base directory used to resolve relative paths in - setting names. When you load settings from a configuration file, the - parent directory of the file will be used instenad, for the settings - coming from the file.
        -
        Throws:
        -
        SettingException
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        define

        -
        public void define(String name,
        -                   fmpp.setting.Settings.SettingType type,
        -                   boolean merge,
        -                   boolean forceStr)
        -            throws SettingException
        -
        Defines a new setting. No setting with the same name already exists.
        -
        -
        Parameters:
        -
        name - the name of the setting
        -
        type - the type of the setting
        -
        merge - specifies if when you add a new setting value, and the - setting has already set, then the new and old value will be merged, - or the new value will replace old value. Note that only a few - setting type supports merging, such as list and map.
        -
        forceStr - specifies if when parsing string values with TDD - interpreter, it should be done with the "force strings" option or - not.
        -
        Throws:
        -
        SettingException
        -
        -
      • -
      - - - - - - - -
        -
      • -

        getStandardSettingNames

        -
        public static Iterator getStandardSettingNames()
        -
        Returns if the given name is the name of a standard setting.
        -
      • -
      - - - -
        -
      • -

        add

        -
        public void add(String name,
        -                Object value)
        -         throws SettingException
        -
        Adds a setting value. If a setting value already exists, it will be - either replaced or merged with the new value, depending on the - definition of the setting. When merging, the new value has higher - priority than the old value.
        -
        -
        Throws:
        -
        SettingException
        -
        -
      • -
      - - - -
        -
      • -

        addDefault

        -
        public void addDefault(String name,
        -                       Object value)
        -                throws SettingException
        -
        Adds a setting value with low priority. If a setting value already - exists, it will be either kept (and thus the method call has no effect) - or merged with the new value, depending on the definition of the setting. - When merging, the new value has lower priorty than the old value.
        -
        -
        Throws:
        -
        SettingException
        -
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        set

        -
        public void set(String name,
        -                Object value)
        -         throws SettingException
        -
        Sets the value of a setting. If the setting value already exists, it will - be replaced (never merged).
        -
        -
        Throws:
        -
        SettingException
        -
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        load

        -
        public void load(File cfgFile)
        -          throws SettingException
        -
        Loads settings from a configuration file. The file will be interpreted - as legacy properties file if its extension is cfg or - properties, otherwise it will be interpreted as TDD file. - The settings stored in the configuration file will be added - to the this object with add(Map). - -

        Note that meta-settings ("configurationBase" and - "inheritConfiguration") will not be added to the settings object. - -

        If the setting "configurationBase" or "inheritConfiguration" is - set in this setting object, then they will override the - meta-settings in the file directly loaded with this method. Files - inherited by the directly loaded file, however, are not affected.

        -
        -
        Parameters:
        -
        cfgFile - the configuration file, or the directory of the - configuration file if its file name is one of the - default configuration file names.
        -
        Throws:
        -
        SettingException
        -
        See Also:
        -
        loadDefaults(File)
        -
        -
      • -
      - - - - - - - -
        -
      • -

        get

        -
        public Object get(String name)
        -
        Gets the current value of a setting.
        -
        -
        Parameters:
        -
        name - the name of the setting.
        -
        Returns:
        -
        The value of the setting, or null if the setting - is not set. Do not modify the returned object!
        -
        -
      • -
      - - - -
        -
      • -

        remove

        -
        public Object remove(String name)
        -
        Removes a setting value.
        -
        -
        Returns:
        -
        the removed value, or null if there was no - value stored for the setting.
        -
        -
      • -
      - - - -
        -
      • -

        getNames

        -
        public Iterator getNames()
        -
        Lists the names of settings that were set.
        -
      • -
      - - - -
        -
      • -

        execute

        -
        public void execute()
        -             throws SettingException,
        -                    ProcessingException
        -
        Executes a processing session based on the setting values. - For each call of this method, a new Engine object will be - internaly created, and initialized based on the setting values, and then - its process method will be called. The method automatically - chooses between bulk and single-file processing, based on the presence of - the "outputFile" setting. - -

        Settings will go throught semantical checks that are not done when - you call other methods. For example, it will be checked if setting - "modes" contains valid mode setter function calls, if "sourceRoot" and - "outputRoot" are defined for bulk mode, if exactly 1 "sources" is defined - for single-file mode, etc. - -

        This method ignores the following settings: - "logFile", "appendLogFile", "echoFormat", "quiet", "snip". - It's the task of the embedding software (the front-end) to interpret - these settings, at least the ones it is interested in. - It usually involves adding progress listeners with - addProgressListener(ProgressListener). - -

        This method can be called for multiple times, but be aware of - that for each call of this method, a new Engine - object will be created and initialized, even if you didn't changed the - settings since the last call. If this overhead is not acceptable - in you case, you can call Engine.process(...) for multiple - times within the same execute() call, by overriding the - doProcessing(Engine, File[], File, File) method. - Also, you can do extra engine initalization there.

        -
        -
        Throws:
        -
        SettingException - if the settings are not correct, or can't be - applied because of some errors occured. This exception, when thrown, - is always thrown before the execution of the processing session is - stated.
        -
        ProcessingException - if Engine.process has - thrown any exception, that is, there was an error during the - execution of the processing session. The message of this exception - holds nothing interesting (just a static text). Call its - getCause() method to get the exception that caused the - termination. Note that all (so even non-checked exceptions) thrown be - the engine are catched and wrapped by this exeption.
        -
        -
      • -
      - - - - - - - - - - - -
        -
      • -

        setEngineAttribute

        -
        public Object setEngineAttribute(String name,
        -                                 Object value)
        -
        Sets an engine attribute. The attribute will be set in the internally - used Engine object when you call execute().
        -
        -
        Returns:
        -
        The previous value of the attribute, or null if - there was no attribute with the given name.
        -
        -
      • -
      - - - - - - - -
        -
      • -

        removeAttribute

        -
        public Object removeAttribute(String name)
        -
        Removes an engine attribute. It does nothing if the attribute does not - exist.
        -
        -
        Returns:
        -
        The value of the removed attribute or null if there - was no attribute with the given name.
        -
        See Also:
        -
        setEngineAttribute(String, Object)
        -
        -
      • -
      - - - - - - - - - - - -
        -
      • -

        getDontTraverseDirectories

        -
        public boolean getDontTraverseDirectories()
        -
      • -
      - - - -
        -
      • -

        dump

        -
        public String dump()
        -
        Dumps the current content of this object for debugging purposes.
        -
      • -
      - - - -
        -
      • -

        quietSettingValueToInt

        -
        public static int quietSettingValueToInt(String value,
        -                                         String name)
        -                                  throws SettingException
        -
        Returns 0 for verbose mode, 1 for quiet mode, 2 for really-quiet mode.
        -
        -
        Throws:
        -
        SettingException
        -
        -
      • -
      - - - -
        -
      • -

        getDefaultConfigurationFile

        -
        public static File getDefaultConfigurationFile(File dir)
        -
        Returns the default configuration file in the directory.
        -
        -
        Returns:
        -
        the absolute file, or null if no default - configuration file exists in the directory.
        -
        -
      • -
      - - - -
        -
      • -

        undashNames

        -
        public void undashNames(Properties props)
        -                 throws SettingException
        -
        Converts legacy dashed setting names to the standard format, as - source-root to sourceRoot.
        -
        -
        Parameters:
        -
        props - the Properties object to convert.
        -
        Throws:
        -
        SettingException - if no setting with the given name exists.
        -
        -
      • -
      - - - -
        -
      • -

        trimValues

        -
        public void trimValues(Properties props)
        -
        Trims all property values.
        -
      • -
      - - - -
        -
      • -

        doProcessing

        -
        protected void doProcessing(Engine eng,
        -                            File[] sources,
        -                            File sourceFile,
        -                            File outputFile)
        -                     throws SettingException,
        -                            ProcessingException
        -
        Executes the processing session(s) on the Engine level, - using the already initialized Engine object. - -

        By overriding this method, you can -

          -
        • call Engine.process(...) for multiple times, so you - can do multiple processing sessions with the same already - initialized Engine object. -
        • do extra Engine initialization. -
        - -

        The inital implementation of this method (that is, the implementation - in the Settings class) is something like this: - -

        - if (outputFile == null) {
        -     eng.process(sources);
        - } else {
        -     eng.process(sourceFile, outputFile);
        - }
        - -

        Modifying the Settings object in this method has no effect on - the Engine object (which is passed in as argument), - since all settings are already applied on it. If you need to modify the - Engine object, call its methods directly. - -

        An implementation of this method may leak out the initialized - Engine object for the caller of execute(). Also, it - may does not call Engine.proccess(...), but left it for the - caller (who has the out-leaked Engine object). These are - extreme, but otherwise legitimate usages.

        -
        -
        Parameters:
        -
        eng - the already initialized Engine object. You may - do extra addjustments on it.
        -
        sources - the list of source files, the parameter to - Engine.process(File[]). It's null if - the processing session uses outputFile setting.
        -
        sourceFile - if the session uses outputFile setting, - then it' the 1st parameter to - Engine.process(File, File), otherwise it is null.
        -
        outputFile - if the session uses outputFile setting, - then it' the 2nd parameter to - Engine.process(File, File), otherwise it is null.
        -
        Throws:
        -
        SettingException
        -
        ProcessingException
        -
        -
      • -
      - - - -
        -
      • -

        getDashedName

        -
        public static String getDashedName(String name)
        -
        Converts mixed-case setting name to dashed form, - as sourceRoot to source-root.
        -
      • -
      - - - -
        -
      • -

        fixVersion08SettingNames

        -
        public static void fixVersion08SettingNames(Properties props)
        -                                     throws SettingException
        -
        Backward compatibility hack: renames properties that use - pre-FMPP 0.9.0 names of settings.
        -
        -
        Throws:
        -
        SettingException
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/setting/class-use/FileWithConfigurationBase.html b/fmpp/docs/api/fmpp/setting/class-use/FileWithConfigurationBase.html deleted file mode 100644 index d299060..0000000 --- a/fmpp/docs/api/fmpp/setting/class-use/FileWithConfigurationBase.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.setting.FileWithConfigurationBase (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.setting.FileWithConfigurationBase

-
-
No usage of fmpp.setting.FileWithConfigurationBase
- - - - - - diff --git a/fmpp/docs/api/fmpp/setting/class-use/FileWithSettingValue.html b/fmpp/docs/api/fmpp/setting/class-use/FileWithSettingValue.html deleted file mode 100644 index 2fcc2d6..0000000 --- a/fmpp/docs/api/fmpp/setting/class-use/FileWithSettingValue.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Class fmpp.setting.FileWithSettingValue (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.setting.FileWithSettingValue

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/setting/class-use/SettingException.html b/fmpp/docs/api/fmpp/setting/class-use/SettingException.html deleted file mode 100644 index db7f95c..0000000 --- a/fmpp/docs/api/fmpp/setting/class-use/SettingException.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - -Uses of Class fmpp.setting.SettingException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.setting.SettingException

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/setting/class-use/Settings.html b/fmpp/docs/api/fmpp/setting/class-use/Settings.html deleted file mode 100644 index 124faad..0000000 --- a/fmpp/docs/api/fmpp/setting/class-use/Settings.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.setting.Settings (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.setting.Settings

-
-
No usage of fmpp.setting.Settings
- - - - - - diff --git a/fmpp/docs/api/fmpp/setting/package-frame.html b/fmpp/docs/api/fmpp/setting/package-frame.html deleted file mode 100644 index 5c7f1ce..0000000 --- a/fmpp/docs/api/fmpp/setting/package-frame.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -fmpp.setting (FMPP 0.9.15 API) - - - - - -

fmpp.setting

- - - diff --git a/fmpp/docs/api/fmpp/setting/package-summary.html b/fmpp/docs/api/fmpp/setting/package-summary.html deleted file mode 100644 index 599d2f6..0000000 --- a/fmpp/docs/api/fmpp/setting/package-summary.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - -fmpp.setting (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp.setting

-
-
FMPP settings.
-
-

See: Description

-
-
-
    -
  • - - - - - - - - - - - - - - - - - - - - -
    Class Summary 
    ClassDescription
    FileWithConfigurationBase -
    File that stores the current configuration base directory at - the time it was instantiated.
    -
    FileWithSettingValue -
    File that stores the original setting value (string) it was - constructed from.
    -
    Settings -
    Stores FMPP settings, loads configuration files, provides other setting - handling related utilities.
    -
    -
  • -
  • - - - - - - - - - - - - -
    Exception Summary 
    ExceptionDescription
    SettingException -
    Bad setting or setting combination, or failure when trying to setup the - engine with the settings.
    -
    -
  • -
- - - -

Package fmpp.setting Description

-

FMPP settings. FMPP settings is an abstraction over the FMPP core that - helps to write tools (front-ends) that can share configuration information, and - has similar setup rules from the view point of tool user.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/setting/package-tree.html b/fmpp/docs/api/fmpp/setting/package-tree.html deleted file mode 100644 index acb5fb2..0000000 --- a/fmpp/docs/api/fmpp/setting/package-tree.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -fmpp.setting Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp.setting

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/setting/package-use.html b/fmpp/docs/api/fmpp/setting/package-use.html deleted file mode 100644 index 4767775..0000000 --- a/fmpp/docs/api/fmpp/setting/package-use.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - -Uses of Package fmpp.setting (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp.setting

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/DataLoader.html b/fmpp/docs/api/fmpp/tdd/DataLoader.html deleted file mode 100644 index 0874725..0000000 --- a/fmpp/docs/api/fmpp/tdd/DataLoader.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - -DataLoader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tdd
-

Interface DataLoader

-
-
-
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        load

        -
        Object load(Engine e,
        -            List args)
        -     throws Exception
        -
        -
        Parameters:
        -
        args - Arguments that the caller specifies for this directive call. - Not null. - The implementation should check if it understands all arguments, - and it should throw java.lang.IllegalArgumentException - if it doesn't.
        -
        Returns:
        -
        The object that will be accessed in FreeMarker templates. - The object can be of any type. FreeMarker will wrap the object so - that it is visible as an FTL variable. However, if the object - implements freemarker.template.TemplateModel, then it - will not be wrapped, as it is already an FTL variable.
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/DataLoaderEvaluationEnvironment.html b/fmpp/docs/api/fmpp/tdd/DataLoaderEvaluationEnvironment.html deleted file mode 100644 index 82d54d7..0000000 --- a/fmpp/docs/api/fmpp/tdd/DataLoaderEvaluationEnvironment.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - -DataLoaderEvaluationEnvironment (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tdd
-

Class DataLoaderEvaluationEnvironment

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/EvalException.html b/fmpp/docs/api/fmpp/tdd/EvalException.html deleted file mode 100644 index 245c97c..0000000 --- a/fmpp/docs/api/fmpp/tdd/EvalException.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - -EvalException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tdd
-

Class EvalException

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        EvalException

        -
        public EvalException(String message)
        -
      • -
      - - - -
        -
      • -

        EvalException

        -
        public EvalException(String message,
        -                     Throwable cause)
        -
      • -
      - - - -
        -
      • -

        EvalException

        -
        public EvalException(String message,
        -                     int position)
        -
      • -
      - - - -
        -
      • -

        EvalException

        -
        public EvalException(String message,
        -                     int position,
        -                     Throwable cause)
        -
      • -
      - - - -
        -
      • -

        EvalException

        -
        public EvalException(String message,
        -                     String text,
        -                     int position,
        -                     String fileName)
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/EvaluationEnvironment.html b/fmpp/docs/api/fmpp/tdd/EvaluationEnvironment.html deleted file mode 100644 index 48202ab..0000000 --- a/fmpp/docs/api/fmpp/tdd/EvaluationEnvironment.html +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - -EvaluationEnvironment (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tdd
-

Interface EvaluationEnvironment

-
-
-
-
    -
  • -
    -
    All Known Implementing Classes:
    -
    DataLoaderEvaluationEnvironment
    -
    -
    -
    -
    public interface EvaluationEnvironment
    -
    Callbacks that let you control the behaviour of TDD expression evaluation.
    -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Field Summary

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Fields 
      Modifier and TypeField and Description
      static intEVENT_ENTER_FUNCTION_PARAMS -
      The code of event that indicates that we have started to evaluate the - parameter list in a function call.
      -
      static intEVENT_ENTER_HASH -
      The code of event that indicates that we have started to evaluate the - items in a hash.
      -
      static intEVENT_ENTER_HASH_KEY -
      The code of event that indicates that we have started to evaluate the - value in a key:value pair.
      -
      static intEVENT_ENTER_SEQUENCE -
      The code of event that indicates that we have started to evaluate the - items in a sequence.
      -
      static intEVENT_LEAVE_FUNCTION_PARAMS -
      The code of event that indicates that we have finished to evaluate the - parameter list in a function call.
      -
      static intEVENT_LEAVE_HASH -
      The code of event that indicates that we have finished to evaluate the - items in a sequence.
      -
      static intEVENT_LEAVE_HASH_KEY -
      The code of event that indicates that we have finished to evaluate the - value in a key:value pair.
      -
      static intEVENT_LEAVE_SEQUENCE -
      The code of event that indicates that we have finished to evaluate the - items in a sequence.
      -
      static ObjectRETURN_FRAGMENT 
      static ObjectRETURN_SKIP 
      -
    • -
    - - -
  • -
-
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        EVENT_ENTER_HASH_KEY

        -
        static final int EVENT_ENTER_HASH_KEY
        -
        The code of event that indicates that we have started to evaluate the - value in a key:value pair.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_LEAVE_HASH_KEY

        -
        static final int EVENT_LEAVE_HASH_KEY
        -
        The code of event that indicates that we have finished to evaluate the - value in a key:value pair.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_ENTER_FUNCTION_PARAMS

        -
        static final int EVENT_ENTER_FUNCTION_PARAMS
        -
        The code of event that indicates that we have started to evaluate the - parameter list in a function call.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_LEAVE_FUNCTION_PARAMS

        -
        static final int EVENT_LEAVE_FUNCTION_PARAMS
        -
        The code of event that indicates that we have finished to evaluate the - parameter list in a function call.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_ENTER_SEQUENCE

        -
        static final int EVENT_ENTER_SEQUENCE
        -
        The code of event that indicates that we have started to evaluate the - items in a sequence. This does not include function call parameter lists.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_LEAVE_SEQUENCE

        -
        static final int EVENT_LEAVE_SEQUENCE
        -
        The code of event that indicates that we have finished to evaluate the - items in a sequence.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_ENTER_HASH

        -
        static final int EVENT_ENTER_HASH
        -
        The code of event that indicates that we have started to evaluate the - items in a hash.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        EVENT_LEAVE_HASH

        -
        static final int EVENT_LEAVE_HASH
        -
        The code of event that indicates that we have finished to evaluate the - items in a sequence.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      - - - -
        -
      • -

        RETURN_SKIP

        -
        static final Object RETURN_SKIP
        -
      • -
      - - - -
        -
      • -

        RETURN_FRAGMENT

        -
        static final Object RETURN_FRAGMENT
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        evalFunctionCall

        -
        Object evalFunctionCall(FunctionCall fc,
        -                        Interpreter ip)
        -                 throws Exception
        -
        Evaluates the function call. This method may simply returns its - parameter, which means that the function was not resolved, and thus the - function call will be availble for further interpretation in the result - of the TDD expression evaluation.
        -
        -
        Parameters:
        -
        fc - the function call to evaluate.
        -
        Returns:
        -
        the return value of the function call. During the evaluation of - a TDD expression, function calls will be replaced with their return - values. - If the return value is a FunctionCall object, it will not be - evaluated again. This way, the final result of a TDD expression - evaluation can contain FunctionCall objects.
        -
        Throws:
        -
        Exception
        -
        -
      • -
      - - - -
        -
      • -

        notify

        -
        Object notify(int event,
        -              Interpreter ip,
        -              String name,
        -              Object extra)
        -       throws Exception
        -
        Notifies about an event during expression evaluation.
        -
        -
        Parameters:
        -
        event - An EVENT_... constant. Further events may will - be added later, so the implementation must silently ignore events - that it does not know. It is guaranteed that for each - EVENT_ENTER_... event there will be an - EVENT_LEAVE_... event later, except if - notifyContextChange has thrown exception during handling - EVENT_ENTER_..., in which case it is guaranteed that - there will be no corresponding EVENT_LEAVE_... event.
        -
        ip - the Interpreter instance that evaluates the text. - The value returned by Interpreter.getPosition() will be - the position in the text where the this even has been created: -
        -
        name - For EVENT_ENTER_HASH_KEY and - EVENT_ENTER_FUNCTION_PARAMS, the name of the hash key or - function. It is null otherwise.
        -
        extra - Even specific extra information. -
        -
        Returns:
        -
        return The allowed return values and their meaning depends on - the event. But return value null always means - "do nothing special". The currently defiend non-null - return values for the events: -
          -
        • EVENT_ENTER_HASH_KEY: -
            -
          • RETURN_SKIP: Skip the key:value - pair. That is, the key:value pair will not be added to - the map. The value expression will not be evaluated. -
          • RETURN_FRAGMENT: The value of the key:value pair - will be the Fragment that stores the value - expression. The value expression will not be evaluated. - However, if the value is implicit boolean - true, (i.e. you omit the value) then - RETURN_FRAGMENT has no effect. -
          -
        • -
        • EVENT_ENTER_HASH if the hash uses { and - }): -
            -
          • RETURN_FRAGMENT: The value of the hash will be - the Fragment that stores the hash expression. - The hash expression will not be evaluated. -
          -
        • -
        -
        Throws:
        -
        Exception
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/Fragment.html b/fmpp/docs/api/fmpp/tdd/Fragment.html deleted file mode 100644 index 33369e6..0000000 --- a/fmpp/docs/api/fmpp/tdd/Fragment.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - -Fragment (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tdd
-

Class Fragment

-
-
- -
-
    -
  • -
    -
    -
    public class Fragment
    -extends Object
    -
    Fragment extracted from a TDD expression.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        Fragment

        -
        public Fragment(String text,
        -                int fragmentStart,
        -                int fragmentEnd,
        -                String fileName)
        -
        Creates new TDD fragment.
        -
        -
        Parameters:
        -
        text - the full TDD text that contains the fragment. (In extreme - case the fragment and the full text is the same.)
        -
        fragmentStart - the start index of the fragment in the text.
        -
        fragmentEnd - the start index of the fragment in the text
        -
        fileName - the name of the file the text comes from (for - informational purposes only). It can be null if the source - file is unknown or there is no source file.
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        getFileName

        -
        public String getFileName()
        -
        Returns the name of the file the text comes from (for informational - purposes only). It can be null if the source file is unknown - or there is no source file.
        -
      • -
      - - - -
        -
      • -

        getText

        -
        public String getText()
        -
        Returns the full TDD text that contains the fragmet.
        -
      • -
      - - - -
        -
      • -

        getFragmentStart

        -
        public int getFragmentStart()
        -
        Returns the start index of the fragment in the text.
        -
      • -
      - - - -
        -
      • -

        getFragmentEnd

        -
        public int getFragmentEnd()
        -
        Returns the end index (exclusive) of the fragment in the text.
        -
      • -
      - - - -
        -
      • -

        toString

        -
        public String toString()
        -
        Returns the fragment text.
        -
        -
        Overrides:
        -
        toString in class Object
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/FunctionCall.html b/fmpp/docs/api/fmpp/tdd/FunctionCall.html deleted file mode 100644 index e35160c..0000000 --- a/fmpp/docs/api/fmpp/tdd/FunctionCall.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - -FunctionCall (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tdd
-

Class FunctionCall

-
-
- -
-
    -
  • -
    -
    -
    public class FunctionCall
    -extends Object
    -
    Symbolizes a TDD function call. - Function calls that are not evaluated during the evaluation of a TDD - expressions will be present in the result as the instances of this class.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        FunctionCall

        -
        public FunctionCall(String name,
        -                    List params)
        -
      • -
      -
    • -
    - - -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/Interpreter.html b/fmpp/docs/api/fmpp/tdd/Interpreter.html deleted file mode 100644 index 9cefdd2..0000000 --- a/fmpp/docs/api/fmpp/tdd/Interpreter.html +++ /dev/null @@ -1,701 +0,0 @@ - - - - - - -Interpreter (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tdd
-

Class Interpreter

-
-
- -
-
    -
  • -
    -
    -
    public class Interpreter
    -extends Object
    -
    Evaluates TDD expressions.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/TddUtil.html b/fmpp/docs/api/fmpp/tdd/TddUtil.html deleted file mode 100644 index d4705fc..0000000 --- a/fmpp/docs/api/fmpp/tdd/TddUtil.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - -TddUtil (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tdd
-

Class TddUtil

-
-
- -
-
    -
  • -
    -
    -
    public class TddUtil
    -extends Object
    -
    Utility methods for TDD related tasks.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        TddUtil

        -
        public TddUtil()
        -
      • -
      -
    • -
    - - -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/class-use/DataLoader.html b/fmpp/docs/api/fmpp/tdd/class-use/DataLoader.html deleted file mode 100644 index ffe8b4f..0000000 --- a/fmpp/docs/api/fmpp/tdd/class-use/DataLoader.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - -Uses of Interface fmpp.tdd.DataLoader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Interface
fmpp.tdd.DataLoader

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/class-use/DataLoaderEvaluationEnvironment.html b/fmpp/docs/api/fmpp/tdd/class-use/DataLoaderEvaluationEnvironment.html deleted file mode 100644 index 52955a1..0000000 --- a/fmpp/docs/api/fmpp/tdd/class-use/DataLoaderEvaluationEnvironment.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.tdd.DataLoaderEvaluationEnvironment (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tdd.DataLoaderEvaluationEnvironment

-
-
No usage of fmpp.tdd.DataLoaderEvaluationEnvironment
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/class-use/EvalException.html b/fmpp/docs/api/fmpp/tdd/class-use/EvalException.html deleted file mode 100644 index 279f39e..0000000 --- a/fmpp/docs/api/fmpp/tdd/class-use/EvalException.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - -Uses of Class fmpp.tdd.EvalException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tdd.EvalException

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/class-use/EvaluationEnvironment.html b/fmpp/docs/api/fmpp/tdd/class-use/EvaluationEnvironment.html deleted file mode 100644 index 814dddf..0000000 --- a/fmpp/docs/api/fmpp/tdd/class-use/EvaluationEnvironment.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - -Uses of Interface fmpp.tdd.EvaluationEnvironment (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Interface
fmpp.tdd.EvaluationEnvironment

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/class-use/Fragment.html b/fmpp/docs/api/fmpp/tdd/class-use/Fragment.html deleted file mode 100644 index c32ffad..0000000 --- a/fmpp/docs/api/fmpp/tdd/class-use/Fragment.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - -Uses of Class fmpp.tdd.Fragment (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tdd.Fragment

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/class-use/FunctionCall.html b/fmpp/docs/api/fmpp/tdd/class-use/FunctionCall.html deleted file mode 100644 index 8e75ab6..0000000 --- a/fmpp/docs/api/fmpp/tdd/class-use/FunctionCall.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - -Uses of Class fmpp.tdd.FunctionCall (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tdd.FunctionCall

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/class-use/Interpreter.html b/fmpp/docs/api/fmpp/tdd/class-use/Interpreter.html deleted file mode 100644 index 4fb8a08..0000000 --- a/fmpp/docs/api/fmpp/tdd/class-use/Interpreter.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - -Uses of Class fmpp.tdd.Interpreter (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tdd.Interpreter

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/class-use/TddUtil.html b/fmpp/docs/api/fmpp/tdd/class-use/TddUtil.html deleted file mode 100644 index d75b2e5..0000000 --- a/fmpp/docs/api/fmpp/tdd/class-use/TddUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.tdd.TddUtil (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tdd.TddUtil

-
-
No usage of fmpp.tdd.TddUtil
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/package-frame.html b/fmpp/docs/api/fmpp/tdd/package-frame.html deleted file mode 100644 index dc87089..0000000 --- a/fmpp/docs/api/fmpp/tdd/package-frame.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -fmpp.tdd (FMPP 0.9.15 API) - - - - - -

fmpp.tdd

- - - diff --git a/fmpp/docs/api/fmpp/tdd/package-summary.html b/fmpp/docs/api/fmpp/tdd/package-summary.html deleted file mode 100644 index fc0a048..0000000 --- a/fmpp/docs/api/fmpp/tdd/package-summary.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - -fmpp.tdd (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp.tdd

-
-
Textual Data Definition related classes.
-
-

See: Description

-
-
-
    -
  • - - - - - - - - - - - - - - - - -
    Interface Summary 
    InterfaceDescription
    DataLoader -
    Creates an object that will be accessed in FreeMarker templates.
    -
    EvaluationEnvironment -
    Callbacks that let you control the behaviour of TDD expression evaluation.
    -
    -
  • -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Class Summary 
    ClassDescription
    DataLoaderEvaluationEnvironment -
    Evaluates function calls as data loader invocations.
    -
    Fragment -
    Fragment extracted from a TDD expression.
    -
    FunctionCall -
    Symbolizes a TDD function call.
    -
    Interpreter -
    Evaluates TDD expressions.
    -
    TddUtil -
    Utility methods for TDD related tasks.
    -
    -
  • -
  • - - - - - - - - - - - - -
    Exception Summary 
    ExceptionDescription
    EvalException 
    -
  • -
- - - -

Package fmpp.tdd Description

-

Textual Data Definition related classes. - TDD is a very simple expression language created for defining hierarchical data - (vectors, dictionaries) as plain text (maybe a command-line argument). - Its syntax is similar to FreeMarker expression syntax. - -

TDD is not for defining large amount of data. - Rather, it is for give a uniform syntax for simple setting (configuration) values.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/package-tree.html b/fmpp/docs/api/fmpp/tdd/package-tree.html deleted file mode 100644 index 36eff60..0000000 --- a/fmpp/docs/api/fmpp/tdd/package-tree.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -fmpp.tdd Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp.tdd

-Package Hierarchies: - -
-
-

Class Hierarchy

- -

Interface Hierarchy

- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tdd/package-use.html b/fmpp/docs/api/fmpp/tdd/package-use.html deleted file mode 100644 index 03ff451..0000000 --- a/fmpp/docs/api/fmpp/tdd/package-use.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - -Uses of Package fmpp.tdd (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp.tdd

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tools/AntTask.AntAttributeSubstitution.html b/fmpp/docs/api/fmpp/tools/AntTask.AntAttributeSubstitution.html deleted file mode 100644 index 14d7907..0000000 --- a/fmpp/docs/api/fmpp/tools/AntTask.AntAttributeSubstitution.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - -AntTask.AntAttributeSubstitution (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tools
-

Class AntTask.AntAttributeSubstitution

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • org.apache.tools.ant.ProjectComponent
    • -
    • -
        -
      • fmpp.tools.AntTask.AntAttributeSubstitution
      • -
      -
    • -
    -
  • -
-
-
    -
  • -
    -
    Enclosing class:
    -
    AntTask
    -
    -
    -
    -
    public static class AntTask.AntAttributeSubstitution
    -extends org.apache.tools.ant.ProjectComponent
    -
    Used internally (must be public class for technical reasons).
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AntAttributeSubstitution

        -
        public AntAttributeSubstitution()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        setExpandProperties

        -
        public void setExpandProperties(boolean expandProperties)
        -
      • -
      - - - -
        -
      • -

        addText

        -
        public void addText(String text)
        -
      • -
      - - - -
        -
      • -

        getText

        -
        public String getText()
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tools/AntTask.html b/fmpp/docs/api/fmpp/tools/AntTask.html deleted file mode 100644 index 657daef..0000000 --- a/fmpp/docs/api/fmpp/tools/AntTask.html +++ /dev/null @@ -1,1202 +0,0 @@ - - - - - - -AntTask (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tools
-

Class AntTask

-
-
-
    -
  • java.lang.Object
  • -
  • -
      -
    • org.apache.tools.ant.ProjectComponent
    • -
    • -
        -
      • org.apache.tools.ant.Task
      • -
      • -
          -
        • org.apache.tools.ant.taskdefs.MatchingTask
        • -
        • -
            -
          • fmpp.tools.AntTask
          • -
          -
        • -
        -
      • -
      -
    • -
    -
  • -
-
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    org.apache.tools.ant.types.selectors.SelectorContainer
    -
    -
    -
    -
    public class AntTask
    -extends org.apache.tools.ant.taskdefs.MatchingTask
    -
    Ant task to process files selected by pattern sets.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        AntTask

        -
        public AntTask()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        setConfiguration

        -
        public void setConfiguration(File outputFile)
        -
      • -
      - - - -
        -
      • -

        setAntTaskFailOnError

        -
        public void setAntTaskFailOnError(boolean antTaskFailOnError)
        -
      • -
      - - - -
        -
      • -

        setConfigurationBase

        -
        public void setConfigurationBase(File f)
        -
      • -
      - - - -
        -
      • -

        setInheritConfiguration

        -
        public void setInheritConfiguration(File f)
        -
      • -
      - - - -
        -
      • -

        setOutputFile

        -
        public void setOutputFile(File outputFile)
        -
      • -
      - - - -
        -
      • -

        setOutputRoot

        -
        public void setOutputRoot(File outputRoot)
        -
      • -
      - - - -
        -
      • -

        setDestDir

        -
        public void setDestDir(File outputRoot)
        -
      • -
      - - - -
        -
      • -

        setOutputRoot_common

        -
        public void setOutputRoot_common(File outputRoot,
        -                                 boolean alt)
        -
      • -
      - - - -
        -
      • -

        setSourceFile

        -
        public void setSourceFile(File sourceFile)
        -
      • -
      - - - -
        -
      • -

        setSourceRoot

        -
        public void setSourceRoot(File sourceRoot)
        -
      • -
      - - - -
        -
      • -

        setSrcDir

        -
        public void setSrcDir(File sourceRoot)
        -
      • -
      - - - -
        -
      • -

        setSourceRoot_common

        -
        public void setSourceRoot_common(File sourceRoot,
        -                                 boolean alt)
        -
      • -
      - - - -
        -
      • -

        setFreemarkerIncompatibleImprovements

        -
        public void setFreemarkerIncompatibleImprovements(String fmIcI)
        -
      • -
      - - - -
        -
      • -

        setObjectWrapper

        -
        public void setObjectWrapper(String objectWrapper)
        -
      • -
      - - - -
        -
      • -

        setFreemarkerLinks

        -
        public void setFreemarkerLinks(String freemarkerLinks)
        -
      • -
      - - - -
        -
      • -

        setBorders

        -
        public void setBorders(String border)
        -
      • -
      - - - -
        -
      • -

        setCaseSensitive

        -
        public void setCaseSensitive(boolean caseSensitive)
        -
        -
        Overrides:
        -
        setCaseSensitive in class org.apache.tools.ant.taskdefs.MatchingTask
        -
        -
      • -
      - - - -
        -
      • -

        setDataRoot

        -
        public void setDataRoot(File dataRoot)
        -
      • -
      - - - -
        -
      • -

        setData

        -
        public void setData(String data)
        -
      • -
      - - - -
        -
      • -

        setLocalData

        -
        public void setLocalData(String localData)
        -
      • -
      - - - -
        -
      • -

        setTurns

        -
        public void setTurns(String turn)
        -
      • -
      - - - -
        -
      • -

        setExpert

        -
        public void setExpert(boolean expert)
        -
      • -
      - - - -
        -
      • -

        setAlwaysCreateDirs

        -
        public void setAlwaysCreateDirs(boolean copy)
        -
        Same as setAlwaysCreateDirectories(boolean); added as this name - is closer to the Ant naming conventions.
        -
      • -
      - - - -
        -
      • -

        setAlwaysCreateDirectories

        -
        public void setAlwaysCreateDirectories(boolean copy)
        -
      • -
      - - - -
        -
      • -

        setLocale

        -
        public void setLocale(String locale)
        -
      • -
      - - - -
        -
      • -

        setLogFile

        -
        public void setLogFile(File logFile)
        -
      • -
      - - - -
        -
      • -

        setAppendLogFile

        -
        public void setAppendLogFile(boolean append)
        -
      • -
      - - - -
        -
      • -

        setModes

        -
        public void setModes(String mode)
        -
      • -
      - - - -
        -
      • -

        setNumberFormat

        -
        public void setNumberFormat(String numberFormat)
        -
      • -
      - - - -
        -
      • -

        setBooleanFormat

        -
        public void setBooleanFormat(String booleanFormat)
        -
      • -
      - - - -
        -
      • -

        setDateFormat

        -
        public void setDateFormat(String dateFormat)
        -
      • -
      - - - -
        -
      • -

        setTimeFormat

        -
        public void setTimeFormat(String timeFormat)
        -
      • -
      - - - -
        -
      • -

        setDateTimeFormat

        -
        public void setDateTimeFormat(String dateTimeFormat)
        -
      • -
      - - - -
        -
      • -

        setTimeZone

        -
        public void setTimeZone(String timeZone)
        -
      • -
      - - - -
        -
      • -

        setSQLDateAndTimeTimeZone

        -
        public void setSQLDateAndTimeTimeZone(String timeZone)
        -
      • -
      - - - -
        -
      • -

        setTagSyntax

        -
        public void setTagSyntax(String tagSyntax)
        -
      • -
      - - - -
        -
      • -

        setOutputEncoding

        -
        public void setOutputEncoding(String outputEncoding)
        -
      • -
      - - - -
        -
      • -

        setUrlEscapingCharset

        -
        public void setUrlEscapingCharset(String urlEscapingCharset)
        -
      • -
      - - - -
        -
      • -

        setXpathEngine

        -
        public void setXpathEngine(String engine)
        -
      • -
      - - - -
        -
      • -

        setXmlCatalogFiles

        -
        public void setXmlCatalogFiles(String files)
        -
      • -
      - - - -
        -
      • -

        setXmlCatalogPrefer

        -
        public void setXmlCatalogPrefer(String prefer)
        -
      • -
      - - - -
        -
      • -

        setValidateXml

        -
        public void setValidateXml(String validate)
        -
      • -
      - - - -
        -
      • -

        setXmlRenderings

        -
        public void setXmlRenderings(String prefer)
        -
      • -
      - - - -
        -
      • -

        setQuiet

        -
        public void setQuiet(String quiet)
        -
      • -
      - - - -
        -
      • -

        setReplaceExtensions

        -
        public void setReplaceExtensions(String replaceExtension)
        -
      • -
      - - - -
        -
      • -

        setRemoveExtensions

        -
        public void setRemoveExtensions(String removeExtension)
        -
      • -
      - - - -
        -
      • -

        setRemovePostfixes

        -
        public void setRemovePostfixes(String removePostfix)
        -
      • -
      - - - -
        -
      • -

        setReplaceExtension

        -
        public void setReplaceExtension(String replaceExtension)
        -
      • -
      - - - -
        -
      • -

        setRemoveExtension

        -
        public void setRemoveExtension(String removeExtension)
        -
      • -
      - - - -
        -
      • -

        setRemovePostfix

        -
        public void setRemovePostfix(String removePostfix)
        -
      • -
      - - - -
        -
      • -

        setSourceEncoding

        -
        public void setSourceEncoding(String sourceEncoding)
        -
      • -
      - - - -
        -
      • -

        setStopOnError

        -
        public void setStopOnError(boolean stopOnError)
        -
      • -
      - - - -
        -
      • -

        setSkipUnchanged

        -
        public void setSkipUnchanged(String skipUnchanged)
        -
      • -
      - - - -
        -
      • -

        setTemplateData

        -
        public void setTemplateData(String templateData)
        -
      • -
      - - - -
        -
      • -

        setDir

        -
        public void setDir(File dir)
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        getTarget

        -
        public org.apache.tools.ant.Target getTarget()
        -
      • -
      - - - -
        -
      • -

        execute

        -
        public void execute()
        -             throws fmpp.tools.AntTask.CausePrinterBuildException
        -
        -
        Overrides:
        -
        execute in class org.apache.tools.ant.Task
        -
        Throws:
        -
        fmpp.tools.AntTask.CausePrinterBuildException
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tools/CommandLine.html b/fmpp/docs/api/fmpp/tools/CommandLine.html deleted file mode 100644 index 9abf4b3..0000000 --- a/fmpp/docs/api/fmpp/tools/CommandLine.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - -CommandLine (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.tools
-

Class CommandLine

-
-
- -
-
    -
  • -
    -
    -
    public class CommandLine
    -extends Object
    -
    Command-line tool for preprocessing single files or entire directories.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        FMPP_CONSOLE_COLS

        -
        public static final String FMPP_CONSOLE_COLS
        -
        The number of console (terminal) columns can be passed in with this environment variable, supposedly by the - OS-specific starter executable (shell script). Note that if the Settings.NAME_COLUMNS is set, that will - override this (but by default it isn't set). The value of the environment variable should be just an integer - (with possible white space around it), however, if it's not a number, CommandLine will attempt to parse - it as the output of the Windows mode con /status command (also then [BR] can be used instead of - real line-breaks, to ease bat programming). On UN*X-es usually this should be the output of tput cols.
        -
        -
        See Also:
        -
        Constant Field Values
        -
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        CommandLine

        -
        public CommandLine()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        main

        -
        public static void main(String[] args)
        -
        Runs the command line interface.
        -
        -
        See Also:
        -
        FMPP_CONSOLE_COLS
        -
        -
      • -
      - - - -
        -
      • -

        execute

        -
        public static int execute(String[] args,
        -                          PrintWriter stdout,
        -                          PrintWriter stderr)
        -
        Emulates the command-line invocation of the tool.
        -
        -
        Parameters:
        -
        args - the command line arguments
        -
        stdout - the PrintWriter used as stdout. - If it is null then it defaults to the real stdout.
        -
        stderr - the PrintWriter used as stderr. - If it is null then it defaults to the real stderr.
        -
        Returns:
        -
        exit code. 0 if everything was OK, non-0 if there was an error.
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/tools/class-use/AntTask.AntAttributeSubstitution.html b/fmpp/docs/api/fmpp/tools/class-use/AntTask.AntAttributeSubstitution.html deleted file mode 100644 index 80db2ef..0000000 --- a/fmpp/docs/api/fmpp/tools/class-use/AntTask.AntAttributeSubstitution.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - -Uses of Class fmpp.tools.AntTask.AntAttributeSubstitution (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tools.AntTask.AntAttributeSubstitution

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/tools/class-use/AntTask.html b/fmpp/docs/api/fmpp/tools/class-use/AntTask.html deleted file mode 100644 index 174cc6b..0000000 --- a/fmpp/docs/api/fmpp/tools/class-use/AntTask.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.tools.AntTask (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tools.AntTask

-
-
No usage of fmpp.tools.AntTask
- - - - - - diff --git a/fmpp/docs/api/fmpp/tools/class-use/CommandLine.html b/fmpp/docs/api/fmpp/tools/class-use/CommandLine.html deleted file mode 100644 index 55bc2d9..0000000 --- a/fmpp/docs/api/fmpp/tools/class-use/CommandLine.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.tools.CommandLine (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.tools.CommandLine

-
-
No usage of fmpp.tools.CommandLine
- - - - - - diff --git a/fmpp/docs/api/fmpp/tools/package-frame.html b/fmpp/docs/api/fmpp/tools/package-frame.html deleted file mode 100644 index a38e681..0000000 --- a/fmpp/docs/api/fmpp/tools/package-frame.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -fmpp.tools (FMPP 0.9.15 API) - - - - - -

fmpp.tools

- - - diff --git a/fmpp/docs/api/fmpp/tools/package-summary.html b/fmpp/docs/api/fmpp/tools/package-summary.html deleted file mode 100644 index 1f570f8..0000000 --- a/fmpp/docs/api/fmpp/tools/package-summary.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - -fmpp.tools (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp.tools

-
-
Tools (front-ends) that end-user can use out-of-the-box.
-
-

See: Description

-
-
-
    -
  • - - - - - - - - - - - - - - - - - - - - -
    Class Summary 
    ClassDescription
    AntTask -
    Ant task to process files selected by pattern sets.
    -
    AntTask.AntAttributeSubstitution -
    Used internally (must be public class for technical reasons).
    -
    CommandLine -
    Command-line tool for preprocessing single files or entire directories.
    -
    -
  • -
- - - -

Package fmpp.tools Description

-

Tools (front-ends) that end-user can use out-of-the-box.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/tools/package-tree.html b/fmpp/docs/api/fmpp/tools/package-tree.html deleted file mode 100644 index 1cfcae9..0000000 --- a/fmpp/docs/api/fmpp/tools/package-tree.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -fmpp.tools Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp.tools

-Package Hierarchies: - -
-
-

Class Hierarchy

-
    -
  • java.lang.Object -
      -
    • fmpp.tools.CommandLine
    • -
    • org.apache.tools.ant.ProjectComponent -
        -
      • fmpp.tools.AntTask.AntAttributeSubstitution
      • -
      • org.apache.tools.ant.Task -
          -
        • org.apache.tools.ant.taskdefs.MatchingTask (implements org.apache.tools.ant.types.selectors.SelectorContainer) - -
        • -
        -
      • -
      -
    • -
    -
  • -
-
- - - - - - diff --git a/fmpp/docs/api/fmpp/tools/package-use.html b/fmpp/docs/api/fmpp/tools/package-use.html deleted file mode 100644 index 205ec5b..0000000 --- a/fmpp/docs/api/fmpp/tools/package-use.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - -Uses of Package fmpp.tools (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp.tools

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/ArgsParser.BadArgsException.html b/fmpp/docs/api/fmpp/util/ArgsParser.BadArgsException.html deleted file mode 100644 index 3276fbe..0000000 --- a/fmpp/docs/api/fmpp/util/ArgsParser.BadArgsException.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -ArgsParser.BadArgsException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class ArgsParser.BadArgsException

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable
    -
    -
    -
    Enclosing class:
    -
    ArgsParser
    -
    -
    -
    -
    public static class ArgsParser.BadArgsException
    -extends Exception
    -
    The user has entered invalid options in the command-line. - Use the getMessage() method to get the description of the - problem, that you can directly print to the terminal for the user.
    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/ArgsParser.OptionDefinition.html b/fmpp/docs/api/fmpp/util/ArgsParser.OptionDefinition.html deleted file mode 100644 index 57056bd..0000000 --- a/fmpp/docs/api/fmpp/util/ArgsParser.OptionDefinition.html +++ /dev/null @@ -1,611 +0,0 @@ - - - - - - -ArgsParser.OptionDefinition (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class ArgsParser.OptionDefinition

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Cloneable
    -
    -
    -
    Enclosing class:
    -
    ArgsParser
    -
    -
    -
    -
    public class ArgsParser.OptionDefinition
    -extends Object
    -implements Cloneable
    -
    Describes and option. It does not store the actual value of the - option after parsing; it is just the definition of the option.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        OptionDefinition

        -
        public OptionDefinition()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        property

        -
        public ArgsParser.OptionDefinition property(String pName)
        -
        Sets the property name for this option. - If you don't override the property name with this, it will be - the long-name of the option if the option has long-name, otherwise - the short-name of the option.
        -
        -
        See Also:
        -
        property(String, String)
        -
        -
      • -
      - - - -
        -
      • -

        propertyValue

        -
        public ArgsParser.OptionDefinition propertyValue(String value)
        -
        Sets the property value for this option. - This only allowed for options that do no support argument, as - the value of options that has argument will be the actual value - of the argument. - If you don't override the property value with this, it will be - "" (0 length String) for those options.
        -
        -
        Throws:
        -
        IllegalArgumentException - if the option has argument.
        -
        See Also:
        -
        property(String, String)
        -
        -
      • -
      - - - - - - - - - - - - - - - -
        -
      • -

        implied

        -
        public ArgsParser.OptionDefinition implied(String impliedArg)
        -
        Ensures that the option will be seemingly present with the given - argument value if args[] does not contains this option, or any - other option that mutually excludes this option. - This version of the method applies only for options that support - argument.
        -
        -
        Throws:
        -
        IllegalArgumentException - if the option has no argument.
        -
        See Also:
        -
        implied()
        -
        -
      • -
      - - - -
        -
      • -

        defaultArg

        -
        public ArgsParser.OptionDefinition defaultArg(String defaultValue)
        -
        Gives default argument value for an option that supports arguments, - thus it will be optional to specify the argument value in the - command-line. - -

        Note that introducing default value for an option is not a - backward compatible step. For example if "color" has no default - value, then "--color red" is interpreted as "color" - has an argument that is "red". But, if "color" has a default value, - then it is interpreted as "color" has the default value, and - we have a non-option "red". Of coruse, there would not be problem - if we use "--color=red".

        -
      • -
      - - - - - - - -
        -
      • -

        hide

        -
        public void hide()
        -
        Hides option, that is, it will not be shown in the option help.
        -
      • -
      - - - -
        -
      • -

        copy

        -
        public ArgsParser.OptionDefinition copy(String shortName,
        -                                        String longName)
        -
        Creates a copy of the option with different short- and long-name, - but with the same property name (and other attributes). - This is mostly useful to create alias options.
        -
        -
        Parameters:
        -
        longName - the long-name of option or null. - Do not use the long-name=ARGNAME form here.
        -
        shortName - the short-name of option or null. - Do not use the s=ARGNAME form here.
        -
        Returns:
        -
        the newly created OptionDefinition.
        -
        Throws:
        -
        IllegalArgumentException - If an option with the same - long-name or short-name is already added, or if the given long- - or short-name is malformed.
        -
        -
      • -
      - - - -
        -
      • -

        getArgName

        -
        public String getArgName()
        -
        Returns the name of the argument, or null if the option does not - support argument.
        -
      • -
      - - - -
        -
      • -

        getDefaultArg

        -
        public String getDefaultArg()
        -
        Returns the default argument of the option, or null if the option - has no default argument.
        -
      • -
      - - - -
        -
      • -

        getDescription

        -
        public String getDescription()
        -
        Returns the description of the option, or null if no description is - available.
        -
      • -
      - - - -
        -
      • -

        getLongName

        -
        public String getLongName()
        -
        Returns the long-name of the option, or null if the option has no - long-name.
        -
      • -
      - - - -
        -
      • -

        getShortName

        -
        public String getShortName()
        -
        Returns the short-name of the option, or null if the option has no - short-name.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/ArgsParser.html b/fmpp/docs/api/fmpp/util/ArgsParser.html deleted file mode 100644 index d18f762..0000000 --- a/fmpp/docs/api/fmpp/util/ArgsParser.html +++ /dev/null @@ -1,846 +0,0 @@ - - - - - - -ArgsParser (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class ArgsParser

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable
    -
    -
    -
    -
    public class ArgsParser
    -extends Object
    -implements Serializable
    -
    Simple command-line argument parser that mimics the logic of UN*X - tools as ls. It does not support the logic of tools like - gcc. - -

    Features: short (1 character) and long option names, options - with no argument, with optional argument and with mandatory argument, option - groups (a.k.a. mutually exclusive options), implied options, alias options, - retrieval of non-options, automatically generates formatted options help. - -

    For example, here it is a typical "UN*X command-line": - -

    $ ls -laT4 --color=auto --quote-name etc etc/mysql - -

    Here, we have 3 options given with short-name: "l", "a" and "T", and - 2 options given with long-name: "color" and "quote-name". Two options have - argument: "T" and "color". Also, we have 2 non-option arguments: - "etc" and "etc/mysql". According to Java logic, the - main method doesn't get the program name (here: "ls"), so we don't deal with - that. - -

    A short example, that defines a subset of ls options: -

    - // 1. Create parser instance:
    - ArgsParser ap = new ArgsParser();
    - 
    - // 2. Define the options:
    - ap.addOption("a", "all")
    -         .desc("do not hide entries starting with .");
    - ap.addOption("A", "almost-all")
    -         .desc("do not list implied . and ..");
    - ap.addOption("l", null)
    -         .desc("use a long list format");
    - ap.addOption("T", "tabsize=COLS")
    -         .desc("assume tab stops at each COLS instead of 8");
    - ap.addOption(null, "color=WHEN")
    -         .defaultArg("always")
    -         .desc("control whether color is used ...[too long].");
    - ap.addOption("Q", "quote-name")
    -         .desc("enclose entry names in double-quotes");
    - 
    - // 3. Parse args[]:
    - try {
    -     ap.parse(args);
    - } catch (ArgsParser.BadArgsException exc) {
    -     System.out.println(exc.getMessage());
    -     System.exit(-1);
    - }
    - 
    - // 4. Get the results:
    - Properties ops = ap.getOptions();
    - String[] nonOps = ap.getNonOptions();
    -
    - // 5. Print the results for the sake of testing:
    - System.out.println("Options:");
    - Iterator it = ops.entrySet().iterator();
    - while (it.hasNext()) {
    -     Map.Entry e = (Map.Entry) it.next();
    -     System.out.println(
    -             "- " + e.getKey() + " = " + e.getValue());
    - }
    - System.out.println("Non-options:");
    - for (int i = 0; i < nonOps.length; i++) {
    -     System.out.println("- " + nonOps[i]);
    - }
    - 
    - -

    This defines the following options:

    - -
    short-namelong-nameargument? -
    aallno -
    Aalmost-allno -
    l no -
    Ttabsizemandatory -
     coloroptional, defaults to "always" -
    Qquote-nameno -
    -

    and will parse command-line arguments like: -
    -laT4 --color=auto --quote-name etc etc/mysql - -

    The resulting properties will be:

    - - -
    namevalue -
    all"" -
    l"" -
    tabsize"4" -
    color"auto" -
    quote-name"" -
    - -

    Note that the property name is always the long-name of the option if the - option has a long-name, otherwise the short-name. Also note that the value of - options that do not allow argument is 0 length String when the option is - present, otherwise no property is made for the option (there is no - "almost-all" propery). - -

    For options that has argument it is maybe practical to use implied values - as: -

    - ...
    - ap.addOption("T", "tabsize=COLS")
    -         .implied("8")
    -         .desc("assume tab stops at each COLS instead of 8");
    - ap.addOption(null, "color=WHEN")
    -         .implied("none")
    -         .defaultArg("always")
    -         .desc("control whether color is used ...[too long].");
    - ...
    - 
    - -

    If you parse this with the above modification: -
    -la --quote-name etc etc/mysql
    - then the "tabsize" property will be "8", and the - "color" property will be "none". If you parse this: -
    -laT4 --color --quote-name etc etc/mysql
    - then the "tabsize" property will be "4", and the - "color" property will be "always" (note that it is - the default argument of "color", as there was no argument given for that in - the command-line). - -

    You may want to use the same propery name but different value for options - as "a" and "A". They should be mutually exclusive options anyway: - -

    - ...
    - ap.addOption("a", "all")
    -         .property("show", "all")
    -         .desc("do not hide entries starting with .");
    - ap.addOption("A", "almost-all")
    -         .property("show", "almost-all")
    -         .desc("do not list implied . and ..");
    - ...
    - 
    - -

    Here you say that both option sets the value of the "show" property - (instead of setting "all" and "almost-all" properties) to the given values - ("all" and "almost-all") if the option is present. As usually you want the - option long-name (or short-name if there is no long-name) as the value of - the property, there is a conveniece method for this: - -

    - ...
    - ap.addOption("a", "all")
    -         .group("show")
    -         .desc("do not hide entries starting with .");
    - ap.addOption("A", "almost-all")
    -         .group("show")
    -         .desc("do not list implied . and ..");
    - ...
    - 
    - -

    The parse method will throw exception if two options in - args[] tries to set the same property, so the two options will mutually - exclude each other here. - -

    For grouped options you may want to choose an implied option. Say, assume - you have "format-normal", and a "format-terse" and a "format-verbose" options - that are mutually exclusively set the value of "format" property. If the user - do not use any of the "format-..." options, then you want see it as if it - were a "--format-nomal" in the command-line: - -

    - ...
    - ap.addOption(null, "format-normal")
    -         .property("format", "normal")
    -         .implied();
    - ap.addOption(null, "format-terse")
    -         .property("format", "terse");
    - ap.addOption(null, "format-verbose")
    -         .property("format", "verbose");
    - ...
    - 
    - -

    You can print the options help to the screen: -

    - System.out.println(ap.getOptionsHelp(80));
    - 
    - -

    For more information please read the documentation of methods.

    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
-
    -
  • - - - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ArgsParser

        -
        public ArgsParser()
        -
        Creates a parser.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        parse

        -
        public Properties parse(String[] args)
        -                 throws ArgsParser.BadArgsException
        -
        Parses the args[]. After this, you can get the options and non-options - with getOptions and - getNonOptions.
        -
        -
        Parameters:
        -
        args - the array of Strings that you get as the parameter of - main method.
        -
        Returns:
        -
        the properties object that stores the options. This is the - same object as getOptions() returns.
        -
        Throws:
        -
        ArgsParser.BadArgsException - if the user has entered bad command-line - arguments. The message in the exception (call - exception.getMessage()) contains the (relatively) - user-frinedly desription of the problem.
        -
        -
      • -
      - - - -
        -
      • -

        getOptions

        -
        public Properties getOptions()
        -
        Returns the options resulting from the latest parse - call as Properties object. An empty - Properties object will be returned if there was no - parse call yet.
        -
      • -
      - - - -
        -
      • -

        getOption

        -
        public String getOption(String name)
        -
        Convenience funtcion to read the option Properties object.
        -
      • -
      - - - -
        -
      • -

        getNonOptions

        -
        public String[] getNonOptions()
        -
        Retruns the non-options resulting from the latest parse - call. An empty array will be returned if there was no parse - call yet. - -

        Non-options are the elements of args[] that are not not options - (as "-l" or "--quote-name"), nor option - arguments (as the "4" after "--tabsize 4", - assuming that "tabsize" has mandatory argument). For - example, in "-l etc --tabsize 8 etc/mysql" there are 2 - non-options: "etc" and "etc/mysql".

        -
      • -
      - - - -
        -
      • -

        getPropertyNames

        -
        public Set getPropertyNames()
        -
        Returns the property names used in the options.
        -
      • -
      - - - -
        -
      • -

        addOption

        -
        public ArgsParser.OptionDefinition addOption(String shortName,
        -                                             String longName)
        -
        Defines an option for the parser. - -

        Note that if you create an option that supports argument, then - the argument will be initially mandatory. To have optional argument, - you have to give a default argument value by calling the - defaultArg method of the returned - object.

        -
        -
        Parameters:
        -
        shortName - the short-name of option or null. Examples of - short-names are "a" and "l" in - "$ ls -la" If the option has argument, then this - parameter has to be in the form "s ARGNAME" or - "s=ARGNAME"; for example: "T COLS". - The space or = indicates that the option supports - argument. - The ARGNAME is used only for showing the help, otherwise its - value is unimportant. - Note that if you will indicate in the longName - parameter that the option has argument, you don't have to indicate it - here.
        -
        longName - the long-name of option or null. An example of long-name - is "quote-name" in "$ ls --quote-name" - If the option supports argument, then this parameter has to - be in the form "long-name=ARGNAME" or - "long-name ARGNAME"; for example: - "tabsize=COLS". The = or space indicates - that the option supports argument. The ARGNAME is used only - for showing the help, otherwise its value is unimportant. - Note that if you have already indicated in the shortName - parameter that the option has argument, you don't have to indicate it - agian here.
        -
        Returns:
        -
        the newly created OptionDefinition; this is - returned to let you addjust the new option with methods like - desc, - property, - implied - or defaultArg.
        -
        Throws:
        -
        IllegalArgumentException - If an option with the same long-name or - short-name is already added, or if the given long- or short-name is - malformed.
        -
        -
      • -
      - - - -
        -
      • -

        setDefaultProperties

        -
        public void setDefaultProperties(Properties defaultProperties)
        -
        Sets the properies object that will be the default properties object for - the properies object that parse creates for the options - (See Properties.Properties(Properties defaults)). - Also, parse will put the implied option values into - the default properties object. - By default there is no default properties object. - -

        This setting takes effect only when you call parse next - time.

        -
      • -
      - - - -
        -
      • -

        setMessages

        -
        public void setMessages(Properties messages)
        -
        Customizes the error messages shown to the user. - The Properties should contain the following keys, - associated with the translation of the following sentences: -
          -
        • "OPTION_CONFLICT": - "This option conflicts with a preceding option: " -
        • "ARG_MISSING": "The argument is missing for this option: " -
        • "OPTION_UNKNOWN": "Unknown option: " -
        • "ARG_NOT_ALLOWED": "This option does not allow argument: " -
        - You may use the MSG_... constants for the key values.
        -
      • -
      - - - - - - - - - - - -
        -
      • -

        getOptionsHelp

        -
        public String getOptionsHelp(int screenWidth)
        -
        Generates options help for the defined options.
        -
        -
        Parameters:
        -
        screenWidth - the (minimum) width of the console screen.
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/BorderedReader.html b/fmpp/docs/api/fmpp/util/BorderedReader.html deleted file mode 100644 index a1da709..0000000 --- a/fmpp/docs/api/fmpp/util/BorderedReader.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - -BorderedReader (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class BorderedReader

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Closeable, AutoCloseable, Readable
    -
    -
    -
    -
    public class BorderedReader
    -extends Reader
    -
    Reader that can insert a string before and after an encapsulated - character stream.
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/BugException.html b/fmpp/docs/api/fmpp/util/BugException.html deleted file mode 100644 index bca134a..0000000 --- a/fmpp/docs/api/fmpp/util/BugException.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -BugException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class BugException

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        BugException

        -
        public BugException(String message)
        -
      • -
      - - - -
        -
      • -

        BugException

        -
        public BugException(String message,
        -                    Throwable cause)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/DataLoaderUtil.html b/fmpp/docs/api/fmpp/util/DataLoaderUtil.html deleted file mode 100644 index 3925881..0000000 --- a/fmpp/docs/api/fmpp/util/DataLoaderUtil.html +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - -DataLoaderUtil (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class DataLoaderUtil

-
-
- -
-
    -
  • -
    -
    -
    public class DataLoaderUtil
    -extends Object
    -
    Utility methods for writing data loaders.
    -
  • -
-
-
- -
-
-
    -
  • - - - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        DataLoaderUtil

        -
        public DataLoaderUtil()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        getStringArgument

        -
        public static String getStringArgument(int index,
        -                                       Object value)
        -
      • -
      - - - -
        -
      • -

        getStringOption

        -
        public static String getStringOption(String name,
        -                                     Object value)
        -
      • -
      - - - -
        -
      • -

        getCharArgument

        -
        public static char getCharArgument(int index,
        -                                   Object value)
        -
      • -
      - - - -
        -
      • -

        getCharOption

        -
        public static char getCharOption(String name,
        -                                 Object value)
        -
      • -
      - - - -
        -
      • -

        getBooleanArgument

        -
        public static boolean getBooleanArgument(int index,
        -                                         Object value)
        -
      • -
      - - - -
        -
      • -

        getBooleanOption

        -
        public static boolean getBooleanOption(String name,
        -                                       Object value)
        -
      • -
      - - - -
        -
      • -

        getIntArgument

        -
        public static int getIntArgument(int index,
        -                                 Object value)
        -
      • -
      - - - -
        -
      • -

        getIntOption

        -
        public static int getIntOption(String name,
        -                               Object value)
        -
      • -
      - - - -
        -
      • -

        getStringArrayArgument

        -
        public static String[] getStringArrayArgument(int index,
        -                                              Object value)
        -
      • -
      - - - -
        -
      • -

        getStringArrayOption

        -
        public static String[] getStringArrayOption(String name,
        -                                            Object value)
        -
      • -
      - - - -
        -
      • -

        getStringArrayArgument

        -
        public static String[] getStringArrayArgument(int index,
        -                                              Object value,
        -                                              boolean allowString)
        -
        -
        Parameters:
        -
        allowString - if true a value that is a single string - will be treated as a 1 long sequence that contains that string.
        -
        -
      • -
      - - - -
        -
      • -

        getStringArrayOption

        -
        public static String[] getStringArrayOption(String name,
        -                                            Object value,
        -                                            boolean allowString)
        -
        -
        Parameters:
        -
        allowString - if true a value that is a single string - will be treated as a 1 long sequence that contains that string.
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/ExceptionCC.html b/fmpp/docs/api/fmpp/util/ExceptionCC.html deleted file mode 100644 index 12b3d4e..0000000 --- a/fmpp/docs/api/fmpp/util/ExceptionCC.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - -ExceptionCC (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class ExceptionCC

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ExceptionCC

        -
        public ExceptionCC()
        -
      • -
      - - - -
        -
      • -

        ExceptionCC

        -
        public ExceptionCC(String s)
        -
      • -
      - - - -
        -
      • -

        ExceptionCC

        -
        public ExceptionCC(Throwable cause)
        -
      • -
      - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/FileUtil.html b/fmpp/docs/api/fmpp/util/FileUtil.html deleted file mode 100644 index 3ac57eb..0000000 --- a/fmpp/docs/api/fmpp/util/FileUtil.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - - -FileUtil (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class FileUtil

-
-
- -
-
    -
  • -
    -
    -
    public class FileUtil
    -extends Object
    -
    Collection of file and path related functions.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        FileUtil

        -
        public FileUtil()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        getRelativePath

        -
        public static String getRelativePath(File fromDir,
        -                                     File toFileOrDir)
        -                              throws IOException
        -
        Reaturns the path of a file or directory relative to a directory, - in native format.
        -
        -
        Returns:
        -
        The relative path. - It never starts with separator char (/ on UN*X).
        -
        Throws:
        -
        IOException - if the two paths has no common parent directory - (such as C:\foo.txt and D:\foo.txt), or - the the paths are malformed.
        -
        -
      • -
      - - - -
        -
      • -

        copyFile

        -
        public static void copyFile(File src,
        -                            File dst,
        -                            boolean copyLMD)
        -                     throws IOException
        -
        Copies a file; silently overwrites the destination if already exists.
        -
        -
        Parameters:
        -
        copyLMD - tells if the last modification time of the original - file will be copied too.
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - - - - - -
        -
      • -

        isInsideOrEquals

        -
        public static boolean isInsideOrEquals(File file,
        -                                       File ascendant)
        -
        Returns true if file is inside ascendant or - file is the same as the ascendant, otherwise - returns false.
        -
      • -
      - - - -
        -
      • -

        isInside

        -
        public static boolean isInside(File file,
        -                               File ascendant)
        -
        Returns true if file is inside ascendant, - otherwise returns false.
        -
      • -
      - - - -
        -
      • -

        resolveRelativeUnixPath

        -
        public static File resolveRelativeUnixPath(File root,
        -                                           File wd,
        -                                           String path)
        -                                    throws IOException
        -
        Resolves relative UN*X path based on given root and working directory.
        -
        -
        Parameters:
        -
        root - root directory
        -
        wd - working directory (current direcory)
        -
        Throws:
        -
        IOException
        -
        -
      • -
      - - - -
        -
      • -

        compressPath

        -
        public static String compressPath(String path,
        -                                  int maxPathLength)
        -
        Returns a compressed version of the path. - For example, /foo/ba.../baaz.txt instead of - /foo/bar/blah/blah/blah/baaz.txt.
        -
        -
        Parameters:
        -
        path - the path to compress. Either native or UNIX format.
        -
        maxPathLength - the maximum length of the result. - Must be at least 4.
        -
        -
      • -
      - - - -
        -
      • -

        pathToUnixStyle

        -
        public static String pathToUnixStyle(String path)
        -
        Brings the path to UNI*X style format, so that it can be handled - with path pattern handling functions.
        -
      • -
      - - - -
        -
      • -

        removeSlashPrefix

        -
        public static String removeSlashPrefix(String path)
        -
      • -
      - - - -
        -
      • -

        pathPatternToPerl5Regex

        -
        public static String pathPatternToPerl5Regex(String text)
        -
        Converts UN*X style path to regular expression (originally, for Perl 5 dialect, but also works for Java's - dialect). - In additional to standard UN*X path meta characters (*, - ?) it understands **, that is the same as - in Ant. It assumes that the paths what you will later match - with the pattern are always starting with slash (they are absoulte paths - to an imaginary base).
        -
      • -
      - - - - - - - - -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/FreemarkerUtil.html b/fmpp/docs/api/fmpp/util/FreemarkerUtil.html deleted file mode 100644 index 63acd9e..0000000 --- a/fmpp/docs/api/fmpp/util/FreemarkerUtil.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - -FreemarkerUtil (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class FreemarkerUtil

-
-
- -
-
    -
  • -
    -
    -
    public class FreemarkerUtil
    -extends Object
    -
    FreeMarker related utilities.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        FreemarkerUtil

        -
        public FreemarkerUtil()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        ftlVarToCoreJavaObject

        -
        public static Object ftlVarToCoreJavaObject(TemplateModel m)
        -                                     throws TemplateModelException
        -
        Converts TemplateModel-s to java.util.* and - java.lang.* objects. -
          -
        • FTL hash will be converted to java.util.Map -
        • FTL sequence and collection will be converted to - java.util.List -
        • FTL numbers will be converted to java.lang.Number -
        • FTL dates will be converted to java.util.Date -
        • FTL booleans will be converted to java.lang.Boolean -
        • FTL strings will be converted to java.lang.String -
        • Other FTL variables (transforms, methods, etc.) will be returned as - is. -
        - -

        Container types (hash, equence, etc.) will be converted recursively, - so the subvariables are also converted, and the subvariables of - subvariables are converted, etc. - -

        For multi-type variables a single type will be choosen, which is the - first type in the above list. - -

        If the TemplateModel supports - WrapperTemplateModel, unwrapping will be used only if - the type of the unwrapped object is proper according to the above list.

        -
        -
        Returns:
        -
        The converted object. You may do not modify the returned - objects, as it is unpredicalbe if it has effect on the converted - TemplateModel-s.
        -
        Throws:
        -
        TemplateModelException
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/InstallationException.html b/fmpp/docs/api/fmpp/util/InstallationException.html deleted file mode 100644 index 66ebda0..0000000 --- a/fmpp/docs/api/fmpp/util/InstallationException.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - -InstallationException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class InstallationException

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable
    -
    -
    -
    -
    public class InstallationException
    -extends ExceptionCC
    -
    There is a problem with the software environment.
    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        InstallationException

        -
        public InstallationException(String s)
        -
      • -
      - - - -
        -
      • -

        InstallationException

        -
        public InstallationException(String s,
        -                             Throwable cause)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/JSONParseException.html b/fmpp/docs/api/fmpp/util/JSONParseException.html deleted file mode 100644 index 5f15b06..0000000 --- a/fmpp/docs/api/fmpp/util/JSONParseException.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - -JSONParseException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class JSONParseException

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        JSONParseException

        -
        public JSONParseException(String message,
        -                          String text,
        -                          int position,
        -                          String fileName)
        -
      • -
      - - - -
        -
      • -

        JSONParseException

        -
        public JSONParseException(String message,
        -                          String text,
        -                          int position,
        -                          String fileName,
        -                          Throwable cause)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/JSONParser.html b/fmpp/docs/api/fmpp/util/JSONParser.html deleted file mode 100644 index de526af..0000000 --- a/fmpp/docs/api/fmpp/util/JSONParser.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - -JSONParser (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class JSONParser

-
-
- -
-
    -
  • -
    -
    -
    public class JSONParser
    -extends Object
    -
    Simple JSON parser where JSON objects create Map-s, JSON array-s create List-s, and the others - create the obvious Java equivalents. Numbers will be Integer-s where they fit into that, otherwise they - will be Long-s, and if not even can store the value or if the value is not whole, BigDecimal-s.
    -
    -
    Since:
    -
    0.9.15
    -
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/MiscUtil.html b/fmpp/docs/api/fmpp/util/MiscUtil.html deleted file mode 100644 index a928051..0000000 --- a/fmpp/docs/api/fmpp/util/MiscUtil.html +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - -MiscUtil (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class MiscUtil

-
-
- -
-
    -
  • -
    -
    -
    public class MiscUtil
    -extends Object
    -
    Miscellaneous utility methods.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        EMPTY_CLASS_ARRAY

        -
        public static final Class[] EMPTY_CLASS_ARRAY
        -
      • -
      - - - -
        -
      • -

        EMPTY_OBJECT_ARRAY

        -
        public static final Object[] EMPTY_OBJECT_ARRAY
        -
      • -
      - - - -
        -
      • -

        EMPTY_STRING_ARRAY

        -
        public static final String[] EMPTY_STRING_ARRAY
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        MiscUtil

        -
        public MiscUtil()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - - - - - -
        -
      • -

        causeTrace

        -
        public static String causeTrace(Throwable e)
        -
        Returns the cause trace of an exception. This is similar to a J2SE 1.4+ - stack-trace, but it's shorter, because it does not contain the "at" - lines.
        -
      • -
      - - - - - - - -
        -
      • -

        dictionaryToMap

        -
        public static Map dictionaryToMap(Dictionary dict)
        -
      • -
      - - - - - - - -
        -
      • -

        listContainsObject

        -
        public static boolean listContainsObject(List list,
        -                                         Object o)
        -
        Checks if the list contains the given object (exactly the same instance).
        -
      • -
      - - - -
        -
      • -

        mapContainsObject

        -
        public static boolean mapContainsObject(Map map,
        -                                        Object o)
        -
        Checks if the map contains the given object (exactly the same instance) - as value.
        -
      • -
      - - - -
        -
      • -

        findObject

        -
        public static int findObject(List list,
        -                             Object o)
        -
        Returns the first index of the given object (exactly the same instance) - in the list.
        -
        -
        Returns:
        -
        the index of the first occurance, or -1 if not found.
        -
        -
      • -
      - - - -
        -
      • -

        checkXmlSupportAvailability

        -
        public static void checkXmlSupportAvailability(String requiredForThis)
        -                                        throws InstallationException
        -
        Checks if XML API-s (JAXP, SAX2, DOM) are present. - Can be a bit slow depending on the actual class loader setup.
        -
        -
        Parameters:
        -
        requiredForThis - a short sentence that describes for human reader - if for what do we need the XML support (e.g. - "Usage of xml data loader." or - "Set XML entity resolver."). This sentence is used - in error message of the InstallationException. - Can be null.
        -
        Throws:
        -
        InstallationException
        -
        -
      • -
      - - - -
        -
      • -

        numberToInt

        -
        public static int numberToInt(Number value)
        -
        Loseless convertion to int.
        -
        -
        Throws:
        -
        IllegalArgumentException - if the loseless conversion is not - possible. The error message contains the details.
        -
        -
      • -
      - - - -
        -
      • -

        add

        -
        public static String[] add(String[] a1,
        -                           String[] a2)
        -
        Concatenates two arrays.
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/MultiListIterator.html b/fmpp/docs/api/fmpp/util/MultiListIterator.html deleted file mode 100644 index e3b6211..0000000 --- a/fmpp/docs/api/fmpp/util/MultiListIterator.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - -MultiListIterator (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class MultiListIterator

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Iterator
    -
    -
    -
    -
    public class MultiListIterator
    -extends Object
    -implements Iterator
    -
    Iterates over multiple List-s. The elements of a list that was - added earlier will be iterated earlier.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        MultiListIterator

        -
        public MultiListIterator()
        -
      • -
      - - - -
        -
      • -

        MultiListIterator

        -
        public MultiListIterator(List ls1)
        -
      • -
      - - - -
        -
      • -

        MultiListIterator

        -
        public MultiListIterator(List ls1,
        -                         List ls2)
        -
      • -
      - - - -
        -
      • -

        MultiListIterator

        -
        public MultiListIterator(List ls1,
        -                         List ls2,
        -                         List ls3)
        -
      • -
      - - - -
        -
      • -

        MultiListIterator

        -
        public MultiListIterator(List ls1,
        -                         List ls2,
        -                         List ls3,
        -                         List ls4)
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        addList

        -
        public void addList(List ls)
        -
        Use this to add more lists after the constructor.
        -
      • -
      - - - -
        -
      • -

        hasNext

        -
        public boolean hasNext()
        -
        -
        Specified by:
        -
        hasNext in interface Iterator
        -
        -
      • -
      - - - - - - - -
        -
      • -

        remove

        -
        public void remove()
        -
        -
        Specified by:
        -
        remove in interface Iterator
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/NullOutputStream.html b/fmpp/docs/api/fmpp/util/NullOutputStream.html deleted file mode 100644 index 70e2c67..0000000 --- a/fmpp/docs/api/fmpp/util/NullOutputStream.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - -NullOutputStream (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class NullOutputStream

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/NullWriter.html b/fmpp/docs/api/fmpp/util/NullWriter.html deleted file mode 100644 index 302b5b0..0000000 --- a/fmpp/docs/api/fmpp/util/NullWriter.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - -NullWriter (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class NullWriter

-
-
- -
- -
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/RuntimeExceptionCC.html b/fmpp/docs/api/fmpp/util/RuntimeExceptionCC.html deleted file mode 100644 index 9dd00fc..0000000 --- a/fmpp/docs/api/fmpp/util/RuntimeExceptionCC.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - - - -RuntimeExceptionCC (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class RuntimeExceptionCC

-
-
- -
-
    -
  • -
    -
    All Implemented Interfaces:
    -
    Serializable
    -
    -
    -
    Direct Known Subclasses:
    -
    BugException
    -
    -
    -
    -
    public class RuntimeExceptionCC
    -extends RuntimeException
    -
    RuntimeException that emulates J2SE 1.4+ cause-chains if it runs - on earlier versions. Furthermore, in FMPP error messages, the message of this - exception is trusted (i.e. no need to print the class name), as it is inside - an fmpp.* package.
    -
    -
    See Also:
    -
    Serialized Form
    -
    -
  • -
-
-
- -
-
- -
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/StringUtil.ParseException.html b/fmpp/docs/api/fmpp/util/StringUtil.ParseException.html deleted file mode 100644 index 8d6084a..0000000 --- a/fmpp/docs/api/fmpp/util/StringUtil.ParseException.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - -StringUtil.ParseException (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class StringUtil.ParseException

-
-
- -
- -
-
- -
-
-
    -
  • - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        ParseException

        -
        public ParseException(String message)
        -
      • -
      - - - -
        -
      • -

        ParseException

        -
        public ParseException(String message,
        -                      int position)
        -
      • -
      - - - -
        -
      • -

        ParseException

        -
        public ParseException(String message,
        -                      String text,
        -                      int position,
        -                      String fileName)
        -
      • -
      - - - -
        -
      • -

        ParseException

        -
        public ParseException(String message,
        -                      Throwable cause)
        -
      • -
      - - - -
        -
      • -

        ParseException

        -
        public ParseException(String message,
        -                      int position,
        -                      Throwable cause)
        -
      • -
      - - - -
        -
      • -

        ParseException

        -
        public ParseException(String message,
        -                      String text,
        -                      int position,
        -                      String fileName,
        -                      Throwable cause)
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/StringUtil.html b/fmpp/docs/api/fmpp/util/StringUtil.html deleted file mode 100644 index a8a3d21..0000000 --- a/fmpp/docs/api/fmpp/util/StringUtil.html +++ /dev/null @@ -1,1218 +0,0 @@ - - - - - - -StringUtil (FMPP 0.9.15 API) - - - - - - - - - - - - -
-
fmpp.util
-

Class StringUtil

-
-
- -
-
    -
  • -
    -
    -
    public class StringUtil
    -extends Object
    -
    Collection of string manipulation functions.
    -
  • -
-
-
- -
-
-
    -
  • - -
      -
    • - - -

      Field Detail

      - - - -
        -
      • -

        LINE_BREAK

        -
        public static final String LINE_BREAK
        -
        The default line-break string used by the methods in this class.
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Constructor Detail

      - - - -
        -
      • -

        StringUtil

        -
        public StringUtil()
        -
      • -
      -
    • -
    - -
      -
    • - - -

      Method Detail

      - - - -
        -
      • -

        htmlEnc

        -
        public static String htmlEnc(String s)
        -
        HTML encoding (does not convert line breaks). - Replaces all '>' '<' '&' and '"' with entity reference
        -
      • -
      - - - -
        -
      • -

        xmlEnc

        -
        public static String xmlEnc(String s)
        -
        XML Encoding. - Replaces all '>' '<' '&', "'" and '"' with entity reference
        -
      • -
      - - - -
        -
      • -

        xmlEncNQ

        -
        public static String xmlEncNQ(String s)
        -
        XML encoding without replacing apostrophes and quotation marks.
        -
        -
        See Also:
        -
        xmlEnc(String)
        -
        -
      • -
      - - - -
        -
      • -

        rtfEnc

        -
        public static String rtfEnc(String s)
        -
        Rich Text Format encoding (does not replace line breaks). - Escapes all '\' '{' '}' and '"'
        -
      • -
      - - - -
        -
      • -

        jQuoteOrName

        -
        public static String jQuoteOrName(char c)
        -
        Quotes character as Java language character, except quote characters, - which are referred with name.
        -
      • -
      - - - -
        -
      • -

        jQuote

        -
        public static String jQuote(char c)
        -
        Quotes string as Java language character.
        -
      • -
      - - - -
        -
      • -

        jQuote

        -
        public static String jQuote(String s)
        -
        Quotes string as Java language string literal.
        -
      • -
      - - - -
        -
      • -

        ftlStringLiteralDec

        -
        public static String ftlStringLiteralDec(String s)
        -                                  throws StringUtil.ParseException
        -
        FTL string literal decoding. - - \\, \", \', \n, \t, \r, \b and \f will be replaced according to - Java rules. In additional, it knows \g, \l, \a and \{ which are - replaced with <, >, & and { respectively. - \x works as hexadecimal character code escape. The character - codes are interpreted according to UCS basic plane (Unicode). - "f\x006Fo", "f\x06Fo" and "f\x6Fo" will be "foo". - "f\x006F123" will be "foo123" as the maximum number of digits is 4. - - All other \X (where X is any character not mentioned above or - End-of-string) will cause a StringUtil.ParseException.
        -
        -
        Parameters:
        -
        s - String literal without the surrounding quotation marks
        -
        Returns:
        -
        String with all escape sequences resolved
        -
        Throws:
        -
        StringUtil.ParseException - if there string contains illegal escapes
        -
        -
      • -
      - - - -
        -
      • -

        stringToPerl5Regex

        -
        public static String stringToPerl5Regex(String text)
        -
        Convers string to Perl 5 regular expression. - This means that regular expression metacharacters will be escaped.
        -
      • -
      - - - - - - - -
        -
      • -

        split

        -
        public static String[] split(String s,
        -                             char c,
        -                             boolean trim)
        -
        Splits a string at the specified character, and optionally trims the - items.
        -
      • -
      - - - -
        -
      • -

        split

        -
        public static String[] split(String s,
        -                             String sep)
        -
        Splits a string at the specified string.
        -
      • -
      - - - -
        -
      • -

        splitAtWS

        -
        public static String[] splitAtWS(String text)
        -
        Splits a string at white-spaces. A continous sequence of one or more - white-space is considered as a single separator. If the string is - starting or ending with a separator, then that separator is silently - ignored. Thus, the result array contains only trimmed non-0-length - strings.
        -
      • -
      - - - -
        -
      • -

        replace

        -
        public static String replace(String text,
        -                             String oldsub,
        -                             String newsub)
        -
        Replaces all occurances of a sub-string in a string.
        -
        -
        Parameters:
        -
        text - The string where it will replace oldsub with - newsub.
        -
        Returns:
        -
        String The string after the replacements.
        -
        -
      • -
      - - - - - - - -
        -
      • -

        expandTabs

        -
        public static String expandTabs(String text,
        -                                int tabWidth,
        -                                int startCol)
        -
        Replaces all occurances of character tab with spaces.
        -
        -
        Parameters:
        -
        tabWidth - the distance of tab stops.
        -
        startCol - the index of the column in which the first character of - the string is from the left edge of the page. The index of the first - column is 0.
        -
        Returns:
        -
        String The string after the replacements.
        -
        -
      • -
      - - - -
        -
      • -

        chomp

        -
        public static String chomp(String s)
        -
        Removes the line-break from the end of the string.
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        wrap

        -
        public static String wrap(String text,
        -                          int screenWidth,
        -                          int indent)
        -
        Hard-wraps flow-text. This is a convenience method that equivalent with - wrap(text, screenWidth, indent, indent, LINE_BREAK, false).
        -
        -
        See Also:
        -
        wrap(String, int, int, int, String, boolean)
        -
        -
      • -
      - - - -
        -
      • -

        wrap

        -
        public static String wrap(String text,
        -                          int screenWidth,
        -                          int firstIndent,
        -                          int indent)
        -
        Hard-wraps flow-text. This is a convenience method that equivalent with - wrap(text, screenWidth, firstIndent, indent, LINE_BREAK, - false).
        -
        -
        See Also:
        -
        wrap(String, int, int, int, String, boolean)
        -
        -
      • -
      - - - - - - - -
        -
      • -

        wrap

        -
        public static String wrap(String text,
        -                          int screenWidth,
        -                          int firstIndent,
        -                          int indent,
        -                          String lineBreak)
        -
        Hard-wraps flow-text. This is a convenience method that equivalent with - wrap(text, screenWidth, firstIndent, indent, lineBreak, - false).
        -
        -
        See Also:
        -
        wrap(String, int, int, int, String, boolean)
        -
        -
      • -
      - - - - - - - -
        -
      • -

        wrap

        -
        public static String wrap(String text,
        -                          int screenWidth,
        -                          int firstIndent,
        -                          int indent,
        -                          String lineBreak,
        -                          boolean traceMode)
        -
        Hard-wraps flow-text.
        -
        -
        Parameters:
        -
        text - The flow-text to wrap. The explicit line-breaks of the - source text will be kept. All types of line-breaks (UN*X, Mac, DOS/Win) - are understood.
        -
        screenWidth - The (minimum) width of the screen. It does not - utilize the screenWidth-th column of the screen to store - characters, except line-breaks (because some terminals/editors - do an automatic line-break when you write visible character there, - and some doesn't... so it is unpredictable if an explicit line-break - is needed or not.).
        -
        firstIndent - The indentation of the first line
        -
        indent - The indentation of all lines but the first line
        -
        lineBreak - The String used for line-breaks
        -
        traceMode - Set this true if the input text is a Java stack - trace. In this mode, all lines starting with - optional indentation + 'at' + space are treated as location - lines, and will be indented and wrapped in a slightly special way.
        -
        Throws:
        -
        IllegalArgumentException - if the number of columns remaining for - the text is less than 2.
        -
        -
      • -
      - - - -
        -
      • -

        wrap

        -
        public static StringBuffer wrap(StringBuffer text,
        -                                int screenWidth,
        -                                int firstIndent,
        -                                int indent,
        -                                String lineBreak,
        -                                boolean traceMode)
        -
        Hard-wraps flow-text. Uses StringBuffer-s instead of String-s. - This is the method that is internally used by all other wrap - variations, so if you are working with StringBuffers anyway, it gives - better performance.
        -
        -
        See Also:
        -
        wrap(String, int, int, int, String, boolean)
        -
        -
      • -
      - - - -
        -
      • -

        createSourceCodeErrorMessage

        -
        public static String createSourceCodeErrorMessage(String message,
        -                                                  String srcCode,
        -                                                  int position,
        -                                                  String fileName,
        -                                                  int maxQuotLength)
        -
      • -
      - - - - - - - - - - - - - - - - - - - - - - - -
        -
      • -

        normalizeLinebreaks

        -
        public static String normalizeLinebreaks(String s)
        -
        Converts all line-breaks to UN*X linebreaks ("\n"). The - input text can contain UN*X, DOS (Windows) and Mac linebreaks mixed.
        -
      • -
      - - - -
        -
      • -

        repeat

        -
        public static String repeat(String s,
        -                            int n)
        -
        -
        Since:
        -
        0.9.15
        -
        -
      • -
      - - - -
        -
      • -

        capitalizeFirst

        -
        public static String capitalizeFirst(String s)
        -
        -
        Since:
        -
        0.9.15
        -
        -
      • -
      -
    • -
    -
  • -
-
-
- - - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/ArgsParser.BadArgsException.html b/fmpp/docs/api/fmpp/util/class-use/ArgsParser.BadArgsException.html deleted file mode 100644 index 0301a59..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/ArgsParser.BadArgsException.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Class fmpp.util.ArgsParser.BadArgsException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.ArgsParser.BadArgsException

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/ArgsParser.OptionDefinition.html b/fmpp/docs/api/fmpp/util/class-use/ArgsParser.OptionDefinition.html deleted file mode 100644 index 8b65089..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/ArgsParser.OptionDefinition.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - -Uses of Class fmpp.util.ArgsParser.OptionDefinition (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.ArgsParser.OptionDefinition

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/ArgsParser.html b/fmpp/docs/api/fmpp/util/class-use/ArgsParser.html deleted file mode 100644 index e1c1f81..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/ArgsParser.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.ArgsParser (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.ArgsParser

-
-
No usage of fmpp.util.ArgsParser
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/BorderedReader.html b/fmpp/docs/api/fmpp/util/class-use/BorderedReader.html deleted file mode 100644 index 8561a0a..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/BorderedReader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.BorderedReader (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.BorderedReader

-
-
No usage of fmpp.util.BorderedReader
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/BugException.html b/fmpp/docs/api/fmpp/util/class-use/BugException.html deleted file mode 100644 index 286db77..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/BugException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.BugException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.BugException

-
-
No usage of fmpp.util.BugException
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/DataLoaderUtil.html b/fmpp/docs/api/fmpp/util/class-use/DataLoaderUtil.html deleted file mode 100644 index b891f29..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/DataLoaderUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.DataLoaderUtil (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.DataLoaderUtil

-
-
No usage of fmpp.util.DataLoaderUtil
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/ExceptionCC.html b/fmpp/docs/api/fmpp/util/class-use/ExceptionCC.html deleted file mode 100644 index e946f4e..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/ExceptionCC.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - -Uses of Class fmpp.util.ExceptionCC (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.ExceptionCC

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/FileUtil.html b/fmpp/docs/api/fmpp/util/class-use/FileUtil.html deleted file mode 100644 index 1b503de..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/FileUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.FileUtil (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.FileUtil

-
-
No usage of fmpp.util.FileUtil
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/FreemarkerUtil.html b/fmpp/docs/api/fmpp/util/class-use/FreemarkerUtil.html deleted file mode 100644 index ceeb3bf..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/FreemarkerUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.FreemarkerUtil (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.FreemarkerUtil

-
-
No usage of fmpp.util.FreemarkerUtil
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/InstallationException.html b/fmpp/docs/api/fmpp/util/class-use/InstallationException.html deleted file mode 100644 index c09fd46..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/InstallationException.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - -Uses of Class fmpp.util.InstallationException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.InstallationException

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/JSONParseException.html b/fmpp/docs/api/fmpp/util/class-use/JSONParseException.html deleted file mode 100644 index 95a6d49..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/JSONParseException.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - -Uses of Class fmpp.util.JSONParseException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.JSONParseException

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/JSONParser.html b/fmpp/docs/api/fmpp/util/class-use/JSONParser.html deleted file mode 100644 index 22a1a21..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/JSONParser.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.JSONParser (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.JSONParser

-
-
No usage of fmpp.util.JSONParser
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/MiscUtil.html b/fmpp/docs/api/fmpp/util/class-use/MiscUtil.html deleted file mode 100644 index 36cdb01..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/MiscUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.MiscUtil (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.MiscUtil

-
-
No usage of fmpp.util.MiscUtil
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/MultiListIterator.html b/fmpp/docs/api/fmpp/util/class-use/MultiListIterator.html deleted file mode 100644 index 4babb2a..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/MultiListIterator.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.MultiListIterator (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.MultiListIterator

-
-
No usage of fmpp.util.MultiListIterator
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/NullOutputStream.html b/fmpp/docs/api/fmpp/util/class-use/NullOutputStream.html deleted file mode 100644 index 5b21517..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/NullOutputStream.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - -Uses of Class fmpp.util.NullOutputStream (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.NullOutputStream

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/NullWriter.html b/fmpp/docs/api/fmpp/util/class-use/NullWriter.html deleted file mode 100644 index c0e1a90..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/NullWriter.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - -Uses of Class fmpp.util.NullWriter (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.NullWriter

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/RuntimeExceptionCC.html b/fmpp/docs/api/fmpp/util/class-use/RuntimeExceptionCC.html deleted file mode 100644 index 03f3903..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/RuntimeExceptionCC.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Class fmpp.util.RuntimeExceptionCC (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.RuntimeExceptionCC

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/StringUtil.ParseException.html b/fmpp/docs/api/fmpp/util/class-use/StringUtil.ParseException.html deleted file mode 100644 index 6323352..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/StringUtil.ParseException.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - -Uses of Class fmpp.util.StringUtil.ParseException (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.StringUtil.ParseException

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/class-use/StringUtil.html b/fmpp/docs/api/fmpp/util/class-use/StringUtil.html deleted file mode 100644 index 8774d5b..0000000 --- a/fmpp/docs/api/fmpp/util/class-use/StringUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class fmpp.util.StringUtil (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Class
fmpp.util.StringUtil

-
-
No usage of fmpp.util.StringUtil
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/package-frame.html b/fmpp/docs/api/fmpp/util/package-frame.html deleted file mode 100644 index ad0011b..0000000 --- a/fmpp/docs/api/fmpp/util/package-frame.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -fmpp.util (FMPP 0.9.15 API) - - - - - -

fmpp.util

- - - diff --git a/fmpp/docs/api/fmpp/util/package-summary.html b/fmpp/docs/api/fmpp/util/package-summary.html deleted file mode 100644 index 7cc914c..0000000 --- a/fmpp/docs/api/fmpp/util/package-summary.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - -fmpp.util (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Package fmpp.util

-
-
Collection of more-less FMPP independent utility classes.
-
-

See: Description

-
-
-
    -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Class Summary 
    ClassDescription
    ArgsParser -
    Simple command-line argument parser that mimics the logic of UN*X - tools as ls.
    -
    BorderedReader -
    Reader that can insert a string before and after an encapsulated - character stream.
    -
    DataLoaderUtil -
    Utility methods for writing data loaders.
    -
    FileUtil -
    Collection of file and path related functions.
    -
    FreemarkerUtil -
    FreeMarker related utilities.
    -
    JSONParser -
    Simple JSON parser where JSON objects create Map-s, JSON array-s create List-s, and the others - create the obvious Java equivalents.
    -
    MiscUtil -
    Miscellaneous utility methods.
    -
    MultiListIterator -
    Iterates over multiple List-s.
    -
    NullOutputStream -
    OutputStream that simply drops what it gets.
    -
    NullWriter -
    Writer that simply drops what it gets.
    -
    StringUtil -
    Collection of string manipulation functions.
    -
    -
  • -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Exception Summary 
    ExceptionDescription
    ArgsParser.BadArgsException -
    The user has entered invalid options in the command-line.
    -
    BugException -
    A bug has been detected.
    -
    ExceptionCC -
    This was used for emulating cause-chains on Java earlier than 1.4, but as FMPP now requires 1.4, it just dispatches - to Exception.
    -
    InstallationException -
    There is a problem with the software environment.
    -
    JSONParseException 
    RuntimeExceptionCC -
    RuntimeException that emulates J2SE 1.4+ cause-chains if it runs - on earlier versions.
    -
    StringUtil.ParseException -
    Formal (syntactical) problem with the text.
    -
    -
  • -
- - - -

Package fmpp.util Description

-

Collection of more-less FMPP independent utility classes.

-
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/package-tree.html b/fmpp/docs/api/fmpp/util/package-tree.html deleted file mode 100644 index 3cb59c9..0000000 --- a/fmpp/docs/api/fmpp/util/package-tree.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - -fmpp.util Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Hierarchy For Package fmpp.util

-Package Hierarchies: - -
-
-

Class Hierarchy

- -
- - - - - - diff --git a/fmpp/docs/api/fmpp/util/package-use.html b/fmpp/docs/api/fmpp/util/package-use.html deleted file mode 100644 index b0318c6..0000000 --- a/fmpp/docs/api/fmpp/util/package-use.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - -Uses of Package fmpp.util (FMPP 0.9.15 API) - - - - - - - - - - - -
-

Uses of Package
fmpp.util

-
-
- -
- - - - - - diff --git a/fmpp/docs/api/help-doc.html b/fmpp/docs/api/help-doc.html deleted file mode 100644 index c607cfd..0000000 --- a/fmpp/docs/api/help-doc.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -API Help (FMPP 0.9.15 API) - - - - - - - - -
- - - - - - - -
- - -
-

How This API Document Is Organized

-
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
-
-
-
    -
  • -

    Overview

    -

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

    -
  • -
  • -

    Package

    -

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    -
      -
    • Interfaces (italic)
    • -
    • Classes
    • -
    • Enums
    • -
    • Exceptions
    • -
    • Errors
    • -
    • Annotation Types
    • -
    -
  • -
  • -

    Class/Interface

    -

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    -
      -
    • Class inheritance diagram
    • -
    • Direct Subclasses
    • -
    • All Known Subinterfaces
    • -
    • All Known Implementing Classes
    • -
    • Class/interface declaration
    • -
    • Class/interface description
    • -
    -
      -
    • Nested Class Summary
    • -
    • Field Summary
    • -
    • Constructor Summary
    • -
    • Method Summary
    • -
    -
      -
    • Field Detail
    • -
    • Constructor Detail
    • -
    • Method Detail
    • -
    -

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    -
  • -
  • -

    Annotation Type

    -

    Each annotation type has its own separate page with the following sections:

    -
      -
    • Annotation Type declaration
    • -
    • Annotation Type description
    • -
    • Required Element Summary
    • -
    • Optional Element Summary
    • -
    • Element Detail
    • -
    -
  • -
  • -

    Enum

    -

    Each enum has its own separate page with the following sections:

    -
      -
    • Enum declaration
    • -
    • Enum description
    • -
    • Enum Constant Summary
    • -
    • Enum Constant Detail
    • -
    -
  • -
  • -

    Use

    -

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    -
  • -
  • -

    Tree (Class Hierarchy)

    -

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    -
      -
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • -
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • -
    -
  • -
  • -

    Deprecated API

    -

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    -
  • -
  • -

    Index

    -

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    -
  • -
  • -

    Prev/Next

    -

    These links take you to the next or previous class, interface, package, or related page.

    -
  • -
  • -

    Frames/No Frames

    -

    These links show and hide the HTML frames. All pages are available with or without frames.

    -
  • -
  • -

    All Classes

    -

    The All Classes link shows all classes and interfaces except non-static nested types.

    -
  • -
  • -

    Serialized Form

    -

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    -
  • -
  • -

    Constant Field Values

    -

    The Constant Field Values page lists the static final fields and their values.

    -
  • -
-This help file applies to API documentation generated using the standard doclet.
- -
- - - - - - - -
- - - - diff --git a/fmpp/docs/api/index-all.html b/fmpp/docs/api/index-all.html deleted file mode 100644 index 6250f1e..0000000 --- a/fmpp/docs/api/index-all.html +++ /dev/null @@ -1,3456 +0,0 @@ - - - - - - -Index (FMPP 0.9.15 API) - - - - - - - - -
- - - - - - - -
- - -
A B C D E F G H I J K L M N O P Q R S T U V W X  - - -

A

-
-
AbstractTextDataLoader - Class in fmpp.dataloaders
-
-
Returns a string based on a plain text file.
-
-
AbstractTextDataLoader() - Constructor for class fmpp.dataloaders.AbstractTextDataLoader
-
 
-
add(String, Object) - Method in class fmpp.setting.Settings
-
-
Adds a setting value.
-
-
add(Map) - Method in class fmpp.setting.Settings
-
-
Adds all name-value pairs stored in the map with - Settings.add(String, Object).
-
-
add(String[], String[]) - Static method in class fmpp.util.MiscUtil
-
-
Concatenates two arrays.
-
-
addConfiguredBorders(AntTask.AntAttributeSubstitution) - Method in class fmpp.tools.AntTask
-
 
-
addConfiguredData(AntTask.AntAttributeSubstitution) - Method in class fmpp.tools.AntTask
-
 
-
addConfiguredFreemarkerLinks(AntTask.AntAttributeSubstitution) - Method in class fmpp.tools.AntTask
-
 
-
addConfiguredLocalData(AntTask.AntAttributeSubstitution) - Method in class fmpp.tools.AntTask
-
 
-
addConfiguredModes(AntTask.AntAttributeSubstitution) - Method in class fmpp.tools.AntTask
-
 
-
addConfiguredTurns(AntTask.AntAttributeSubstitution) - Method in class fmpp.tools.AntTask
-
 
-
addConfiguredXmlRenderings(AntTask.AntAttributeSubstitution) - Method in class fmpp.tools.AntTask
-
 
-
addData(String, Object) - Method in class fmpp.Engine
-
-
Adds a variable that will be visible for all templates when the - processing session executes.
-
-
addData(String, byte) - Method in class fmpp.Engine
-
-
Convenience method for adding a Byte object.
-
-
addData(String, short) - Method in class fmpp.Engine
-
-
Convenience method for adding a Short object.
-
-
addData(String, int) - Method in class fmpp.Engine
-
-
Convenience method for adding a Integer object.
-
-
addData(String, long) - Method in class fmpp.Engine
-
-
Convenience method for adding a Long object.
-
-
addData(String, float) - Method in class fmpp.Engine
-
-
Convenience method for adding a Float object.
-
-
addData(String, double) - Method in class fmpp.Engine
-
-
Convenience method for adding a Double object.
-
-
addData(String, char) - Method in class fmpp.Engine
-
-
Convenience method for adding a Character object.
-
-
addData(String, boolean) - Method in class fmpp.Engine
-
-
Convenience method for adding a Boolean object.
-
-
addData(Map) - Method in class fmpp.Engine
-
-
Adds all entries with Engine.addData(String, Object).
-
-
addDefault(String, Object) - Method in class fmpp.setting.Settings
-
-
Adds a setting value with low priority.
-
-
addDefaults(Map) - Method in class fmpp.setting.Settings
-
-
Adds all entries stored in the map with - Settings.addDefault(String, Object).
-
-
addDefaultsWithStrings(Properties) - Method in class fmpp.setting.Settings
-
-
Same as Settings.addDefaults(Map), but uses a Properties - object, so the values are strings.
-
-
addDefaultWithString(String, String) - Method in class fmpp.setting.Settings
-
-
Same as Settings.addDefault(String, Object), but uses string value.
-
-
addDocumentElement(String, String) - Method in class fmpp.XmlRenderingConfiguration
-
-
Adds an element to the list of document elements.
-
-
addFooterChooser(String, String) - Method in class fmpp.Engine
-
- -
-
addFooterChooser(int, String, String) - Method in class fmpp.Engine
-
-
Adds a new entry to the end of path-pattern -> footer mapping list of the - given layer.
-
-
addFreemarkerLink(String, File) - Method in class fmpp.Engine
-
-
Adds a FreeMarker link.
-
-
addHeaderChooser(String, String) - Method in class fmpp.Engine
-
- -
-
addHeaderChooser(int, String, String) - Method in class fmpp.Engine
-
-
Adds a new entry to the end of path-pattern -> header mapping list of the - given layer.
-
-
addList(List) - Method in class fmpp.util.MultiListIterator
-
-
Use this to add more lists after the constructor.
-
-
addLocalDataBuilder(int, String, LocalDataBuilder) - Method in class fmpp.Engine
-
-
Adds a local data builder.
-
-
addLocalDataBuilder(LocalDataBuilder) - Method in class fmpp.XmlRenderingConfiguration
-
-
Adds an extra local data builder that is invoked after all other - local data builders.
-
-
addModeChooser(String, int) - Method in class fmpp.Engine
-
-
Adds a new entry to the end of path-pattern -> processing-mode - mapping list.
-
-
addOption(String, String) - Method in class fmpp.util.ArgsParser
-
-
Defines an option for the parser.
-
-
addProgressListener(ProgressListener) - Method in class fmpp.Engine
-
-
Adds a progress listener to the list of progress listeners.
-
-
addProgressListener(ProgressListener) - Method in class fmpp.setting.Settings
-
-
Adds a progress listener.
-
-
addRemoveExtension(String) - Method in class fmpp.Engine
-
-
Adds an extension to the list of extensions to remove.
-
-
addRemovePostfix(String) - Method in class fmpp.Engine
-
-
Adds a postfix to the list of file name postfixes to remove.
-
-
addReplaceExtension(String, String) - Method in class fmpp.Engine
-
-
Adds an old-exension -> new-extension pair to the list of - extension replacements.
-
-
addSourcePathPattern(String) - Method in class fmpp.XmlRenderingConfiguration
-
-
Adds a path to the list of source path patterns.
-
-
addText(String) - Method in class fmpp.tools.AntTask.AntAttributeSubstitution
-
 
-
AddTransform - Class in fmpp.models
-
-
Adds/inserts an item to a WritableSequence.
-
-
AddTransform() - Constructor for class fmpp.models.AddTransform
-
 
-
addTurnChooser(String, int) - Method in class fmpp.Engine
-
-
Adds a new entry to the end of path-pattern -> turn-number mapping list.
-
-
addWithString(String, String) - Method in class fmpp.setting.Settings
-
-
Same as Settings.add(String, Object), but uses string value.
-
-
addWithStrings(Properties) - Method in class fmpp.setting.Settings
-
-
Same as Settings.add(Map), but uses a Properties object, - so the values are strings.
-
-
addXmlDataLoaderOption(String, Object) - Method in class fmpp.XmlRenderingConfiguration
-
-
Adds or replaces an option in the map of xml data loader - options.
-
-
addXmlRenderingConfiguration(XmlRenderingConfiguration) - Method in class fmpp.Engine
-
-
Adds as XML rendering configuration.
-
-
AntAttributeSubstitution() - Constructor for class fmpp.tools.AntTask.AntAttributeSubstitution
-
 
-
AntDataLoader - Class in fmpp.dataloaders
-
-
Abstract base class of Ant related data loaders.
-
-
AntDataLoader() - Constructor for class fmpp.dataloaders.AntDataLoader
-
 
-
AntProgressListener - Class in fmpp.progresslisteners
-
-
Designed to show the progress for Ant tasks.
-
-
AntProgressListener(Task) - Constructor for class fmpp.progresslisteners.AntProgressListener
-
-
Output will be printed to the stdout.
-
-
AntProgressListener(Task, boolean) - Constructor for class fmpp.progresslisteners.AntProgressListener
-
 
-
AntProjectDataLoader - Class in fmpp.dataloaders
-
-
Returns the Ant project object.
-
-
AntProjectDataLoader() - Constructor for class fmpp.dataloaders.AntProjectDataLoader
-
 
-
AntPropertiesDataLoader - Class in fmpp.dataloaders
-
-
Returns the Map of all Ant properties, or of the selected Ant properties.
-
-
AntPropertiesDataLoader() - Constructor for class fmpp.dataloaders.AntPropertiesDataLoader
-
 
-
AntPropertyDataLoader - Class in fmpp.dataloaders
-
-
Returns the value of an Ant property.
-
-
AntPropertyDataLoader() - Constructor for class fmpp.dataloaders.AntPropertyDataLoader
-
 
-
AntTask - Class in fmpp.tools
-
-
Ant task to process files selected by pattern sets.
-
-
AntTask() - Constructor for class fmpp.tools.AntTask
-
 
-
AntTask.AntAttributeSubstitution - Class in fmpp.tools
-
-
Used internally (must be public class for technical reasons).
-
-
AntTaskDataLoader - Class in fmpp.dataloaders
-
-
Returns the FMPP Ant task object.
-
-
AntTaskDataLoader() - Constructor for class fmpp.dataloaders.AntTaskDataLoader
-
 
-
args - Variable in class fmpp.dataloaders.FileDataLoader
-
 
-
ArgsParser - Class in fmpp.util
-
-
Simple command-line argument parser that mimics the logic of UN*X - tools as ls.
-
-
ArgsParser() - Constructor for class fmpp.util.ArgsParser
-
-
Creates a parser.
-
-
ArgsParser.BadArgsException - Exception in fmpp.util
-
-
The user has entered invalid options in the command-line.
-
-
ArgsParser.OptionDefinition - Class in fmpp.util
-
-
Describes and option.
-
-
ATTRIBUTE_ANT_TASK - Static variable in class fmpp.dataloaders.AntDataLoader
-
-
The name of the Engine attribute that must store the Ant task - object.
-
-
- - - -

B

-
-
beginNestedOutputFile(String) - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the begin tag of the corresponding directive of the - pp hash.
-
-
beginNestedOutputFile(String, boolean) - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the begin tag of the corresponding directive of the - pp hash.
-
-
boolParam(Object, String) - Method in class fmpp.models.TemplateModelUtils
-
 
-
BorderedReader - Class in fmpp.util
-
-
Reader that can insert a string before and after an encapsulated - character stream.
-
-
BorderedReader(String, Reader, String) - Constructor for class fmpp.util.BorderedReader
-
 
-
BshLocalDataBuilder - Class in fmpp.localdatabuilders
-
-
Deduces the file name of a BeanShell scrip file from the source file - name, and executes that script to create local data.
-
-
BshLocalDataBuilder() - Constructor for class fmpp.localdatabuilders.BshLocalDataBuilder
-
-
Creates new instance.
-
-
BugException - Exception in fmpp.util
-
-
A bug has been detected.
-
-
BugException(String) - Constructor for exception fmpp.util.BugException
-
 
-
BugException(String, Throwable) - Constructor for exception fmpp.util.BugException
-
 
-
build(Engine, TemplateEnvironment) - Method in interface fmpp.LocalDataBuilder
-
-
Returns the variables that could be added to the local data.
-
-
build(Engine, TemplateEnvironment) - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
 
-
build(Engine, TemplateEnvironment) - Method in class fmpp.localdatabuilders.CachingLocalDataBuilder
-
-
Takes care of caching, and calls CachingLocalDataBuilder.build(Engine) if no cached - result is available.
-
-
build(Engine) - Method in class fmpp.localdatabuilders.CachingLocalDataBuilder
-
-
Override this method in your local data builder class.
-
-
build(Engine, TemplateEnvironment) - Method in class fmpp.localdatabuilders.MapLocalDataBuilder
-
 
-
build(Engine) - Method in class fmpp.localdatabuilders.TddHashLocalDataBuilder
-
 
-
build(Engine, Template, File) - Method in interface fmpp.TemplateDataModelBuilder
-
-
Deprecated.
-
Returns the top-level variables that will be available for the template.
-
-
- - - -

C

-
-
CachingLocalDataBuilder - Class in fmpp.localdatabuilders
-
-
Stores the returned Map, and reuses it - CachingLocalDataBuilder.build(Engine, TemplateEnvironment) is invoked again during the same - processing session.
-
-
CachingLocalDataBuilder() - Constructor for class fmpp.localdatabuilders.CachingLocalDataBuilder
-
 
-
capitalizeFirst(String) - Static method in class fmpp.util.StringUtil
-
 
-
causeMessages(Throwable) - Static method in class fmpp.util.MiscUtil
-
-
This is the same as MiscUtil.causeTrace(java.lang.Throwable), but it doesn't print the - exception class name if the class is inside an fmpp package.
-
-
causeTrace(Throwable) - Static method in class fmpp.util.MiscUtil
-
-
Returns the cause trace of an exception.
-
-
changeOutputFile(String) - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the directive in the pp hash.
-
-
changeOutputFile(String, boolean) - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the directive in the pp hash.
-
-
checkXmlSupportAvailability(String) - Method in class fmpp.Engine
-
-
Checks if XML support is available.
-
-
checkXmlSupportAvailability(String) - Static method in class fmpp.util.MiscUtil
-
-
Checks if XML API-s (JAXP, SAX2, DOM) are present.
-
-
chomp(String) - Static method in class fmpp.util.StringUtil
-
-
Removes the line-break from the end of the string.
-
-
chomp(StringBuffer) - Static method in class fmpp.util.StringUtil
-
-
Removes the line-break from the end of the StringBuffer.
-
-
classForName(String) - Static method in class fmpp.util.MiscUtil
-
-
Tries to load the class with the current context class loader, - and only then with the current defining class loader.
-
-
clearAttribues() - Method in class fmpp.Engine
-
-
Removes all attributes.
-
-
clearAttribues() - Method in class fmpp.setting.Settings
-
-
Removes all engine attributes.
-
-
clearData() - Method in class fmpp.Engine
-
-
Removes all data.
-
-
clearDocumentElements() - Method in class fmpp.XmlRenderingConfiguration
-
-
Empties the document element list.
-
-
clearFooterChoosers() - Method in class fmpp.Engine
-
-
Removes all footer choosers.
-
-
clearFreemarkerLinks() - Method in class fmpp.Engine
-
-
Removes all FreeMarker links.
-
-
clearHeaderChoosers() - Method in class fmpp.Engine
-
-
Removes all header choosers.
-
-
clearLocalDataBuilders() - Method in class fmpp.Engine
-
-
Removes all local data builders.
-
-
clearLocalDataBuilders() - Method in class fmpp.XmlRenderingConfiguration
-
-
Removes all local data builders.
-
-
clearModeChoosers() - Method in class fmpp.Engine
-
-
Removes all processing mode choosers.
-
-
clearProgressListeners() - Method in class fmpp.Engine
-
-
Removes all progress listeners from the list of progress listeners that - were added with Engine.addProgressListener(fmpp.ProgressListener).
-
-
clearProgressListeners() - Method in class fmpp.setting.Settings
-
-
Removes all progress listeneres.
-
-
clearRemoveExtensions() - Method in class fmpp.Engine
-
 
-
clearRemovePostfixes() - Method in class fmpp.Engine
-
 
-
clearReplaceExtensions() - Method in class fmpp.Engine
-
 
-
clearSharedVariables() - Method in class fmpp.Engine
-
-
Deprecated. -
Use Engine.clearData() instead.
-
-
-
clearSourcePathPatterns() - Method in class fmpp.XmlRenderingConfiguration
-
-
Empties the list of source path patterns.
-
-
ClearTransform - Class in fmpp.models
-
-
Removes all items from a WritableSequence or WritableHash.
-
-
ClearTransform() - Constructor for class fmpp.models.ClearTransform
-
 
-
clearTurnChoosers() - Method in class fmpp.Engine
-
-
Removes all turn choosers.
-
-
clearXmlDataLoaderOptions() - Method in class fmpp.XmlRenderingConfiguration
-
-
Removes all xml data loader options.
-
-
clearXmlRenderingConfigurations() - Method in class fmpp.Engine
-
-
Removes all XML rendering configurations.
-
-
clone() - Method in class fmpp.models.WritableHash
-
 
-
clone() - Method in class fmpp.models.WritableSequence
-
 
-
close() - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Closes the PrintWriter used for printing into the log.
-
-
close() - Method in class fmpp.util.BorderedReader
-
 
-
close() - Method in class fmpp.util.NullWriter
-
 
-
CommandLine - Class in fmpp.tools
-
-
Command-line tool for preprocessing single files or entire directories.
-
-
CommandLine() - Constructor for class fmpp.tools.CommandLine
-
 
-
compressPath(String, int) - Static method in class fmpp.util.FileUtil
-
-
Returns a compressed version of the path.
-
-
ConsoleProgressListener - Class in fmpp.progresslisteners
-
-
Designed to show the progress on console screen.
-
-
ConsoleProgressListener() - Constructor for class fmpp.progresslisteners.ConsoleProgressListener
-
-
Output will be printed to the stdout.
-
-
ConsoleProgressListener(OutputStream) - Constructor for class fmpp.progresslisteners.ConsoleProgressListener
-
 
-
ConsoleProgressListener(PrintWriter) - Constructor for class fmpp.progresslisteners.ConsoleProgressListener
-
 
-
ConsoleProgressListener(OutputStream, boolean) - Constructor for class fmpp.progresslisteners.ConsoleProgressListener
-
 
-
ConsoleProgressListener(PrintWriter, boolean) - Constructor for class fmpp.progresslisteners.ConsoleProgressListener
-
 
-
copy(String, String) - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Creates a copy of the option with different short- and long-name, - but with the same property name (and other attributes).
-
-
copyFile(File, File, boolean) - Static method in class fmpp.util.FileUtil
-
-
Copies a file; silently overwrites the destination if already exists.
-
-
copyFile(File, File) - Static method in class fmpp.util.FileUtil
-
- -
-
CopyWritableVariableMethod - Class in fmpp.models
-
-
Creates a new, empty WritableHash.
-
-
CopyWritableVariableMethod() - Constructor for class fmpp.models.CopyWritableVariableMethod
-
 
-
createInstanceForSetting(String, List) - Static method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
 
-
createSourceCodeErrorMessage(String, String, int, String, int) - Static method in class fmpp.util.StringUtil
-
 
-
CsvDataLoader - Class in fmpp.dataloaders
-
-
Data loaders that loads CSV (Column Separated Values) files or other files of - similar formats (as tab divided text), and returns a - fmpp.models.CsvSequence object.
-
-
CsvDataLoader() - Constructor for class fmpp.dataloaders.CsvDataLoader
-
 
-
CsvSequence - Class in fmpp.models
-
-
Sequence variable implementation that wraps text of CSV or tab separated - values format, or any other format that is the same as CSV except that it - uses different column separator char.
-
-
CsvSequence() - Constructor for class fmpp.models.CsvSequence
-
-
Creates a new instance.
-
-
- - - -

D

-
-
dataFile - Variable in class fmpp.dataloaders.FileDataLoader
-
 
-
DataLoader - Interface in fmpp.tdd
-
-
Creates an object that will be accessed in FreeMarker templates.
-
-
DataLoaderEvaluationEnvironment - Class in fmpp.tdd
-
-
Evaluates function calls as data loader invocations.
-
-
DataLoaderEvaluationEnvironment(Engine) - Constructor for class fmpp.tdd.DataLoaderEvaluationEnvironment
-
 
-
DataLoaderUtil - Class in fmpp.util
-
-
Utility methods for writing data loaders.
-
-
DataLoaderUtil() - Constructor for class fmpp.util.DataLoaderUtil
-
 
-
DataModelBuildingException - Exception in fmpp
-
-
Error while trying to build the data-model for a template.
-
-
DataModelBuildingException(Throwable) - Constructor for exception fmpp.DataModelBuildingException
-
 
-
DataModelBuildingException(String) - Constructor for exception fmpp.DataModelBuildingException
-
 
-
DataModelBuildingException(String, Throwable) - Constructor for exception fmpp.DataModelBuildingException
-
 
-
DEFAULT_CFG_FILE_NAME - Static variable in class fmpp.setting.Settings
-
-
Primary default file name.
-
-
DEFAULT_CFG_FILE_NAME_OLD - Static variable in class fmpp.setting.Settings
-
-
Secondary (legacy) default file name.
-
-
DEFAULT_NODE_NAME - Static variable in class fmpp.models.JSONArrayNode
-
 
-
DEFAULT_NODE_NAME - Static variable in class fmpp.models.JSONBooleanNode
-
 
-
DEFAULT_NODE_NAME - Static variable in class fmpp.models.JSONNullNode
-
 
-
DEFAULT_NODE_NAME - Static variable in class fmpp.models.JSONNumberNode
-
 
-
DEFAULT_NODE_NAME - Static variable in class fmpp.models.JSONObjectNode
-
 
-
DEFAULT_NODE_NAME - Static variable in class fmpp.models.JSONStringNode
-
 
-
defaultArg(String) - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Gives default argument value for an option that supports arguments, - thus it will be optional to specify the argument value in the - command-line.
-
-
define(String, Settings.SettingType, boolean, boolean) - Method in class fmpp.setting.Settings
-
-
Defines a new setting.
-
-
desc(String) - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Sets the description (used in help) of the option.
-
-
dictionaryToMap(Dictionary) - Static method in class fmpp.util.MiscUtil
-
 
-
dieWithMissingParam(String) - Method in class fmpp.models.TemplateModelUtils
-
- -
-
dieWithParamsNotAllowed() - Method in class fmpp.models.TemplateModelUtils
-
- -
-
dieWithUnknownParam(String) - Method in class fmpp.models.TemplateModelUtils
-
- -
-
doProcessing(Engine, File[], File, File) - Method in class fmpp.setting.Settings
-
-
Executes the processing session(s) on the Engine level, - using the already initialized Engine object.
-
-
dropOutputFile() - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the directive in the pp hash.
-
-
dump() - Method in class fmpp.setting.Settings
-
-
Dumps the current content of this object for debugging purposes.
-
-
dump(Object) - Static method in class fmpp.tdd.Interpreter
-
-
Converts an object to a TDD-like representation (not necessary valid - TDD).
-
-
- - - -

E

-
-
EMPTY_CLASS_ARRAY - Static variable in class fmpp.util.MiscUtil
-
 
-
EMPTY_OBJECT_ARRAY - Static variable in class fmpp.util.MiscUtil
-
 
-
EMPTY_STRING_ARRAY - Static variable in class fmpp.util.MiscUtil
-
 
-
endNestedOutputFile() - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the end tag of the corresponding directive of the - pp hash.
-
-
engine - Variable in class fmpp.dataloaders.FileDataLoader
-
 
-
Engine - Class in fmpp
-
-
The bare-bone, low-level preprocessor engine.
-
-
Engine() - Constructor for class fmpp.Engine
-
-
Deprecated. - -
-
-
Engine(BeansWrapper) - Constructor for class fmpp.Engine
-
-
Deprecated. - -
-
-
Engine(BeansWrapper, Version) - Constructor for class fmpp.Engine
-
-
Creates a new FMPP engine instance.
-
-
eval(String, EvaluationEnvironment, boolean, String) - Static method in class fmpp.tdd.Interpreter
-
-
Evaluates text as single TDD expression.
-
-
eval(Fragment, EvaluationEnvironment, boolean) - Static method in class fmpp.tdd.Interpreter
-
-
Evaluates a Fragment as single TDD expression.
-
-
eval(String, String) - Static method in class fmpp.tdd.Interpreter
-
-
Same as eval(text, null, false, fileName).
-
-
eval(String) - Static method in class fmpp.tdd.Interpreter
-
-
Same as eval(text, null, false, null).
-
-
evalAsHash(String, EvaluationEnvironment, boolean, String) - Static method in class fmpp.tdd.Interpreter
-
-
Evaluates text as a list of key:value pairs.
-
-
evalAsHash(String) - Static method in class fmpp.tdd.Interpreter
-
-
Same as evalAsHash(text, null, false, null).
-
-
evalAsHash(String, String) - Static method in class fmpp.tdd.Interpreter
-
-
Same as evalAsHash(text, null, false, fileName).
-
-
evalAsSequence(String, EvaluationEnvironment, boolean, String) - Static method in class fmpp.tdd.Interpreter
-
-
Evaluates text as a list values.
-
-
evalAsSequence(String) - Static method in class fmpp.tdd.Interpreter
-
-
Same as evalAsList(text, null, false, null).
-
-
evalAsSequence(String, String) - Static method in class fmpp.tdd.Interpreter
-
-
Same as evalAsList(text, null, false, fileName).
-
-
EvalDataLoader - Class in fmpp.dataloaders
-
-
Evaluates a BeanShell expression (looks like as Java).
-
-
EvalDataLoader() - Constructor for class fmpp.dataloaders.EvalDataLoader
-
 
-
EvalException - Exception in fmpp.tdd
-
 
-
EvalException(String) - Constructor for exception fmpp.tdd.EvalException
-
 
-
EvalException(String, Throwable) - Constructor for exception fmpp.tdd.EvalException
-
 
-
EvalException(String, int) - Constructor for exception fmpp.tdd.EvalException
-
 
-
EvalException(String, int, Throwable) - Constructor for exception fmpp.tdd.EvalException
-
 
-
EvalException(String, String, int, String) - Constructor for exception fmpp.tdd.EvalException
-
 
-
EvalException(String, String, int, String, Throwable) - Constructor for exception fmpp.tdd.EvalException
-
 
-
evalFunctionCall(FunctionCall, Interpreter) - Method in class fmpp.tdd.DataLoaderEvaluationEnvironment
-
 
-
evalFunctionCall(FunctionCall, Interpreter) - Method in interface fmpp.tdd.EvaluationEnvironment
-
-
Evaluates the function call.
-
-
EvaluationEnvironment - Interface in fmpp.tdd
-
-
Callbacks that let you control the behaviour of TDD expression evaluation.
-
-
EVENT_BEGIN_FILE_PROCESSING - Static variable in interface fmpp.ProgressListener
-
-
The processing of a single file has been started.
-
-
EVENT_BEGIN_PROCESSING_SESSION - Static variable in interface fmpp.ProgressListener
-
-
Engine.process has started the work.
-
-
EVENT_CREATED_EMPTY_DIR - Static variable in interface fmpp.ProgressListener
-
-
An empty directory was created due to the copyEmptyDirs setting.
-
-
EVENT_END_FILE_PROCESSING - Static variable in interface fmpp.ProgressListener
-
-
The processing of a single file has been finished.
-
-
EVENT_END_PROCESSING_SESSION - Static variable in interface fmpp.ProgressListener
-
-
Engine.process has finished the work.
-
-
EVENT_ENTER_FUNCTION_PARAMS - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
-
The code of event that indicates that we have started to evaluate the - parameter list in a function call.
-
-
EVENT_ENTER_HASH - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
-
The code of event that indicates that we have started to evaluate the - items in a hash.
-
-
EVENT_ENTER_HASH_KEY - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
-
The code of event that indicates that we have started to evaluate the - value in a key:value pair.
-
-
EVENT_ENTER_SEQUENCE - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
-
The code of event that indicates that we have started to evaluate the - items in a sequence.
-
-
EVENT_IGNORING_DIR - Static variable in interface fmpp.ProgressListener
-
-
A source directory has been ignored (skipped.)
-
-
EVENT_LEAVE_FUNCTION_PARAMS - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
-
The code of event that indicates that we have finished to evaluate the - parameter list in a function call.
-
-
EVENT_LEAVE_HASH - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
-
The code of event that indicates that we have finished to evaluate the - items in a sequence.
-
-
EVENT_LEAVE_HASH_KEY - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
-
The code of event that indicates that we have finished to evaluate the - value in a key:value pair.
-
-
EVENT_LEAVE_SEQUENCE - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
-
The code of event that indicates that we have finished to evaluate the - items in a sequence.
-
-
EVENT_SOURCE_NOT_MODIFIED - Static variable in interface fmpp.ProgressListener
-
-
The processing of source was skipped because the output was generated - after the last modification of the source file.
-
-
EVENT_WARNING - Static variable in interface fmpp.ProgressListener
-
-
A warning message has been received from a template or from the - engine.
-
-
ExceptionCC - Exception in fmpp.util
-
-
This was used for emulating cause-chains on Java earlier than 1.4, but as FMPP now requires 1.4, it just dispatches - to Exception.
-
-
ExceptionCC() - Constructor for exception fmpp.util.ExceptionCC
-
 
-
ExceptionCC(String) - Constructor for exception fmpp.util.ExceptionCC
-
 
-
ExceptionCC(Throwable) - Constructor for exception fmpp.util.ExceptionCC
-
 
-
ExceptionCC(String, Throwable) - Constructor for exception fmpp.util.ExceptionCC
-
 
-
exec(List) - Method in class fmpp.models.CopyWritableVariableMethod
-
 
-
exec(List) - Method in class fmpp.models.NewWritableHashMethod
-
 
-
exec(List) - Method in class fmpp.models.NewWritableSequenceMethod
-
 
-
execute() - Method in class fmpp.setting.Settings
-
-
Executes a processing session based on the setting values.
-
-
execute() - Method in class fmpp.tools.AntTask
-
 
-
execute(String[], PrintWriter, PrintWriter) - Static method in class fmpp.tools.CommandLine
-
-
Emulates the command-line invocation of the tool.
-
-
expandTabs(String, int) - Static method in class fmpp.util.StringUtil
-
-
Same as expandTabs(text, tabWidth, 0).
-
-
expandTabs(String, int, int) - Static method in class fmpp.util.StringUtil
-
-
Replaces all occurances of character tab with spaces.
-
-
- - - -

F

-
-
FileDataLoader - Class in fmpp.dataloaders
-
-
Ancestor of data loaders that create the result based on a file.
-
-
FileDataLoader() - Constructor for class fmpp.dataloaders.FileDataLoader
-
 
-
FileUtil - Class in fmpp.util
-
-
Collection of file and path related functions.
-
-
FileUtil() - Constructor for class fmpp.util.FileUtil
-
 
-
FileWithConfigurationBase - Class in fmpp.setting
-
-
File that stores the current configuration base directory at - the time it was instantiated.
-
-
FileWithConfigurationBase(File, String, String) - Constructor for class fmpp.setting.FileWithConfigurationBase
-
-
Creates a new instance.
-
-
FileWithSettingValue - Class in fmpp.setting
-
-
File that stores the original setting value (string) it was - constructed from.
-
-
FileWithSettingValue(File, String, String) - Constructor for class fmpp.setting.FileWithSettingValue
-
 
-
FileWithSettingValue(String, String) - Constructor for class fmpp.setting.FileWithSettingValue
-
 
-
FileWithSettingValue(String, String, String) - Constructor for class fmpp.setting.FileWithSettingValue
-
 
-
finalizeResult(Object) - Method in class fmpp.dataloaders.JSONDataLoader
-
-
Converts the POJO created from the JSON to its final form.
-
-
findObject(List, Object) - Static method in class fmpp.util.MiscUtil
-
-
Returns the first index of the given object (exactly the same instance) - in the list.
-
-
findTopLevelVariable(String) - Method in class fmpp.tdd.DataLoaderEvaluationEnvironment
-
-
Override this to help TDD get function to find top level - variables.
-
-
fixBoolean(String) - Method in class fmpp.models.CsvSequence
-
-
Override this if you want to correct boolean values come from the file.
-
-
fixNumber(String) - Method in class fmpp.models.CsvSequence
-
-
Override this if you want to correct numerical values come from the - file.
-
-
fixVersion08SettingNames(Properties) - Static method in class fmpp.setting.Settings
-
-
Backward compatibility hack: renames properties that use - pre-FMPP 0.9.0 names of settings.
-
-
flush() - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Flushes the PrintWriter used for printing into the log.
-
-
flush() - Method in class fmpp.util.NullWriter
-
 
-
fmpp - package fmpp
-
-
The very core, the foundation of FMPP.
-
-
fmpp.dataloaders - package fmpp.dataloaders
-
-
fmpp.DataLoader implementations.
-
-
fmpp.localdatabuilders - package fmpp.localdatabuilders
-
-
fmpp.LocalDataBuilder implementations.
-
-
fmpp.models - package fmpp.models
-
-
freemarker.template.TemplateModel implementations.
-
-
fmpp.progresslisteners - package fmpp.progresslisteners
-
-
fmpp.ProgressListener implementations.
-
-
fmpp.setting - package fmpp.setting
-
-
FMPP settings.
-
-
fmpp.tdd - package fmpp.tdd
-
-
Textual Data Definition related classes.
-
-
fmpp.tools - package fmpp.tools
-
-
Tools (front-ends) that end-user can use out-of-the-box.
-
-
fmpp.util - package fmpp.util
-
-
Collection of more-less FMPP independent utility classes.
-
-
FMPP_CONSOLE_COLS - Static variable in class fmpp.tools.CommandLine
-
-
The number of console (terminal) columns can be passed in with this environment variable, supposedly by the - OS-specific starter executable (shell script).
-
-
Fragment - Class in fmpp.tdd
-
-
Fragment extracted from a TDD expression.
-
-
Fragment(String, int, int, String) - Constructor for class fmpp.tdd.Fragment
-
-
Creates new TDD fragment.
-
-
FreemarkerUtil - Class in fmpp.util
-
-
FreeMarker related utilities.
-
-
FreemarkerUtil() - Constructor for class fmpp.util.FreemarkerUtil
-
 
-
ftlStringLiteralDec(String) - Static method in class fmpp.util.StringUtil
-
-
FTL string literal decoding.
-
-
ftlVarToCoreJavaObject(TemplateModel) - Static method in class fmpp.util.FreemarkerUtil
-
-
Converts TemplateModel-s to java.util.* and - java.lang.* objects.
-
-
FunctionCall - Class in fmpp.tdd
-
-
Symbolizes a TDD function call.
-
-
FunctionCall(String, List) - Constructor for class fmpp.tdd.FunctionCall
-
 
-
- - - -

G

-
-
get(int) - Method in class fmpp.models.CsvSequence
-
 
-
get(String) - Method in class fmpp.models.CsvSequence
-
 
-
get(int) - Method in class fmpp.models.JSONArrayNode
-
-
Returns the JSONNode at the given index from this JSON array, using a Java null for JSON - null-s.
-
-
get(String) - Method in class fmpp.models.JSONObjectNode
-
-
Returns the JSONNode for the given key from this JSON object, using a Java null for JSON - null-s.
-
-
get(int) - Method in class fmpp.models.StringArraySequence
-
 
-
get(int) - Method in class fmpp.models.TemplateModelListSequence
-
 
-
get(String) - Method in class fmpp.models.WritableHash
-
 
-
get(int) - Method in class fmpp.models.WritableSequence
-
 
-
get(String) - Method in class fmpp.setting.Settings
-
-
Gets the current value of a setting.
-
-
getAccessed() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
Number of files that the engine has tried to process.
-
-
getAltFalse() - Method in class fmpp.models.CsvSequence
-
 
-
getAltTrue() - Method in class fmpp.models.CsvSequence
-
 
-
getAlwaysCreateDirectories() - Method in class fmpp.Engine
-
 
-
getArgName() - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Returns the name of the argument, or null if the option does not - support argument.
-
-
getAsBoolean() - Method in class fmpp.models.JSONBooleanNode
-
 
-
getAsNumber() - Method in class fmpp.models.JSONNumberNode
-
 
-
getAsString() - Method in class fmpp.models.JSONStringNode
-
 
-
getAttribute(String) - Method in class fmpp.Engine
-
-
Reads an engine attribute.
-
-
getBooleanArgument(int, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getBooleanOption(String, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getBuildInfo() - Static method in class fmpp.Engine
-
-
Returns FMPP build info.
-
-
getCaseSensitive() - Method in class fmpp.Engine
-
 
-
getCause() - Method in exception fmpp.util.RuntimeExceptionCC
-
 
-
getCauseException(Throwable) - Static method in class fmpp.util.MiscUtil
-
 
-
getCharArgument(int, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getCharOption(String, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getChildNodes() - Method in class fmpp.models.JSONArrayNode
-
-
Returns the JSONNode-s in this JSON array, using a JSONNullNode for JSON null-s.
-
-
getChildNodes() - Method in class fmpp.models.JSONBooleanNode
-
-
Always returns null.
-
-
getChildNodes() - Method in class fmpp.models.JSONNullNode
-
 
-
getChildNodes() - Method in class fmpp.models.JSONNumberNode
-
-
Always returns null.
-
-
getChildNodes() - Method in class fmpp.models.JSONObjectNode
-
 
-
getChildNodes() - Method in class fmpp.models.JSONStringNode
-
-
Always returns null.
-
-
getConfigurationBase() - Method in class fmpp.setting.FileWithConfigurationBase
-
 
-
getCopied() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
Number of files successfully copied.
-
-
getCurrentInstance() - Static method in class fmpp.TemplateEnvironment
-
-
Returns the TemplateEnvironment object used for the template - currently being executed by FMPP in the current thread.
-
-
getDashedName(String) - Static method in class fmpp.setting.Settings
-
-
Converts mixed-case setting name to dashed form, - as sourceRoot to source-root.
-
-
getData(String) - Method in class fmpp.Engine
-
-
Gets the value of a variable.
-
-
getData(String) - Method in class fmpp.TemplateEnvironment
-
-
Similar to Engine.getData(java.lang.String), but it also sees file processing - specifict variables (local data).
-
-
getDataLoaderInstance(Engine, String) - Static method in class fmpp.tdd.TddUtil
-
-
Resolves a data loader name to a data loader instance.
-
-
getDataRoot() - Method in class fmpp.Engine
-
-
Returns the directory used as data root directory.
-
-
getDateFormat() - Method in class fmpp.Engine
-
 
-
getDateFormatPattern() - Method in class fmpp.models.CsvSequence
-
 
-
getDateTimeFormat() - Method in class fmpp.Engine
-
 
-
getDateTimeFormatPattern() - Method in class fmpp.models.CsvSequence
-
 
-
getDecimalSeparator() - Method in class fmpp.models.CsvSequence
-
 
-
getDefaultArg() - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Returns the default argument of the option, or null if the option - has no default argument.
-
-
getDefaultConfigurationFile(File) - Static method in class fmpp.setting.Settings
-
-
Returns the default configuration file in the directory.
-
-
getDefaultNodeName() - Method in class fmpp.models.JSONArrayNode
-
 
-
getDefaultNodeName() - Method in class fmpp.models.JSONBooleanNode
-
 
-
getDefaultNodeName() - Method in class fmpp.models.JSONNode
-
-
Returns the name of the node if it has no explicit name.
-
-
getDefaultNodeName() - Method in class fmpp.models.JSONNullNode
-
 
-
getDefaultNodeName() - Method in class fmpp.models.JSONNumberNode
-
 
-
getDefaultNodeName() - Method in class fmpp.models.JSONObjectNode
-
 
-
getDefaultNodeName() - Method in class fmpp.models.JSONStringNode
-
 
-
getDescription() - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Returns the description of the option, or null if no description is - available.
-
-
getDontTraverseDirectories() - Method in class fmpp.Engine
-
 
-
getDontTraverseDirectories() - Method in class fmpp.setting.Settings
-
 
-
getEmptyValues() - Method in class fmpp.models.CsvSequence
-
 
-
getEncoding() - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
 
-
getEnding() - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
 
-
getEngine() - Method in class fmpp.TemplateEnvironment
-
-
Returns the FMPP engine object in use.
-
-
getEngineAttribute(String) - Method in class fmpp.setting.Settings
-
-
Reads an engine attribute.
-
-
getErrorCount() - Method in class fmpp.progresslisteners.AntProgressListener
-
 
-
getEvaluationEnvironment() - Method in class fmpp.tdd.Interpreter
-
 
-
getExecuted() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
Number of files successfully executed (templates).
-
-
getExpertMode() - Method in class fmpp.Engine
-
 
-
getExternalHeaderRow() - Method in class fmpp.models.CsvSequence
-
 
-
getFailed() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
Number of files where processing was failed.
-
-
getFileName() - Method in class fmpp.tdd.Fragment
-
-
Returns the name of the file the text comes from (for informational - purposes only).
-
-
getFileName() - Method in class fmpp.tdd.Interpreter
-
 
-
getFragmentEnd() - Method in class fmpp.tdd.Fragment
-
-
Returns the end index (exclusive) of the fragment in the text.
-
-
getFragmentStart() - Method in class fmpp.tdd.Fragment
-
-
Returns the start index of the fragment in the text.
-
-
getFreemarkerEnvironment() - Method in class fmpp.TemplateEnvironment
-
-
Returns the FreeMarker environment currently in use.
-
-
getFreemarkerLink(String) - Method in class fmpp.Engine
-
-
Returns the list of files associated with a FreeMarker link name.
-
-
getFreeMarkerVersionNumber() - Static method in class fmpp.Engine
-
 
-
getGroupingSeparator() - Method in class fmpp.models.CsvSequence
-
 
-
getHasHeaderRow() - Method in class fmpp.models.CsvSequence
-
 
-
getHomePath() - Method in class fmpp.TemplateEnvironment
-
-
Returns URL-style path of the output root relative to the current output - file.
-
-
getIgnoreCvsFiles() - Method in class fmpp.Engine
-
 
-
getIgnoreMissing() - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
-
Set if it will be ignored no script file found for the source file, - rather than throwing an exception.
-
-
getIgnoreSvnFiles() - Method in class fmpp.Engine
-
 
-
getIgnoreTemporaryFiles() - Method in class fmpp.Engine
-
 
-
getIntArgument(int, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getIntOption(String, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getList() - Method in class fmpp.models.WritableSequence
-
 
-
getLocale() - Method in class fmpp.Engine
-
-
Returns the actual (non-null) locale in use.
-
-
getLongName() - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Returns the long-name of the option, or null if the option has no - long-name.
-
-
getMap() - Method in class fmpp.models.WritableHash
-
 
-
getMessage() - Method in exception fmpp.ProcessingException
-
-
Returns always the same text: "FMPP processing session failed."
-
-
getName() - Method in class fmpp.tdd.FunctionCall
-
 
-
getNames() - Method in class fmpp.setting.Settings
-
-
Lists the names of settings that were set.
-
-
getNodeName() - Method in class fmpp.models.JSONNode
-
-
Returns the same as TemplateNodeModel.getNodeType(), except when the node is the value in a key-value pair in a - JSON object, in which case it returns the key value.
-
-
getNodeNamespace() - Method in class fmpp.models.JSONNode
-
 
-
getNodeType() - Method in class fmpp.models.JSONArrayNode
-
- -
-
getNodeType() - Method in class fmpp.models.JSONBooleanNode
-
- -
-
getNodeType() - Method in class fmpp.models.JSONNullNode
-
 
-
getNodeType() - Method in class fmpp.models.JSONNumberNode
-
- -
-
getNodeType() - Method in class fmpp.models.JSONObjectNode
-
 
-
getNodeType() - Method in class fmpp.models.JSONStringNode
-
- -
-
getNonOptions() - Method in class fmpp.util.ArgsParser
-
-
Retruns the non-options resulting from the latest parse - call.
-
-
getNormalizeHeaders() - Method in class fmpp.models.CsvSequence
-
 
-
getNumberFormat() - Method in class fmpp.Engine
-
 
-
getOldTemplateSyntax() - Method in class fmpp.Engine
-
 
-
getOption(String) - Method in class fmpp.util.ArgsParser
-
-
Convenience funtcion to read the option Properties object.
-
-
getOptionDefinition(String) - Method in class fmpp.util.ArgsParser
-
-
Returns the ArgsParser.OptionDefinition for the given option name.
-
-
getOptionDefintions() - Method in class fmpp.util.ArgsParser
-
-
Returns the list of ArgsParser.OptionDefinition-s, sorted as they should - appear in an option help.
-
-
getOptions() - Method in class fmpp.util.ArgsParser
-
-
Returns the options resulting from the latest parse - call as Properties object.
-
-
getOptionsHelp(int) - Method in class fmpp.util.ArgsParser
-
-
Generates options help for the defined options.
-
-
getOutputEncoding() - Method in class fmpp.Engine
-
-
Retruns the output encoding used; It can be "source" - (since that can't be resolved to a concrete charset), but never - null or "host".
-
-
getOutputEncoding() - Method in class fmpp.TemplateEnvironment
-
-
Returns the output encoding.
-
-
getOutputFile() - Method in class fmpp.TemplateEnvironment
-
-
Returns the output file.
-
-
getOutputRoot() - Method in class fmpp.Engine
-
-
Returns the output root directory.
-
-
getParams() - Method in class fmpp.tdd.FunctionCall
-
 
-
getParentNode() - Method in class fmpp.models.JSONNode
-
-
Returns the JSON "object" or JSON "array" that contains this value.
-
-
getPathTo(String) - Method in class fmpp.TemplateEnvironment
-
-
Calculates the path of another output file relatively to current output - file, in UN*X format.
-
-
getPosition() - Method in class fmpp.tdd.Interpreter
-
 
-
getPrintWriter() - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Returns the PrintWriter used for printing into the log.
-
-
getProcessingTime() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
The duration of the last - BEGIN_ALL_PROCESSING-END_ALL_PROCESSING - in milliseconds, or -1 if that is not known.
-
-
getProgressListenerEventName(int) - Static method in class fmpp.Engine
-
-
Converts an ProgressListener.EVENT_... constant to English - text.
-
-
getPropertyNames() - Method in class fmpp.util.ArgsParser
-
-
Returns the property names used in the options.
-
-
getRelativePath(File, File) - Static method in class fmpp.util.FileUtil
-
-
Reaturns the path of a file or directory relative to a directory, - in native format.
-
-
getRemoveExtension() - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
 
-
getSeparator() - Method in class fmpp.models.CsvSequence
-
 
-
getSettingValue() - Method in class fmpp.setting.FileWithSettingValue
-
 
-
getShortName() - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Returns the short-name of the option, or null if the option has no - short-name.
-
-
getSkipUnchanged() - Method in class fmpp.Engine
-
 
-
getSourceEncoding() - Method in class fmpp.Engine
-
-
Returns the source encoding used for the template files.
-
-
getSourceFile() - Method in exception fmpp.ProcessingException
-
-
Returns the source file the faliure relates to.
-
-
getSourceFile() - Method in class fmpp.TemplateEnvironment
-
-
Returns the source file.
-
-
getSourcePathTo(String) - Method in class fmpp.TemplateEnvironment
-
-
Same as TemplateEnvironment.getPathTo(java.lang.String) but with the source file and - source root directory.
-
-
getSourceRoot() - Method in class fmpp.Engine
-
-
Returns the source root directory.
-
-
getSourceRoot() - Method in exception fmpp.ProcessingException
-
-
Returns the "sourceRoot" used during the processing session that failed.
-
-
getStandardSettingNames() - Static method in class fmpp.setting.Settings
-
-
Returns if the given name is the name of a standard setting.
-
-
getStopOnError() - Method in class fmpp.Engine
-
 
-
getStringArgument(int, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getStringArrayArgument(int, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getStringArrayArgument(int, Object, boolean) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getStringArrayOption(String, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getStringArrayOption(String, Object, boolean) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getStringOption(String, Object) - Static method in class fmpp.util.DataLoaderUtil
-
 
-
getSuccesful() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
Number of files where processing was successfull.
-
-
getTagSyntax() - Method in class fmpp.Engine
-
 
-
getTarget() - Method in class fmpp.tools.AntTask
-
 
-
getTemplate() - Method in class fmpp.TemplateEnvironment
-
-
Retuns the FreeMarker Template object for the source file.
-
-
getTemplateDataModelBuilder() - Method in class fmpp.Engine
-
 
-
getTemplateEnvironment() - Method in class fmpp.Engine
-
-
Returns the TemplateEnvironment.
-
-
getText() - Method in class fmpp.tdd.Fragment
-
-
Returns the full TDD text that contains the fragmet.
-
-
getText() - Method in class fmpp.tdd.Interpreter
-
 
-
getText() - Method in class fmpp.tools.AntTask.AntAttributeSubstitution
-
 
-
getTimeFormat() - Method in class fmpp.Engine
-
 
-
getTimeFormatPattern() - Method in class fmpp.models.CsvSequence
-
 
-
getTimeZone() - Method in class fmpp.Engine
-
 
-
getTimeZone() - Method in class fmpp.models.CsvSequence
-
 
-
getTrimCells() - Method in class fmpp.models.CsvSequence
-
 
-
getTypeName(Object) - Static method in class fmpp.tdd.Interpreter
-
 
-
getUrlEscapingCharset() - Method in class fmpp.Engine
-
-
Retruns the output encoding used; It can be "output" - (since that can't be resolved to a concrete charset), but never - null.
-
-
getValidateXml() - Method in class fmpp.Engine
-
 
-
getVersionNumber() - Static method in class fmpp.Engine
-
-
Returns the FMPP version number string.
-
-
getWarnings() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
Total number of warnings.
-
-
getWrappedObject() - Method in class fmpp.models.TemplateModelListSequence
-
 
-
getWrappedXmlDocument() - Method in class fmpp.TemplateEnvironment
-
-
The same as TemplateEnvironment.getXmlDocument(), but returns the document as - NodeModel.
-
-
getWriter(Writer, Map) - Method in class fmpp.models.AddTransform
-
 
-
getWriter(Writer, Map) - Method in class fmpp.models.ClearTransform
-
 
-
getWriter(Writer, Map) - Method in class fmpp.models.RemoveTransform
-
 
-
getWriter(Writer, Map) - Method in class fmpp.models.SetTransform
-
 
-
getXmlDocument() - Method in class fmpp.TemplateEnvironment
-
-
Returns the processed XML document (pp.doc) as - Document.
-
-
getXmlEntiryResolver() - Method in class fmpp.Engine
-
-
Gets the XML entiry resolver used for reading XML documents.
-
-
getXmlRendered() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
Number of XML files successfully rendered.
-
-
getXpathEngine() - Method in class fmpp.Engine
-
 
-
group(String) - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Convenience method; same as calling - property(propertyName, optionName), where optionName - is the long-name if that exists, otherwise the short-name.
-
-
- - - -

H

-
-
hasNext() - Method in class fmpp.util.MultiListIterator
-
 
-
hide() - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Hides option, that is, it will not be shown in the option help.
-
-
htmlEnc(String) - Static method in class fmpp.util.StringUtil
-
-
HTML encoding (does not convert line breaks).
-
-
HtmlUtilsDataLoader - Class in fmpp.dataloaders
-
-
Returns a hash that contains useful directives for HTML generation.
-
-
HtmlUtilsDataLoader() - Constructor for class fmpp.dataloaders.HtmlUtilsDataLoader
-
 
-
- - - -

I

-
-
implied() - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Ensures that the option will be seemingly present if the - args[] does not contains this option or any other option that - mutually excludes this option.
-
-
implied(String) - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Ensures that the option will be seemingly present with the given - argument value if args[] does not contains this option, or any - other option that mutually excludes this option.
-
-
InstallationException - Exception in fmpp.util
-
-
There is a problem with the software environment.
-
-
InstallationException(String) - Constructor for exception fmpp.util.InstallationException
-
 
-
InstallationException(String, Throwable) - Constructor for exception fmpp.util.InstallationException
-
 
-
INSTANCE - Static variable in class fmpp.util.NullOutputStream
-
 
-
INSTANCE - Static variable in class fmpp.util.NullWriter
-
 
-
Interpreter - Class in fmpp.tdd
-
-
Evaluates TDD expressions.
-
-
intParam(Object, String) - Method in class fmpp.models.TemplateModelUtils
-
 
-
isDefined(String) - Method in class fmpp.setting.Settings
-
-
Returns if a setting with the given name is defined (do not mix it up - with being set).
-
-
isEmpty() - Method in class fmpp.models.CsvSequence
-
 
-
isEmpty() - Method in class fmpp.models.JSONObjectNode
-
 
-
isEmpty() - Method in class fmpp.models.WritableHash
-
 
-
isInside(File, File) - Static method in class fmpp.util.FileUtil
-
-
Returns true if file is inside ascendant, - otherwise returns false.
-
-
isInsideOrEquals(File, File) - Static method in class fmpp.util.FileUtil
-
-
Returns true if file is inside ascendant or - file is the same as the ascendant, otherwise - returns false.
-
-
isOptionName(String) - Static method in class fmpp.dataloaders.XmlDataLoader
-
-
Checks if the string is a valid xml data loader option name.
-
-
isTemplateEnvironmentAvailable() - Method in class fmpp.Engine
-
-
Tells if Engine.getTemplateEnvironment() will throw exception or not.
-
-
isXmlSupportAvailabile() - Method in class fmpp.Engine
-
-
Quickly tells if XML support is available.
-
-
iterator() - Method in class fmpp.models.TemplateModelArrayCollection
-
 
-
iterator() - Method in class fmpp.models.TemplateModelListCollection
-
 
-
- - - -

J

-
-
jQuote(char) - Static method in class fmpp.util.StringUtil
-
-
Quotes string as Java language character.
-
-
jQuote(String) - Static method in class fmpp.util.StringUtil
-
-
Quotes string as Java language string literal.
-
-
jQuoteOrName(char) - Static method in class fmpp.util.StringUtil
-
-
Quotes character as Java language character, except quote characters, - which are referred with name.
-
-
JSONArrayNode - Class in fmpp.models
-
-
JSON "array" value; see http://www.json.org/.
-
-
JSONArrayNode(JSONNode, String, List) - Constructor for class fmpp.models.JSONArrayNode
-
 
-
JSONBooleanNode - Class in fmpp.models
-
-
JSON "true" and "false" value; see http://www.json.org/.
-
-
JSONBooleanNode(JSONNode, String, boolean) - Constructor for class fmpp.models.JSONBooleanNode
-
 
-
JSONDataLoader - Class in fmpp.dataloaders
-
-
Creates a JSONNode based on a JSON file.
-
-
JSONDataLoader() - Constructor for class fmpp.dataloaders.JSONDataLoader
-
 
-
JSONNode - Class in fmpp.models
-
-
Node in a hierarchy of JSON values.
-
-
JSONNode(JSONNode, String) - Constructor for class fmpp.models.JSONNode
-
 
-
JSONNullNode - Class in fmpp.models
-
-
JSON "null" value; see http://www.json.org/.
-
-
JSONNullNode(JSONNode, String) - Constructor for class fmpp.models.JSONNullNode
-
 
-
JSONNumberNode - Class in fmpp.models
-
-
JSON "number" value; see http://www.json.org/.
-
-
JSONNumberNode(JSONNode, String, Number) - Constructor for class fmpp.models.JSONNumberNode
-
 
-
JSONObjectNode - Class in fmpp.models
-
-
JSON "object" value; see http://www.json.org/.
-
-
JSONObjectNode(JSONNode, String, Map) - Constructor for class fmpp.models.JSONObjectNode
-
 
-
JSONParseException - Exception in fmpp.util
-
 
-
JSONParseException(String, String, int, String) - Constructor for exception fmpp.util.JSONParseException
-
 
-
JSONParseException(String, String, int, String, Throwable) - Constructor for exception fmpp.util.JSONParseException
-
 
-
JSONParser - Class in fmpp.util
-
-
Simple JSON parser where JSON objects create Map-s, JSON array-s create List-s, and the others - create the obvious Java equivalents.
-
-
JSONStringNode - Class in fmpp.models
-
-
JSON "string" value; see http://www.json.org/.
-
-
JSONStringNode(JSONNode, String, String) - Constructor for class fmpp.models.JSONStringNode
-
 
-
- - - -

K

-
-
keys() - Method in class fmpp.models.JSONObjectNode
-
 
-
keys() - Method in class fmpp.models.WritableHash
-
 
-
- - - -

L

-
-
LINE_BREAK - Static variable in class fmpp.util.StringUtil
-
-
The default line-break string used by the methods in this class.
-
-
listContainsObject(List, Object) - Static method in class fmpp.util.MiscUtil
-
-
Checks if the list contains the given object (exactly the same instance).
-
-
load(InputStream) - Method in class fmpp.dataloaders.AbstractTextDataLoader
-
 
-
load(Engine, List) - Method in class fmpp.dataloaders.AntDataLoader
-
-
Gets the Ant task object, and invoked AntDataLoader.load(Engine, List, Task).
-
-
load(Engine, List, Task) - Method in class fmpp.dataloaders.AntDataLoader
-
-
Override this method to implement your Ant related data loader.
-
-
load(Engine, List, Task) - Method in class fmpp.dataloaders.AntProjectDataLoader
-
 
-
load(Engine, List, Task) - Method in class fmpp.dataloaders.AntPropertiesDataLoader
-
 
-
load(Engine, List, Task) - Method in class fmpp.dataloaders.AntPropertyDataLoader
-
 
-
load(Engine, List, Task) - Method in class fmpp.dataloaders.AntTaskDataLoader
-
 
-
load(InputStream) - Method in class fmpp.dataloaders.CsvDataLoader
-
 
-
load(Engine, List) - Method in class fmpp.dataloaders.EvalDataLoader
-
 
-
load(Engine, List) - Method in class fmpp.dataloaders.FileDataLoader
-
 
-
load(InputStream) - Method in class fmpp.dataloaders.FileDataLoader
-
-
FileDataLoader subclasess override this method to parse - the file.
-
-
load(Engine, List) - Method in class fmpp.dataloaders.HtmlUtilsDataLoader
-
 
-
load(InputStream) - Method in class fmpp.dataloaders.JSONDataLoader
-
 
-
load(Engine, List) - Method in class fmpp.dataloaders.NowDataLoader
-
 
-
load(InputStream) - Method in class fmpp.dataloaders.PropertiesDataLoader
-
 
-
load(InputStream) - Method in class fmpp.dataloaders.TddDataLoader
-
 
-
load(InputStream) - Method in class fmpp.dataloaders.TddSequenceDataLoader
-
 
-
load(InputStream) - Method in class fmpp.dataloaders.TextDataLoader
-
 
-
load(Engine, List) - Method in class fmpp.dataloaders.XmlDataLoader
-
 
-
load(Engine, List, Document) - Method in class fmpp.dataloaders.XmlDataLoader
-
 
-
load(InputStream) - Method in class fmpp.dataloaders.XmlInfosetDataLoader
-
-
Deprecated.
-
load(Reader) - Method in class fmpp.models.CsvSequence
-
-
Loads data from text of CSV (or whatever similar) format.
-
-
load(File) - Method in class fmpp.setting.Settings
-
-
Loads settings from a configuration file.
-
-
load(Engine, List) - Method in interface fmpp.tdd.DataLoader
-
 
-
loadByteArray(InputStream) - Static method in class fmpp.util.FileUtil
-
 
-
loadDefaults(File) - Method in class fmpp.setting.Settings
-
-
Same as load, except that it adds the settings with - Settings.addDefaults(Map).
-
-
loadString(InputStream, String) - Static method in class fmpp.util.FileUtil
-
 
-
loadTdd(InputStream, String) - Static method in class fmpp.tdd.Interpreter
-
-
Loads a TDD file with utilizing #encoding:enc header.
-
-
loadTdd(byte[], String) - Static method in class fmpp.tdd.Interpreter
-
-
Loads a TDD file with utilizing #encoding:enc header.
-
-
loadXmlFile(Engine, File, boolean, boolean) - Static method in class fmpp.dataloaders.XmlDataLoader
-
 
-
loadXmlFile(Engine, File, boolean, boolean, boolean) - Static method in class fmpp.dataloaders.XmlDataLoader
-
 
-
LocalDataBuilder - Interface in fmpp
-
-
Contains callback to build the local data for a file processing.
-
-
LoggerProgressListener - Class in fmpp.progresslisteners
-
-
Writes detailed information about errors and warning messages into a file - or into any character stream.
-
-
LoggerProgressListener() - Constructor for class fmpp.progresslisteners.LoggerProgressListener
-
-
Output will be printed to the stderr.
-
-
LoggerProgressListener(OutputStream) - Constructor for class fmpp.progresslisteners.LoggerProgressListener
-
 
-
LoggerProgressListener(PrintWriter) - Constructor for class fmpp.progresslisteners.LoggerProgressListener
-
 
-
LoggerProgressListener(File) - Constructor for class fmpp.progresslisteners.LoggerProgressListener
-
 
-
LoggerProgressListener(File, boolean) - Constructor for class fmpp.progresslisteners.LoggerProgressListener
-
 
-
- - - -

M

-
-
main(String[]) - Static method in class fmpp.tools.CommandLine
-
-
Runs the command line interface.
-
-
mapContainsObject(Map, Object) - Static method in class fmpp.util.MiscUtil
-
-
Checks if the map contains the given object (exactly the same instance) - as value.
-
-
MapLocalDataBuilder - Class in fmpp.localdatabuilders
-
-
Trivial local data builder that returns the Map passed to - its constructor.
-
-
MapLocalDataBuilder(Map) - Constructor for class fmpp.localdatabuilders.MapLocalDataBuilder
-
 
-
MiscUtil - Class in fmpp.util
-
-
Miscellaneous utility methods.
-
-
MiscUtil() - Constructor for class fmpp.util.MiscUtil
-
 
-
MSG_ARG_MISSING - Static variable in class fmpp.util.ArgsParser
-
 
-
MSG_ARG_NOT_ALLOWED - Static variable in class fmpp.util.ArgsParser
-
 
-
MSG_OPTION_CONFLICT - Static variable in class fmpp.util.ArgsParser
-
 
-
MSG_OPTION_UNKNOWN - Static variable in class fmpp.util.ArgsParser
-
 
-
MultiListIterator - Class in fmpp.util
-
-
Iterates over multiple List-s.
-
-
MultiListIterator() - Constructor for class fmpp.util.MultiListIterator
-
 
-
MultiListIterator(List) - Constructor for class fmpp.util.MultiListIterator
-
 
-
MultiListIterator(List, List) - Constructor for class fmpp.util.MultiListIterator
-
 
-
MultiListIterator(List, List, List) - Constructor for class fmpp.util.MultiListIterator
-
 
-
MultiListIterator(List, List, List, List) - Constructor for class fmpp.util.MultiListIterator
-
 
-
- - - -

N

-
-
NAME_ALWAYS_CREATE_DIRECTORIES - Static variable in class fmpp.setting.Settings
-
 
-
NAME_APPEND_LOG_FILE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_BOOLEAN_FORMAT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_BORDERS - Static variable in class fmpp.setting.Settings
-
 
-
NAME_CASE_SENSITIVE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_COLUMNS - Static variable in class fmpp.setting.Settings
-
 
-
NAME_CONFIGURATION_BASE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_DATA - Static variable in class fmpp.setting.Settings
-
 
-
NAME_DATA_ROOT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_DATE_FORMAT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_DATETIME_FORMAT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_ECHO_FORMAT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_EXPERT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS - Static variable in class fmpp.setting.Settings
-
 
-
NAME_FREEMARKER_LINKS - Static variable in class fmpp.setting.Settings
-
 
-
NAME_IGNORE_CVS_FILES - Static variable in class fmpp.setting.Settings
-
 
-
NAME_IGNORE_SVN_FILES - Static variable in class fmpp.setting.Settings
-
 
-
NAME_IGNORE_TEMPORARY_FILES - Static variable in class fmpp.setting.Settings
-
 
-
NAME_INHERIT_CONFIGURATION - Static variable in class fmpp.setting.Settings
-
 
-
NAME_LOCAL_DATA - Static variable in class fmpp.setting.Settings
-
 
-
NAME_LOCALE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_LOG_FILE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_MODES - Static variable in class fmpp.setting.Settings
-
 
-
NAME_NUMBER_FORMAT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_OBJECT_WRAPPER - Static variable in class fmpp.setting.Settings
-
 
-
NAME_OUTPUT_ENCODING - Static variable in class fmpp.setting.Settings
-
 
-
NAME_OUTPUT_FILE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_OUTPUT_ROOT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_PRINT_STACK_TRACE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_QUIET - Static variable in class fmpp.setting.Settings
-
 
-
NAME_REMOVE_EXTENSIONS - Static variable in class fmpp.setting.Settings
-
 
-
NAME_REMOVE_POSTFIXES - Static variable in class fmpp.setting.Settings
-
 
-
NAME_REPLACE_EXTENSIONS - Static variable in class fmpp.setting.Settings
-
 
-
NAME_SKIP_UNCHANGED - Static variable in class fmpp.setting.Settings
-
 
-
NAME_SNIP - Static variable in class fmpp.setting.Settings
-
 
-
NAME_SOURCE_ENCODING - Static variable in class fmpp.setting.Settings
-
 
-
NAME_SOURCE_ROOT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_SOURCES - Static variable in class fmpp.setting.Settings
-
 
-
NAME_SQL_DATE_AND_TIME_TIME_ZONE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_STOP_ON_ERROR - Static variable in class fmpp.setting.Settings
-
 
-
NAME_TAG_SYNTAX - Static variable in class fmpp.setting.Settings
-
 
-
NAME_TEMPLATE_DATA - Static variable in class fmpp.setting.Settings
-
 
-
NAME_TIME_FORMAT - Static variable in class fmpp.setting.Settings
-
 
-
NAME_TIME_ZONE - Static variable in class fmpp.setting.Settings
-
 
-
NAME_TURNS - Static variable in class fmpp.setting.Settings
-
 
-
NAME_URL_ESCAPING_CHARSET - Static variable in class fmpp.setting.Settings
-
 
-
NAME_VALIDATE_XML - Static variable in class fmpp.setting.Settings
-
 
-
NAME_XML_CATALOG_FILES - Static variable in class fmpp.setting.Settings
-
 
-
NAME_XML_CATALOG_PREFER - Static variable in class fmpp.setting.Settings
-
 
-
NAME_XML_RENDERINGS - Static variable in class fmpp.setting.Settings
-
 
-
NAME_XPATH_ENGINE - Static variable in class fmpp.setting.Settings
-
 
-
newMissingParamException(String) - Method in class fmpp.models.TemplateModelUtils
-
 
-
newNoParamsAllowedException() - Method in class fmpp.models.TemplateModelUtils
-
 
-
newUnsupportedParamException(String) - Method in class fmpp.models.TemplateModelUtils
-
 
-
NewWritableHashMethod - Class in fmpp.models
-
-
Creates a new, empty WritableHash.
-
-
NewWritableHashMethod() - Constructor for class fmpp.models.NewWritableHashMethod
-
 
-
NewWritableSequenceMethod - Class in fmpp.models
-
-
Creates a new, empty WritableSequence.
-
-
NewWritableSequenceMethod() - Constructor for class fmpp.models.NewWritableSequenceMethod
-
 
-
next() - Method in class fmpp.util.MultiListIterator
-
 
-
NODE_TYPE - Static variable in class fmpp.models.JSONArrayNode
-
 
-
NODE_TYPE - Static variable in class fmpp.models.JSONBooleanNode
-
 
-
NODE_TYPE - Static variable in class fmpp.models.JSONNullNode
-
 
-
NODE_TYPE - Static variable in class fmpp.models.JSONNumberNode
-
 
-
NODE_TYPE - Static variable in class fmpp.models.JSONObjectNode
-
 
-
NODE_TYPE - Static variable in class fmpp.models.JSONStringNode
-
 
-
nodeTypeToDefaultNodeName(String) - Static method in class fmpp.models.JSONNode
-
-
Returns the FTL node name for a node that has otherwise no name.
-
-
normalizeLinebreaks(String) - Static method in class fmpp.util.StringUtil
-
-
Converts all line-breaks to UN*X linebreaks ("\n").
-
-
notify(int, Interpreter, String, Object) - Method in class fmpp.tdd.DataLoaderEvaluationEnvironment
-
 
-
notify(int, Interpreter, String, Object) - Method in interface fmpp.tdd.EvaluationEnvironment
-
-
Notifies about an event during expression evaluation.
-
-
notifyProgressEvent(Engine, int, File, int, Throwable, Object) - Method in class fmpp.localdatabuilders.CachingLocalDataBuilder
-
-
Discards the cached result on - ProgressListener.EVENT_END_PROCESSING_SESSION.
-
-
notifyProgressEvent(Engine, int, File, int, Throwable, Object) - Method in interface fmpp.ProgressListener
-
-
Method called be the engine to notify events.
-
-
notifyProgressEvent(Engine, int, File, int, Throwable, Object) - Method in class fmpp.progresslisteners.AntProgressListener
-
 
-
notifyProgressEvent(Engine, int, File, int, Throwable, Object) - Method in class fmpp.progresslisteners.ConsoleProgressListener
-
 
-
notifyProgressEvent(Engine, int, File, int, Throwable, Object) - Method in class fmpp.progresslisteners.LoggerProgressListener
-
 
-
notifyProgressEvent(Engine, int, File, int, Throwable, Object) - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
 
-
notifyProgressEvent(Engine, int, File, int, Throwable, Object) - Method in class fmpp.progresslisteners.TerseConsoleProgressListener
-
 
-
NowDataLoader - Class in fmpp.dataloaders
-
-
Data loader that produces string from the current date.
-
-
NowDataLoader() - Constructor for class fmpp.dataloaders.NowDataLoader
-
 
-
NullOutputStream - Class in fmpp.util
-
-
OutputStream that simply drops what it gets.
-
-
NullWriter - Class in fmpp.util
-
-
Writer that simply drops what it gets.
-
-
numberToInt(Number) - Static method in class fmpp.util.MiscUtil
-
-
Loseless convertion to int.
-
-
- - - -

O

-
-
OLD_NAME_REMOVE_EXTENSION - Static variable in class fmpp.setting.Settings
-
 
-
OLD_NAME_REMOVE_POSTFIX - Static variable in class fmpp.setting.Settings
-
 
-
OLD_NAME_REPLACE_EXTENSION - Static variable in class fmpp.setting.Settings
-
 
-
OPTION_INDEX - Static variable in class fmpp.dataloaders.XmlDataLoader
-
 
-
OPTION_NAME_ENCODING - Static variable in class fmpp.util.DataLoaderUtil
-
 
-
OPTION_NAMESPACE_AWARE - Static variable in class fmpp.dataloaders.XmlDataLoader
-
 
-
OPTION_REMOVE_COMMENTS - Static variable in class fmpp.dataloaders.XmlDataLoader
-
 
-
OPTION_REMOVE_PIS - Static variable in class fmpp.dataloaders.XmlDataLoader
-
 
-
OPTION_VALIDATE - Static variable in class fmpp.dataloaders.XmlDataLoader
-
 
-
OPTION_XINCLUDE_AWARE - Static variable in class fmpp.dataloaders.XmlDataLoader
-
 
-
OPTION_XMLNS - Static variable in class fmpp.dataloaders.XmlDataLoader
-
 
-
OptionDefinition() - Constructor for class fmpp.util.ArgsParser.OptionDefinition
-
 
-
- - - -

P

-
-
PARAMETER_VALUE_HOST - Static variable in class fmpp.Engine
-
-
A commonly used reserved parameter value: "host".
-
-
PARAMETER_VALUE_OUTPUT - Static variable in class fmpp.Engine
-
-
A commonly used reserved parameter value: "source".
-
-
PARAMETER_VALUE_SOURCE - Static variable in class fmpp.Engine
-
-
A commonly used reserved parameter value: "source".
-
-
parse(String[]) - Method in class fmpp.util.ArgsParser
-
-
Parses the args[].
-
-
parse(String, String) - Static method in class fmpp.util.JSONParser
-
 
-
ParseException(String) - Constructor for exception fmpp.util.StringUtil.ParseException
-
 
-
ParseException(String, int) - Constructor for exception fmpp.util.StringUtil.ParseException
-
 
-
ParseException(String, String, int, String) - Constructor for exception fmpp.util.StringUtil.ParseException
-
 
-
ParseException(String, Throwable) - Constructor for exception fmpp.util.StringUtil.ParseException
-
 
-
ParseException(String, int, Throwable) - Constructor for exception fmpp.util.StringUtil.ParseException
-
 
-
ParseException(String, String, int, String, Throwable) - Constructor for exception fmpp.util.StringUtil.ParseException
-
 
-
parseExtraArguments(List) - Method in class fmpp.dataloaders.AbstractTextDataLoader
-
-
Parses the argument list, except the 1st (file name) argument.
-
-
parseExtraArguments(List) - Method in class fmpp.dataloaders.SlicedTextDataLoader
-
 
-
parseText(String) - Method in class fmpp.dataloaders.AbstractTextDataLoader
-
-
Parses the file content to the final object that the data loader - will return.
-
-
parseText(String) - Method in class fmpp.dataloaders.SlicedTextDataLoader
-
 
-
pathPatternToPerl5Regex(String) - Static method in class fmpp.util.FileUtil
-
-
Converts UN*X style path to regular expression (originally, for Perl 5 dialect, but also works for Java's - dialect).
-
-
pathToUnixStyle(String) - Static method in class fmpp.util.FileUtil
-
-
Brings the path to UNI*X style format, so that it can be handled - with path pattern handling functions.
-
-
PMODE_COPY - Static variable in class fmpp.Engine
-
-
Processing mode: Copy the file as-is (binary copy).
-
-
PMODE_EXECUTE - Static variable in class fmpp.Engine
-
-
Processing mode: Execute the file as template
-
-
PMODE_IGNORE - Static variable in class fmpp.Engine
-
-
Processing mode: Ignore the file.
-
-
PMODE_NONE - Static variable in class fmpp.Engine
-
-
Processing mode: N/A
-
-
PMODE_RENDER_XML - Static variable in class fmpp.Engine
-
-
Processing mode: Render XML with an FTL template.
-
-
postProcessItems(List) - Method in class fmpp.dataloaders.SlicedTextDataLoader
-
-
Override this if you want to post-process the items.
-
-
println() - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Prints line-break into the log.
-
-
println(Object) - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Prints into the log with word-wrapping.
-
-
println(String) - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Prints into the log with word-wrapping.
-
-
println(String, int) - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Prints into the log with word-wrapping and indentation.
-
-
printlnNW(String) - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Prints into the log without word-wrapping.
-
-
printNW(String) - Method in class fmpp.progresslisteners.LoggerProgressListener
-
-
Prints into the log without word-wrapping.
-
-
printStackTrace(Throwable) - Method in class fmpp.progresslisteners.LoggerProgressListener
-
 
-
printStackTrace() - Method in exception fmpp.util.RuntimeExceptionCC
-
 
-
printStackTrace(PrintStream) - Method in exception fmpp.util.RuntimeExceptionCC
-
 
-
printStackTrace(PrintWriter) - Method in exception fmpp.util.RuntimeExceptionCC
-
 
-
process(File[]) - Method in class fmpp.Engine
-
-
Processes a list of files.
-
-
process(File, File) - Method in class fmpp.Engine
-
-
Hack to processes a single file.
-
-
ProcessingException - Exception in fmpp
-
-
Error while performing the processing session.
-
-
ProcessingException(Engine, File, Throwable) - Constructor for exception fmpp.ProcessingException
-
 
-
ProgressListener - Interface in fmpp
-
-
Interface to monitor the events of an Engine.
-
-
PropertiesDataLoader - Class in fmpp.dataloaders
-
-
Returns a Map based on a Java properties file.
-
-
PropertiesDataLoader() - Constructor for class fmpp.dataloaders.PropertiesDataLoader
-
 
-
property(String) - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Sets the property name for this option.
-
-
property(String, String) - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Convenience method; same as calling property(String) and - then propertyValue.
-
-
propertyValue(String) - Method in class fmpp.util.ArgsParser.OptionDefinition
-
-
Sets the property value for this option.
-
-
- - - -

Q

-
-
quietSettingValueToInt(String, String) - Static method in class fmpp.setting.Settings
-
-
Returns 0 for verbose mode, 1 for quiet mode, 2 for really-quiet mode.
-
-
- - - -

R

-
-
read() - Method in class fmpp.util.BorderedReader
-
 
-
read(char[], int, int) - Method in class fmpp.util.BorderedReader
-
 
-
remove(String) - Method in class fmpp.setting.Settings
-
-
Removes a setting value.
-
-
remove() - Method in class fmpp.util.MultiListIterator
-
 
-
removeAttribute(String) - Method in class fmpp.Engine
-
-
Removes an attribute.
-
-
removeAttribute(String) - Method in class fmpp.setting.Settings
-
-
Removes an engine attribute.
-
-
removeData(String) - Method in class fmpp.Engine
-
-
Removes a variable that would be visible for all templates when the - processing session executes.
-
-
removeSlashPrefix(String) - Static method in class fmpp.util.FileUtil
-
 
-
RemoveTransform - Class in fmpp.models
-
-
Removes an item from a WritableSequence or WritableHash.
-
-
RemoveTransform() - Constructor for class fmpp.models.RemoveTransform
-
 
-
renameOutputFile(String) - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the directive in the pp hash.
-
-
repeat(String, int) - Static method in class fmpp.util.StringUtil
-
 
-
replace(String, String, String) - Static method in class fmpp.util.StringUtil
-
-
Replaces all occurances of a sub-string in a string.
-
-
reset() - Method in class fmpp.progresslisteners.StatisticsProgressListener
-
-
Rests all counters.
-
-
resolveOutputPath(String) - Method in class fmpp.TemplateEnvironment
-
-
Resolves a output path to a File object.
-
-
resolveRelativeUnixPath(File, File, String) - Static method in class fmpp.util.FileUtil
-
-
Resolves relative UN*X path based on given root and working directory.
-
-
resolveSourcePath(String) - Method in class fmpp.TemplateEnvironment
-
-
Resolves a source path to a File object.
-
-
restartOutputFile() - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the directive in the pp hash.
-
-
RETURN_FRAGMENT - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
 
-
RETURN_SKIP - Static variable in interface fmpp.tdd.EvaluationEnvironment
-
 
-
rtfEnc(String) - Static method in class fmpp.util.StringUtil
-
-
Rich Text Format encoding (does not replace line breaks).
-
-
RuntimeExceptionCC - Exception in fmpp.util
-
-
RuntimeException that emulates J2SE 1.4+ cause-chains if it runs - on earlier versions.
-
-
RuntimeExceptionCC() - Constructor for exception fmpp.util.RuntimeExceptionCC
-
 
-
RuntimeExceptionCC(String) - Constructor for exception fmpp.util.RuntimeExceptionCC
-
 
-
RuntimeExceptionCC(Throwable) - Constructor for exception fmpp.util.RuntimeExceptionCC
-
 
-
RuntimeExceptionCC(String, Throwable) - Constructor for exception fmpp.util.RuntimeExceptionCC
-
 
-
- - - -

S

-
-
set(String, Object) - Method in class fmpp.setting.Settings
-
-
Sets the value of a setting.
-
-
set(String, boolean) - Method in class fmpp.setting.Settings
-
-
Convenience method for setting a Boolean value.
-
-
set(String, int) - Method in class fmpp.setting.Settings
-
-
Convenience method for setting an Integer value.
-
-
set(Map) - Method in class fmpp.setting.Settings
-
-
Sets all name-value pairs stored in the map with - Settings.set(String, Object).
-
-
setAltFalse(String) - Method in class fmpp.models.CsvSequence
-
-
Alternative word used to indicate boolean false in the CSV file.
-
-
setAltTrue(String) - Method in class fmpp.models.CsvSequence
-
-
Alternative word used to indicate boolean true in the CSV file.
-
-
setAlwaysCreateDirectories(boolean) - Method in class fmpp.Engine
-
-
Sets whether for source directories a corresponding output directory - will be created even if no file output went into it.
-
-
setAlwaysCreateDirectories(boolean) - Method in class fmpp.tools.AntTask
-
 
-
setAlwaysCreateDirs(boolean) - Method in class fmpp.tools.AntTask
-
-
Same as AntTask.setAlwaysCreateDirectories(boolean); added as this name - is closer to the Ant naming conventions.
-
-
setAntTaskFailOnError(boolean) - Method in class fmpp.tools.AntTask
-
 
-
setAppendLogFile(boolean) - Method in class fmpp.tools.AntTask
-
 
-
setAttribute(String, Object) - Method in class fmpp.Engine
-
-
Adds/replaces an engine attribute.
-
-
setBooleanFormat(String) - Method in class fmpp.Engine
-
-
Sets the boolean format used to convert boolean to strings, as defined - by Configurable.setBooleanFormat(String).
-
-
setBooleanFormat(String) - Method in class fmpp.tools.AntTask
-
 
-
setBorders(String) - Method in class fmpp.tools.AntTask
-
 
-
setCaseSensitive(boolean) - Method in class fmpp.Engine
-
-
Sets if the engine differentiates upper- and lower-case letters when it - compares paths or matches path patterns with paths.
-
-
setCaseSensitive(boolean) - Method in class fmpp.tools.AntTask
-
 
-
setConfiguration(File) - Method in class fmpp.tools.AntTask
-
 
-
setConfigurationBase(File) - Method in class fmpp.tools.AntTask
-
 
-
setCopy(boolean) - Method in class fmpp.XmlRenderingConfiguration
-
-
Sets if the XML file should be copied as is, or renderd with a template.
-
-
setData(String) - Method in class fmpp.tools.AntTask
-
 
-
setDataRoot(File) - Method in class fmpp.Engine
-
-
Sets the root directory of data files.
-
-
setDataRoot(File) - Method in class fmpp.tools.AntTask
-
 
-
setDateFormat(String) - Method in class fmpp.Engine
-
-
Sets the format used to convert date values (year + month + day) to - strings.
-
-
setDateFormat(String) - Method in class fmpp.tools.AntTask
-
 
-
setDateFormatPattern(String) - Method in class fmpp.models.CsvSequence
-
-
Sets the pattern used to parse date columns.
-
-
setDateTimeFormat(String) - Method in class fmpp.Engine
-
-
Sets the format used to convert date-time values (year + month + day + - hour + minute + second + millisecond) to strings.
-
-
setDateTimeFormat(String) - Method in class fmpp.tools.AntTask
-
 
-
setDateTimeFormatPattern(String) - Method in class fmpp.models.CsvSequence
-
-
Sets the pattern used to parse date-time columns.
-
-
setDecimalSeparator(char) - Method in class fmpp.models.CsvSequence
-
-
Sets the alternative symbol used for the decimal dot in - the file for numbers.
-
-
setDefault(String, Object) - Method in class fmpp.setting.Settings
-
-
Sets the value of a setting if the value doesn't exists yet.
-
-
setDefault(String, boolean) - Method in class fmpp.setting.Settings
-
-
Convenience method for setting a Boolean value.
-
-
setDefault(String, int) - Method in class fmpp.setting.Settings
-
-
Convenience method for setting an Integer value.
-
-
setDefaultProperties(Properties) - Method in class fmpp.util.ArgsParser
-
-
Sets the properies object that will be the default properties object for - the properies object that parse creates for the options - (See Properties.Properties(Properties defaults)).
-
-
setDefaults(Map) - Method in class fmpp.setting.Settings
-
-
Sets all name-value pairs stored in the map with - Settings.setDefault(String, Object).
-
-
setDefaultsWithStrings(Properties) - Method in class fmpp.setting.Settings
-
-
Same as Settings.setDefaults(Map), but uses a Properties - object, so the values are strings.
-
-
setDefaultWithString(String, String) - Method in class fmpp.setting.Settings
-
-
Same as Settings.setDefault(String, Object), but uses string value.
-
-
setDestDir(File) - Method in class fmpp.tools.AntTask
-
 
-
setDir(File) - Method in class fmpp.tools.AntTask
-
 
-
setDontTraverseDirectories(boolean) - Method in class fmpp.Engine
-
-
Sets the Engine should automatically process the files and - directories inside a directory whose processing was asked through the - public Engine API.
-
-
setDontTraverseDirectories(boolean) - Method in class fmpp.setting.Settings
-
- -
-
setEmptyValues(String[]) - Method in class fmpp.models.CsvSequence
-
-
Specifies the list of cell values that will be replaced with an empty - (0 length) string.
-
-
setEncoding(String) - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
-
Sets the encoding of the script files.
-
-
setEnding(String) - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
-
Sets the string appended at the end of the source file name.
-
-
setEngineAttribute(String, Object) - Method in class fmpp.setting.Settings
-
-
Sets an engine attribute.
-
-
setExpandProperties(boolean) - Method in class fmpp.tools.AntTask.AntAttributeSubstitution
-
 
-
setExpert(boolean) - Method in class fmpp.tools.AntTask
-
 
-
setExpertMode(boolean) - Method in class fmpp.Engine
-
-
Allows some features that are considerd dangerous.
-
-
setExternalHeaderRow(String[]) - Method in class fmpp.models.CsvSequence
-
-
If it is not null, then it is used as the header row - instead of the first row of the CSV file.
-
-
setFreemarkerIncompatibleImprovements(String) - Method in class fmpp.tools.AntTask
-
 
-
setFreemarkerLinks(String) - Method in class fmpp.tools.AntTask
-
 
-
setGroupingSeparator(char) - Method in class fmpp.models.CsvSequence
-
-
Set the grouping separator symbol used for grouping in the file - for numbers.
-
-
setHasHeaderRow(boolean) - Method in class fmpp.models.CsvSequence
-
-
Specifies if the file contains header row or not.
-
-
setIgnoreCvsFiles(boolean) - Method in class fmpp.Engine
-
-
Sets if the CVS files inside the source root directory should be - ignored or not.
-
-
setIgnoreMissing(boolean) - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
 
-
setIgnoreSvnFiles(boolean) - Method in class fmpp.Engine
-
-
Sets if the SVN files inside the source root directory should be - ignored or not.
-
-
setIgnoreTemporaryFiles(boolean) - Method in class fmpp.Engine
-
-
Set if well-known temporary files inside the source root directory should - be ignored or not.
-
-
setInheritConfiguration(File) - Method in class fmpp.tools.AntTask
-
 
-
setList(List) - Method in class fmpp.models.WritableSequence
-
 
-
setLocalData(String) - Method in class fmpp.tools.AntTask
-
 
-
setLocale(Locale) - Method in class fmpp.Engine
-
-
Sets the locale (country, language).
-
-
setLocale(String) - Method in class fmpp.Engine
-
-
Sets the locale (country, language).
-
-
setLocale(String) - Method in class fmpp.tools.AntTask
-
 
-
setLogFile(File) - Method in class fmpp.tools.AntTask
-
 
-
setMap(Map) - Method in class fmpp.models.WritableHash
-
 
-
setMessages(Properties) - Method in class fmpp.util.ArgsParser
-
-
Customizes the error messages shown to the user.
-
-
setModes(String) - Method in class fmpp.tools.AntTask
-
 
-
setNormalizeHeaders(boolean) - Method in class fmpp.models.CsvSequence
-
-
Specifies if the header names coming from the file will be normalized - or should be left as is.
-
-
setNumberFormat(String) - Method in class fmpp.Engine
-
-
Sets the number format used to convert numbers to strings, as defined - by Configurable.setNumberFormat(String).
-
-
setNumberFormat(String) - Method in class fmpp.tools.AntTask
-
 
-
setObjectWrapper(String) - Method in class fmpp.tools.AntTask
-
 
-
setOldTemplateSyntax(boolean) - Method in class fmpp.Engine
-
-
Sets if the # is required in FTL tags or not.
-
-
setOutputEncoding(String) - Method in class fmpp.Engine
-
-
Sets the encoding used for textural output (template generated files).
-
-
setOutputEncoding(String) - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the directive in the pp hash.
-
-
setOutputEncoding(String) - Method in class fmpp.tools.AntTask
-
 
-
setOutputFile(File) - Method in class fmpp.tools.AntTask
-
 
-
setOutputRoot(File) - Method in class fmpp.Engine
-
-
Sets the root directory of output files.
-
-
setOutputRoot(File) - Method in class fmpp.tools.AntTask
-
 
-
setOutputRoot_common(File, boolean) - Method in class fmpp.tools.AntTask
-
 
-
setQuiet(String) - Method in class fmpp.tools.AntTask
-
 
-
setRemoveExtension(boolean) - Method in class fmpp.localdatabuilders.BshLocalDataBuilder
-
-
Sets if the extension from the source file name should be removed before - appending the ending.
-
-
setRemoveExtension(String) - Method in class fmpp.tools.AntTask
-
 
-
setRemoveExtensions(String) - Method in class fmpp.tools.AntTask
-
 
-
setRemovePostfix(String) - Method in class fmpp.tools.AntTask
-
 
-
setRemovePostfixes(String) - Method in class fmpp.tools.AntTask
-
 
-
setReplaceExtension(String) - Method in class fmpp.tools.AntTask
-
 
-
setReplaceExtensions(String) - Method in class fmpp.tools.AntTask
-
 
-
setSeparator(char) - Method in class fmpp.models.CsvSequence
-
-
Separator char between cloumns.
-
-
setSkipUnchanged(int) - Method in class fmpp.Engine
-
-
Sets what source file can be skipped if it was not modified after the - last modification time of the output file.
-
-
setSkipUnchanged(String) - Method in class fmpp.tools.AntTask
-
 
-
setSourceEncoding(String) - Method in class fmpp.Engine
-
-
Sets the encoding (charset) of textual source files.
-
-
setSourceEncoding(String) - Method in class fmpp.tools.AntTask
-
 
-
setSourceFile(File) - Method in class fmpp.tools.AntTask
-
 
-
setSourceRoot(File) - Method in class fmpp.Engine
-
-
Sets the root directory of source files.
-
-
setSourceRoot(File) - Method in class fmpp.tools.AntTask
-
 
-
setSourceRoot_common(File, boolean) - Method in class fmpp.tools.AntTask
-
 
-
setSQLDateAndTimeTimeZone(TimeZone) - Method in class fmpp.Engine
-
-
Sets the time zone used when dealing with java.sql.Date and - java.sql.Time values.
-
-
setSQLDateAndTimeTimeZone(String) - Method in class fmpp.Engine
-
-
Same as Engine.setSQLDateAndTimeTimeZone(TimeZone), but lets FreeMarker parse the value to time zone.
-
-
setSQLDateAndTimeTimeZone(String) - Method in class fmpp.tools.AntTask
-
 
-
setSrcDir(File) - Method in class fmpp.tools.AntTask
-
 
-
setStopOnError(boolean) - Method in class fmpp.Engine
-
 
-
setStopOnError(boolean) - Method in class fmpp.tools.AntTask
-
 
-
setTagSyntax(int) - Method in class fmpp.Engine
-
-
Sets the tagSyntax setting of FreeMarker.
-
-
setTagSyntax(String) - Method in class fmpp.tools.AntTask
-
 
-
setTemplate(String) - Method in class fmpp.XmlRenderingConfiguration
-
-
Sets the renderer template.
-
-
setTemplateData(String) - Method in class fmpp.tools.AntTask
-
 
-
setTemplateDataModelBuilder(TemplateDataModelBuilder) - Method in class fmpp.Engine
-
-
Sets the class that will be instantiated to create the template specfic - variables.
-
-
setTemplateDataModelBuilder(String) - Method in class fmpp.Engine
-
 
-
setTimeFormat(String) - Method in class fmpp.Engine
-
-
Sets the format used to convert time values (hour + minute + second - + millisecond) to strings.
-
-
setTimeFormat(String) - Method in class fmpp.tools.AntTask
-
 
-
setTimeFormatPattern(String) - Method in class fmpp.models.CsvSequence
-
-
Sets the pattern used to parse time columns.
-
-
setTimeZone(TimeZone) - Method in class fmpp.Engine
-
-
Sets the time zone used to display date/time/date-time values.
-
-
setTimeZone(String) - Method in class fmpp.Engine
-
-
Same as Engine.setTimeZone(TimeZone), but lets FreeMarker parse the value to time zone.
-
-
setTimeZone(TimeZone) - Method in class fmpp.models.CsvSequence
-
-
Sets the time zone used for parsing date/time/date-time that does not - specify a time zone explicitly.
-
-
setTimeZone(String) - Method in class fmpp.tools.AntTask
-
 
-
SettingException - Exception in fmpp.setting
-
-
Bad setting or setting combination, or failure when trying to setup the - engine with the settings.
-
-
SettingException(String) - Constructor for exception fmpp.setting.SettingException
-
 
-
SettingException(String, Throwable) - Constructor for exception fmpp.setting.SettingException
-
 
-
Settings - Class in fmpp.setting
-
-
Stores FMPP settings, loads configuration files, provides other setting - handling related utilities.
-
-
Settings(File) - Constructor for class fmpp.setting.Settings
-
-
Creates a new instance.
-
-
SetTransform - Class in fmpp.models
-
-
Changes items an item in a WritableSequence or sets/adds and - item to a WritableHash.
-
-
SetTransform() - Constructor for class fmpp.models.SetTransform
-
 
-
setTrimCells(boolean) - Method in class fmpp.models.CsvSequence
-
-
Specifies if all cells will be trimmed.
-
-
setTurns(String) - Method in class fmpp.tools.AntTask
-
 
-
setUrlEscapingCharset(String) - Method in class fmpp.Engine
-
-
Sets the charset used for URL escaping.
-
-
setUrlEscapingCharset(String) - Method in class fmpp.tools.AntTask
-
 
-
setValidateXml(boolean) - Method in class fmpp.Engine
-
-
Sets if XML documents should be validated when they are loaded.
-
-
setValidateXml(String) - Method in class fmpp.tools.AntTask
-
 
-
setWithString(String, String) - Method in class fmpp.setting.Settings
-
-
Same as Settings.set(String, Object), but uses string value.
-
-
setWithStrings(Properties) - Method in class fmpp.setting.Settings
-
-
Same as Settings.set(Map), but uses a Properties object, - so the values are strings.
-
-
setXHtml(boolean) - Method in class fmpp.dataloaders.HtmlUtilsDataLoader
-
 
-
setXmlCatalogFiles(String) - Method in class fmpp.tools.AntTask
-
 
-
setXmlCatalogPrefer(String) - Method in class fmpp.tools.AntTask
-
 
-
setXmlEntityResolver(Object) - Method in class fmpp.Engine
-
-
Sets the XML entiry resolver used for reading XML documents.
-
-
setXmlRenderings(String) - Method in class fmpp.tools.AntTask
-
 
-
setXpathEngine(String) - Method in class fmpp.Engine
-
-
Sets if which XPath engine should be used.
-
-
setXpathEngine(String) - Method in class fmpp.tools.AntTask
-
 
-
SIMPLE_EVALUATION_ENVIRONMENT - Static variable in class fmpp.tdd.Interpreter
-
-
Evaluates function calls to itself.
-
-
size() - Method in class fmpp.models.CsvSequence
-
 
-
size() - Method in class fmpp.models.JSONArrayNode
-
 
-
size() - Method in class fmpp.models.JSONObjectNode
-
 
-
size() - Method in class fmpp.models.StringArraySequence
-
 
-
size() - Method in class fmpp.models.TemplateModelListSequence
-
 
-
size() - Method in class fmpp.models.WritableHash
-
 
-
size() - Method in class fmpp.models.WritableSequence
-
 
-
skip(long) - Method in class fmpp.util.BorderedReader
-
 
-
SKIP_ALL - Static variable in class fmpp.Engine
-
-
Used with the "skipUnchanged" engine parameter: skip all unchanged - files
-
-
SKIP_NONE - Static variable in class fmpp.Engine
-
-
Used with the "skipUnchnaged" engine parameter: never skip files
-
-
SKIP_STATIC - Static variable in class fmpp.Engine
-
-
Used with the "skipUnchanged" engine parameter: skip unchanged static - files
-
-
SlicedTextDataLoader - Class in fmpp.dataloaders
-
-
Returns a sequence of strings based on a plain text file, where the specified - symbol is used as separator.
-
-
SlicedTextDataLoader() - Constructor for class fmpp.dataloaders.SlicedTextDataLoader
-
 
-
split(String, char) - Static method in class fmpp.util.StringUtil
-
- -
-
split(String, char, boolean) - Static method in class fmpp.util.StringUtil
-
-
Splits a string at the specified character, and optionally trims the - items.
-
-
split(String, String) - Static method in class fmpp.util.StringUtil
-
-
Splits a string at the specified string.
-
-
splitAtWS(String) - Static method in class fmpp.util.StringUtil
-
-
Splits a string at white-spaces.
-
-
StatisticsProgressListener - Class in fmpp.progresslisteners
-
-
Spins some counters regarding the work of the Engine.
-
-
StatisticsProgressListener() - Constructor for class fmpp.progresslisteners.StatisticsProgressListener
-
 
-
StringArraySequence - Class in fmpp.models
-
-
Sequence variable implementation that wraps a String[] with relatively low - resource utilization.
-
-
StringArraySequence(String[]) - Constructor for class fmpp.models.StringArraySequence
-
-
Warning: Does not copy the argument array!
-
-
stringToBigDecimal(String) - Static method in class fmpp.util.StringUtil
-
-
Converts a string to BigDecimal.
-
-
stringToBoolean(String) - Static method in class fmpp.util.StringUtil
-
 
-
stringToDate(String, TimeZone) - Static method in class fmpp.util.StringUtil
-
-
Parses a date of format "yyyy-MM-dd" - or "yyyy-MM-dd z" and returns it as - TemplateDateModel.
-
-
stringToDateTime(String, TimeZone) - Static method in class fmpp.util.StringUtil
-
-
Parses a date-time of format "yyyy-MM-dd H:mm:ss" - or "yyyy-MM-dd h:mm:ss a" or - "yyyy-MM-dd H:mm:ss z" - or "yyyy-MM-dd h:mm:ss a z" and returns it as - TemplateDateModel.
-
-
stringToPerl5Regex(String) - Static method in class fmpp.util.StringUtil
-
-
Convers string to Perl 5 regular expression.
-
-
stringToTime(String, TimeZone) - Static method in class fmpp.util.StringUtil
-
-
Parses a time of format "H:mm:ss" - or "h:mm:ss a" or "H:mm:ss z" - or "h:mm:ss a z" and returns it as - TemplateDateModel.
-
-
StringUtil - Class in fmpp.util
-
-
Collection of string manipulation functions.
-
-
StringUtil() - Constructor for class fmpp.util.StringUtil
-
 
-
StringUtil.ParseException - Exception in fmpp.util
-
-
Formal (syntactical) problem with the text.
-
-
strParam(Object, String) - Method in class fmpp.models.TemplateModelUtils
-
 
-
- - - -

T

-
-
TddDataLoader - Class in fmpp.dataloaders
-
-
Creates a Map based on a TDD file.
-
-
TddDataLoader() - Constructor for class fmpp.dataloaders.TddDataLoader
-
 
-
TddHashLocalDataBuilder - Class in fmpp.localdatabuilders
-
-
Builds data from a TDD hash, interpreting function calls as data loader - invocations.
-
-
TddHashLocalDataBuilder(String) - Constructor for class fmpp.localdatabuilders.TddHashLocalDataBuilder
-
 
-
TddHashLocalDataBuilder(Fragment) - Constructor for class fmpp.localdatabuilders.TddHashLocalDataBuilder
-
 
-
TddSequenceDataLoader - Class in fmpp.dataloaders
-
-
Creates a List based on a TDD file.
-
-
TddSequenceDataLoader() - Constructor for class fmpp.dataloaders.TddSequenceDataLoader
-
 
-
TddUtil - Class in fmpp.tdd
-
-
Utility methods for TDD related tasks.
-
-
TddUtil() - Constructor for class fmpp.tdd.TddUtil
-
 
-
TemplateDataModelBuilder - Interface in fmpp
-
-
Deprecated. -
Use LocalDataBuilder instead.
-
-
-
TemplateEnvironment - Class in fmpp
-
-
The runtime FMPP environment of an executing template.
-
-
TemplateModelArrayCollection - Class in fmpp.models
-
-
Collection variable implementation that wraps an array of already - wrapped objects directly.
-
-
TemplateModelArrayCollection(TemplateModel[]) - Constructor for class fmpp.models.TemplateModelArrayCollection
-
 
-
TemplateModelListCollection - Class in fmpp.models
-
-
Collection variable implementation that wraps a java.util.List of already - wrapped objects directly.
-
-
TemplateModelListCollection(List) - Constructor for class fmpp.models.TemplateModelListCollection
-
 
-
TemplateModelListSequence - Class in fmpp.models
-
-
Sequence that wraps a java.util.List of already wrapped objects - directly, with minimal resource usage.
-
-
TemplateModelListSequence(List) - Constructor for class fmpp.models.TemplateModelListSequence
-
 
-
TemplateModelUtils - Class in fmpp.models
-
-
Constains utility methods for transform and method variable implementation.
-
-
TemplateModelUtils() - Constructor for class fmpp.models.TemplateModelUtils
-
 
-
TerseConsoleProgressListener - Class in fmpp.progresslisteners
-
-
Designed to show the progress on console screen in a - very terse way (prints a symbol for each processed file).
-
-
TerseConsoleProgressListener() - Constructor for class fmpp.progresslisteners.TerseConsoleProgressListener
-
-
Output will be printed to the stdout.
-
-
TerseConsoleProgressListener(OutputStream) - Constructor for class fmpp.progresslisteners.TerseConsoleProgressListener
-
 
-
TerseConsoleProgressListener(PrintWriter) - Constructor for class fmpp.progresslisteners.TerseConsoleProgressListener
-
 
-
TextDataLoader - Class in fmpp.dataloaders
-
-
Returns a string based on a plain text file.
-
-
TextDataLoader() - Constructor for class fmpp.dataloaders.TextDataLoader
-
 
-
toOutputRelatitvePath(String) - Method in class fmpp.TemplateEnvironment
-
-
Same as TemplateEnvironment.toSourceRootRelativePath(String) but with the output - file and output root directory.
-
-
toOutputRootRelativePath(File) - Method in class fmpp.TemplateEnvironment
-
-
Convets a file object to an output root relative UN*X style path.
-
-
toSourceRootRelativePath(String) - Method in class fmpp.TemplateEnvironment
-
-
Returns the path relative to the source root.
-
-
toSourceRootRelativePath(File) - Method in class fmpp.TemplateEnvironment
-
-
Convets a file object to a source root relative UN*X style path.
-
-
toString() - Method in class fmpp.localdatabuilders.TddHashLocalDataBuilder
-
 
-
toString() - Method in class fmpp.setting.FileWithConfigurationBase
-
 
-
toString() - Method in class fmpp.setting.FileWithSettingValue
-
 
-
toString() - Method in class fmpp.tdd.Fragment
-
-
Returns the fragment text.
-
-
toString() - Method in class fmpp.tdd.FunctionCall
-
 
-
toString() - Method in class fmpp.XmlRenderingConfiguration
-
 
-
trimValues(Properties) - Method in class fmpp.setting.Settings
-
-
Trims all property values.
-
-
TYPE_ANY - Static variable in class fmpp.setting.Settings
-
-
Any object.
-
-
TYPE_BOOLEAN - Static variable in class fmpp.setting.Settings
-
-
Boolean setting type.
-
-
TYPE_CFG_RELATIVE_PATH - Static variable in class fmpp.setting.Settings
-
-
"Configuration relative path" setting type.
-
-
TYPE_CFG_RELATIVE_PATHS - Static variable in class fmpp.setting.Settings
-
-
"Configuration relative paths" setting type.
-
-
TYPE_DATA_MODEL - Static variable in class fmpp.setting.Settings
-
-
Data model setting type.
-
-
TYPE_HASH - Static variable in class fmpp.setting.Settings
-
-
Hash setting type.
-
-
TYPE_HASH_OF_SEQUENCE_OF_CFG_RELATIVE_PATHS - Static variable in class fmpp.setting.Settings
-
-
Hash-of-configuration-relative-paths setting type.
-
-
TYPE_INTEGER - Static variable in class fmpp.setting.Settings
-
-
Integer setting type.
-
-
TYPE_LOCAL_DATA_MODEL - Static variable in class fmpp.setting.Settings
-
-
Local data model setting type.
-
-
TYPE_SEQUENCE - Static variable in class fmpp.setting.Settings
-
-
Sequence setting type.
-
-
TYPE_STRING - Static variable in class fmpp.setting.Settings
-
-
String setting type.
-
-
TYPE_UNRESOLVED_CFG_RELATIVE_PATHS - Static variable in class fmpp.setting.Settings
-
-
"Unresolved configuration relative paths" setting type.
-
-
- - - -

U

-
-
undashNames(Properties) - Method in class fmpp.setting.Settings
-
-
Converts legacy dashed setting names to the standard format, as - source-root to sourceRoot.
-
-
urlEnc(String, String) - Static method in class fmpp.util.StringUtil
-
-
URL encoding (like%20this).
-
-
urlPathEnc(String, String) - Static method in class fmpp.util.StringUtil
-
-
URL encoding without escaping slashes.
-
-
- - - -

V

-
-
VALUE_GLOBAL_DEFAULT - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_HOST - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_NONE - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_OBJECTWRAPPER_SHARED_BEANS_WRAPPER - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_OUTPUT - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_REALLY_QUIET - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_SOURCE - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_TAG_SYNTAX_ANGLE_BRACKET - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_TAG_SYNTAX_AUTO_DETECT - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_TAG_SYNTAX_SQUARE_BRACKET - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_XML_CATALOG_PREFER_PUBLIC - Static variable in class fmpp.setting.Settings
-
 
-
VALUE_XML_CATALOG_PREFER_SYSTEM - Static variable in class fmpp.setting.Settings
-
 
-
values() - Method in class fmpp.models.JSONObjectNode
-
-
Returns the values from the key-value pairs of this JSON object, returning Java null for JSON - null-s.
-
-
values() - Method in class fmpp.models.WritableHash
-
 
-
- - - -

W

-
-
warning(String) - Method in class fmpp.TemplateEnvironment
-
-
It does the same as the directive in the pp hash.
-
-
wrap(Object) - Method in class fmpp.Engine
-
-
Wraps any object as TemplateModel.
-
-
wrap(Object) - Static method in class fmpp.models.JSONNode
-
-
Wraps a List, a Map with string keys, a String, a Number or a Boolean - into a JSONNode.
-
-
wrap(Object, JSONNode, String, boolean) - Static method in class fmpp.models.JSONNode
-
 
-
wrap(String, int) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrap(String, int, String) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrap(String, int, int) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrap(String, int, int, int) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrap(String, int, int, String) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrap(String, int, int, int, String) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrap(StringBuffer, int, int, int) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrap(String, int, int, int, String, boolean) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrap(StringBuffer, int, int, int, String, boolean) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
wrapTrace(String, int) - Static method in class fmpp.util.StringUtil
-
-
Hard-wraps flow-text.
-
-
WritableHash - Class in fmpp.models
-
-
Hash variable that can be changed during template execution with the proper - method variables.
-
-
WritableHash() - Constructor for class fmpp.models.WritableHash
-
 
-
WritableHash(Map) - Constructor for class fmpp.models.WritableHash
-
 
-
WritableSequence - Class in fmpp.models
-
-
Sequence variable that can be changed during template execution with the - proper method variables.
-
-
WritableSequence() - Constructor for class fmpp.models.WritableSequence
-
 
-
WritableSequence(List) - Constructor for class fmpp.models.WritableSequence
-
 
-
write(int) - Method in class fmpp.util.NullOutputStream
-
 
-
write(byte[], int, int) - Method in class fmpp.util.NullOutputStream
-
 
-
write(char[], int, int) - Method in class fmpp.util.NullWriter
-
 
-
- - - -

X

-
-
XmlDataLoader - Class in fmpp.dataloaders
-
-
Returns a variable that exposes the content of an XML file.
-
-
XmlDataLoader() - Constructor for class fmpp.dataloaders.XmlDataLoader
-
 
-
xmlEnc(String) - Static method in class fmpp.util.StringUtil
-
-
XML Encoding.
-
-
xmlEncNQ(String) - Static method in class fmpp.util.StringUtil
-
-
XML encoding without replacing apostrophes and quotation marks.
-
-
XmlInfosetDataLoader - Class in fmpp.dataloaders
-
-
Deprecated. -
Use XmlDataLoader instead.
-
-
-
XmlInfosetDataLoader() - Constructor for class fmpp.dataloaders.XmlInfosetDataLoader
-
-
Deprecated.
-
XmlRenderingConfiguration - Class in fmpp
-
-
Stores options that describe when and how to process an XML file in - "renderXml" processing mode.
-
-
XmlRenderingConfiguration() - Constructor for class fmpp.XmlRenderingConfiguration
-
-
Creates new object.
-
-
XPATH_ENGINE_DEFAULT - Static variable in class fmpp.Engine
-
-
Used as the value of the "xmlEngine" engine parameter: Let FreeMarker - choose.
-
-
XPATH_ENGINE_DONT_SET - Static variable in class fmpp.Engine
-
-
Used as the value of the "xmlEngine" engine parameter: keep the current - JVM level setting.
-
-
XPATH_ENGINE_JAXEN - Static variable in class fmpp.Engine
-
-
Used as the value of the "xmlEngine" engine parameter: Force the usage - of Jaxen.
-
-
XPATH_ENGINE_XALAN - Static variable in class fmpp.Engine
-
-
Used as the value of the "xmlEngine" engine parameter: Force the usage - of Xalan.
-
-
-A B C D E F G H I J K L M N O P Q R S T U V W X 
- -
- - - - - - - -
- - - - diff --git a/fmpp/docs/api/index.html b/fmpp/docs/api/index.html deleted file mode 100644 index f00f488..0000000 --- a/fmpp/docs/api/index.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -FMPP 0.9.15 API - - - - - - - - - -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<h2>Frame Alert</h2> -<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> - - - diff --git a/fmpp/docs/api/overview-frame.html b/fmpp/docs/api/overview-frame.html deleted file mode 100644 index 37bcbff..0000000 --- a/fmpp/docs/api/overview-frame.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - -Overview List (FMPP 0.9.15 API) - - - - - - - -

 

- - diff --git a/fmpp/docs/api/overview-summary.html b/fmpp/docs/api/overview-summary.html deleted file mode 100644 index b3157b4..0000000 --- a/fmpp/docs/api/overview-summary.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - -Overview (FMPP 0.9.15 API) - - - - - - - - -
- - - - - - - -
- - -
-

FMPP 0.9.15 API

-
-
-
-
FMPP is a general-purpose text file preprocessor tool that uses FreeMarker - templates.
-
-

See: Description

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Packages 
PackageDescription
fmpp -
The very core, the foundation of FMPP.
-
fmpp.dataloaders -
fmpp.DataLoader implementations.
-
fmpp.localdatabuilders -
fmpp.LocalDataBuilder implementations.
-
fmpp.models -
freemarker.template.TemplateModel implementations.
-
fmpp.progresslisteners -
fmpp.ProgressListener implementations.
-
fmpp.setting -
FMPP settings.
-
fmpp.tdd -
Textual Data Definition related classes.
-
fmpp.tools -
Tools (front-ends) that end-user can use out-of-the-box.
-
fmpp.util -
Collection of more-less FMPP independent utility classes.
-
-
-
- - -

FMPP is a general-purpose text file preprocessor tool that uses FreeMarker - templates. It is especially designed for HTML preprocessor, for the generation - of complete (static) homepages: directory structure that contains HTML-s, - image files, etc. FMPP can pull data from external data sources (database, - XML files, Java property files, etc.) and embed the data into the - generated files. - -

For detailed instructions, read the FMPP Manual. - -

Report bugs and send suggestions to "ddekany at freemail dot hu" - or use the mailing list, forums and trackers on the source forge project page: - http://sourceforge.net/projects/fmpp/. - -

For the latest version, and for more information visit: - http://fmpp.sourceforge.net/.

-
- -
- - - - - - - -
- - - - diff --git a/fmpp/docs/api/overview-tree.html b/fmpp/docs/api/overview-tree.html deleted file mode 100644 index c07e550..0000000 --- a/fmpp/docs/api/overview-tree.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - -Class Hierarchy (FMPP 0.9.15 API) - - - - - - - - -
- - - - - - - -
- - -
-

Hierarchy For All Packages

-Package Hierarchies: - -
-
-

Class Hierarchy

- -

Interface Hierarchy

- -
- -
- - - - - - - -
- - - - diff --git a/fmpp/docs/api/package-list b/fmpp/docs/api/package-list deleted file mode 100644 index 56747eb..0000000 --- a/fmpp/docs/api/package-list +++ /dev/null @@ -1,9 +0,0 @@ -fmpp -fmpp.dataloaders -fmpp.localdatabuilders -fmpp.models -fmpp.progresslisteners -fmpp.setting -fmpp.tdd -fmpp.tools -fmpp.util diff --git a/fmpp/docs/api/script.js b/fmpp/docs/api/script.js deleted file mode 100644 index c3a1cae..0000000 --- a/fmpp/docs/api/script.js +++ /dev/null @@ -1,30 +0,0 @@ -function show(type) -{ - count = 0; - for (var key in methods) { - var row = document.getElementById(key); - if ((methods[key] & type) != 0) { - row.style.display = ''; - row.className = (count++ % 2) ? rowColor : altColor; - } - else - row.style.display = 'none'; - } - updateTabs(type); -} - -function updateTabs(type) -{ - for (var value in tabs) { - var sNode = document.getElementById(tabs[value][0]); - var spanNode = sNode.firstChild; - if (value == type) { - sNode.className = activeTableTab; - spanNode.innerHTML = tabs[value][1]; - } - else { - sNode.className = tableTab; - spanNode.innerHTML = "" + tabs[value][1] + ""; - } - } -} diff --git a/fmpp/docs/api/serialized-form.html b/fmpp/docs/api/serialized-form.html deleted file mode 100644 index 8b37ba4..0000000 --- a/fmpp/docs/api/serialized-form.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - -Serialized Form (FMPP 0.9.15 API) - - - - - - - - -
- - - - - - - -
- - -
-

Serialized Form

-
-
- -
- -
- - - - - - - -
- - - - diff --git a/fmpp/docs/api/stylesheet.css b/fmpp/docs/api/stylesheet.css deleted file mode 100644 index ad00323..0000000 --- a/fmpp/docs/api/stylesheet.css +++ /dev/null @@ -1,574 +0,0 @@ -/* Javadoc style sheet - JDK 8 usability fix regexp substitutions applied */ -/* -Overall document style -*/ - -@import url('resources/fonts/dejavu.css'); - -body { - background-color:#ffffff; - color:#353833; - font-family:Arial, Helvetica, sans-serif; - font-size:14px; - margin:0; -} -a:link, a:visited { - text-decoration:none; - color:#4A6782; -} -a:hover, a:focus { - text-decoration:none; - color:#bb7a2a; -} -a:active { - text-decoration:none; - color:#4A6782; -} -a[name] { - color:#353833; -} -a[name]:hover { - text-decoration:none; - color:#353833; -} -pre { - font-family:'Courier New', monospace; - font-size:14px; -} -h1 { - font-size:20px; -} -h2 { - font-size:18px; -} -h3 { - font-size:16px; - font-style:italic; -} -h4 { - font-size:13px; -} -h5 { - font-size:12px; -} -h6 { - font-size:11px; -} -ul { - list-style-type:disc; -} -code, tt { - font-family:'Courier New', monospace; - font-size:14px; - padding-top:4px; - margin-top:8px; - line-height:1.4em; -} -dt code { - font-family:'Courier New', monospace; - font-size:14px; - padding-top:4px; -} -table tr td dt code { - font-family:'Courier New', monospace; - font-size:14px; - vertical-align:top; - padding-top:4px; -} -sup { - font-size:8px; -} -/* -Document title and Copyright styles -*/ -.clear { - clear:both; - height:0px; - overflow:hidden; -} -.aboutLanguage { - float:right; - padding:0px 21px; - font-size:11px; - z-index:200; - margin-top:-9px; -} -.legalCopy { - margin-left:.5em; -} -.bar a, .bar a:link, .bar a:visited, .bar a:active { - color:#FFFFFF; - text-decoration:none; -} -.bar a:hover, .bar a:focus { - color:#bb7a2a; -} -.tab { - background-color:#0066FF; - color:#ffffff; - padding:8px; - width:5em; - font-weight:bold; -} -/* -Navigation bar styles -*/ -.bar { - background-color:#4D7A97; - color:#FFFFFF; - padding:.8em .5em .4em .8em; - height:auto;/*height:1.8em;*/ - font-size:11px; - margin:0; -} -.topNav { - background-color:#4D7A97; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - height:2.8em; - padding-top:10px; - overflow:hidden; - font-size:12px; -} -.bottomNav { - margin-top:10px; - background-color:#4D7A97; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - height:2.8em; - padding-top:10px; - overflow:hidden; - font-size:12px; -} -.subNav { - background-color:#dee3e9; - float:left; - width:100%; - overflow:hidden; - font-size:12px; -} -.subNav div { - clear:left; - float:left; - padding:0 0 5px 6px; - text-transform:uppercase; -} -ul.navList, ul.subNavList { - float:left; - margin:0 25px 0 0; - padding:0; -} -ul.navList li{ - list-style:none; - float:left; - padding: 5px 6px; - text-transform:uppercase; -} -ul.subNavList li{ - list-style:none; - float:left; -} -.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { - color:#FFFFFF; - text-decoration:none; - text-transform:uppercase; -} -.topNav a:hover, .bottomNav a:hover { - text-decoration:none; - color:#bb7a2a; - text-transform:uppercase; -} -.navBarCell1Rev { - background-color:#F8981D; - color:#253441; - margin: auto 5px; -} -.skipNav { - position:absolute; - top:auto; - left:-9999px; - overflow:hidden; -} -/* -Page header and footer styles -*/ -.header, .footer { - clear:both; - margin:0 20px; - padding:5px 0 0 0; -} -.indexHeader { - margin:10px; - position:relative; -} -.indexHeader span{ - margin-right:15px; -} -.indexHeader h1 { - font-size:13px; -} -.title { - color:#2c4557; - margin:10px 0; -} -.subTitle { - margin:5px 0 0 0; -} -.header ul { - margin:0 0 15px 0; - padding:0; -} -.footer ul { - margin:20px 0 5px 0; -} -.header ul li, .footer ul li { - list-style:none; - font-size:13px; -} -/* -Heading styles -*/ -div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { - background-color:#dee3e9; - border:1px solid #d0d9e0; - margin:0 0 6px -8px; - padding:7px 5px; -} -ul.blockList ul.blockList ul.blockList li.blockList h3 { - background-color:#dee3e9; - border:1px solid #d0d9e0; - margin:0 0 6px -8px; - padding:7px 5px; -} -ul.blockList ul.blockList li.blockList h3 { - padding:0; - margin:15px 0; -} -ul.blockList li.blockList h2 { - padding:0px 0 20px 0; -} -/* -Page layout container styles -*/ -.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { - clear:both; - padding:10px 20px; - position:relative; -} -.indexContainer { - margin:10px; - position:relative; - font-size:12px; -} -.indexContainer h2 { - font-size:13px; - padding:0 0 3px 0; -} -.indexContainer ul { - margin:0; - padding:0; -} -.indexContainer ul li { - list-style:none; - padding-top:2px; -} -.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { - font-size:12px; - font-weight:bold; - margin:10px 0 0 0; - color:#4E4E4E; -} -.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { - margin: 5px 0 10px 20px; - font-size:14px; - -} -.serializedFormContainer dl.nameValue dt { - margin-left:1px; - font-size:1.1em; - display:inline; - font-weight:bold; -} -.serializedFormContainer dl.nameValue dd { - margin:0 0 0 1px; - font-size:1.1em; - display:inline; -} -/* -List styles -*/ -ul.horizontal li { - display:inline; - font-size:0.9em; -} -ul.inheritance { - margin:0; - padding:0; -} -ul.inheritance li { - display:inline; - list-style:none; -} -ul.inheritance li ul.inheritance { - margin-left:15px; - padding-left:15px; - padding-top:1px; -} -ul.blockList, ul.blockListLast { - margin:10px 0 10px 0; - padding:0; -} -ul.blockList li.blockList, ul.blockListLast li.blockList { - list-style:none; - margin-bottom:15px; - line-height:1.4; -} -ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { - padding:0px 20px 5px 10px; - border:1px solid #ededed; - background-color:#f8f8f8; -} -ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { - padding:0 0 5px 8px; - background-color:#ffffff; - border:none; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { - margin-left:0; - padding-left:0; - padding-bottom:15px; - border:none; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { - list-style:none; - border-bottom:none; - padding-bottom:0; -} -table tr td dl, table tr td dl dt, table tr td dl dd { - margin-top:0; - margin-bottom:1px; -} -/* -Table styles -*/ -.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { - width:100%; - border-left:1px solid #EEE; - border-right:1px solid #EEE; - border-bottom:1px solid #EEE; -} -.overviewSummary, .memberSummary { - padding:0px; -} -.overviewSummary caption, .memberSummary caption, .typeSummary caption, -.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { - position:relative; - text-align:left; - background-repeat:no-repeat; - color:#253441; - font-weight:bold; - clear:none; - overflow:hidden; - padding:0px; - padding-top:10px; - padding-left:1px; - margin:0px; - white-space:pre; -} -.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, -.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, -.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, -.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, -.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, -.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, -.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, -.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { - color:#FFFFFF; -} -.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, -.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - padding-bottom:7px; - display:inline-block; - float:left; - background-color:#F8981D; - border: none; - height:16px; -} -.memberSummary caption span.activeTableTab span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - margin-right:3px; - display:inline-block; - float:left; - background-color:#F8981D; - height:16px; -} -.memberSummary caption span.tableTab span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - margin-right:3px; - display:inline-block; - float:left; - background-color:#4D7A97; - height:16px; -} -.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { - padding-top:0px; - padding-left:0px; - padding-right:0px; - background-image:none; - float:none; - display:inline; -} -.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, -.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { - display:none; - width:5px; - position:relative; - float:left; - background-color:#F8981D; -} -.memberSummary .activeTableTab .tabEnd { - display:none; - width:5px; - margin-right:3px; - position:relative; - float:left; - background-color:#F8981D; -} -.memberSummary .tableTab .tabEnd { - display:none; - width:5px; - margin-right:3px; - position:relative; - background-color:#4D7A97; - float:left; - -} -.overviewSummary td, .memberSummary td, .typeSummary td, -.useSummary td, .constantsSummary td, .deprecatedSummary td { - text-align:left; - padding:0px 0px 12px 10px; - width:100%; -} -th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, -td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ - vertical-align:top; - padding-right:0px; - padding-top:8px; - padding-bottom:3px; -} -th.colFirst, th.colLast, th.colOne, .constantsSummary th { - background:#dee3e9; - text-align:left; - padding:8px 3px 3px 7px; -} -td.colFirst, th.colFirst { - white-space:nowrap; - font-size:13px; -} -td.colLast, th.colLast { - font-size:13px; -} -td.colOne, th.colOne { - font-size:13px; -} -.overviewSummary td.colFirst, .overviewSummary th.colFirst, -.overviewSummary td.colOne, .overviewSummary th.colOne, -.memberSummary td.colFirst, .memberSummary th.colFirst, -.memberSummary td.colOne, .memberSummary th.colOne, -.typeSummary td.colFirst{ - width:25%; - vertical-align:top; -} -td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { - font-weight:bold; -} -.tableSubHeadingColor { - background-color:#EEEEFF; -} -.altColor { - background-color:#FFFFFF; -} -.rowColor { - background-color:#EEEEEF; -} -/* -Content styles -*/ -.description pre { - margin-top:0; -} -.deprecatedContent { - margin:0; - padding:10px 0; -} -.docSummary { - padding:0; -} - -ul.blockList ul.blockList ul.blockList li.blockList h3 { - font-style:normal; -} - -div.block { - font-size:14px; - font-family:Arial, sans-serif; -} - -td.colLast div { - padding-top:0px; -} - - -td.colLast a { - padding-bottom:3px; -} -/* -Formatting effect styles -*/ -.sourceLineNo { - color:green; - padding:0 30px 0 0; -} -h1.hidden { - visibility:hidden; - overflow:hidden; - font-size:10px; -} -.block { - display:block; - margin:3px 10px 2px 0px; - color:#474747; -} -.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, -.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, -.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { - font-weight:bold; -} -.deprecationComment, .emphasizedPhrase, .interfaceName { - font-style:italic; -} - -div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, -div.block div.block span.interfaceName { - font-style:normal; -} - -div.contentContainer ul.blockList li.blockList h2{ - padding-bottom:0px; -} diff --git a/fmpp/docs/basics.html b/fmpp/docs/basics.html deleted file mode 100644 index 1fb6c69..0000000 --- a/fmpp/docs/basics.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - -Basics - FMPP - - - - - - - - - - - - - - - -
-

Basics

- -
-
-

Chapter Contents

- -
- -
-
-
-
- - - \ No newline at end of file diff --git a/fmpp/docs/bsh.html b/fmpp/docs/bsh.html deleted file mode 100644 index 9905e74..0000000 --- a/fmpp/docs/bsh.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - -BeanShell language - FMPP - - - - - - - - - - - - - - - -
-

BeanShell language

- -
-
- -

From the BeanShell documentation: "BeanShell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. BeanShell executes standard Java statements and expressions but also extends Java into the scripting domain with common scripting language conventions and syntax." So if you know Java programming language, and already used some scripting languages, you will find it quite easy to learn and use. For more information, please visit: http://www.beanshell.org/

- -

In FMPP, BeanShell is used for: -

    -
  • Creating Java objects to be used in setting values. For example when the data setting used together with the eval data loader. -
  • Pre-processing data for individual templates. See the localData setting and its bsh function. -
  • Accessing Java classes and objects from FTL templates, using the pp.loadData directive with the eval data loader. -
- - -
-
-
-
- - - \ No newline at end of file diff --git a/fmpp/docs/commandline.html b/fmpp/docs/commandline.html deleted file mode 100644 index 07f28d7..0000000 --- a/fmpp/docs/commandline.html +++ /dev/null @@ -1,577 +0,0 @@ - - - - - - - -The Command-line Tool - FMPP - - - - - - - - - - - - - - - -
-

The Command-line Tool

- -
- -
- - -

Basic usage

- -

FMPP can work in two modes: as a recursive directory processor, or as single file processor.

- -

When you're using it as recursive directory processor, it needs a source root directory and an output root directory. It processes all files inside the source root (including the files in its subdirectories), and writes the processed files into the output root directory with similar path as in the source root (that is, the output of <source-root>/foo/bar.txt will be <output-root>/foo/bar.txt. If /home/me/sample-project/src is the source root and /home/me/sample-project/out is the output root, then you issue:

- -
fmpp -S /home/me/sample-project/src -O /home/me/sample-project/out
- -

It's possible to tell FMPP to process only certain files and/or directories of the source root directory:

- -
fmpp -S /home/me/sample-project/src -O /home/me/sample-project/out index.html foo/bar.txt somedir
- -

Note that these paths are interpreted relatively to the source root directory, not to the current working directory.

- -

When you use FMPP as single file processor, you specify a single input file, and then an output file with the -o option. It's the -o option is what triggers single file mode.

- -
fmpp /home/me/file-to-process.txt -o /home/me/processed-file.txt
- -

In single file mode, the source root and output root directory defaults to the directory of source and output files respectively. (It has significance for example if the source file wants to include another file), but you can override them with the -S and -O switches. The source file and output file path is always interpreted relatively to the current working directory.

- -

It's often more convenient and manageable to use a project configuration file instead of entering everything as command-line arguments. For example, create file config.fmpp with this content:

- -
sourceRoot: src
-outputRoot: out
-logFile: fmpp.log
-modes: [ ignore(tmp/), copy(**/*.dwg, bin/) ]
-data: {
-  contact: me@example.com
-  clients: csv(data/clients.csv)
-}
-

then use it as:

- -
fmpp -C /home/me/sample-project/config.fmpp
- -

or since config.fmpp is the default configuration file name, you can simply issue:

- -
fmpp -C /home/me/sample-project
- -

or if you are in the same directory as config.fmpp then just issue:

- -
fmpp
- -

Note that paths in the configuration file are resolved relatively to the configuration file's directory, so it doesn't mater where do you invoke it from. Also note that you can override the settings stored in the configuration file with the command line:

- -
fmpp -C /home/me/sample-project/config.fmpp -O other/destination
- -

Much of what should be known about FMPP is not specific to its command line interface, so look around in the Table of Contents for more information!

- - - - -

Command-line argument syntax primer

- -

This section is for users who are not too familiar with using the command-line. No FMPP specific information can be found here, so you may skip to the next section.

- -

The exact command-line syntax depends on what shell do you use (sh, csh, DOS shell, etc.), because the shell is responsible to split the command-line to an executable name and a list of arguments. FMPP just gets the list from the shell.

- -

Most shells will parse this command-line:

- -
test -f t 1.txt 2.txt
- -

as the executable name is test, and the list of arguments is:

- -
    -
  1. -f -
  2. t -
  3. 1.txt -
  4. 2.txt -
- -

As you may guess, the arguments are delimited by the spaces. If you want to put spaces into the value of arguments, in most shells you should use quotation marks:

- -
test -f t -D "x:1, y:2"
- -

Here, the list of arguments will be:

- -
    -
  1. -f -
  2. t -
  3. -D -
  4. x:1, y:2 -
- -

The shell has removed the quotation marks. Thus, command-line tools like FMPP will not know that there were quotation marks, as they just gets the above list from the shell.

- -

With shells as sh, you can use apostrophe-quotes (') instead of quotation marks. In Windows/DOS shell you can use quotation marks (") only.

- -

You have to quote the argument if you use characters that are reserved by the shell for other purposes. For example > and | is reserved in most shells. &, ; and ( is reserved in sh. Also, if you use an UN*X shell, sometimes you need to quote arguments that contain *, ? or ~, because otherwise the shell interprets the argument as a path, and replaces that with the list of matching files.

- -

Most shells understand partially quoted arguments. For example:

- -
test -D"x:1, y:2"
- -

will be interpreted as:

- -
    -
  1. -Dx:1, y:2 -
- -

A tricky situation is when you want to use quotation marks in an argument value. To prevent this situations use apostrophe-quotes instead of plain quotes and vice versa. For example:

- -
test -D"x:'red led', y:2"
- -

or (will not work in Windows/DOS shell!):

- -
test -D'x:"red led", y:2'
- - - - -

FMPP command-line argument syntax

- -

The FMPP command-line tool uses similar argument syntax to usual UN*X command-line tools, such as ls. UN*X users should be able to use the tool even without reading this section.

- -

This is a possible FMPP command-line:

- -
fmpp -C mycfg.fmpp -q --case-sensitive products index.html
- -

The FMPP command-line tool interprets command-line arguments as either:

-
    -
  • Option, as -q, --case-sensitive and -C mycfg.fmpp -
  • Non-option, as products and index.html -
- -

An option always starts with dash (-), or with double dash. (--), followed by the name of the option (e.g. q, C, case-sensitive). If the option requires parameter, then it is followed by the parameter to the option (as mycfg.fmpp in -C mycfg.fmpp), which counts as the part of the option, not as non-option.

- -

If the option uses single dash, then the name of the option is exactly 1 character long; this is called short form. If the option uses double dash, then the name can be arbitrary long; this is called long form. All options have long form, and many options have both long and short form versions, which are equivalent (for example -q and --quiet). Short form options can be grouped together, for example you can write
-qxs
instead of
-q -x -s

- -

Some options require a parameter. To demonstrate the syntactical rules with examples, here are the valid ways to give cp852 as parameter to option -E alias --source-encoding:

- -
    -
  • -E cp852: here the parameter was the next argument after the option -
  • -Ecp852: here I have utilized that a short option name is always 1 character long, and thus, since -E require parameter, the rest of this argument will be interpreted as the parameter of the option. (Note, that because if this, grouping (as -qxs) will not work if an option in the group, other than the very last option, requires parameter.) The next argument of the command-line will not be interpreted as parameter to -E. -
  • -E=cp852: This is similar to the latest, but the option name and parameter value is separated with = -
  • --source-encoding cp852 -
  • --source-encoding=cp852 -
- -

I didn't show the combinations like -E="cp852", as the usage of quotation marks is shell dependent. See the section about using the command-line for more information.

- -

The order in which options occur in the command-line argument list is not significant.

- -

Options are case sensitive. This means that -c and -C are not the same.

- -

Any argument that does not start with dash and is not directly after an option that needs parameter, is a non-option. In FMPP, non-options are used to list the name of the files or directories that you want to process; see more about this later. The position of a non-option in the argument list relatively to the options is not significant. That is, these command-line argument lists are equivalent:

- -
    -
  • -C mycfg.fmpp -q products index.html -
  • products index.html -C mycfg.fmpp -q -
  • products -C mycfg.fmpp index.html -q -
- -

Sometimes it happens that a non-option should start with dash (for example, because the name of the file you want to refer to starts with dash). In this case you can use a special character sequence, -- followed by no option name, to indicate that all subsequent arguments are non-options:

- -
fmpp -Cmycfg.fmpp -- -this-is-a-non-option
- - - -

Invoking the command-line tool

- -

The command-line tool can be invoked with the fmpp shell script (<FMPP>/bin/fmpp or <FMPP>/bin/fmpp.bat), assuming you have installed it properly.

- -

When you invoke this tool, it will immediately run a processing session, with the settings you have set with its arguments (see later how), and then terminates. (With some command-line options, however, it will do something else, as with -h it just prints help.)

- - - - -

Specifying settings in the command-line

- -

Most command-line options specify FMPP settings. The option name is the name of the setting, but with lower case dashed form (as source-root) instead of the usual mixed case form (as sourceRoot). The value of the setting is given as the parameter of the option. The configuration base for the values is the current working directory (i.e. the directory you are in).

- -

Example: Runs a processing session with sourceRoot set to src and outputRoot set to out (so this will process all files in the src directory, and store the output in the out directory):

- -
fmpp --source-root src --output-root out
- -

For the most frequently used settings there is short option name too. For example, this is equivalent with the previous example:

- -
fmpp -S src -O out
- -

If the setting value is of scalar type (as string, boolean, number) then just enter the value simply as is, not with TDD syntax. If the setting value is of more tricky type, as hash or sequence, then you use TDD syntax for it. For hash settings the value is a hash mode TDD, and for sequence setting it is sequence mode TDD, so the brackets should be omitted. For example:

- -
fmpp -S src -O out -D "online:false, tdd(data/style.tdd)" --replaceExtensions "ftl, html"
- -

Note that the quotation marks were needed only for the command-line parser of the shell (see earlier on this page), so they are not visible for FMPP.

- -

Boolean settings (and quiet) are specified with parameterless options:

- - - - - - - - - - - - - - - - - - - - - - - -
Command-line option - Meaning -
Setting name - Value -
-s, --stop-on-error - stopOnError - true -
-c, --continue-on-error - stopOnError - false -
--case-sensitive - caseSensitive - true -
--ignore-case - caseSensitive - false -
--ignore-cvs-files - ignoreCvsFiles - true -
--dont-ignore-cvs-files - ignoreCvsFiles - false -
--ignore-svn-files - ignoreSvnFiles - true -
--dont-ignore-svn-files - ignoreSvnFiles - false -
--ignore-temporary-files - ignoreTemporaryFiles - true -
--dont-ignore-temporary-files - ignoreTemporaryFiles - false -
--print-stack-trace - printStackTrace - true -
--dont-print-stack-trace - printStackTrace - false -
-x, --expert - expert - true -
--not-expert - expert - false -
--append-log-file - appendLogFile - true -
--dont-append-log-file - appendLogFile - false -
-q, --quiet - quiet - true -
-v, --verbose - quiet - false -
-Q, --really-quiet - quiet - reallyQuiet -
- -

Example:

- -
fmpp -S src -O out --dont-ignore-cvs-files -cqx
- -

where the last few options mean: ignoreCvsFiles is false, stopOnError is false, quiet is true, expert is true.

- -

The value of the sources setting can be given as the non-option arguments to the tool. For example, to process only files index.html and directory products of the source root:

- -
fmpp -S src -O out index.html products
- -

Notes for Windows users:

-
    -
  • In paths you can optionally use slash (/) instead of backslash (\) anywhere.
  • -
  • You can't use * and ? in paths (except in settings that explicitly want path patterns, e.g. modes)
  • -
- - - - -

Using configuration files

- -

With option --configuration or -C you can load a configuration file. As you may know it from the chapter about configuration files, it is enough to give the directory of the configuration file, if the file uses one of the standard names. Example:

- -
fmpp -C works/project1
- -

If you don't use option --configuration/-C, fmpp will look for a configuration file in the current working directory, and if it finds one with standard name, it will load that automatically. To prevent this, use --configuration/-C with none parameter (as -C none).

- - -

Settings loaded from the configuration file have lower priority than settings given as command-line arguments. For example, here you add an extra variable to the data specified in the configuration file, or if variable online was already created there then replace its value:

- -
fmpp -C works/project1 -D online:true
- -

Options configurationBase and inheritConfiguration can be used to emulate that settings configurationBase and inheritConfiguration are present with the given value in the configuration file.

- - - - -

Global options

- -

The default of some settings that can't influence the output files can be set in a configuration file called .fmpprc. This file is searched in these directories, in this order:

-
    -
  1. In your home directory.
  2. -
  3. On Windows, in the directory pointed by the HOME environment variable.
  4. -
  5. In the directory pointed by the FMPP_HOME environment variable. This is usually automatically set to the directory where you have installed FMPP.
  6. -
- -

Only the first .fmpprc found will be loaded.

- -

The settings you can set in the .fmpprc are:

- - - - - -

Supported front-end dependent settings

- -

All logging related settings are supported.

- -

All recommended echoFormat-s are supported, but verbose is the same as normal. It depends on the terminal implementation you use, but terse echo format can substantially speed up the processing session if you have many files.

- -

All quiet values are supported.

- - - - -

List of all options

- -

The complete list of command-line options with brief description is included further below in the output of fmpp -h. -Almost all options correspond to FMPP settings; see the complete descriptions of FMPP settings here.

- -
-Typical usages:
-   fmpp -C configfile
-   fmpp -S sourcedir -O outputdir
-   fmpp sourcefile -o outputfile
-For more examples: http://fmpp.sourceforge.net/commandline.html
-
-Options:
-  -A, --locale=<LOC>             The locale (as ar_SA). Use the special value "host" (-A host) if the default
-                                   locale of the host machine should be used. The default value of the option
-                                   is en_US.
-      --always-create-directories Create output subdirectory even if it will remain empty. Defaults to false.
-      --append-log-file          If the log file already exists, it will be continuted, instead of restarting
-                                   it.
-      --boolean-format=<FORMAT>  The boolean format used to show boolean values, like "Yes,No". Not
-                                   "true,false"; use ${myBool?c} for that. The default is error on ${myBool}.
-      --borders=<SEQ>            The list of TDD function calls that choose header and footer for templates,
-                                   e.g.:
-                                   -M 'border("<#escape x as x?html>", "</#escape>", *.htm, *.html),
-                                   header("<#include \"/css.ftl\">", *.css)'
-  -c, --continue-on-error        Skip to the next file on failed file processing (and log the error: see -L)
-  -C, --configuration=<FILE>     Load settings from a configuration file. Settings given with command-line
-                                   options have higher priority (note that some settings are merged, rather
-                                   than overridden). Be default fmpp will use ./config.fmpp or ./fmpp.cfg if
-                                   that exists. Use value "none" (-C none) to prevent this.
-      --case-sensitive           Upper- and lower-case letters are considered as different characters when
-                                   comparing or matching paths.
-      --columns=<COLS>           The number of columns on the console screen. Use when auto-detection gives
-                                   bad result.
-      --configuration-base=<DIR> The directory used as base to resolve relative paths in the configuration
-                                   file. It defaults to the directory of the configuration file.
-  -D, --data=<TDD>               Creates shared data that all template will see. <TDD> is the Textual Data
-                                   Definition, e.g.:
-                                   -D "properties(style.properties), onLine:true"
-                                   Note that paths like "style.properties" are relatve to the data root
-                                   directory.
-      --data-root=<DIR>          Sets the root directory of data files. The reserved value "source" means
-                                   that the data root is the same as the source root. The default value is
-                                   "source".
-      --date-format=<FORMAT>     The format used to show date (year+month+day) values. The default is locale
-                                   dependent.
-      --datetime-format=<FORMAT> The format used to show date-time values. The default is locale dependent.
-      --dont-append-log-file     If the log file already exists, it will be restarted. This is the default.
-      --dont-ignore-cvs-files    Don't ignore CVS files in the source root directory.
-      --dont-ignore-svn-files    Don't ignore SVN files in the source root directory.
-      --dont-ignore-temporary-files Don't ignore well-known temporary files in the source root directory.
-      --dont-print-stack-trace   Don't print stack trace on error, just cause chain. This is the default.
-      --dont-snip                Deprecated; alias of printStackTrace.
-      --dont-validate-xml        Sets that XML files will not be validated by default. This is the default.
-  -E, --source-encoding=<ENC>    The encoding of textual sources (templates). Use the special value "host"
-                                   (-E host) if the default encoding of the host machine should be used. The
-                                   default is "ISO-8859-1".
-  -F, --echo-format=<FORMAT>     The format used for displaying the progress. <FORMAT> is n[ormal], t[erse]
-                                   or q[uiet] (or v[erbose], which is the same as normal). The default is
-                                   normal.
-      --freemarker-incompatible-improvements=<VER> Enables the FreeMarker fixes/improvements that are not
-                                   100% backward compatible, and were implemented in FreeMarker version
-                                   <VER>. In older projects using the highest available 2.3.x is usually a
-                                   good compromise. New projects should use the maximum, which is currently
-                                   "2.3.21". The default is "2.3.0".
-      --freemarker-links=<MAP>   The map of FreeMarker links (external includes).
-  -h, --help                     Prints help on options.
-      --ignore-case              Upper- and lower-case letters are considered as the same characters when
-                                   comparing or matching paths. This is the default.
-      --ignore-cvs-files         Ignore CVS files in the source root directory. This is the default.
-      --ignore-svn-files         Ignore SVN files in the source root directory. This is the default.
-      --ignore-temporary-files   Ignore well-known temporary files (e.g. **/?*~) in the source root
-                                   directory. This is the default.
-      --inherit-configuration=<FILE> Inherits options from a configuration file. The options in the primary
-                                   configuration file (-C) has higher precednece.
-  -L, --log-file=<FILE>          Sets the log file. Use "none" (-L none) to disable logging. The default is
-                                   "none".
-      --local-data=<SEQ>         Creates data that is visible only for certain templates. This is a list of
-                                   case(...) and layer() function calls.
-      --long-help                Deprecated; same as -h
-  -M, --modes=<SEQ>              The list of TDD function calls that choose the file processing mode, e.g.:
-                                   -M "ignore(**/tmp/), execute(**/*.htm, **/*.html), copy(**/*)"
-      --not-expert               Disables expert mode. This is the default.
-      --number-format=<FORMAT>   The number format used to show numerical values. The default is
-                                   0.############
-  -o, --output-file=<FILE>       The output file. This switches FMPP to single-file mode.
-  -O, --output-root=<DIR>        Sets the root directory of output files.
-      --object-wrapper=<BSH>     Specifies the ObjectWrapper to use with a BeanShell expression that must
-                                   evaluate to an object that extends BeansWrapper. The default value is a
-                                   BeansWrapper instance with simpleMapWrapper set to true.
-      --output-encoding=<ENC>    The encoding of template output. Use the special value "source" if the
-                                   encoding of the template file should be used. Use the special value "host"
-                                   if the default encoding of the host machine should be used. The default is
-                                   "source".
-      --print-locales            Prints the locale codes that Java platform knows.
-      --print-stack-trace        Print stack trace on error.
-  -q, --quiet                    Don't write to the stdout, unless the command-line arguments are wrong.
-                                   Print warning and error messages to the stderr.
-  -Q, --really-quiet             As -q, but doesn't even write to the stderr.
-  -R, --remove-extensions=<SEQ>  These extensions will be removed from the output file name. <SEQ> contains
-                                   the extensions without the dot.
-      --remove-postfixes=<SEQ>   If the source file name without the extension ends with a string in the
-                                   <SEQ>, then that string will be removed from the output file name.
-      --replace-extensions=<SEQ> Replaces the extensions with another exensions. The list contains the old
-                                   and new extensions alternately; old1, new1, old2, new2, etc. The
-                                   extensions in the <SEQ> do not contain the dot.
-  -s, --stop-on-error            Terminate fmpp on failed file processing. This is the default behaviour. Use
-                                   -c to override this.
-  -S, --source-root=<DIR>        Sets the root directory of source files. In bulk-mode it defaults to the
-                                   current working directory.
-      --snip                     Deprecated; alias of dont-printStackTrace.
-      --sql-date-and-time-time-zone=<ZONE> Sets a different time zone for java.sql.Date and java.sql.Time
-                                   only.
-      --tag-syntax=<WHAT>        Sets the tag syntax for templates that doesn't start with the ftl directive.
-                                   Possible values are: angleBracket, squareBracket, autoDetect. The default
-                                   depends on the FreeMarker version. The recommended value is autoDetect.
-      --time-format=<FORMAT>     The format used to show time values. The default is locale dependent.
-      --time-zone=<ZONE>         Sets the time zone in which date/time/date-time values are shown. The
-                                   default is the time zone of the host machine. Example: GMT+02
-      --turns=<SEQ>              The list of turn(...)-s that choose the turns of processings, e.g.:
-                                   --turns "turn(2, **/*_t2.*, ), turn(3, **/*_t3.*, **/*.toc)"
-                                   By default all files will be procesed in the first turn.
-  -U, --skip-unchanged=<WHAT>    Skip <WHAT> files if the source was not modified after the output file was
-                                   last modified. <WHAT> can be "all", "none" or "static"
-      --url-escaping-charset=<ENC> The charset used for URL escaping. Use the special value "output" if the
-                                   encoding of the output file should be used. The default is "output".
-  -v, --verbose                  The opposite of -Q: prints everything to the stdout. This is the default.
-      --validate-xml             Sets that XML files will be validated by default.
-      --version                  Prints version information.
-  -x, --expert                   Expert mode.
-      --xml-catalog-files=<SEQ>  Sets the catalog files used for XML entity resolution. Catalog based
-                                   resolution is enabled if and only if this settings is specified.
-      --xml-catalog-prefer=<WHAT> Sets if catalog file based XML entity resolution prefers public or system
-                                   identifiers. Valid values are: public, system, globalDefault. Defaults to
-                                   public.
-      --xml-renderings=<SEQ>     Sets the sequence of XML renderings. Each item is hash, that stores the
-                                   options of an XML rendering configuration.
-      --xpath-engine=<NAME>      Sets the XPath engine to be used. Legal values are: dontSet, default, jaxen,
-                                   xalan, and any adapter class name.
-
-Most options above directly correspond to FMPP settings. See their full descriptions here:
-http://fmpp.sourceforge.net/settings.html
-
-
-
-
- - - -
-
-
-
- - - \ No newline at end of file diff --git a/fmpp/docs/configfile.html b/fmpp/docs/configfile.html deleted file mode 100644 index e90ef66..0000000 --- a/fmpp/docs/configfile.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - -Configuration Files - FMPP - - - - - - - - - - - - - - - -
-

Configuration Files

- -
- -
- - -

Basics

- -

Configuration files are text files that store setting values. They can use two syntaxes (two formats):

-
    -
  • TDD: This is the preferred format.
  • -
  • Java "Properties": This is mostly supported for backward compatibility with the FMPP 0.8.X series.
  • -
- -

The syntax that a configuration file uses is detected with the file extension. For "properties" configuration files, the file extension must be cfg or properties. For TDD files, the preferred file extension is fmpp, but it can be anything but cfg and properties.

- -

When you want to load a configuration file, you specify the path of the file for the front-end somehow (read the documentation of the front-end). But if the configuration file name is one of these standard names:

-
    -
  • config.fmpp
  • -
  • fmpp.cfg
  • -
- -

then it is enough to give the path of the directory that contains the configuration file. (config.fmpp has higher priority if both file is present.)

- - - - -

The configuration base

- -

The configuration base is the directory used as base for resolving relative real paths in setting values. Be default, the configuration base is the directory that contains the configuration file. For example, if /home/me/project1/config.fmpp contains sourceRoot: src, then the sourceRoot will be /home/me/project1/src.

- -

The configuration base can be changed with the configurationBase meta setting. For example, if in the previous example config.fmpp contains configurationBase: ../project2, then the sourceRoot will be /home/me/project2/src. The configurationBase setting applies only for the setting values specified in the same file it is stored in.

- -

Not all relative paths in settings are resolved relatively to the configurationBase. Relative virtual paths, for example, are relative to the sourceRoot or outputRoot. Relative paths of data files passed to data loaders are relative to the dataRoot.

- -

If the setting value comes not from a configuration file (such as from a command-line argument), then the front-end specifies what the configuration base is for that setting value (see the documentation of the front-end).

- - - - -

Configuration inheritance

- -

A configuration file can inherit setting values from another configuration file, with the inheritConfiguration meta setting. When the FMPP core loads a configuration file, and it finds inheritConfiguration setting in it, it will automatically load that configuration file too, and then merge its settings with the settings loaded from the inheriting (the first) configuration file. The settings stored in the inheriting configuration file have higher priority than the settings stored in the inherited configuration file. Thus, if both file contains the same setting, then the value stored in the inheriting file will be used, or it will be merged with the other value if the setting supports merging.

- -

The above description is applicable recursively. That is, an inherited configuration file can inherit another configuration file, and that can inherit yet another configuration file, and so on.

- -

Meta settings (as inheritConfiguration and configurationBase) are never inherited. They influence only the file where they are actually present.

- -

A possible usage of configuration inheritance is to customize a common configuration file. See: <FMPP>/docs/examples/inherit_config.

- - - - -

Configuration files with TDD syntax

- -

These files start in TDD hash mode. For example:

- -
sourceRoot: src
-outputRoot: out
-data: {tdd(data/style.tdd), birds:csv(data/birds.csv)}
-removeExtensions: [ftl, t2]
-datetimeFormat: "MMM d, yyyy hh:mm a zzz"
-caseSensitive
-

According the TDD syntax, values of type sequence (as removeExtensions) was put into square brackets. However, for sequence settings, if the sequence would contain exactly 1 element, then you can just give that element directly:

- -
removeExtensions: ftl
-

and the value will be automatically converted to a sequence that contains the a single string ftl, as it is known that removeExtensions must be a sequence. This is a feature of the setting handling mechanism, not TDD, so don't try to use this trick elsewhere.

- -

TDD configuration files always use ISO-8859-1 encoding, if there is no other encoding suggested in the file with TDD's encoding comment.

- -

For more information about TDD, please read the chapter about TDD.

- - - - -

Configuration files with "properties" syntax

- -

Attention: "properties" configuration files must use cfg or properties file extension.

- -

This is the previous example configuration file with "properties" format:

- -
sourceRoot = src
-outputRoot = out
-data = tdd(data/style.tdd), birds:csv(data/birds.csv)
-removeExtensions = ftl, t2
-datetimeFormat = MMM d, yyyy hh:mm a zzz
-caseSensitive
-

The differences to TDD configuration files are:

-
    -
  • It uses "properties" syntax...
  • -
  • The values do not use TDD syntax, except for composite types as hashes and sequences. For example, the value of datetimeFormat is not quoted (in TDD it was, as the string contains spaces and coma), it is just entered directly.
  • -
  • The { and } for the data hash and the [ and ] for the removeExtensions sequence is omitted. This is because the value of a hash setting is parsed as hash mode TDD, and the value of a sequence setting is parsed as sequence mode TDD, so the brackets are implied.
  • -
  • For boolean settings, empty-string is considered as true (see the line that sets caseSensitive).
  • -
  • Setting names can be written with lower case dashed form (as output-root) instead of mixed case (as outputRoot). This is for backward compatibility with FMPP 0.8.X, where configuration files were use to store options to the command-line tool. The two forms can be used mixed in the same configuration file.
  • -
- -

Otherwise "properties" configuration files work in the same way as TDD configuration files. For example, they can inherit an other configuration file. It is not a problem if a "properties" configuration file inherits TDD configuration file or the opposite.

- - - -
-
-
-
- - - \ No newline at end of file diff --git a/fmpp/docs/dataloader.html b/fmpp/docs/dataloader.html deleted file mode 100644 index a8a6f5d..0000000 --- a/fmpp/docs/dataloader.html +++ /dev/null @@ -1,769 +0,0 @@ - - - - - - - -Data Loaders - FMPP - - - - - - - - - - - - - - - -
-

Data Loaders

- -
-
-

Page contents

- -
-

Alphabetical index of keys:

- -
-
- - -

Introduction

- -

Data loaders are Java objects that load data from certain type of data source, such as a CSV file or MySQL data-base, and expose the data as variables for the templates. For example, a data loader was invoked in the Quick Tour when you have written csv(data/birds.csv).

- -

Data loaders are typically invoked: -

    -
  • ... by TDD functions used in the data setting -
  • ... by TDD functions used in the localData setting -
  • ... by the pp.loadData method used in FreeMarker templates -
- - - - -

Predefined data loaders

- -

Data loaders that load data directly from files will want you to give the path of the file as parameter. There you have to give real path. If you give a relative path, then it will be interpreted relatively to the dataRoot, which defaults to the sourceRoot if you didn't specified it. The data files can be outside the dataRoot directory; it is used only as a base directory.

- -

Note: I have not written a database/SQL/JDBC data loader yet... Of coruse, you can write a such data loader yourself. Contributions are welcome!

- - - -

csv

- Parameters: -
    -
  1. path: string. - The path of the CSV file. -
  2. options: hash, optional. - The list of valid options: -
      -
    • separator: The character that separates the columns. Defaults to ";". It can be any character. It also understands the string "tab", which means that the separtor character will be the tab character.
    • - -
    • encoding: The charset used for reading CSV file. Defaults to the value of the sourceEncoding setting.
    • - -
    • trimCells: Specifies if all cells will be trimmed (boolean). Trimming means the removal of all leading and trailing white-space. Defaults to no trimming (in which case only header cells are trimmed). For tables directly entered by humans (like in Excel) it is strongly recommended to turn this on. - -
    • decimalSeparator: Alternative character used for the decimal dot in the CSV files. The dot will be always assumed as decimal separator, except if groupingSeparator is set to dot. Note that this option has significance only if you use :n (or :number) in the headers, so the data loader has to interpret the text as numbers.
    • - -
    • groupingSeparator: The character used for grouping symbol in the CSV file (as the coma in $20,000,000). Be default, grouping is not allowed. Note that this option has significance only if you use :n (or :number) in the headers.
    • - -
    • altTrue: Alternative word interpreted as boolean true. Note that this option has significance only if you use :b (or :boolean) in the headers, so the data loader has to parse the text as booleans.
    • - -
    • altFalse: Alternative word interpreted as boolean false. Note that this option has significance only if you use :b (or :boolean) in the headers.
    • - -
    • emptyValue: A string or a sequence of strings which define the values that are equal to an empty cell. For example, if this is ["-", "N/A"], then cells whose content is a minus sign or N/A will look like they were left empty. The comparison is case-sensitive. The header row is not affected by this option. - -
    • dateFormat: The pattern used for parsing date-only values. Note that this option has significance only if you use :d (or :date) in the headers.
    • - -
    • timeFormat: The pattern used for parsing time-only values. Note that this option has significance only if you use :t (or :time) in the headers.
    • - -
    • dateTimeFormat: The pattern used for parsing date-time values. Note that this option has significance only if you use :dt (or :dateTime) in the headers.
    • - -
    • normalizeHeaders: Specifies if the header names coming from the file will be normalized - or should be left as is (boolean). Normalization means: -
        -
      1. Remove the part between the first "(" and last - ")", before the header is parsed for column type - identifier (like ":n"; column type identifiers are discussed somewhere later). -
      2. After the type identifier was extracted and removed, the cell value is trimmed. (Note that this happens even if this option is off.) -
      3. Then it's converted to lower case. -
      4. Then the following characters are replaced with "_": - space, comma, semicolon, colon.
      5. Then all "__" - and "___" and so on is replaced with a single - "_". -
      - For example, "Price, old (category: A, B, F): n" will be normailzed to "price_old", and the column type identifier will be n. -
    • - -
    • headers: Use this if the CSV file has no header row, that is, if the first row doesn't store column names. The option value must be a sequence of strings. Each item in the sequence corresponds to a cell value of the imaginary (actually missing) header row, and will be parsed on the same way as a real header row would be.
    • - -
    • replaceHeaders: Use this if the CSV file does have a header row, but you don't like/trust the content of it. The rules are the same as with the header option, except of course that it replaces the existing header row.
    • -
    - -
- - -

Examples (with TDD syntax):

-
    -
  • csv(data/foo.txt) -
  • csv(data/foo.txt, {separator:tab, encoding:UTF-8}) -
  • csv(data/foo.txt, {separator:',', encoding:ISO-8859-2, headers:[name, size:n, lastModified:dt]}) -
- -

The csv data loader parses CSV (Column Separated Values) file, or other file of similar formats (as tab divided text, comma separated values), and returns it as a sequence. The sequence is the list of the table rows, and each row is a hash, where you can access the cells with the column name. The column names (headers) are stored in the first row of the CSV file (unless you use the headers option), so this row is not part of the result sequence.

- -

For example, if this is the CSV file:

- -
name;color;price
-rose;red;10
-rose;yellow;15
-tulip;white;6
-

and you load it into the variable flowers, then you can print it as:

- -
<table border=1>
-<#list flowers as flower>
-  <tr><td>${flower.name}<td>${flower.color}<td>${flower.price}
-</#list>
-</table>
-

and the output will be:

- -
<table border=1>
-  <tr><td>rose<td>red<td>10
-  <tr><td>rose<td>yellow<td>15
-  <tr><td>tulip<td>white<td>6
-</table>
-

The rows are not only hashes, but also sequences, so instead of the column name you can use the 0 based column index. Thus the above template could be written like this as well, just it is less readable:

- -
<table border=1>
-<#list flowers as flower>
-  <tr><td>${flower[0]}<td>${flower[1]}<td>${flower[2]}
-</#list>
-</table>
-

and actually then it would be simpler to write:

- -
<table border=1>
-<#list flowers as flower>
-  <tr><#list flower as cell><td>${cell}</#list>
-</#list>
-</table>
-

The values (cells) in the CSV file will be always exposed as string variables, unless you specify a different type in the header cells directly. To specify the type, type a colon after the column name, and a type identifier. The type identifier can be: n (or number) or b (or boolean) or d (or date) or t (or time) or dt (or dateTime) or s (or string). For example, if you want to expose the price column as number, and not as string (so you can do arithmetic with it, or use the number formatting facilities), then the CSV file would be:

- -
name;color;price:n
-rose;red;10
-rose;yellow;15
-tulip;white;6
-

Numerical values must use dot (.) as decimal separator, and no grouping, unless you change these with the decimalSeparator and/or groupingSeparator options.

- -

Boolean values must be one of true, yes, y, 1, false, no, n, 0, or the words defined be the altTrue and altFalse options. Upper- and lower-case letters are not distinguished.

- -

Date, time and date-time values use common SQL format with optional time zone, as "2003-06-25", "22:30:08", "2003-06-25 10:30:08 PM", "2003-06-25 10:30:08 PM GMT+02:00". But if you use option dateFormat, timeFormat, or datetimeFormat, then that format has to be used for dates, times, and date-times respectively. If the time zone is not given in a value, the value of the timeZone setting is used.

- -

The variable returned by the csv data loader is not only a sequence, but also a hash at the same time, that contains one key: headers. This is a sequence that stores the column names.

- -
<#list flowers.headers as h>
-- ${h}
-</#list>
-

will print:

- -
- name
-- color
-- price
-

Note that only the name of the column is returned, not the type identifier stuff (as :n).

- - - - - -

json

- Parameters: -
    -
  1. path: string. - The path of the JSON file. -
  2. charset: string, optional. - The charset used for reading the JSON file. Defaults to the sourceEncoding setting. -
- - - -

Examples (with TDD syntax):

-
    -
  • json(data/foo.json) -
  • json(data/foo.json, UTF-8) -
- -

This data loader parses a JSON file. The JSON file must contain a single top-level JSON value of any type, like a JSON array, or a JSON object, or a JSON string, etc. Example file content (this contains a JSON array on the top-level):

- -
[
-  {
-    "name": "Jean Test",
-    "maidenName": "Jean Test",
-    "age": 20,
-    "skills": [ "HTML", "CSS" ],
-    "testResults": { "a": 10.5, "b": 20, "c": 30 },
-    "decided": true
-  },
-  {
-    "name": "José Test",
-    "maidenName": null,
-    "age": 30,
-    "skills": [ "Ruby", "C++", "Cuda" ],
-    "testResults": { "a": 20, "b": 30, "c": 40 },
-    "decided": false
-  }
-]
-

Assuming you have loaded the above JSON into the applicants variable, you could print the name and age of all applicants, and print their skills in nested listing like this:

- -
<#list applicants as applicant>
-  ${applicant.name} (age: ${applicant.age})
-  <#list applicant.skills as skill>
-    - ${skill}
-  </#list>
-</#list>
-

That is, JSON arrays will be FTL (FreeMarker Template Language) sequences, JSON objects will be FTL hashes, JSON strings will be FTL strings, JSON numbers will be FTL numbers, JSON boolean will be FTL boolean. JSON null-s will be FTL undefined variables (Java null-s), so for applicants[1].maindenName FreeMarker would give an undefined variable error, and you need to write something like applicants[1].maindenName!'N/A' instead.

- -

The loaded JSON will also act as an FTL node tree (and advanced FreeMarker feature), similarly to an XML. This means, among others, that you can get the parent of a value. The parent of a value is its containing array or object:

- -
<#-- We just pick some skill for the example below: -->
-<#assign skill = applicants[0].skills[0]>
-<#-- Now let's say we only have the skill variable, and we don't know
-     how was it get. We can still get whose skill it was: -->
-${skill} is the skill of ${skill?parent?parent.name},
-<#-- skill?parent is the array, the parent of that is the JSON object -->
-

More details about the node nature:

-
    -
  • The ?node_type of a value will be the name of the JSON type, like "string", "array", "object", etc.
  • -
  • If a value is the right-side of a key-value pair in a JSON object, its ?node_name will be the value of the key (like "name", "age", etc.). Otherwise, it will be "unnamed" + capital node type, like "unnamedString".
  • -
  • When traversing the tree with <#visit ...>/<#recurse>, or using ?children, JSON null-s will appear as existing nodes with ?node_type "null" and no FTL type other than node (thus they are unprintable, uncomparable, unlistable, etc.).
  • -
- -

See the FreeMarker Manual for more about nodes and the related directives and built-ins!

- - - - - - -

text

- Parameters: -
    -
  1. path: string. - The path of the text file. -
  2. charset: string, optional. - The charset used for reading text file. Defaults to the sourceEncoding setting. -
- - - -

Examples (with TDD syntax):

-
    -
  • text(C:/autoexec.bat) -
  • text(C:/autoexec.bat, CP850) -
- -

This data loader loads a plain text file, and returns that as a string.

- - - - -

slicedText

- Parameters: -
    -
  1. path: string. - The path of the text file. -
  2. options: hash, optional. - The list of valid options: -
      -
    • separator: The string that slices the text file into items, that is, the string between two adjoining items. It defaults to "\n", so each line of the text will be an item. Examples: If you want the items to be separated with empty lines, then you should write "\n\n" (this is what is between two items if you imagine it). Of course in this case the items can contain single line-breaks (but not multiple consequent line breaks), not like in the default case. If you want to separate the items with a "---" that is considered as separator only if it's alone in a line (not in the middle of a line) then the separator should be "\n---\n". If you simply want to separate the items with semicolon then the separator should be ";" (in this case you certainly want to use the trim option described below). There is some "magic" involved in the handling of line-breaks: 1.: no mater if you are using UN*X, DOS/Windows or Mac line-breaks in the separator option and in the text file, they will be considered to be equal, 2.: when the text file is searched for a multi-line separator string, those evil invisible extra spaces and tabs at the end of the lines will be tolerated.
    • -
    • trim: If it's true, then each item will be trimmed individually, that is, the leading and trailing white space will be removed from them. Defaults to false.
    • -
    • dropEmptyLastItem: If it's true then the last item will be removed from the result if it's a 0 length string (after trimming, if the trim option is true). Defaults to true, so if the text file ends with a separator or the text file is empty, you will not get a needless empty item.
    • -
    • encoding: The charset used for reading text file. Defaults to the value of the sourceEncoding setting.
    • -
    - -
- - -

Examples (with TDD syntax):

-
    -
  • slicedText(data/foo.txt)
  • -
  • slicedText(data/foo.txt, {separator:\n---\n, encoding:UTF-8})
  • -
  • slicedText(data/foo.txt, {separator:';', trim})
  • -
- -

This data loader loads a text file and slices it to items (strings) by cutting out all occurences of the separator string specified with the separator option. The result is a sequence of strings.

- -

For example, if this is the data/stuff.txt file:

-
This is the first item.
-
-Still the first item...
-
---8<--
-
-The items are separated with this:
---8<--
-just don't forget to surround it with
-empty lines.
-
---8<--
-
-This is the last item.
-

and it's loaded in the configuration file like: - -

data: {
-    stuff: slicedText(data/stuff.txt, {separator:"\n\n--8<--\n\n"})
-}
-

then the output of this template file

- -
<#escape x as x?html>
-
-<#list stuff as i>
-<pre>
-${i}
-</pre>
-</#list>
-
-</#escape>
-

will be this:

- -
-<pre>
-This is the first item.
-
-Still the first item...
-</pre>
-<pre>
-The items are separated with this:
---8&lt;--
-just don't forget to surround it with
-empty lines.
-</pre>
-<pre>
-This is the last item.
-</pre>
-
-

Note the double \n-s in the separator that causes the data loader to treat "–8<--" as separator only if it is surrounded with empty lines.

- - - - - -

tdd

- Parameters: -
    -
  1. path: string. - The path of the TDD file. -
  2. charset: string, optional. - The charset used for reading TDD file. Defaults to the sourceEncoding setting. -
- - - -

Examples (with TDD syntax):

-
    -
  • tdd(data/foo.tdd) -
  • tdd(data/foo.tdd, ISO-8859-5) -
- -

This data loader parses a TDD file. The loaded TDD is interpreted in hash mode, and TDD functions will invoke data loaders, exactly like with the data setting.

- -

See <FMPP>/docs/examples/tdd for a concrete example.

- - - - - -

tddSequence

- Parameters: -
    -
  1. path: string. - The path of the TDD file. -
  2. charset: string, optional. - The charset used for reading TDD file. Defaults to the sourceEncoding setting. -
- - - -

This is like the tdd dataloader, except that it interprets the file as a TDD sequence (TDD "sequence mode"), rather than as a TDD hash. So the result will be a sequence (a list), not a hash.

- - - - -

properties

- Parameters: -
    -
  1. path: string. - The path of the "properties" file. -
- - -

Loads a "properties" file. The result is a hash.

- - - - - -

xml

- Parameters: -
    -
  1. path: string. - The path of the XML file. -
  2. options: hash, optional. - Options. See later... -
- - - -

Note: Sometimes XML files are rather source files (as the HTML-s and the JPG in the Quick Tour) than data files (as data/birds.tdd in the Quick Tour), just you need to invoke a template to render them to their final form (e.g. to HTML pages). If this is the case, you should use renderXml processing mode (see here...), not XML data loader. An example that uses this approach is <FMPP>/docs/examples/xml_rendering.

- -

Loads an XML file. This uses the built-in XML wrapper of FreeMarker 2.3 and later; please read FreeMarker Manual/XML Processing Guide for more information about the usage of the returned variable.

- -

Notes:

-
    -
  • Comment nodes will be removed by default (see option removeComments below). -
  • Processing instruction well be keep by default (see option removePIs below). -
  • CDATA sections count as plain text nodes. -
  • There are no adjacent text nodes in the node tree; adjacent text nodes will be joined. -
- -

The example <FMPP>/docs/examples/xml_try is a good tool to understand this data loader and its options.

- -

Options:

-
    -
  • removeComments: Optional, defaults to true: Specifies if XML comment nodes will be removed from the node tree. - -
  • removePIs: Optional, defaults to false: Specifies if XML processing instruction nodes will be removed from the node tree. - -
  • validate: Optional, defaults to the value of the validateXml setting: Specifies if the XML file should be validated (checked agains the DTD). If it's true, and the XML is not valid, then the data loading fails. - -
  • namespaceAware: Optional, defaults to true: Specifies if the XML parsing should be XML name-space aware or not. If the parsing is not name-space aware, colons in element and attribute names will not be considered as name-space prefix delimiters, so the "local name" of the node will contain the colon and the name-space prefix before that. - -
  • xincludeAware: Optional, defaults to false: Basically, it specifies whether the XML parsing should replace the XInclude-s with the included content. For most practical purposes you should set it to true (but due to backward-compatibility issues it defaults to false). Note that for setting this successfully to true you need at least Java 5. - -
  • xmlns: Optional. This is a hash that maps prefixes to XML name-space URI-s. The prefixes can be used in the other options. This option has no impact outside the XML data loader invocation, so the prefixes will not be available in the templates. The XML name-space for prefixless elements (with other words, the default name-space) is "no name-space" initially, but it can be changed by assigning name-space URI to the reserved prefix D (similar as if you use xmlns="..." in an XML document). - -
  • index: Adds attributes to element nodes, that can be helpful when later you process the XML with the templates. We say on this, that you index the elements. Well, it's hard to explain... :) Look at the output of example <FMPP>/docs/examples/xml_try; the id attributes were added by this option, they are not present in the XML file. Also you can easily try other aspects of indexing with that example. The value of this option is a hash that contains the indexing options, or a sequence of hashes if you want to do more indexing successively. The hash accepts these subvariables (sub-options): - -
      -
    • element: Required. The name of the XML element or elements to index. If this is a string, then it selects a single element only. If this is a sequence, then it must be the sequence of element names that it selects. To use name-space prefixes, see option xmlns. - -
    • attribute: Optional, defaults to id. This is the name of the XML attribute that will be added to the indexed elements (the indexed elements are the elements selected by the sub-option element). If the element has this attribute already, then the original value of the attribute will be kept. To use name-space prefixes, see option xmlns. - -
    • numbering: Optional, defaults to sequential: The rule for the numbering of the indexed elements. The number is used in the attribute values; see option value. This must be one of the following strings: -
        -
      • sequential: The number for the first indexed element is 1, for the second indexed element is 2, etc. The element numbering is done in the "document order", that is, in the order in which the first character of the XML representation of each node occurs (after expansion of general entities). -
      • hierarchical: Similar to sequential numbering, but, for example, if we have an indexed element that got number 2, then indexed elements nested into this element will get numbers 2_1, 2_2, 2_3, etc. The indexed elements that are nested into the element numbered as 2_1, will get numbers 2_1_1, 2_1_2, 2_1_3, etc. For example, look at the output file names in <FMPP>/docs/examples/xml_rendering; they are generated with the hierarchical indexing of the part and chapter elements. Or use <FMPP>/docs/examples/xml_try to try it. -
      - -
    • value: Optional, defaults to 'ppi_%n': A string that describes the format of index values. All character will go directly into the value, except that % is used for place holders. The valid place holders are: -
        -
      • '%n': This will be replaced with the value generated based on the value of option numbering. -
      • '%e': This will be replaced with the name (local, prefixless name) of the element -
      • '%%': This will be replaced with a single %. -
      -
    -
- - - - - -

eval

- Parameters: -
    -
  1. expression: string. - Expression in BeansShell language. -
  2. variables: hash, optional. - Values that will be visible for the expression as variables. -
- - - -

Evaluates a BeanShell expression, or runs a more complex BeanShell script and uses its return-ed value.

-

You can use the predefined variable engine to access the current FMPP engine instance.

- -

Examples (with TDD syntax):

-
    -
  • eval('System.getProperties()') -
  • eval('fmpp.Engine.getVersionNumber()') -
  • eval('
    -     f = engine.getSourceRoot().getParentFile();
    -     if (f == null) {
    -         return new String[]{};
    -     } else {
    -         return f.list();
    -     }
    - ')
    -
  • In a configuration file:
    - width: 100 -
    height: 50 -
    area: eval('a * b', {a:get(width), b:get(height)})
    -
- - - - - -

htmlUtils

- Parameters: - none
-

The returned hash contains custom directives that help HTML template development.

- -

Currently it contains only 1 directive: img. This is used as HTML img element, but the width and height attributes are calculated automatically (unless these attributes are specified in the template). Also, the processing will stop with error, if the image file pointed by the src attribute is missing.

- -

Example: If you have loaded the hash into the html variable, then you can do this in a template:

- -
<@html.img src="falcon.png" alt="Falcon" />
-

and the output will be something like this (depending on the concrete dimensions of the image):

- -
<img src="falcon.png" alt="Falcon" width="80" height="120">
-

See also the example in <FMPP>/docs/examples/img_dims.

- -

Directive img accepts any extra parameters (attributes). The extra parameters will be printed as the attributes of the HTML img element. - - - - - - -

xhtmlUtils

- Parameters: - none
- -

This is the same as htmlUtils, but it is for XHTML output.

- - - - - - -

now

- Parameters: -
    -
  1. options: hash, optional. - The supported options are: -
      -
    • locale: The locale (language) used for displaying the date. It defaults to the "locale" setting of the FMPP engine. The value of the option is a usual java locale strings, such as en_GB, fr, ar_SA, ...etc. To see the complete list of locale codes, call the command line FMPP tool:
      fmpp --print-locales -
    • date: The format of the date (year, month, day) part of the date: short, medium, long, default. The exact meaning of these formats are locale dependent, and it is defined by the Java platform implementation. You can't use this option together with the pattern option. -
    • time: The format of the time (hour, minute, second, millisecond) part of the date: short, medium, long, default. The exact meaning of these formats are locale dependent, and it is defined by the Java platform implementation. You can't use this option together with the pattern option. -
    • pattern: A pattern that specifies the formatting of the date. -
    • zone: The time zone you would like to use ford displaying the date. Defaults to the "time zone" FMPP engine setting. The zone is given with a string, for example: GMT, GMT+02, GMT-02 or GMT+02:30. -
    - -
- -

Note: FreeMarker now has a .now variable, so you don't need this data loader any more. You can print the current date and time with ${.now} (or ${.now?date} or ${.now?time}), and the format and zone is specified by the global datetimeFormat (or dateFormat or timeFormat) and timeZone FMPP settings.

- -

Examples (with TDD syntax): -

    -
  • now() -
  • now({pattern:"EEEE, MMMM dd, yyyy, hh:mm:ss a '('zzz')'"}) -
    This will print something like: Tuesday, April 08, 2003, 09:24:44 PM (GMT+02) -
  • now({date:short, time:short, zone:GMT}) -
- -

This data loader loads the current date and time from the system clock, and produces a string from it. Since FreeMarker has introduced native date/time value support, it is maybe better to use pp.sessionStart or pp.now instead of this data loader.

- - - - -

get

- Parameters: -
    -
  1. varName: string. - The name of the variable. -
  2. subVarName: string, optional. - The name of the sub-variable. -
  3. subSubVarName: string, optional. - ...etc. You can specify any number of parameters. -
- - - - -

This data loader returns the value of a variable that was already put into the data hash. For example:

- -
data: {
-    a: 123
-    b: get(a)
-}
-

Here the value of b will be the same as the value of a, which is 123. You can retrieve the value of subvariables with additional parameters:

- -
data: {
-    a: {
-        x: 123
-        y: {
-            q:234
-        }
-    }
-    b: get(a, x)
-    c: get(a, y, q)
-}
-

Here b will be 123, c will be 234.

- -

The get data loader was introduced so that data loaders can get the values loaded by other data loaders previously. For example:

- -
data: {
-    doc: xml(data/foo.xml)
-    index: com.example.MyIndexBuilderDataLoader(get(doc))
-}
-

The get data loader sees the variables that were already put into the hash in the same enclosing data/localData hash TDD expression where it is called, but it doesn't see values that are put into the data model elsewhere, as in other (inherited or inheriting) configuration files. However, if you use get in the localData setting, it will also see the session level data (see data).

- - - - - -

antProperty

- Parameters: -
    -
  1. properyName: string. - The name of the Ant property. -
  2. defaultValue: any, optional. - The value returned if the Ant property does not exist. -
- - - -

This data loader returns the value of an Ant property. If no Ant property with the given name exists, it will return nothing (i.e. will not add new variable to the shared data model), or it will return the value of the second parameter if you use that. - -

The values of Ant properties are strings. But sometimes you want to see a property as numerical variable, or as boolean variable, etc. If the property name you give as data loader parameter ends with ?n, then the string will be converted to number variable, and the ?n itself will not count as the part of the actual property name. The complete list of postfixes:

-
    -
  • ?n: Convert to number. The string value must follow Java language number format, that is, the decimal separator is always dot (.).
  • -
  • ?b: Convert to boolean. Valid values are: true, false, yes, no, y, n, 0, 1. Upper- and lowercase letters are considered as equivalent.
  • -
  • ?d: Convert to date. Use common SQL format with optional time zone, as "2003-06-25 GMT". If the time zone is omitted, the value of the timeZone setting is used.
  • -
  • ?t: Convert to time. Use common SQL format with optional time zone, as "22:05:30 GMT-02:00". The usage of AM/PM is also supported, e.g. "10:05:30 PM". If the time zone is omitted, then the value of the timeZone setting is used.
  • -
  • ?dt: Convert to date-time. The date and time format is the same as with ?d and ?t, e.g. "2003-06-25 10:05:30 PM GMT".
  • -
  • ?s: Keep the property as string. This can be useful if the actual property name ends with a prefix, so you must protect it against misinterpretation: foo?t?s.
  • -
- -

To see a concrete example, look at <FMPP>/docs/examples/ant2.

- -

This data loader will work only if you execute FMPP as Ant task.

- - - - - -

antProperites

- Parameters: -
    -
  1. properyName1: string, optional. - The name of an Ant property to expose. -
  2. properyName2: string, optional. - The name of another Ant property to expose. -
  3. properyNameN: string, optional. - ...etc. You can specify any number of Ant parameters. -
- - - - -

Returns the set of all Ant properties, or the set of selected ant properties, as a hash. - -

If you use this data loader without parameters, then it returns the hash of all Ant properties. To see a concrete example, look at <FMPP>/docs/examples/ant.

- -

You can also give the name of properties to expose as parameters. For example if you want to put only the Ant properties foo and bar into the shared data model, then you write: antProperties(foo, bar). Parameters that refer to not existing Ant properties will be silently ignored. The same postfixes (as ?n) are supported as with antProperty.

- -

To see a concrete example, look at <FMPP>/docs/examples/ant2.

- -

This data loader will work only if you execute FMPP as Ant task.

- - - - - -

antProject

- Parameters: - none
-

Returns the current Ant project object (org.apache.tools.ant.Project). See the example in <FMPP>/docs/examples/ant.

-

This data loader will work only if you execute FMPP as Ant task.

- - - - - -

antTask

- Parameters: - none
-

Returns the current Ant task object (org.apache.tools.ant.Task). See the example in <FMPP>/docs/examples/ant.

-

This data loader will work only if you execute FMPP as Ant task.

- - - - - -

Custom data loaders

- -

If you want to write custom data loader, you have to write a Java class that implements the fmpp.tdd.DataLoader interface (see in the API documentation). Then, if the class is available in the class path, or if you drop its jar into the lib directory of the FMPP installation, you can call it similarly as a predefined data loader, just you use the full-qualified class name as the data loader name. For example:
com.example.fmpp.SQLDataLoader("SELECT * FROM products").

- -

If you have written a data loader that can be useful for other FMPP users, I will be happy to make it available on the FMPP home page for download. So if you want to contribute with your data loader, drop me a mail (ddekanyREMOVETHIS@freemail.hu (delete the "REMOVETHIS"!)) or write to the mailing list. Thank you!

- - - -
-
-
-
- - - \ No newline at end of file diff --git a/fmpp/docs/details.html b/fmpp/docs/details.html deleted file mode 100644 index 7bdec76..0000000 --- a/fmpp/docs/details.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - -Core Details - FMPP - - - - - - - - - - - - - - - -
-

Core Details

- -
-
-

Chapter Contents

- -
- -
-
-
-
- - - \ No newline at end of file diff --git a/fmpp/docs/examples/README.txt b/fmpp/docs/examples/README.txt deleted file mode 100644 index e36930f..0000000 --- a/fmpp/docs/examples/README.txt +++ /dev/null @@ -1,95 +0,0 @@ -FMPP Examples -============= - -How to try them ---------------- - -To run the examples, the command-line FMPP tool must be installed (see -the FMPP Manual). Then, go to the directory of the example, and simply -issue the fmpp command there. Or, you can run the example without -entering into its directory with: fmpp -C the/example/directory - -The above does not apply for the Ant examples (their name starts with -"ant"). To run those, FMPP must be installed for Ant (see the FMPP -Manual). Then, go to the directory of the example, and simply issue the -ant command there. Or, you can run the example without -entering into its directory with: ant -f the/example/directory/build.xml - -The output will be created in the out subdirectory of the example. - -The build.xml in this directory: if you run it with Ant, it will run all -examples. In this case, the command-line FMPP tool need not be -installed. - - -List of examples ----------------- - -qtour_step... The examples used in the Manual/Quick Tour chapter. - 1 - The idea of bulk processing - 2 - Data loading basics. Interpolations. - 3 - Data loading from multiple sources. Directives. - 4 - Multiple output files from single source file - -capture Generates Table of Contents on the top of the page - based on the headers used further down, using - block assignments to resolve the x-dependency. - -border Uses headers and footers to automate including, - interpolation escaping, and to convert *.c files - to HTML files. - -session Demonstrates session variables and turns with the - generation of an index page that contains links to - the other generated pages. - -img_dims Shows HTML with calculated image dimensions. - -csv Detects the columns of a CSV file. - Uses typed columns (numerical colum, boolean column). - -check_links Uses a macro instead of HTML that sends - warning if the link is broken. - -tdd Loads data model from a tdd file. - -xml XML data loader basics. - If you use earlier J2SE version than 1.4, the you have - to install some JAXP 1.2+ implementation. Say, Crimson. - -xml2 Product catalog that uses two related XML-s as data source. - FreeMarker requires XPath support for this example; see the - FMPP Manual/Installing for more information about XPath - availability. - -xml_try You can play with xml data loader options here, and examine - XML wrapping in general: It displays the resulting node - tree. - -xml_validating Demonstrates the usage of OASIS catalogs (public ID - resolution), validation, and the usage of XML name spaces - through the processing of an XHTML document. - -xml_rendering Renders XML source files to HTML-s, using "renderXml" - processing mode. Also demonstrates features as indexing, - declarative XML processing, XPath expressions. - -eval Demonstrates eval (BeanShell) data loader. - -inherit_config Demonstrates the usage of configuration inheritance. - -local_data Demonstrates the usage of the localData setting. - -ant Uses FMPP as Ant task: Basics. - You can't use the command-line tool here. - -ant2 Uses FMPP as Ant task: More property data loaders. - You can't use the command-line tool here. - -ant3 Uses FMPP as Ant task: Executes qtour_step4 with - changed text color. - -multipage_list Lists a sequence on multiple pages, like a Google search - result. Demonstrates the usage of BeanShell calculated local - data to prevent template overcomplication. Kinf of MVC style - separation. \ No newline at end of file diff --git a/fmpp/docs/examples/ant/build.xml b/fmpp/docs/examples/ant/build.xml deleted file mode 100644 index 9bf9c8a..0000000 --- a/fmpp/docs/examples/ant/build.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/ant/src/test.txt b/fmpp/docs/examples/ant/src/test.txt deleted file mode 100644 index b15806d..0000000 --- a/fmpp/docs/examples/ant/src/test.txt +++ /dev/null @@ -1,5 +0,0 @@ -Hello property: ${hello} -Basedir property: ${basedir} -Project name: ${proj.name} -Target name: ${task.target.name} -${true} \ No newline at end of file diff --git a/fmpp/docs/examples/ant2/build.xml b/fmpp/docs/examples/ant2/build.xml deleted file mode 100644 index d184e7c..0000000 --- a/fmpp/docs/examples/ant2/build.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - antProperties(p1, p2, x?n, test?b, time?t, thisWillBeIgnored) - wombat1: antProperty(p3) - wombat2: antProperty(p4) - wombat3: antProperty(p4, 'P4?') - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/ant2/src/test.txt b/fmpp/docs/examples/ant2/src/test.txt deleted file mode 100644 index 90bf9da..0000000 --- a/fmpp/docs/examples/ant2/src/test.txt +++ /dev/null @@ -1,10 +0,0 @@ -p1: ${p1!"not found"} -p2: ${p2!"not found"} -p3: ${p3!"not found"} -wombat1: ${wombat1!"not found"} -wombat2: ${wombat2!"not found"} -wombat3: ${wombat3!"not found"} - -x + 1: ${x + 1} -<#if test>It's a test.<#else>It's not a test. -time: ${time} \ No newline at end of file diff --git a/fmpp/docs/examples/ant3/build.xml b/fmpp/docs/examples/ant3/build.xml deleted file mode 100644 index dc1998b..0000000 --- a/fmpp/docs/examples/ant3/build.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/border/config.fmpp b/fmpp/docs/examples/border/config.fmpp deleted file mode 100644 index c657f57..0000000 --- a/fmpp/docs/examples/border/config.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -borders: [ - border( - "<#include '/include/test.ftl'><#escape x as x?html>" - "" - *.html - ) - border( - "<@pp.renameOutputFile name=pp.outputFileName+'.html'/>
<@html_escape><#noparse>"
-        "
" - *.c - ) -] \ No newline at end of file diff --git a/fmpp/docs/examples/border/src/include/ignoredir.fmpp b/fmpp/docs/examples/border/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/border/src/include/test.ftl b/fmpp/docs/examples/border/src/include/test.ftl deleted file mode 100644 index bb86337..0000000 --- a/fmpp/docs/examples/border/src/include/test.ftl +++ /dev/null @@ -1 +0,0 @@ -<#assign test = "Hello"> \ No newline at end of file diff --git a/fmpp/docs/examples/border/src/test.c b/fmpp/docs/examples/border/src/test.c deleted file mode 100644 index dd6d393..0000000 --- a/fmpp/docs/examples/border/src/test.c +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include "futil_i.h" - -zxz_ec_t -zxz_f_child_path_can_match(zxz_bool_t *pbMatches, - const char *sPath, const char *sPattern) -{ - zxz_ec_t ec; - int i; - char *sNew = NULL; - - i = strlen(sPath); - if (i != 0 && sPath[i-1] != ZXZ_CFGM_PATH_SEPARATOR_CHR - && sPath[i-1] != ZXZ_CFGM_PATH_SEPARATOR2_CHR) { - sNew = malloc(i+2); /* <-- +sNew */ - strcpy(sNew, sPath); - sNew[i] = ZXZ_CFGM_PATH_SEPARATOR_CHR; - sNew[i+1] = '\0'; - sPath = sNew; - } - ec = zxz_f_path_matches_ex(pbMatches, sPath, sPattern, FALSE, 1); - free(sNew); /* <-- -sNew */ - return ec; -} diff --git a/fmpp/docs/examples/border/src/test.html b/fmpp/docs/examples/border/src/test.html deleted file mode 100644 index 975bb9f..0000000 --- a/fmpp/docs/examples/border/src/test.html +++ /dev/null @@ -1,3 +0,0 @@ -${test} -

${"a < b & c"} -

A C program \ No newline at end of file diff --git a/fmpp/docs/examples/build.xml b/fmpp/docs/examples/build.xml deleted file mode 100644 index 5d7bfa2..0000000 --- a/fmpp/docs/examples/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/capture/config.fmpp b/fmpp/docs/examples/capture/config.fmpp deleted file mode 100644 index 925102e..0000000 --- a/fmpp/docs/examples/capture/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp \ No newline at end of file diff --git a/fmpp/docs/examples/capture/src/include/ignoredir.fmpp b/fmpp/docs/examples/capture/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/capture/src/include/page.ftl b/fmpp/docs/examples/capture/src/include/page.ftl deleted file mode 100644 index 87c7d11..0000000 --- a/fmpp/docs/examples/capture/src/include/page.ftl +++ /dev/null @@ -1,24 +0,0 @@ -<#assign h1Counter = 0> -<#assign contents = pp.newWritableSequence()> - -<#macro h1> - <#local title><#nested> - <#assign h1Counter = h1Counter + 1> - <@pp.add seq=contents value={"anchor":h1Counter, "title":title} /> - -

${title}

- - -<#macro page> - <#local output> - <#nested> - - Contents: - -
- ${output} - \ No newline at end of file diff --git a/fmpp/docs/examples/capture/src/test.html b/fmpp/docs/examples/capture/src/test.html deleted file mode 100644 index af44b9d..0000000 --- a/fmpp/docs/examples/capture/src/test.html +++ /dev/null @@ -1,100 +0,0 @@ -<#include "/include/page.ftl"> -<@page> - -<@h1>Foo - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -<@h1>Bar - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -<@h1>Baaz - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - - \ No newline at end of file diff --git a/fmpp/docs/examples/check_links/config.fmpp b/fmpp/docs/examples/check_links/config.fmpp deleted file mode 100644 index 925102e..0000000 --- a/fmpp/docs/examples/check_links/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp \ No newline at end of file diff --git a/fmpp/docs/examples/check_links/src/good_target.html b/fmpp/docs/examples/check_links/src/good_target.html deleted file mode 100644 index 2f9031f..0000000 --- a/fmpp/docs/examples/check_links/src/good_target.html +++ /dev/null @@ -1 +0,0 @@ -Hi! \ No newline at end of file diff --git a/fmpp/docs/examples/check_links/src/include/a.ftl b/fmpp/docs/examples/check_links/src/include/a.ftl deleted file mode 100644 index 2a07d93..0000000 --- a/fmpp/docs/examples/check_links/src/include/a.ftl +++ /dev/null @@ -1,13 +0,0 @@ -<#macro a href> - <#-- remove anchor link ending --> - <#local x = href?index_of('#')> - <#if x != -1> - <#local href = href?substring(0, x)> - - <#-- check existence --> - <#if !pp.sourceFileExists(href)> - <@pp.warning message="Broken link in " + pp.sourceFile + ": " + href /> - - <#-- print HTML --> - <#nested><#t> - \ No newline at end of file diff --git a/fmpp/docs/examples/check_links/src/include/ignoredir.fmpp b/fmpp/docs/examples/check_links/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/check_links/src/index.html b/fmpp/docs/examples/check_links/src/index.html deleted file mode 100644 index 7fafe7f..0000000 --- a/fmpp/docs/examples/check_links/src/index.html +++ /dev/null @@ -1,3 +0,0 @@ -<#include "/include/a.ftl"> -

<@a href="good_target.html">Working link -

<@a href="bad_target.html">Broken link \ No newline at end of file diff --git a/fmpp/docs/examples/csv/config.fmpp b/fmpp/docs/examples/csv/config.fmpp deleted file mode 100644 index 94e53b0..0000000 --- a/fmpp/docs/examples/csv/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: {csv: csv(data/test.csv)} \ No newline at end of file diff --git a/fmpp/docs/examples/csv/src/data/ignoredir.fmpp b/fmpp/docs/examples/csv/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/csv/src/data/test.csv b/fmpp/docs/examples/csv/src/data/test.csv deleted file mode 100644 index a17bb9e..0000000 --- a/fmpp/docs/examples/csv/src/data/test.csv +++ /dev/null @@ -1,5 +0,0 @@ -name;protected:b;price:n;entered:dt -arctic-tern;yes;10000;2003-01-25 03:10:06 -house-sparrow;no;50;2003-02-15 01:20:30 PM -hoachim;yes;; -sakeret;yes;200000;2002-12-18 20:45:00 \ No newline at end of file diff --git a/fmpp/docs/examples/csv/src/test.html b/fmpp/docs/examples/csv/src/test.html deleted file mode 100644 index bfe6d97..0000000 --- a/fmpp/docs/examples/csv/src/test.html +++ /dev/null @@ -1,8 +0,0 @@ -<#setting number_format=",##0.00"> -<#setting datetime_format="MMM dd, yyyy hh:mm:ss a"> - - <#list csv.headers as h><#list csv.headers as h>
${h} -<#list csv as row> -
${(row[h]!"N/A")?string} - -
\ No newline at end of file diff --git a/fmpp/docs/examples/eval/config.fmpp b/fmpp/docs/examples/eval/config.fmpp deleted file mode 100644 index 122ca80..0000000 --- a/fmpp/docs/examples/eval/config.fmpp +++ /dev/null @@ -1,7 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - props: eval('System.getProperties()') - exampleDir: eval('engine.getSourceRoot().getParentFile().getParentFile().list()') -} \ No newline at end of file diff --git a/fmpp/docs/examples/eval/src/test.html b/fmpp/docs/examples/eval/src/test.html deleted file mode 100644 index defa5ae..0000000 --- a/fmpp/docs/examples/eval/src/test.html +++ /dev/null @@ -1,17 +0,0 @@ -<#escape x as x?html> - -

System properties: -

    -<#list props?keys?sort as k> -
  • ${k} = ${props[k]} - -
- -

Example dir: -

    -<#list exampleDir?sort as f> -
  • ${f} - -
- - \ No newline at end of file diff --git a/fmpp/docs/examples/ignoredir.fmpp b/fmpp/docs/examples/ignoredir.fmpp deleted file mode 100644 index 7562186..0000000 --- a/fmpp/docs/examples/ignoredir.fmpp +++ /dev/null @@ -1 +0,0 @@ -Not copied as part of the FMPP documentation generation. \ No newline at end of file diff --git a/fmpp/docs/examples/img_dims/config.fmpp b/fmpp/docs/examples/img_dims/config.fmpp deleted file mode 100644 index 8bb1c12..0000000 --- a/fmpp/docs/examples/img_dims/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: {h:htmlUtils()} \ No newline at end of file diff --git a/fmpp/docs/examples/img_dims/src/falcon.png b/fmpp/docs/examples/img_dims/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/docs/examples/img_dims/src/falcon.png and /dev/null differ diff --git a/fmpp/docs/examples/img_dims/src/index.html b/fmpp/docs/examples/img_dims/src/index.html deleted file mode 100644 index dc24945..0000000 --- a/fmpp/docs/examples/img_dims/src/index.html +++ /dev/null @@ -1,12 +0,0 @@ -

All calcualted: -<@h.img src="falcon.png" alt="Falcon" /> - -

Width calculated: -<@h.img src="falcon.png" alt="Falcon" height=20/> - - -

Height calculated: -<@h.img src="falcon.png" alt="Falcon" width=20/> - -

Nothing calculated: -<@h.img src="falcon.png" alt="Falcon" height="20" width="20"/> diff --git a/fmpp/docs/examples/inherit_config/README.txt b/fmpp/docs/examples/inherit_config/README.txt deleted file mode 100644 index 605ed9d..0000000 --- a/fmpp/docs/examples/inherit_config/README.txt +++ /dev/null @@ -1,14 +0,0 @@ -This example shows how to "customize" another configuration file, that -is, how to make configuration variations without actually editing or -copy/pasting the common configuration file. - -In this example, config_red.fmpp and config_dark.fmpp executes a -slightly modified version of config.fmpp. To try them type: - - fmpp -C config_red.fmpp - -and - - fmpp -C config_dark.fmpp - -respectively. \ No newline at end of file diff --git a/fmpp/docs/examples/inherit_config/config.fmpp b/fmpp/docs/examples/inherit_config/config.fmpp deleted file mode 100644 index 6830455..0000000 --- a/fmpp/docs/examples/inherit_config/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: {backgroundColor:#C0C0FF, textColor:blue} \ No newline at end of file diff --git a/fmpp/docs/examples/inherit_config/config_dark.fmpp b/fmpp/docs/examples/inherit_config/config_dark.fmpp deleted file mode 100644 index 00fbceb..0000000 --- a/fmpp/docs/examples/inherit_config/config_dark.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -inheritConfiguration: config.fmpp -data: {backgroundColor:black} \ No newline at end of file diff --git a/fmpp/docs/examples/inherit_config/config_red.fmpp b/fmpp/docs/examples/inherit_config/config_red.fmpp deleted file mode 100644 index 8842538..0000000 --- a/fmpp/docs/examples/inherit_config/config_red.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -inheritConfiguration: config.fmpp -data: {textColor:red} \ No newline at end of file diff --git a/fmpp/docs/examples/inherit_config/src/index.html b/fmpp/docs/examples/inherit_config/src/index.html deleted file mode 100644 index 9205087..0000000 --- a/fmpp/docs/examples/inherit_config/src/index.html +++ /dev/null @@ -1,3 +0,0 @@ - -

Test. - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/config.fmpp b/fmpp/docs/examples/local_data/config.fmpp deleted file mode 100644 index 638d145..0000000 --- a/fmpp/docs/examples/local_data/config.fmpp +++ /dev/null @@ -1,29 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp - -modes: ignore(**/*.bsh) - -data: { - bgColor: green - author: Anonymous -} - -localData: [ - # Run the attached BeanShell script for HTML-s, if there is one available. - case(**/*.htm, **/*.html, bsh({ignoreMissing})) - - # Independently of the above, - # set "bgColor" to "yellow" when processing the files of the "sub" folder: - # except for the files in "sun/sky/**", where use "blue". - # But, never override the "bgColor" if the file name starts with "foo" - layer() - case(**/foo*, {}) - case(sub/sky/**, {bgColor: blue}) - case(sub/**, sub2/**, {bgColor: yellow}) - - # Independently of all above, set the "author"... - layer() - case(**/*_j.*, {author: Joe}) - case(**/*_a.*, {author: Amy}) -] \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/index.html b/fmpp/docs/examples/local_data/src/index.html deleted file mode 100644 index 05f62c1..0000000 --- a/fmpp/docs/examples/local_data/src/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - -

Test

-

Other pages: -

- -

Here it is the config file used: -
-
${pp.loadData('text', '../config.fmpp')?html}
-
- - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/1.html b/fmpp/docs/examples/local_data/src/sub/1.html deleted file mode 100644 index 32f023d..0000000 --- a/fmpp/docs/examples/local_data/src/sub/1.html +++ /dev/null @@ -1,8 +0,0 @@ - - -

1

-

Author: ${author} -

x: ${x} -

y: ${y} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/1.html.bsh b/fmpp/docs/examples/local_data/src/sub/1.html.bsh deleted file mode 100644 index 14c8e0f..0000000 --- a/fmpp/docs/examples/local_data/src/sub/1.html.bsh +++ /dev/null @@ -1,4 +0,0 @@ -res = new HashMap(); -res.put("x", "Just for test: " + templateEnvironment.getData("author")); -res.put("y", "Blah for 1..."); -return res; \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/2.html b/fmpp/docs/examples/local_data/src/sub/2.html deleted file mode 100644 index cd7fba9..0000000 --- a/fmpp/docs/examples/local_data/src/sub/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

2

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/3_j.html b/fmpp/docs/examples/local_data/src/sub/3_j.html deleted file mode 100644 index b89c36c..0000000 --- a/fmpp/docs/examples/local_data/src/sub/3_j.html +++ /dev/null @@ -1,8 +0,0 @@ - - -

3_j

-

Author: ${author} -

x: ${x} -

y: ${y} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/3_j.html.bsh b/fmpp/docs/examples/local_data/src/sub/3_j.html.bsh deleted file mode 100644 index cb052d2..0000000 --- a/fmpp/docs/examples/local_data/src/sub/3_j.html.bsh +++ /dev/null @@ -1,4 +0,0 @@ -res = new HashMap(); -res.put("x", "Just for test: " + templateEnvironment.getData("author")); -res.put("y", "Blah for 3_j..."); -return res; \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/food.html b/fmpp/docs/examples/local_data/src/sub/food.html deleted file mode 100644 index e817607..0000000 --- a/fmpp/docs/examples/local_data/src/sub/food.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

Food

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/sky/1.html b/fmpp/docs/examples/local_data/src/sub/sky/1.html deleted file mode 100644 index 960b8d4..0000000 --- a/fmpp/docs/examples/local_data/src/sub/sky/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

1

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/sky/2.html b/fmpp/docs/examples/local_data/src/sub/sky/2.html deleted file mode 100644 index cd7fba9..0000000 --- a/fmpp/docs/examples/local_data/src/sub/sky/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

2

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/sky/3_a.html b/fmpp/docs/examples/local_data/src/sub/sky/3_a.html deleted file mode 100644 index 6734b3f..0000000 --- a/fmpp/docs/examples/local_data/src/sub/sky/3_a.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

3_a

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/subsub/1.html b/fmpp/docs/examples/local_data/src/sub/subsub/1.html deleted file mode 100644 index 960b8d4..0000000 --- a/fmpp/docs/examples/local_data/src/sub/subsub/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

1

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub/subsub/2.html b/fmpp/docs/examples/local_data/src/sub/subsub/2.html deleted file mode 100644 index cd7fba9..0000000 --- a/fmpp/docs/examples/local_data/src/sub/subsub/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

2

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub2/1.html b/fmpp/docs/examples/local_data/src/sub2/1.html deleted file mode 100644 index 960b8d4..0000000 --- a/fmpp/docs/examples/local_data/src/sub2/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

1

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/local_data/src/sub2/2.html b/fmpp/docs/examples/local_data/src/sub2/2.html deleted file mode 100644 index cd7fba9..0000000 --- a/fmpp/docs/examples/local_data/src/sub2/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

2

-

Author: ${author} - - \ No newline at end of file diff --git a/fmpp/docs/examples/multipage_list/config.fmpp b/fmpp/docs/examples/multipage_list/config.fmpp deleted file mode 100644 index ea19e9d..0000000 --- a/fmpp/docs/examples/multipage_list/config.fmpp +++ /dev/null @@ -1,35 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - foos: [ - {name:"qweqwe", url:"http://qweqwe.com"} - {name:"asdasd", url:"http://asdasd.com"} - {name:"cvbcvbcv", url:"http://cvbcvbcvb.com"} - {name:"iopiopi", url:"http://iopiopo.com"} - {name:"bmbnmbm", url:"http://bnmnbmb.com"} - {name:"uiouioui", url:"http://uiouiouio.com"} - {name:"bvnbvnbv", url:"http://bvnbvnbvnbv.com"} - {name:"hghjghjghjg", url:"http://hghjghjghjg.com"} - {name:"werwer", url:"http://werwerr.com"} - {name:"mnmbnbm", url:"http://mbnmbnmb.com"} - {name:"gfhfghgfgfh", url:"http://fghgfhgfhg.com"} - {name:"asdasas", url:"http://asdasdasd.com"} - {name:"yuuiyiyu", url:"http://yuiyuiyui.com"} - {name:"rtytryytr", url:"http://rttryytr.com"} - {name:"kjhkjhk", url:"http://khjkhjkhjk.com"} - {name:"rrrrr", url:"http://rrrrr.com"} - {name:"ddfdgfgf", url:"http://ddffdg.com"} - {name:"jhjhhgjh", url:"http://jghjjhj.com"} - {name:"zzzzzzzz", url:"http://zzzzzzzz.com"} - {name:"zxzxxzzx", url:"http://zzxzxzxzx.com"} - {name:"cvvcvvcv", url:"http://ccvvcvcvcv.com"} - {name:"bnvvbnvb", url:"http://vbnvbnnvbnb.com"} - {name:"asdsadasd", url:"http://asdasdasd.com"} - {name:"vvvvvv", url:"http://vvvvvvv.com"} - {name:"ssssss", url:"http://sssss.com"} - {name:"qqqqqqq", url:"http://qqqqqq.com"} - {name:"xxxxxxx", url:"http://xxxxx.com"} - {name:"vvvvv", url:"http://vvvvv.com"} - {name:"aaaaaaa", url:"http://aaaaaaaa.com"} - ] -} diff --git a/fmpp/docs/examples/multipage_list/src/result.html b/fmpp/docs/examples/multipage_list/src/result.html deleted file mode 100644 index 8c371fc..0000000 --- a/fmpp/docs/examples/multipage_list/src/result.html +++ /dev/null @@ -1,56 +0,0 @@ -<#escape x as x?html> -<@pp.dropOutputFile /> -<#assign pages = foos?chunk(5)> -<#assign entryIndex = 0> -<#list pages as page> - <@pp.changeOutputFile name="result${page_index+1}.html" /> - - - Results - page ${page_index+1} of ${pages?size} - - -

Results

- - <#list page as entry> - <#assign entryIndex = entryIndex + 1> -

${entryIndex}. ${entry.name?cap_first}: ${entry.url} - - -


- Pages:   - <#if page_index != 0> - <<  - <#else> - <<  - - <#list 0..pages?size-1 as i> - <#if i != page_index> - ${i+1} - <#else> - ${i+1} - - <#if i_has_next>| - - <#if page_index != pages?size-1> -  >> - <#else> -  >> - - - - - -<#if pages?size == 0> - <@pp.changeOutputFile name="result1.html" /> - - - Results - No foos - - -

Results

-

Sorry, no foos available.

- - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step1/config.fmpp b/fmpp/docs/examples/qtour_step1/config.fmpp deleted file mode 100644 index 1a65d4c..0000000 --- a/fmpp/docs/examples/qtour_step1/config.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -sourceRoot: src -outputRoot: out \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step1/src/falcon.png b/fmpp/docs/examples/qtour_step1/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/docs/examples/qtour_step1/src/falcon.png and /dev/null differ diff --git a/fmpp/docs/examples/qtour_step1/src/index.html b/fmpp/docs/examples/qtour_step1/src/index.html deleted file mode 100644 index cc440b0..0000000 --- a/fmpp/docs/examples/qtour_step1/src/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Index - - -

Index

-

- - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step1/src/subdir/something.html b/fmpp/docs/examples/qtour_step1/src/subdir/something.html deleted file mode 100644 index fd4daec..0000000 --- a/fmpp/docs/examples/qtour_step1/src/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

Something else

- - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step2/config.fmpp b/fmpp/docs/examples/qtour_step2/config.fmpp deleted file mode 100644 index d9978be..0000000 --- a/fmpp/docs/examples/qtour_step2/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -data: tdd(data/style.tdd) \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step2/src/data/ignoredir.fmpp b/fmpp/docs/examples/qtour_step2/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/qtour_step2/src/data/style.tdd b/fmpp/docs/examples/qtour_step2/src/data/style.tdd deleted file mode 100644 index 2151f44..0000000 --- a/fmpp/docs/examples/qtour_step2/src/data/style.tdd +++ /dev/null @@ -1,2 +0,0 @@ -bgColor: #FFFFE0 -textColor: #000000 \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step2/src/falcon.png b/fmpp/docs/examples/qtour_step2/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/docs/examples/qtour_step2/src/falcon.png and /dev/null differ diff --git a/fmpp/docs/examples/qtour_step2/src/index.html b/fmpp/docs/examples/qtour_step2/src/index.html deleted file mode 100644 index e539e0b..0000000 --- a/fmpp/docs/examples/qtour_step2/src/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Index - - -

Index

-

- - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step2/src/subdir/something.html b/fmpp/docs/examples/qtour_step2/src/subdir/something.html deleted file mode 100644 index a1949bc..0000000 --- a/fmpp/docs/examples/qtour_step2/src/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

Something else

- - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step3/config.fmpp b/fmpp/docs/examples/qtour_step3/config.fmpp deleted file mode 100644 index 0957840..0000000 --- a/fmpp/docs/examples/qtour_step3/config.fmpp +++ /dev/null @@ -1,6 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - tdd(data/style.tdd) - birds: csv(data/birds.csv) -} \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step3/src/data/birds.csv b/fmpp/docs/examples/qtour_step3/src/data/birds.csv deleted file mode 100644 index 3105e8c..0000000 --- a/fmpp/docs/examples/qtour_step3/src/data/birds.csv +++ /dev/null @@ -1,4 +0,0 @@ -name;description;favoriteFood -arctic-tern;Flies very long distances all years.;sardine -house-sparrow;Don't you say you don't know it...;sunflower -sakeret;Great hunter of the sky.;pigeon \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step3/src/data/ignoredir.fmpp b/fmpp/docs/examples/qtour_step3/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/qtour_step3/src/data/style.tdd b/fmpp/docs/examples/qtour_step3/src/data/style.tdd deleted file mode 100644 index 2151f44..0000000 --- a/fmpp/docs/examples/qtour_step3/src/data/style.tdd +++ /dev/null @@ -1,2 +0,0 @@ -bgColor: #FFFFE0 -textColor: #000000 \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step3/src/falcon.png b/fmpp/docs/examples/qtour_step3/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/docs/examples/qtour_step3/src/falcon.png and /dev/null differ diff --git a/fmpp/docs/examples/qtour_step3/src/index.html b/fmpp/docs/examples/qtour_step3/src/index.html deleted file mode 100644 index f5a58f4..0000000 --- a/fmpp/docs/examples/qtour_step3/src/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - Index - - -

Index

-

Birds: -

    - <#list birds as bird> -
  • ${bird.name?cap_first}: ${bird.description} - Favorite food: ${bird.favoriteFood} - -
-
-

- - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step3/src/subdir/something.html b/fmpp/docs/examples/qtour_step3/src/subdir/something.html deleted file mode 100644 index a1949bc..0000000 --- a/fmpp/docs/examples/qtour_step3/src/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

Something else

- - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step4/config.fmpp b/fmpp/docs/examples/qtour_step4/config.fmpp deleted file mode 100644 index 0957840..0000000 --- a/fmpp/docs/examples/qtour_step4/config.fmpp +++ /dev/null @@ -1,6 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - tdd(data/style.tdd) - birds: csv(data/birds.csv) -} \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step4/src/bird.html b/fmpp/docs/examples/qtour_step4/src/bird.html deleted file mode 100644 index 670719a..0000000 --- a/fmpp/docs/examples/qtour_step4/src/bird.html +++ /dev/null @@ -1,16 +0,0 @@ -<@pp.dropOutputFile /> -<#list birds as bird> -<@pp.changeOutputFile name=bird.name+".html" /> - - - ${bird.name?cap_first} - - -

${bird.name?cap_first}

- -

${bird.description}

- -

Favorite food: ${bird.favoriteFood}

- - - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step4/src/data/birds.csv b/fmpp/docs/examples/qtour_step4/src/data/birds.csv deleted file mode 100644 index 3105e8c..0000000 --- a/fmpp/docs/examples/qtour_step4/src/data/birds.csv +++ /dev/null @@ -1,4 +0,0 @@ -name;description;favoriteFood -arctic-tern;Flies very long distances all years.;sardine -house-sparrow;Don't you say you don't know it...;sunflower -sakeret;Great hunter of the sky.;pigeon \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step4/src/data/ignoredir.fmpp b/fmpp/docs/examples/qtour_step4/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/qtour_step4/src/data/style.tdd b/fmpp/docs/examples/qtour_step4/src/data/style.tdd deleted file mode 100644 index 2151f44..0000000 --- a/fmpp/docs/examples/qtour_step4/src/data/style.tdd +++ /dev/null @@ -1,2 +0,0 @@ -bgColor: #FFFFE0 -textColor: #000000 \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step4/src/falcon.png b/fmpp/docs/examples/qtour_step4/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/docs/examples/qtour_step4/src/falcon.png and /dev/null differ diff --git a/fmpp/docs/examples/qtour_step4/src/index.html b/fmpp/docs/examples/qtour_step4/src/index.html deleted file mode 100644 index b4668ed..0000000 --- a/fmpp/docs/examples/qtour_step4/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - Index - - -

Index

-

Birds: -

-
-

- - \ No newline at end of file diff --git a/fmpp/docs/examples/qtour_step4/src/subdir/something.html b/fmpp/docs/examples/qtour_step4/src/subdir/something.html deleted file mode 100644 index a1949bc..0000000 --- a/fmpp/docs/examples/qtour_step4/src/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

Something else

- - \ No newline at end of file diff --git a/fmpp/docs/examples/session/config.fmpp b/fmpp/docs/examples/session/config.fmpp deleted file mode 100644 index 013c036..0000000 --- a/fmpp/docs/examples/session/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -turns: turn(2, index.html) \ No newline at end of file diff --git a/fmpp/docs/examples/session/src/01_foo.html b/fmpp/docs/examples/session/src/01_foo.html deleted file mode 100644 index 078bb05..0000000 --- a/fmpp/docs/examples/session/src/01_foo.html +++ /dev/null @@ -1,6 +0,0 @@ -<#include "/include/page.ftl"> -<@page title="Foo"> - -

Blah blah blah - - \ No newline at end of file diff --git a/fmpp/docs/examples/session/src/02_bar.html b/fmpp/docs/examples/session/src/02_bar.html deleted file mode 100644 index d7f4607..0000000 --- a/fmpp/docs/examples/session/src/02_bar.html +++ /dev/null @@ -1,6 +0,0 @@ -<#include "/include/page.ftl"> -<@page title="Bar"> - -

Blah blah blah - - \ No newline at end of file diff --git a/fmpp/docs/examples/session/src/03_baaz.html b/fmpp/docs/examples/session/src/03_baaz.html deleted file mode 100644 index d942675..0000000 --- a/fmpp/docs/examples/session/src/03_baaz.html +++ /dev/null @@ -1,6 +0,0 @@ -<#include "/include/page.ftl"> -<@page title="Baaz"> - -

Blah blah blah - - \ No newline at end of file diff --git a/fmpp/docs/examples/session/src/04_wombat.html b/fmpp/docs/examples/session/src/04_wombat.html deleted file mode 100644 index 81b1ae6..0000000 --- a/fmpp/docs/examples/session/src/04_wombat.html +++ /dev/null @@ -1,6 +0,0 @@ -<#include "/include/page.ftl"> -<@page title="Wombat"> - -

Blah blah blah - - \ No newline at end of file diff --git a/fmpp/docs/examples/session/src/include/ignoredir.fmpp b/fmpp/docs/examples/session/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/session/src/include/page.ftl b/fmpp/docs/examples/session/src/include/page.ftl deleted file mode 100644 index 25fdcfb..0000000 --- a/fmpp/docs/examples/session/src/include/page.ftl +++ /dev/null @@ -1,17 +0,0 @@ -<#escape x as x?html> - -<#macro page title> - <#if !pp.s.contents??> - <@pp.set hash=pp.s key="contents" value=pp.newWritableSequence() /> - - <@pp.add seq=pp.s.contents value={"link":pp.outputFile, "title":title} /> - - ${title} - - -

${title}

- <#nested> - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/session/src/index.html b/fmpp/docs/examples/session/src/index.html deleted file mode 100644 index e9c3c5a..0000000 --- a/fmpp/docs/examples/session/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ -<#escape x as x?html> - -Index - -

Index

- <#assign pages = pp.s.contents?sort_by("link")> - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/tdd/config.fmpp b/fmpp/docs/examples/tdd/config.fmpp deleted file mode 100644 index 1fb8ea0..0000000 --- a/fmpp/docs/examples/tdd/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: tdd(data/test.tdd) \ No newline at end of file diff --git a/fmpp/docs/examples/tdd/src/data/ignoredir.fmpp b/fmpp/docs/examples/tdd/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/tdd/src/data/test.tdd b/fmpp/docs/examples/tdd/src/data/test.tdd deleted file mode 100644 index ffefb40..0000000 --- a/fmpp/docs/examples/tdd/src/data/test.tdd +++ /dev/null @@ -1,7 +0,0 @@ -user:"Big Joe", -tall -animals:[ - {name:"white mouse", price:30}, - {name:"black mouse", price:25}, - {name:"green mouse", price:150} -] \ No newline at end of file diff --git a/fmpp/docs/examples/tdd/src/index.html b/fmpp/docs/examples/tdd/src/index.html deleted file mode 100644 index 4e8efb2..0000000 --- a/fmpp/docs/examples/tdd/src/index.html +++ /dev/null @@ -1,10 +0,0 @@ -

Hello ${user}!

- -

Our offers: -

    - <#list animals as animal> -
  • ${animal.name?cap_first} for ${animal.price} credits - -
- -

Note that we know that you are <#if !tall>not tall, ${user}.

\ No newline at end of file diff --git a/fmpp/docs/examples/xml/config.fmpp b/fmpp/docs/examples/xml/config.fmpp deleted file mode 100644 index a095251..0000000 --- a/fmpp/docs/examples/xml/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: {doc: xml(data/test.xml)} \ No newline at end of file diff --git a/fmpp/docs/examples/xml/src/data/ignoredir.fmpp b/fmpp/docs/examples/xml/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/xml/src/data/test.xml b/fmpp/docs/examples/xml/src/data/test.xml deleted file mode 100644 index 4375656..0000000 --- a/fmpp/docs/examples/xml/src/data/test.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Preface blah blah... - And preface blah blah... - - - Blah blah blah... - And blah blah blah... - - - Foo blah blah... - And foo blah blah... - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml/src/test.html b/fmpp/docs/examples/xml/src/test.html deleted file mode 100644 index 66b913c..0000000 --- a/fmpp/docs/examples/xml/src/test.html +++ /dev/null @@ -1,7 +0,0 @@ -

${doc.book.@title}

-<#list doc.book.chapter as ch> -

${ch.@title}

- <#list ch.para as p> -

${p}

- - \ No newline at end of file diff --git a/fmpp/docs/examples/xml2/config.fmpp b/fmpp/docs/examples/xml2/config.fmpp deleted file mode 100644 index fa29ced..0000000 --- a/fmpp/docs/examples/xml2/config.fmpp +++ /dev/null @@ -1,7 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - prodXml: xml(data/products.xml, {index: {element: product, value: '%n'}}) - manuXml: xml(data/manufacturers.xml) -} \ No newline at end of file diff --git a/fmpp/docs/examples/xml2/src/data/ignoredir.fmpp b/fmpp/docs/examples/xml2/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/xml2/src/data/manufacturers.xml b/fmpp/docs/examples/xml2/src/data/manufacturers.xml deleted file mode 100644 index d1db011..0000000 --- a/fmpp/docs/examples/xml2/src/data/manufacturers.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - Foo Incorporated -
3 Traktor Road, Budapest, 1234, Hungary
- 45-456-7461 - http://www.foo.hu/ -
- - Acmee Incorporated -
5 Kili Street, Tarawa, Kiribati
- http://www.acmee.com/ - bounche@acmee.com -
- - Batman International -
77 Cash Square, Palo Alto, California 94531, U.S.A
- 07-798-456-985 - http://www.batmaninternational.com/ - devnul@batmaninternational.com -
-
\ No newline at end of file diff --git a/fmpp/docs/examples/xml2/src/data/products.xml b/fmpp/docs/examples/xml2/src/data/products.xml deleted file mode 100644 index a389a11..0000000 --- a/fmpp/docs/examples/xml2/src/data/products.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - K8 Widget - 500 - Foo Incorporated - This is a standard widget with highly durable thingamy. - - - Giant/S2 Widget - 2500 - Acmee Incorporated - This is an extra-large widget. - - - Micro Widget - 800 - Acmee Incorporated - This widget can even fit into your suitcase. - - - CXC Widget - 350 - Batman International - I have no idea... this is just a stupid example, OK? - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml2/src/index.html b/fmpp/docs/examples/xml2/src/index.html deleted file mode 100644 index 1953250..0000000 --- a/fmpp/docs/examples/xml2/src/index.html +++ /dev/null @@ -1,19 +0,0 @@ -<#escape x as x?html> - - - Product Catalog - - - -

Product Catalog

- -

The available products are: - -

    -<#list prodXml.products.product?sort_by('name') as p> -
  • ${p.name} - -
- - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml2/src/product.html b/fmpp/docs/examples/xml2/src/product.html deleted file mode 100644 index b40cf35..0000000 --- a/fmpp/docs/examples/xml2/src/product.html +++ /dev/null @@ -1,36 +0,0 @@ -<@pp.dropOutputFile /> -<#list prodXml.products.product as p> -<@pp.changeOutputFile name="product_${p.@id}.html" /> -<#escape x as x?html> - - - ${p.name} - - - -

${p.name}

- -

Price: $${p.price} - -

Description: -
${p.description} -

- -

Manufacturer: -
Name: ${p.manufacturer} -<#assign m = manuXml.manufacturers['manufacturer[name="${p.manufacturer}"]']> -<#if m?has_content> - <#if m.address?has_content>
Address: ${m.address} - <#if m.phone?has_content>
Phone: ${m.phone} - <#if m.homepage?has_content>
Homepage: ${m.homepage} - <#if m.email?has_content>
Email: ${m.email} -<#else> - <@pp.warning message="Referenced manufacturer not found: ${p.manufacturer}" /> - - -


-Back... - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/config.fmpp b/fmpp/docs/examples/xml_rendering/config.fmpp deleted file mode 100644 index 21fc6ef..0000000 --- a/fmpp/docs/examples/xml_rendering/config.fmpp +++ /dev/null @@ -1,19 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -xmlRenderings: [ - { - ifDocumentElementIs: product - template: renderer/product.html - } - { - ifDocumentElementIs: book - template: renderer/book.html - index: { - element: [part, chapter] - attribute: ppFile - numbering: hierarchical - value: '%e_%n.html' - } - } -] \ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/src/bigwidget.xml b/fmpp/docs/examples/xml_rendering/src/bigwidget.xml deleted file mode 100644 index 72b8a0d..0000000 --- a/fmpp/docs/examples/xml_rendering/src/bigwidget.xml +++ /dev/null @@ -1,8 +0,0 @@ - - big widget - $15 - - This is an extra large widget, manufactured with a technology - developed by the NASA. - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/src/example1.xml b/fmpp/docs/examples/xml_rendering/src/example1.xml deleted file mode 100644 index f37601d..0000000 --- a/fmpp/docs/examples/xml_rendering/src/example1.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - -

This is an example "book" that demonstrates FreeMarker and FMPP.

-
- - - -

A paragraph with emphasized and marked sections.

- - A quotation with emphasized and marked sections. - -

A emphasized section with a marked section in it.

-
- - -

Blah...

-

Blah blah...

-
-
- - -

Blah blah blah...

-

Blah blah blah blah...

-
- - -

Blah blah blah blah blah...

-

Blah blah blah blah blah blah...

-
- - -

Blah blah blah blah blah blah blah...

-

Blah blah blah blah blah blah blah blah...

-
-
-
\ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/src/example2.xml b/fmpp/docs/examples/xml_rendering/src/example2.xml deleted file mode 100644 index d63a0b9..0000000 --- a/fmpp/docs/examples/xml_rendering/src/example2.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - -

Yet another example book.

-
- - - -

So you have seen that you can have more books...

-
-
-
\ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/src/index.html b/fmpp/docs/examples/xml_rendering/src/index.html deleted file mode 100644 index 8154588..0000000 --- a/fmpp/docs/examples/xml_rendering/src/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - XML rendering example - - -

XML rendering example

-

The "books": -

-

The "products": -

- \ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/src/normalwidget.xml b/fmpp/docs/examples/xml_rendering/src/normalwidget.xml deleted file mode 100644 index fcb0753..0000000 --- a/fmpp/docs/examples/xml_rendering/src/normalwidget.xml +++ /dev/null @@ -1,7 +0,0 @@ - - normal widget - $5 - - This is a standard widget, with great quality pink painting. - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/src/renderer/book.html b/fmpp/docs/examples/xml_rendering/src/renderer/book.html deleted file mode 100644 index 8c155ae..0000000 --- a/fmpp/docs/examples/xml_rendering/src/renderer/book.html +++ /dev/null @@ -1,155 +0,0 @@ -<#-- -Renders a "book" XML to multiple HTML files. -This is a rather complex stuff... check the product.html first. ---> -<#escape x as x?html> -<@pp.dropOutputFile /> - -<#-- Calculating the prefix of output file names --> -<#assign prefix = pp.sourceFileName> -<#assign prefix = prefix?substring(0, prefix?last_index_of('.'))> -<#assign prefix = prefix + '_'> - -<#-- Calculate the ordered list of HTML pages, used for the nav. bar. --> -<#assign pages = pp.doc["//*[@ppFile != '']"]> - -<#-- Render the HTML pages --> -<#recurse pp.doc> - - -<#-- - *********************************************************************************** - Node handlers - *********************************************************************************** ---> - -<#macro book> - <@pp.nestOutputFile name="${prefix}index.html"> - <@Html title="${.node.@title}"> -

Table of Contents

-
    - <#list .node.part as part> -
  • ${part.@title} - <#local cs = part.chapter> - <#if cs?has_content> - - - -
- <#recurse> - - - - -<#macro part> - <@pp.nestOutputFile name=prefix+.node.@ppFile> - <@Html title="${.node.@title}"> - <#local cs = .node.chapter> - <#if cs?has_content> -

Part Contents

- - - <#recurse> - - - - -<#macro chapter> - <@pp.nestOutputFile name=prefix+.node.@ppFile> - <@Html title="${.node.@title}"> - <#recurse> - - - - -<#macro p> -

<#recurse>

- - -<#macro quote> -
<#recurse>
- - -<#macro e> - <#recurse><#t> - - -<#macro mark> - <#recurse><#t> - - -<#macro @text> - ${.node}<#t> - - - -<#-- - *********************************************************************************** - Other macros - *********************************************************************************** ---> - -<#macro Html title> - - - ${title} - - - <@NavBar /> -
-

${title}

- <#nested> -
- <@NavBar /> - - - - -<#macro NavBar> - <#local nodeName = .node?node_name> - <#if nodeName == 'book'> - Prev | Up | Next | ToC | Home - <#else> - <#local ppFile = .node.@ppFile> - <#local max = pages?size - 1> - <#list 0..max as i> - <#if pages[i].@ppFile == ppFile> - <#local idx = i> - <#break> - - - <#if idx != 0> - Prev<#t> - <#else> - Prev<#t> - - | - <#list .node?ancestors as a> - <#if a.@ppFile[0]??> - Up<#t> - <#break> - <#elseif a?node_name == 'book'> - Up<#t> - <#break> - - - | - <#if idx != max> - Next - <#else> - Next<#t> - - | - ToC | Home - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/src/renderer/ignoredir.fmpp b/fmpp/docs/examples/xml_rendering/src/renderer/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/xml_rendering/src/renderer/product.html b/fmpp/docs/examples/xml_rendering/src/renderer/product.html deleted file mode 100644 index 832fb06..0000000 --- a/fmpp/docs/examples/xml_rendering/src/renderer/product.html +++ /dev/null @@ -1,20 +0,0 @@ -<#-- -Renders a "product" XML to a HTML files. ---> -<#escape x as x?html> -<@pp.renameOutputFile extension="html" /> -<#assign prod = pp.doc.product> - - - Product: ${prod.name?cap_first} - - -

${prod.name?cap_first}

-

Price: only ${prod.price} -

Description:
- ${prod.description} -


- Back... - - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_rendering/src/smallwidget.xml b/fmpp/docs/examples/xml_rendering/src/smallwidget.xml deleted file mode 100644 index d23985c..0000000 --- a/fmpp/docs/examples/xml_rendering/src/smallwidget.xml +++ /dev/null @@ -1,8 +0,0 @@ - - small widget - $10 - - Always wanted a small widget, but never found it? - Now, then this one is for You! - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_try/config.fmpp b/fmpp/docs/examples/xml_try/config.fmpp deleted file mode 100644 index 735bdd4..0000000 --- a/fmpp/docs/examples/xml_try/config.fmpp +++ /dev/null @@ -1,12 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - doc:xml( - data/test.xml - { - removeComments: false - index: {element: [part, chapter, para], value: '%n'} - } - ) -} \ No newline at end of file diff --git a/fmpp/docs/examples/xml_try/src/data/ignoredir.fmpp b/fmpp/docs/examples/xml_try/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/xml_try/src/data/test.xml b/fmpp/docs/examples/xml_try/src/data/test.xml deleted file mode 100644 index 24836d7..0000000 --- a/fmpp/docs/examples/xml_try/src/data/test.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - A - - - - A - B - - - A - B - - - - - A - B - C - - - A - B - C - - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_try/src/index.html b/fmpp/docs/examples/xml_try/src/index.html deleted file mode 100644 index 8b5883a..0000000 --- a/fmpp/docs/examples/xml_try/src/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - - XML Tree Dump - - <@pp.setOutputEncoding encoding="UTF-8" /> - - - -

XML Tree Dump

- -<@dumpXml doc /> - -

Legend: -

    -
  • <foo bar="123">: Element node -
  • "Blah blah": Text node -
  • <?foo bar ?>: Processing instruction node -
  • <!-- Blah blah -->: Comment node -
  • foo: Other node -
- - - -<#function showXmlSource s> - <#return s?xml?xml?replace(" ", r" ")?replace('\n', '&#xA;')?replace('\r', '&#xD;')> - - -<#-- -Prints an XML node tree as colored HTML. ---> -<#macro dumpXml node> -
    - <@dumpXml_internal node /> -
- - -<#macro dumpXml_internal node> - <#local type = node?node_type> - <#if type == 'element'> -
  • <<#rt> - <#if node?node_namespace?? && node?node_namespace != ''> - '${node?node_namespace}':<#t> - - ${node?node_name}<#t> - <#list node.@@ as att> - ${' '}<#t> - <#if att?node_namespace?? && att?node_namespace != ''> - '${att?node_namespace}':<#t> - - ${att?node_name}="${showXmlSource(att)}"<#t> - - ><#lt> - <#elseif type == 'text'> -
  • "${showXmlSource(node)}"<#lt> - <#elseif type == 'pi'> - <#local nodeName = node?node_name> -
  • <?${nodeName?substring(4)} ${showXmlSource(node)}?><#lt> - <#elseif type == 'comment'> -
  • <!-- ${node} --><#lt> - <#else> -
  • ${node?node_type}<#lt> - - <#if node?children?size != 0> -
      - <#list node?children as c> - <@dumpXml_internal c /><#t> - -
    - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_validating/config.fmpp b/fmpp/docs/examples/xml_validating/config.fmpp deleted file mode 100644 index 96ec9ec..0000000 --- a/fmpp/docs/examples/xml_validating/config.fmpp +++ /dev/null @@ -1,8 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - doc: xml(data/test.xhtml) -} -xmlCatalogFiles: dtds/catalog.xml -validateXml \ No newline at end of file diff --git a/fmpp/docs/examples/xml_validating/dtds/catalog.xml b/fmpp/docs/examples/xml_validating/dtds/catalog.xml deleted file mode 100644 index c180196..0000000 --- a/fmpp/docs/examples/xml_validating/dtds/catalog.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_validating/dtds/xhtml-lat1.ent b/fmpp/docs/examples/xml_validating/dtds/xhtml-lat1.ent deleted file mode 100644 index ffee223..0000000 --- a/fmpp/docs/examples/xml_validating/dtds/xhtml-lat1.ent +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/docs/examples/xml_validating/dtds/xhtml-special.ent b/fmpp/docs/examples/xml_validating/dtds/xhtml-special.ent deleted file mode 100644 index ca358b2..0000000 --- a/fmpp/docs/examples/xml_validating/dtds/xhtml-special.ent +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/docs/examples/xml_validating/dtds/xhtml-symbol.ent b/fmpp/docs/examples/xml_validating/dtds/xhtml-symbol.ent deleted file mode 100644 index 63c2abf..0000000 --- a/fmpp/docs/examples/xml_validating/dtds/xhtml-symbol.ent +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/docs/examples/xml_validating/dtds/xhtml1-transitional.dtd b/fmpp/docs/examples/xml_validating/dtds/xhtml1-transitional.dtd deleted file mode 100644 index 1b99c61..0000000 --- a/fmpp/docs/examples/xml_validating/dtds/xhtml1-transitional.dtd +++ /dev/null @@ -1,1201 +0,0 @@ - - - - - -%HTMLlat1; - - -%HTMLsymbol; - - -%HTMLspecial; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/docs/examples/xml_validating/src/data/ignoredir.fmpp b/fmpp/docs/examples/xml_validating/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/docs/examples/xml_validating/src/data/test.xhtml b/fmpp/docs/examples/xml_validating/src/data/test.xhtml deleted file mode 100644 index f73cf96..0000000 --- a/fmpp/docs/examples/xml_validating/src/data/test.xhtml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - Test - - - -

    Test

    -

    p1

    -

    p2

    -

    p3

    - - - \ No newline at end of file diff --git a/fmpp/docs/examples/xml_validating/src/test.txt b/fmpp/docs/examples/xml_validating/src/test.txt deleted file mode 100644 index be308fa..0000000 --- a/fmpp/docs/examples/xml_validating/src/test.txt +++ /dev/null @@ -1,16 +0,0 @@ -<#ftl ns_prefixes={'D':'http://www.w3.org/1999/xhtml'}> -<#-- Note: Prefix D is a reserver in FreeMarker, and stands for Default --> - -Title: -${doc.html.head.title} - -Paragraphs: -<#list doc.**.p as p> -- ${p} - - -Paragraphs where class is "foo": -<#-- Note that in XPath expressions you must use explicit prefix --> -<#list doc['//D:p[@class="foo"]'] as p> -- ${p} - \ No newline at end of file diff --git a/fmpp/docs/figures/fmpparch.png b/fmpp/docs/figures/fmpparch.png deleted file mode 100644 index fbfe283..0000000 Binary files a/fmpp/docs/figures/fmpparch.png and /dev/null differ diff --git a/fmpp/docs/figures/qtour_step1.png b/fmpp/docs/figures/qtour_step1.png deleted file mode 100644 index 7e37afa..0000000 Binary files a/fmpp/docs/figures/qtour_step1.png and /dev/null differ diff --git a/fmpp/docs/figures/qtour_step1_src.png b/fmpp/docs/figures/qtour_step1_src.png deleted file mode 100644 index 14c11e8..0000000 Binary files a/fmpp/docs/figures/qtour_step1_src.png and /dev/null differ diff --git a/fmpp/docs/figures/qtour_step2.png b/fmpp/docs/figures/qtour_step2.png deleted file mode 100644 index ec0d321..0000000 Binary files a/fmpp/docs/figures/qtour_step2.png and /dev/null differ diff --git a/fmpp/docs/figures/qtour_step4.png b/fmpp/docs/figures/qtour_step4.png deleted file mode 100644 index 01f02bc..0000000 Binary files a/fmpp/docs/figures/qtour_step4.png and /dev/null differ diff --git a/fmpp/docs/freemarker/alphaidx.html b/fmpp/docs/freemarker/alphaidx.html deleted file mode 100644 index d29c26c..0000000 --- a/fmpp/docs/freemarker/alphaidx.html +++ /dev/null @@ -1,1529 +0,0 @@ - - - - - - - - FreeMarker Manual - Alphabetical Index - - - - - - - - -
    - - - - - -

    -Alphabetical Index

    - -

    -$ | # | < | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | R | S | T | U | V | W | X

    - -
    - -

    $

    -
    -
    - ${...},  Interpolations -
    -
    -
    - -

    #

    -
    -
    - #,  Overall structure, -Directives -
    -
    - #{...},  #{...}: Numerical interpolation -
    -
    -
    - -

    <

    -
    -
    - <#...>,  Directives -
    -
    - <#--...-->,  Overall structure -
    -
    -
    - -

    A

    -
    -
    - abs built-in,  abs -
    -
    - absolute value,  abs -
    -
    - acquisition,  Using acquisition -
    -
    - adding hashes,  Concatenation -
    -
    - adding sequences,  Concatenation -
    -
    - adding strings,  Interpolation (or concatenation) -
    -
    - addition,  Arithmetical calculations -
    -
    - alternative syntax,  Alternative (square bracket) syntax -
    -
    - ancestors built-in,  ancestors -
    -
    - and,  Logical operations -
    -
    - ant task,  Using FreeMarker with Ant -
    -
    - arithmetic,  Arithmetical calculations -
    -
    - assign directive,  assign -
    -
    - attempt directive,  attempt, recover -
    -
    -
    - -

    B

    -
    -
    - beans
    -
    -
    wrapping, Bean wrapper
    -
    -
    - boolean
    -
    -
    built-ins, Built-ins for booleans
    -
    Java side, Scalars
    -
    literal, Booleans
    -
    operations, Logical operations
    -
    printing, string (when used with a boolean value)
    -
    the FTL value type, Scalars
    -
    -
    - boolean_format,  setting -
    -
    - boolean built-in,  boolean -
    -
    - break directive,  list, break, -switch, case, default, break -
    -
    - built-in,  Built-ins, -Built-in Reference, -Alphabetical index -
    -
    - byte built-in,  byte, double, float, int, long, short -
    -
    -
    - -

    C

    -
    -
    - caching,  Template caching -
    -
    - call a method,  Method call -
    -
    - cap_first built-in,  cap_first -
    -
    - capitalize built-in,  capitalize -
    -
    - case directive,  switch, case, default, break -
    -
    - c built-in,  c (when used with numerical value), -c (when used with boolean) -
    -
    - ceiling built-in,  round, floor, ceiling -
    -
    - charAt,  Getting a character -
    -
    - charset,  Charset issues, -ftl -
    -
    - children built-in,  children -
    -
    - chop_linebreak built-in,  chop_linebreak -
    -
    - chunk built-in,  chunk -
    -
    - classic_compatible,  setting -
    -
    - collection
    -
    -
    Java side, Containers
    -
    the FTL value type, Containers
    -
    -
    - columnar printing of sequences,  chunk -
    -
    - command-line,  Using FreeMarker with Ant -
    -
    - comment,  Overall structure -
    -
    - comparison operators,  Comparison -
    -
    - compress directive,  compress -
    -
    - concatenate hashes,  Concatenation -
    -
    - concatenate sequences,  Concatenation -
    -
    - concatenate strings,  Interpolation (or concatenation) -
    -
    - configuration,  Create a configuration instance -
    -
    - Configuration,  The Configuration -
    -
    - constant,  Specify values directly -
    -
    - contact,  Preface -
    -
    - containers
    -
    -
    Java side, Containers
    -
    -
    - contains built-in,  contains -
    -
    - converting between types,  boolean, -date, time, datetime, -number, -c (when used with numerical value), -string (when used with a numerical value), -date, time, datetime (when used with a date/time/date-time - value), -string (when used with a date/time/date-time value), -c (when used with boolean), -string (when used with a boolean value), -byte, double, float, int, long, short, -number_to_date, number_to_time, number_to_datetime -
    -
    - converting date to long,  byte, double, float, int, long, short -
    -
    - converting date to string,  string (when used with a date/time/date-time value) -
    -
    - converting long to date,  number_to_date, number_to_time, number_to_datetime -
    -
    - converting string to boolean,  boolean -
    -
    - converting string to date,  date, time, datetime -
    -
    - converting string to number,  number -
    -
    - converting string to time,  date, time, datetime -
    -
    - converting time to string,  string (when used with a date/time/date-time value) -
    -
    - current date-time,  Special Variable Reference -
    -
    - custom directive,  Defining your own directives -
    -
    - custom tags,  Using FreeMarker with servlets -
    -
    -
    - -

    D

    -
    -
    - data-model,  Template + data-model = output -
    -
    -
    assembling with Java, Create a data-model
    -
    assembling with Java, without object wrapper, Basics
    -
    -
    - date
    -
    -
    built-ins, Built-ins for date/time/date-time values
    -
    Java API related difficulties, Scalars
    -
    Java side, Scalars
    -
    the FTL value type, Scalars
    -
    -
    - date_format,  setting -
    -
    - date built-in,  date, time, datetime, -date, time, datetime (when used with a date/time/date-time - value) -
    -
    - datetime
    -
    -
    built-ins, Built-ins for date/time/date-time values
    -
    -
    - date-time
    -
    -
    the FTL value type, Scalars
    -
    -
    - datetime_format,  setting -
    -
    - datetime built-in,  date, time, datetime, -date, time, datetime (when used with a date/time/date-time - value) -
    -
    - date to long,  byte, double, float, int, long, short -
    -
    - date to string,  string (when used with a date/time/date-time value) -
    -
    - default built-in,  List of deprecated built-ins -
    -
    - default directive,  switch, case, default, break -
    -
    - default value operator,  Default value operator -
    -
    - defining macro,  Defining your own directives -
    -
    - deprecated,  Deprecated FTL constructs -
    -
    - directive,  Directives, -Directive Reference, -Alphabetical index -
    -
    -
    the FTL value type, User-defined directives
    -
    user-defined, Defining your own directives
    -
    -
    - directives
    -
    -
    Java side, Directives
    -
    -
    - division,  Arithmetical calculations -
    -
    - double built-in,  byte, double, float, int, long, short -
    -
    - download,  Preface -
    -
    -
    - -

    E

    -
    -
    - else directive,  if, else, elseif -
    -
    - elseif directive,  if, else, elseif -
    -
    - encoding,  Charset issues, -ftl -
    -
    -
    URL, url
    -
    URL path, url_path
    -
    -
    - ends_with built-in,  ends_with -
    -
    - ensure_ends_with built-in,  ensure_ends_with, -ensure_starts_with -
    -
    - enum,  Accessing enums -
    -
    - error,  Special Variable Reference -
    -
    - error handling,  Handling missing values, -Error handling, -attempt, recover -
    -
    - escape directive,  escape, noescape -
    -
    - escape sequences,  Strings -
    -
    - escaping
    -
    -
    output, html, rtf, xhtml, xml
    -
    URL, url
    -
    URL path, url_path
    -
    -
    - eval,  eval -
    -
    - evaluate string,  eval -
    -
    - exception handling,  Error handling -
    -
    - existence test operator,  Missing value test operator -
    -
    - exists built-in,  List of deprecated built-ins -
    -
    - expression,  Expressions -
    -
    - -
    - -

    G

    -
    -
    - get character,  Getting a character -
    -
    - global directive,  global -
    -
    - groups built-in,  groups -
    -
    -
    - -

    H

    -
    -
    - handling null-s,  Handling missing values -
    -
    - has_content built-in,  has_content -
    -
    - hash
    -
    -
    accessing subvariable, Retrieving data from a hash
    -
    built-ins, Built-ins for hashes
    -
    concatenate, Concatenation
    -
    Java side, Containers
    -
    key type, FAQ
    -
    literal, Hashes
    -
    modify, FAQ
    -
    operations, Hash operations
    -
    the FTL value type, Containers
    -
    -
    - header,  ftl -
    -
    - help,  Preface -
    -
    - homepage,  Preface -
    -
    - html built-in,  html -
    -
    - HTTP,  Using FreeMarker with servlets -
    -
    -
    - -

    I

    -
    -
    - if_exists built-in,  List of deprecated built-ins -
    -
    - if directive,  if, else, elseif -
    -
    - import directive,  import -
    -
    - include
    -
    -
    JSP, Including content from other web application - resources
    -
    servlet, Including content from other web application - resources
    -
    -
    - include directive,  include -
    -
    - index_of built-in,  index_of -
    -
    - infinite,  is_infinite -
    -
    - install,  Installing FreeMarker -
    -
    - instantiating variable,  new -
    -
    - int built-in,  byte, double, float, int, long, short -
    -
    - integer division,  Arithmetical calculations -
    -
    - integer part,  Arithmetical calculations -
    -
    - interpolation,  Overall structure, -Interpolation (or concatenation), -Interpolations -
    -
    - interpret built-in,  interpret -
    -
    - is_... built-in,  is_... -
    -
    - is_infinte built-in,  is_infinite -
    -
    - is_nan built-in,  is_nan -
    -
    - is null,  Missing value test operator -
    -
    - iso_... built-ins,  iso_... -
    -
    - ISO 8601,  setting -
    -
    - ISO 8601 parsing,  date, time, datetime -
    -
    - iso built-in,  iso_... -
    -
    -
    - -

    J

    -
    -
    - j_string built-in,  j_string -
    -
    - JDBC time zone,  setting -
    -
    - join built-in,  join -
    -
    - joining hashes,  Concatenation -
    -
    - joining sequences,  Concatenation -
    -
    - joining strings,  Interpolation (or concatenation) -
    -
    - js_string built-in,  js_string -
    -
    - json_string built-in,  json_string -
    -
    - JSP,  Using FreeMarker with servlets, -FAQ -
    -
    -
    include, Including content from other web application - resources
    -
    taglib, Using FreeMarker with servlets, Using FreeMarker with servlets
    -
    -
    - jython
    -
    -
    wrapping, Jython wrapper
    -
    -
    -
    - -

    K

    -
    -
    - keep_after built-in,  keep_after -
    -
    - keep_before built-in,  keep_before -
    -
    - keys built-in,  keys -
    -
    -
    - -

    L

    -
    -
    - lang,  Special Variable Reference -
    -
    - language,  Special Variable Reference -
    -
    - last_index_of built-in,  last_index_of -
    -
    - last built-in,  last -
    -
    - left_pad built-in,  left_pad -
    -
    - length built-in,  length -
    -
    - libraries,  Namespaces -
    -
    - library path,  Namespaces -
    -
    - license,  License -
    -
    - list directive,  list, break -
    -
    - literal,  Specify values directly -
    -
    -
    boolean, Booleans
    -
    hash, Hashes
    -
    -
    - loading templates,  Template loading -
    -
    - local directive,  local -
    -
    - locale,  setting, -Special Variable Reference -
    -
    - locale_object,  Special Variable Reference -
    -
    - localization,  Localized lookup -
    -
    - local variable,  Defining variables in the template -
    -
    - logging,  Logging -
    -
    - logical operations,  Logical operations -
    -
    - long built-in,  byte, double, float, int, long, short -
    -
    - long to date,  number_to_date, number_to_time, number_to_datetime -
    -
    - loop variable,  Macros with loop variables, -Defining variables in the template -
    -
    - lower_case built-in,  lower_case -
    -
    - lt directive,  t, lt, rt -
    -
    -
    - -

    M

    -
    -
    - macro,  Defining your own directives -
    -
    -
    the FTL value type, User-defined directives
    -
    -
    - macro directive,  macro, nested, return -
    -
    - matches built-in,  matches -
    -
    - math,  Arithmetical calculations -
    -
    - merging,  Merging the template with the data-model -
    -
    - method
    -
    -
    call, Method call
    -
    defining with FTL, function, return
    -
    Java side, Methods
    -
    the FTL value type, Methods and functions
    -
    -
    - missing value test operator,  Missing value test operator -
    -
    - missing variable,  Handling missing values -
    -
    - Model 2,  Using FreeMarker with servlets -
    -
    - modify hashes,  FAQ -
    -
    - modify sequences,  FAQ -
    -
    - modulus,  Arithmetical calculations -
    -
    - multithreading,  Multithreading -
    -
    - Multi-typed value,  Basics -
    -
    -
    - -

    N

    -
    -
    - namespace built-in,  namespace -
    -
    - namespaces,  Namespaces -
    -
    - NaN,  is_nan -
    -
    - nested directive,  macro, nested, return -
    -
    - new built-in,  new -
    -
    - new FTL syntax,  Old FTL syntax -
    -
    - node
    -
    -
    built-ins, Built-ins for nodes (for XML)
    -
    Java side, Node variables
    -
    the FTL value type, Nodes
    -
    -
    - node_name built-in,  node_name -
    -
    - node_namespace built-in,  node_namespace -
    -
    - node_type built-in,  node_type -
    -
    - noescape directive,  escape, noescape -
    -
    - noparse directive,  noparse -
    -
    - not,  Logical operations -
    -
    - now,  Special Variable Reference -
    -
    - nt directive,  nt -
    -
    - null,  Handling missing values, -FAQ -
    -
    - number
    -
    -
    built-ins, Built-ins for numbers
    -
    Java side, Scalars
    -
    literal, Numbers
    -
    the FTL value type, Scalars
    -
    -
    - number_format,  setting -
    -
    - number_to_date built-in,  number_to_date, number_to_time, number_to_datetime -
    -
    - number_to_datetime built-in,  number_to_date, number_to_time, number_to_datetime -
    -
    - number_to_time built-in,  number_to_date, number_to_time, number_to_datetime -
    -
    - number built-in,  number -
    -
    - numerical range expression,  Sequences -
    -
    - numerical sequence,  Sequences -
    -
    -
    - -

    O

    -
    -
    - object wrapper,  Basics, -Object wrappers -
    -
    - old FTL syntax,  Old FTL syntax -
    -
    - operator precedence,  Operator precedence -
    -
    - or,  Logical operations -
    -
    - output
    -
    -
    generate with Java, Merging the template with the data-model
    -
    -
    - output_encoding,  setting -
    -
    - output charset,  Charset issues, -url, -Special Variable Reference -
    -
    - output encoding,  Charset issues, -url, -Special Variable Reference -
    -
    -
    - -

    P

    -
    -
    - padding,  left_pad, -right_pad -
    -
    - parent built-in,  parent -
    -
    - parentheses,  Parentheses -
    -
    - parse string as boolean,  boolean -
    -
    - parse string as number,  number -
    -
    - parsing string as date,  date, time, datetime -
    -
    - parsing string as time,  date, time, datetime -
    -
    - path,  Template loading -
    -
    - positional parameter passing,  Positional parameter passing -
    -
    - precedence,  Operator precedence -
    -
    -
    - -

    R

    -
    -
    - range expression,  Sequences -
    -
    - raw string literal,  Strings -
    -
    - recover directive,  attempt, recover -
    -
    - recurse directive,  visit, recurse, fallback -
    -
    - recursion
    -
    -
    iterate, visit, recurse, fallback
    -
    -
    - regular expression
    -
    -
    built-ins, Common flags
    -
    -
    - remove_beginning built-in,  remove_beginning -
    -
    - remove_ending built-in,  remove_ending -
    -
    - replace built-in,  replace -
    -
    - reserved name,  Reserved names in FTL -
    -
    - return directive,  function, return, -macro, nested, return -
    -
    - reverse built-in,  reverse -
    -
    - right_pad built-in,  right_pad -
    -
    - root built-in,  root -
    -
    - round built-in,  round, floor, ceiling -
    -
    - rounding,  round, floor, ceiling -
    -
    - rt directive,  t, lt, rt -
    -
    - rtf built-in,  rtf -
    -
    -
    - -

    S

    -
    -
    - scalar
    -
    -
    Java side, Scalars
    -
    -
    - scopes,  Variables, scopes -
    -
    - security,  Configuring security policy for FreeMarker -
    -
    -
    user-provided templates, FAQ
    -
    -
    - seq_contains built-in,  seq_contains -
    -
    - seq_index_of built-in,  seq_index_of -
    -
    - seq_last_index_of built-in,  seq_last_index_of -
    -
    - sequence
    -
    -
    accessing subvariable, Retrieving data from a sequence
    -
    built-ins, Built-ins for sequences
    -
    concatenate, Concatenation
    -
    iterate, list, break
    -
    Java side, Containers
    -
    literal, Sequences
    -
    modify, FAQ
    -
    operations, Sequence operations
    -
    slice, Sequence slicing
    -
    sorting, sort, sort_by
    -
    the FTL value type, Containers
    -
    -
    - sequence slice,  Sequence slicing -
    -
    - servlet
    -
    -
    include, Including content from other web application - resources
    -
    -
    - Servlet,  Using FreeMarker with servlets -
    -
    - setting,  Settings -
    -
    - setting directive,  setting -
    -
    - shared variable,  Shared variables -
    -
    - short built-in,  byte, double, float, int, long, short -
    -
    - size built-in,  size -
    -
    - sort_by built-in,  sort_by -
    -
    - sort built-in,  sort -
    -
    - special variable,  Special Variable Reference -
    -
    - special variables,  Special variables -
    -
    - split built-in,  split -
    -
    - square bracket syntax,  Alternative (square bracket) syntax -
    -
    - starts_with built-in,  starts_with -
    -
    - static method
    -
    -
    accessing from templates, Bean wrapper
    -
    -
    - stop directive,  stop -
    -
    - storing templates,  Template loading -
    -
    - strict syntax,  Old FTL syntax -
    -
    - string
    -
    -
    built-ins, Built-ins for strings
    -
    concatenate, Interpolation (or concatenation)
    -
    interpolation, Interpolation (or concatenation)
    -
    Java side, Scalars
    -
    literal, Strings
    -
    operations, String operations
    -
    slice, String slicing (substrings)
    -
    substring, String slicing (substrings)
    -
    the FTL value type, Scalars
    -
    -
    - string built-in,  string (when used with a numerical value), -string (when used with a date/time/date-time value), -string (when used with a boolean value) -
    -
    - string slicing,  String slicing (substrings) -
    -
    - string to boolean,  boolean -
    -
    - string to date,  date, time, datetime -
    -
    - string to number,  number -
    -
    - string to time,  date, time, datetime -
    -
    - Struts,  Using FreeMarker with servlets -
    -
    - subsequence,  Sequence slicing -
    -
    - substring,  String slicing (substrings), -substring -
    -
    - substring built-in,  substring -
    -
    - subtraction,  Arithmetical calculations -
    -
    - subvariable
    -
    -
    accessing, Top-level variables, Retrieving data from a hash, Retrieving data from a sequence
    -
    -
    - switch directive,  switch, case, default, break -
    -
    -
    - -

    T

    -
    -
    - tabular printing of sequences,  chunk -
    -
    - tag
    -
    -
    user-defined, Defining your own directives
    -
    -
    - taglib,  Using FreeMarker with servlets -
    -
    - t directive,  t, lt, rt -
    -
    - template,  The Template -
    -
    -
    Java side, Get the template
    -
    -
    - template caching,  Template caching -
    -
    - template loaders,  Template loading -
    -
    - template loading,  Template loading -
    -
    - template name,  Template loading -
    -
    - template path,  Template loading -
    -
    - temporary variable,  Defining variables in the template -
    -
    - testing for missing,  Missing value test operator -
    -
    - testing for null,  Missing value test operator -
    -
    - testing for undefined,  Missing value test operator -
    -
    - text,  Overall structure -
    -
    - thread-safety,  Multithreading -
    -
    - time
    -
    -
    built-ins, Built-ins for date/time/date-time values
    -
    Java API related difficulties, Scalars
    -
    Java side, Scalars
    -
    the FTL value type, Scalars
    -
    -
    - time_format,  setting -
    -
    - time_zone,  setting, -setting -
    -
    - time built-in,  date, time, datetime, -date, time, datetime (when used with a date/time/date-time - value) -
    -
    - timestamp
    -
    -
    built-ins, Built-ins for date/time/date-time values
    -
    -
    - time to string,  string (when used with a date/time/date-time value) -
    -
    - transform,  Defining your own directives -
    -
    - transform directive,  Transform directive -
    -
    - tree nodes,  Node variables -
    -
    - trees,  Node variables -
    -
    - trim built-in,  trim -
    -
    - trimmer directives,  nt, -t, lt, rt -
    -
    - type-casting,  boolean, -date, time, datetime, -number, -c (when used with numerical value), -string (when used with a numerical value), -date, time, datetime (when used with a date/time/date-time - value), -string (when used with a date/time/date-time value), -c (when used with boolean), -string (when used with a boolean value), -byte, double, float, int, long, short, -number_to_date, number_to_time, number_to_datetime -
    -
    - type checking,  is_... -
    -
    -
    - -

    U

    -
    -
    - uncap_first built-in,  uncap_first -
    -
    - undefined variable,  Handling missing values -
    -
    - upper_case built-in,  upper_case -
    -
    - url_escaping_charset,  url, -setting -
    -
    - url_path built-in,  url_path -
    -
    - url built-in,  url -
    -
    - URL encoding,  url, -url_path -
    -
    - URL escaping,  url, -url_path -
    -
    - URL escaping charset,  Special Variable Reference, -Special Variable Reference -
    -
    - user-defined directive,  Defining your own directives, -User-defined directive (<@...>) -
    -
    -
    the FTL value type, User-defined directives
    -
    -
    -
    - -

    V

    -
    -
    - value,  What is a value? -
    -
    - values built-in,  values -
    -
    - variable,  Defining variables in the template -
    -
    - variables,  Variables, scopes -
    -
    -
    names, FAQ
    -
    -
    - variable scopes,  Variables, scopes -
    -
    - version,  Special Variable Reference -
    -
    - visit directive,  visit, recurse, fallback -
    -
    -
    - -

    W

    -
    -
    - web_safe built-in,  List of deprecated built-ins -
    -
    - Web application framework,  Using FreeMarker with servlets -
    -
    - white-space removal,  White-space handling -
    -
    -
    compress, White-space handling, compress
    -
    stripping, White-space stripping, ftl, nt
    -
    trimming, nt, t, lt, rt
    -
    -
    - word_list built-in,  word_list -
    -
    - wrapper,  Basics, -Object wrappers -
    -
    - wrapping
    -
    -
    beans, Bean wrapper
    -
    jython, Jython wrapper
    -
    reflection, Bean wrapper
    -
    -
    -
    - -

    X

    -
    -
    - xhtml built-in,  xhtml -
    -
    - XML
    -
    -
    declarative processing, Declarative XML processing
    -
    exposing, Exposing XML documents
    -
    imperative processing, Imperative XML processing
    -
    -
    - xml built-in,  xml -
    -
    - XML namespace
    -
    -
    in imperative processing, Basics
    -
    -
    - XML namespaces
    -
    -
    in declarative processing, Details
    -
    -
    - XML Schema date parsing,  date, time, datetime -
    -
    - XML Schema date rendering,  setting -
    -
    - XML Schema dateTime rendering,  setting -
    -
    - XML Schema time parsing,  date, time, datetime -
    -
    - XML Schema time rendering,  setting -
    -
    - XSLT,  Declarative XML processing -
    -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/api/allclasses-frame.html b/fmpp/docs/freemarker/api/allclasses-frame.html deleted file mode 100644 index c4080d7..0000000 --- a/fmpp/docs/freemarker/api/allclasses-frame.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -All Classes (FreeMarker 2.3.21 API) - - - - - -

    All Classes

    -
    - -
    - - diff --git a/fmpp/docs/freemarker/api/allclasses-noframe.html b/fmpp/docs/freemarker/api/allclasses-noframe.html deleted file mode 100644 index dd5823e..0000000 --- a/fmpp/docs/freemarker/api/allclasses-noframe.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -All Classes (FreeMarker 2.3.21 API) - - - - - -

    All Classes

    -
    - -
    - - diff --git a/fmpp/docs/freemarker/api/constant-values.html b/fmpp/docs/freemarker/api/constant-values.html deleted file mode 100644 index 1cb4cd6..0000000 --- a/fmpp/docs/freemarker/api/constant-values.html +++ /dev/null @@ -1,2876 +0,0 @@ - - - - - - -Constant Field Values (FreeMarker 2.3.21 API) - - - - - - - - -
    - - - - - - - -
    - - - -
    - - -

    freemarker.core.*

    -
      -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      freemarker.core.Configurable 
      Modifier and TypeConstant FieldValue
      - -public static final StringARITHMETIC_ENGINE_KEY"arithmetic_engine"
      - -public static final StringAUTO_FLUSH_KEY"auto_flush"
      - -public static final StringBOOLEAN_FORMAT_KEY"boolean_format"
      - -public static final StringCLASSIC_COMPATIBLE_KEY"classic_compatible"
      - -public static final StringDATE_FORMAT_KEY"date_format"
      - -public static final StringDATETIME_FORMAT_KEY"datetime_format"
      - -public static final StringLOCALE_KEY"locale"
      - -public static final StringNEW_BUILTIN_CLASS_RESOLVER_KEY"new_builtin_class_resolver"
      - -public static final StringNUMBER_FORMAT_KEY"number_format"
      - -public static final StringOBJECT_WRAPPER_KEY"object_wrapper"
      - -public static final StringOUTPUT_ENCODING_KEY"output_encoding"
      - -public static final StringSHOW_ERROR_TIPS_KEY"show_error_tips"
      - -public static final StringSQL_DATE_AND_TIME_TIME_ZONE_KEY"sql_date_and_time_time_zone"
      - -public static final StringSTRICT_BEAN_MODELS"strict_bean_models"
      - -public static final StringTEMPLATE_EXCEPTION_HANDLER_KEY"template_exception_handler"
      - -public static final StringTIME_FORMAT_KEY"time_format"
      - -public static final StringTIME_ZONE_KEY"time_zone"
      - -public static final StringURL_ESCAPING_CHARSET_KEY"url_escaping_charset"
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - - -
      freemarker.core.CustomAttribute 
      Modifier and TypeConstant FieldValue
      - -public static final intSCOPE_CONFIGURATION2
      - -public static final intSCOPE_ENVIRONMENT0
      - -public static final intSCOPE_TEMPLATE1
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      freemarker.core.ParseException 
      Modifier and TypeConstant FieldValue
      - -public static final int_INCLUDE17
      - -public static final intAND107
      - -public static final intAS120
      - -public static final intASCII_DIGIT125
      - -public static final intASSIGN14
      - -public static final intATTEMPT6
      - -public static final intBLANK1
      - -public static final intBREAK45
      - -public static final intBUILT_IN91
      - -public static final intCALL25
      - -public static final intCASE13
      - -public static final intCLOSE_BRACKET114
      - -public static final intCLOSE_PAREN116
      - -public static final intCLOSE_TAG14
      - -public static final intCLOSE_TAG25
      - -public static final intCLOSING_CURLY_BRACKET118
      - -public static final intCOLON112
      - -public static final intCOMMA110
      - -public static final intCOMMENT28
      - -public static final intCOMPRESS27
      - -public static final intDECIMAL86
      - -public static final intDEFAUL53
      - -public static final intDEFAULT0
      - -public static final intDIRECTIVE_END126
      - -public static final intDIVIDE105
      - -public static final intDOLLAR_INTERPOLATION_OPENING71
      - -public static final intDOT87
      - -public static final intDOT_DOT88
      - -public static final intDOT_DOT_ASTERISK90
      - -public static final intDOT_DOT_LESS89
      - -public static final intDOUBLE_EQUALS94
      - -public static final intDOUBLE_STAR103
      - -public static final intELLIPSIS104
      - -public static final intELSE44
      - -public static final intELSE_IF9
      - -public static final intEMPTY_DIRECTIVE_END127
      - -public static final intEND_ASSIGN38
      - -public static final intEND_ATTEMPT34
      - -public static final intEND_COMPRESS41
      - -public static final intEND_ESCAPE60
      - -public static final intEND_FOREACH35
      - -public static final intEND_FUNCTION39
      - -public static final intEND_GLOBAL37
      - -public static final intEND_IF31
      - -public static final intEND_LIST32
      - -public static final intEND_LOCAL36
      - -public static final intEND_MACRO40
      - -public static final intEND_NOESCAPE62
      - -public static final intEND_RECOVER33
      - -public static final intEND_SWITCH43
      - -public static final intEND_TAG3
      - -public static final intEND_TRANSFORM42
      - -public static final intEOF0
      - -public static final intEQUALS93
      - -public static final intESCAPE59
      - -public static final intESCAPED_CHAR80
      - -public static final intESCAPED_GT98
      - -public static final intESCAPED_GTE99
      - -public static final intEXCLAM109
      - -public static final intEXISTS92
      - -public static final intEXPRESSION_COMMENT5
      - -public static final intFALLBACK58
      - -public static final intFALSE83
      - -public static final intFLUSH48
      - -public static final intFM_EXPRESSION2
      - -public static final intFOREACH11
      - -public static final intFTL_HEADER65
      - -public static final intFUNCTION19
      - -public static final intGLOBALASSIGN15
      - -public static final intHALT47
      - -public static final intHASH_INTERPOLATION_OPENING72
      - -public static final intID122
      - -public static final intIF8
      - -public static final intIMPORT18
      - -public static final intIN119
      - -public static final intIN_PAREN3
      - -public static final intINTEGER85
      - -public static final intKEEP_GOING134
      - -public static final intLESS_THAN96
      - -public static final intLESS_THAN_EQUALS97
      - -public static final intLIST10
      - -public static final intLOCALASSIGN16
      - -public static final intLONE_LESS_THAN_OR_DASH135
      - -public static final intLTRIM50
      - -public static final intMACRO20
      - -public static final intMAYBE_END133
      - -public static final intMINUS101
      - -public static final intNAME_START_CHAR124
      - -public static final intNAMED_PARAMETER_EXPRESSION4
      - -public static final intNATURAL_GT128
      - -public static final intNATURAL_GTE129
      - -public static final intNESTED55
      - -public static final intNO_PARSE7
      - -public static final intNO_SPACE_EXPRESSION6
      - -public static final intNODIRECTIVE1
      - -public static final intNOESCAPE61
      - -public static final intNOPARSE30
      - -public static final intNOT_EQUALS95
      - -public static final intNOTRIM52
      - -public static final intOPEN_BRACKET113
      - -public static final intOPEN_MISPLACED_INTERPOLATION123
      - -public static final intOPEN_PAREN115
      - -public static final intOPENING_CURLY_BRACKET117
      - -public static final intOR108
      - -public static final intPERCENT106
      - -public static final intPLUS100
      - -public static final intRAW_STRING82
      - -public static final intRECOVER7
      - -public static final intRECURSE57
      - -public static final intRETURN24
      - -public static final intRTRIM51
      - -public static final intSEMICOLON111
      - -public static final intSETTING26
      - -public static final intSIMPLE_NESTED54
      - -public static final intSIMPLE_RECURSE56
      - -public static final intSIMPLE_RETURN46
      - -public static final intSTART_TAG2
      - -public static final intSTATIC_TEXT_FALSE_ALARM70
      - -public static final intSTATIC_TEXT_NON_WS69
      - -public static final intSTATIC_TEXT_WS68
      - -public static final intSTOP23
      - -public static final intSTRING_LITERAL81
      - -public static final intSWITCH12
      - -public static final intTERMINATING_EXCLAM131
      - -public static final intTERMINATING_WHITESPACE130
      - -public static final intTERSE_COMMENT29
      - -public static final intTERSE_COMMENT_END132
      - -public static final intTIMES102
      - -public static final intTRANSFORM21
      - -public static final intTRIM49
      - -public static final intTRIVIAL_FTL_HEADER66
      - -public static final intTRUE84
      - -public static final intUNIFIED_CALL63
      - -public static final intUNIFIED_CALL_END64
      - -public static final intUNKNOWN_DIRECTIVE67
      - -public static final intUSING121
      - -public static final intVISIT22
      -
    • -
    - - - -

    freemarker.debug.*

    - - - - -

    freemarker.ext.*

    - - -
      -
    • - - - - - - - - - - - - - - -
      freemarker.ext.util.IdentityHashMap 
      Modifier and TypeConstant FieldValue
      - -public static final longserialVersionUID362498820763181265L
      -
    • -
    - - - -

    freemarker.log.*

    - - - - -

    freemarker.template.*

    -
      -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      freemarker.template.Configuration 
      Modifier and TypeConstant FieldValue
      - -public static final intANGLE_BRACKET_TAG_SYNTAX1
      - -public static final intAUTO_DETECT_TAG_SYNTAX0
      - -public static final StringAUTO_IMPORT_KEY"auto_import"
      - -public static final StringAUTO_INCLUDE_KEY"auto_include"
      - -public static final StringCACHE_STORAGE_KEY"cache_storage"
      - -public static final StringDEFAULT_ENCODING_KEY"default_encoding"
      - -public static final StringINCOMPATIBLE_ENHANCEMENTS"incompatible_enhancements"
      - -public static final StringINCOMPATIBLE_IMPROVEMENTS"incompatible_improvements"
      - -public static final StringLOCALIZED_LOOKUP_KEY"localized_lookup"
      - -public static final intSQUARE_BRACKET_TAG_SYNTAX2
      - -public static final StringSTRICT_SYNTAX_KEY"strict_syntax"
      - -public static final StringTAG_SYNTAX_KEY"tag_syntax"
      - -public static final StringTEMPLATE_LOADER_KEY"template_loader"
      - -public static final StringTEMPLATE_UPDATE_DELAY_KEY"template_update_delay"
      - -public static final StringWHITESPACE_STRIPPING_KEY"whitespace_stripping"
      -
    • -
    • - - - - - - - - - - - - - - - - - - - -
      freemarker.template.Template 
      Modifier and TypeConstant FieldValue
      - -public static final StringDEFAULT_NAMESPACE_PREFIX"D"
      - -public static final StringNO_NS_PREFIX"N"
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      freemarker.template.Template.WrongEncodingException 
      Modifier and TypeConstant FieldValue
      - -public static final int_INCLUDE17
      - -public static final intAND107
      - -public static final intAS120
      - -public static final intASCII_DIGIT125
      - -public static final intASSIGN14
      - -public static final intATTEMPT6
      - -public static final intBLANK1
      - -public static final intBREAK45
      - -public static final intBUILT_IN91
      - -public static final intCALL25
      - -public static final intCASE13
      - -public static final intCLOSE_BRACKET114
      - -public static final intCLOSE_PAREN116
      - -public static final intCLOSE_TAG14
      - -public static final intCLOSE_TAG25
      - -public static final intCLOSING_CURLY_BRACKET118
      - -public static final intCOLON112
      - -public static final intCOMMA110
      - -public static final intCOMMENT28
      - -public static final intCOMPRESS27
      - -public static final intDECIMAL86
      - -public static final intDEFAUL53
      - -public static final intDEFAULT0
      - -public static final intDIRECTIVE_END126
      - -public static final intDIVIDE105
      - -public static final intDOLLAR_INTERPOLATION_OPENING71
      - -public static final intDOT87
      - -public static final intDOT_DOT88
      - -public static final intDOT_DOT_ASTERISK90
      - -public static final intDOT_DOT_LESS89
      - -public static final intDOUBLE_EQUALS94
      - -public static final intDOUBLE_STAR103
      - -public static final intELLIPSIS104
      - -public static final intELSE44
      - -public static final intELSE_IF9
      - -public static final intEMPTY_DIRECTIVE_END127
      - -public static final intEND_ASSIGN38
      - -public static final intEND_ATTEMPT34
      - -public static final intEND_COMPRESS41
      - -public static final intEND_ESCAPE60
      - -public static final intEND_FOREACH35
      - -public static final intEND_FUNCTION39
      - -public static final intEND_GLOBAL37
      - -public static final intEND_IF31
      - -public static final intEND_LIST32
      - -public static final intEND_LOCAL36
      - -public static final intEND_MACRO40
      - -public static final intEND_NOESCAPE62
      - -public static final intEND_RECOVER33
      - -public static final intEND_SWITCH43
      - -public static final intEND_TAG3
      - -public static final intEND_TRANSFORM42
      - -public static final intEOF0
      - -public static final intEQUALS93
      - -public static final intESCAPE59
      - -public static final intESCAPED_CHAR80
      - -public static final intESCAPED_GT98
      - -public static final intESCAPED_GTE99
      - -public static final intEXCLAM109
      - -public static final intEXISTS92
      - -public static final intEXPRESSION_COMMENT5
      - -public static final intFALLBACK58
      - -public static final intFALSE83
      - -public static final intFLUSH48
      - -public static final intFM_EXPRESSION2
      - -public static final intFOREACH11
      - -public static final intFTL_HEADER65
      - -public static final intFUNCTION19
      - -public static final intGLOBALASSIGN15
      - -public static final intHALT47
      - -public static final intHASH_INTERPOLATION_OPENING72
      - -public static final intID122
      - -public static final intIF8
      - -public static final intIMPORT18
      - -public static final intIN119
      - -public static final intIN_PAREN3
      - -public static final intINTEGER85
      - -public static final intKEEP_GOING134
      - -public static final intLESS_THAN96
      - -public static final intLESS_THAN_EQUALS97
      - -public static final intLIST10
      - -public static final intLOCALASSIGN16
      - -public static final intLONE_LESS_THAN_OR_DASH135
      - -public static final intLTRIM50
      - -public static final intMACRO20
      - -public static final intMAYBE_END133
      - -public static final intMINUS101
      - -public static final intNAME_START_CHAR124
      - -public static final intNAMED_PARAMETER_EXPRESSION4
      - -public static final intNATURAL_GT128
      - -public static final intNATURAL_GTE129
      - -public static final intNESTED55
      - -public static final intNO_PARSE7
      - -public static final intNO_SPACE_EXPRESSION6
      - -public static final intNODIRECTIVE1
      - -public static final intNOESCAPE61
      - -public static final intNOPARSE30
      - -public static final intNOT_EQUALS95
      - -public static final intNOTRIM52
      - -public static final intOPEN_BRACKET113
      - -public static final intOPEN_MISPLACED_INTERPOLATION123
      - -public static final intOPEN_PAREN115
      - -public static final intOPENING_CURLY_BRACKET117
      - -public static final intOR108
      - -public static final intPERCENT106
      - -public static final intPLUS100
      - -public static final intRAW_STRING82
      - -public static final intRECOVER7
      - -public static final intRECURSE57
      - -public static final intRETURN24
      - -public static final intRTRIM51
      - -public static final intSEMICOLON111
      - -public static final intSETTING26
      - -public static final intSIMPLE_NESTED54
      - -public static final intSIMPLE_RECURSE56
      - -public static final intSIMPLE_RETURN46
      - -public static final intSTART_TAG2
      - -public static final intSTATIC_TEXT_FALSE_ALARM70
      - -public static final intSTATIC_TEXT_NON_WS69
      - -public static final intSTATIC_TEXT_WS68
      - -public static final intSTOP23
      - -public static final intSTRING_LITERAL81
      - -public static final intSWITCH12
      - -public static final intTERMINATING_EXCLAM131
      - -public static final intTERMINATING_WHITESPACE130
      - -public static final intTERSE_COMMENT29
      - -public static final intTERSE_COMMENT_END132
      - -public static final intTIMES102
      - -public static final intTRANSFORM21
      - -public static final intTRIM49
      - -public static final intTRIVIAL_FTL_HEADER66
      - -public static final intTRUE84
      - -public static final intUNIFIED_CALL63
      - -public static final intUNIFIED_CALL_END64
      - -public static final intUNKNOWN_DIRECTIVE67
      - -public static final intUSING121
      - -public static final intVISIT22
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      freemarker.template.TemplateDateModel 
      Modifier and TypeConstant FieldValue
      - -public static final intDATE2
      - -public static final intDATETIME3
      - -public static final intTIME1
      - -public static final intUNKNOWN0
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      freemarker.template.TransformControl 
      Modifier and TypeConstant FieldValue
      - -public static final intEND_EVALUATION1
      - -public static final intEVALUATE_BODY1
      - -public static final intREPEAT_EVALUATION0
      - -public static final intSKIP_BODY0
      -
    • -
    - -
    - -
    - - - - - - - -
    - - - - diff --git a/fmpp/docs/freemarker/api/deprecated-list.html b/fmpp/docs/freemarker/api/deprecated-list.html deleted file mode 100644 index 5fe69a9..0000000 --- a/fmpp/docs/freemarker/api/deprecated-list.html +++ /dev/null @@ -1,549 +0,0 @@ - - - - - - -Deprecated List (FreeMarker 2.3.21 API) - - - - - - - - -
    - - - - - - - -
    - - - -
    - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - - -
    - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/CacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/CacheStorage.html deleted file mode 100644 index 9eea630..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/CacheStorage.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - -CacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Interface CacheStorage

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/CacheStorageWithGetSize.html b/fmpp/docs/freemarker/api/freemarker/cache/CacheStorageWithGetSize.html deleted file mode 100644 index 90b561c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/CacheStorageWithGetSize.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - -CacheStorageWithGetSize (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Interface CacheStorageWithGetSize

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getSize

          -
          int getSize()
          -
          Returns the current number of cache entries. This is intended to be used for monitoring. Note that depending on - the implementation, the cost of this operation is not necessary trivial, although calling it a few times per - minute should not be a problem.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/ClassTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/ClassTemplateLoader.html deleted file mode 100644 index 0b6fee6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/ClassTemplateLoader.html +++ /dev/null @@ -1,420 +0,0 @@ - - - - - - -ClassTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class ClassTemplateLoader

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          ClassTemplateLoader

          -
          public ClassTemplateLoader()
          -
          Deprecated. confusing constructor, and seldom useful; - use ClassTemplateLoader(Class, String) instead.
          -
          Creates a template loader that will use the Class.getResource(String) - method of its own class to load the resources, and "/" as base path. - This means that that template paths will be resolved relatvively the root package - of the class hierarchy, so you hardly ever should use this constructor, rather do - something like this:
          - new ClassTemplateLoader(com.example.myapplication.SomeClass.class, "templates") - -

          If you extend this class, then the extending class will be used to load - the resources. - -

          Warning: this constructor was malfunctioned prior FreeMarker 2.3.4 - -- please update FreeMarker if needed.

          -
        • -
        - - - -
          -
        • -

          ClassTemplateLoader

          -
          public ClassTemplateLoader(Class baseClass)
          -
          Deprecated. it's confusing that the base path is ""; - use ClassTemplateLoader(Class, String) instead.
          -
          Creates a template loader that will use the Class.getResource(String) - method of the specified class to load the resources, and "" as base - path. This means that template paths will be resolved relatively to the class - location, that is, relatively to the directory (package) of the class.
          -
          -
          Parameters:
          -
          baseClass - the class whose - Class.getResource(String) will be used to load the templates.
          -
          -
        • -
        - - - -
          -
        • -

          ClassTemplateLoader

          -
          public ClassTemplateLoader(Class baseClass,
          -                           String packagePath)
          -
          Creates a template loader that will use the Class.getResource(String) method - of the specified class to load the resources, and the specified base path (absolute or relative). - -

          Examples: -

            -
          • Relative base path (will load from the - com.example.myapplication.templates package):
            - new ClassTemplateLoader(
            - com.example.myapplication.SomeClass.class,
            - "templates")
            -
          • Absolute base path:
            - new ClassTemplateLoader(
            - somepackage.SomeClass.class,
            - "/com/example/myapplication/templates")
            -
          -
          -
          Parameters:
          -
          baseClass - the class whose Class.getResource(String) method will be used - to load the templates. Be sure that you chose a class whose defining class-loader - sees the templates. This parameter can't be null.
          -
          packagePath - the path to the package that contains the templates. - A path that doesn't start with a slash (/) is relative to the - path (package) of the specified class. A path that starts with a slash - is an absolute path starting from the root of the package hierarchy. Path - components should be separated by forward slashes independently of the - separator character used by the underlying operating system. - This parameter can't be null.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getURL

          -
          protected URL getURL(String name)
          -
          Description copied from class: URLTemplateLoader
          -
          Given a template name (plus potential locale decorations) retrieves - an URL that points the template source.
          -
          -
          Specified by:
          -
          getURL in class URLTemplateLoader
          -
          Parameters:
          -
          name - the name of the sought template, including the locale - decorations.
          -
          Returns:
          -
          an URL that points to the template source, or null if it can - determine that the template source does not exist.
          -
          -
        • -
        - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Show class name and some details that are useful in template-not-found errors.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/ConcurrentCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/ConcurrentCacheStorage.html deleted file mode 100644 index 642ba1b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/ConcurrentCacheStorage.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - -ConcurrentCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Interface ConcurrentCacheStorage

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          isConcurrent

          -
          boolean isConcurrent()
          -
          Returns true if this instance of cache storage is concurrently - accessible from multiple threads without synchronization.
          -
          -
          Returns:
          -
          true if this instance of cache storage is concurrently - accessible from multiple threads without synchronization.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/FileTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/FileTemplateLoader.html deleted file mode 100644 index 0a6eef2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/FileTemplateLoader.html +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - -FileTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class FileTemplateLoader

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateLoader
      -
      -
      -
      -
      public class FileTemplateLoader
      -extends Object
      -implements TemplateLoader
      -
      A TemplateLoader that uses files in a specified directory as the - source of templates. If contains security checks that will prevent it - serving templates outside the template directory (like <include /etc/passwd>. - It compares canonical paths for this, so templates that are symbolically - linked into the template directory from outside of it won't work either.
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Summary

        - - - - - - - - - - -
        Fields 
        Modifier and TypeField and Description
        FilebaseDir 
        -
      • -
      - -
        -
      • - - -

        Constructor Summary

        - - - - - - - - - - - - - - -
        Constructors 
        Constructor and Description
        FileTemplateLoader() -
        Creates a new file template cache that will use the current directory - (the value of the system property user.dir as the base - directory for loading templates.
        -
        FileTemplateLoader(File baseDir) -
        Creates a new file template loader that will use the specified directory - as the base directory for loading templates.
        -
        FileTemplateLoader(File baseDir, - boolean allowLinking) -
        Creates a new file template loader that will use the specified directory - as the base directory for loading templates.
        -
        -
      • -
      - - -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          baseDir

          -
          public final File baseDir
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          FileTemplateLoader

          -
          public FileTemplateLoader()
          -                   throws IOException
          -
          Creates a new file template cache that will use the current directory - (the value of the system property user.dir as the base - directory for loading templates. It will not allow access to template - files that are accessible through symlinks that point outside the - base directory.
          -
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          FileTemplateLoader

          -
          public FileTemplateLoader(File baseDir)
          -                   throws IOException
          -
          Creates a new file template loader that will use the specified directory - as the base directory for loading templates. It will not allow access to - template files that are accessible through symlinks that point outside - the base directory.
          -
          -
          Parameters:
          -
          baseDir - the base directory for loading templates
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          FileTemplateLoader

          -
          public FileTemplateLoader(File baseDir,
          -                          boolean allowLinking)
          -                   throws IOException
          -
          Creates a new file template loader that will use the specified directory - as the base directory for loading templates.
          -
          -
          Parameters:
          -
          baseDir - the base directory for loading templates
          -
          allowLinking - if true, it will allow
          -
          Throws:
          -
          IOException
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          findTemplateSource

          -
          public Object findTemplateSource(String name)
          -                          throws IOException
          -
          Description copied from interface: TemplateLoader
          -
          Finds the object that acts as the source of the template with the - given name. This method is called by the TemplateCache when a template - is requested, before calling either TemplateLoader.getLastModified(Object) or - TemplateLoader.getReader(Object, String).
          -
          -
          Specified by:
          -
          findTemplateSource in interface TemplateLoader
          -
          Parameters:
          -
          name - the name of the template, already localized and normalized by - the cache. - It is completely up to the loader implementation to interpret - the name, however it should expect to receive hierarchical paths where - path components are separated by a slash (not backslash). Backslashes - (or any other OS specific separator character) are not considered as separators by - FreeMarker, and thus they will not be replaced with slash before passing to this method, - so it's up to the template loader to handle them (say, be throwing and exception that - tells the user that the path (s)he has entered is invalid, as (s)he must use slash -- - typical mistake of Windows users). - The passed names are always considered relative to some loader-defined root - location (often referred as the "template root directory"), and will never start with - a slash, nor will they contain a path component consisting of either a single or a double - dot -- these are all resolved by the template cache before passing the name to the - loader. As a side effect, paths that trivially reach outside template root directory, - such as ../my.ftl, will be rejected by the template cache, so they never - reach the template loader. Note again, that if the path uses backslash as path separator - instead of slash as (the template loader should not accept that), the normalization will - not properly happen, as FreeMarker (the cache) recognizes only the slashes as separators.
          -
          Returns:
          -
          an object representing the template source, which can be - supplied in subsequent calls to TemplateLoader.getLastModified(Object) and - TemplateLoader.getReader(Object, String). Null must be returned if the source - for the template can not be found (do not throw FileNotFoundException!). - The returned object may will be compared with a cached template source - object for equality, using the equals method. Thus, - objects returned for the same physical source must be equivalent - according to equals method, otherwise template caching - can become very ineffective!
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          getLastModified

          -
          public long getLastModified(Object templateSource)
          -
          Description copied from interface: TemplateLoader
          -
          Returns the time of last modification of the specified template source. - This method is called after findTemplateSource().
          -
          -
          Specified by:
          -
          getLastModified in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          Returns:
          -
          the time of last modification of the specified template source, - or -1 if the time is not known.
          -
          -
        • -
        - - - -
          -
        • -

          getReader

          -
          public Reader getReader(Object templateSource,
          -                        String encoding)
          -                 throws IOException
          -
          Description copied from interface: TemplateLoader
          -
          Returns the character stream of a template represented by the specified - template source. This method is possibly called for multiple times for the - same template source object, and it must always return a Reader that - reads the template from its beginning. Before this method is called for the - second time (or later), its caller must close the previously returned - Reader, and it must not use it anymore. That is, this method is not - required to support multiple concurrent readers for the same source - templateSource object. - -

          Typically, this method is called if the template is missing from the cache, - or if after calling TemplateLoader.findTemplateSource(String) and TemplateLoader.getLastModified(Object) - it was determined that the cached copy of the template is stale. Then, if it turns out that the - encoding parameter passed doesn't match the actual template content, this method will be called for a - second time with the correct encoding parameter value.

          -
          -
          Specified by:
          -
          getReader in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          encoding - the character encoding used to translate source bytes - to characters. Some loaders may not have access to the byte - representation of the template stream, and instead directly obtain a - character stream. These loaders should ignore the encoding parameter.
          -
          Returns:
          -
          a reader representing the template character stream. It's - the responsibility of the caller (TemplateCache usually) to - close() it.
          -
          Throws:
          -
          IOException - if an I/O error occurs while accessing the stream.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getBaseDirectory

          -
          public File getBaseDirectory()
          -
          Returns the base directory in which the templates are searched. This comes from the constructor argument, but - it's possibly a canonicalized version of that.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Show class name and some details that are useful in template-not-found errors.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/MruCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/MruCacheStorage.html deleted file mode 100644 index 0ab3868..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/MruCacheStorage.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - -MruCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class MruCacheStorage

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      CacheStorage, CacheStorageWithGetSize
      -
      -
      -
      -
      public class MruCacheStorage
      -extends Object
      -implements CacheStorageWithGetSize
      -
      A cache storage that implements a two-level Most Recently Used cache. In the - first level, items are strongly referenced up to the specified maximum. When - the maximum is exceeded, the least recently used item is moved into the - second level cache, where they are softly referenced, up to another - specified maximum. When the second level maximum is also exceeded, the least - recently used item is discarded altogether. This cache storage is a - generalization of both StrongCacheStorage and - SoftCacheStorage - the effect of both of them can be achieved by - setting one maximum to zero and the other to the largest positive integer. - On the other hand, if you wish to use this storage in a strong-only mode, or - in a soft-only mode, you might consider using StrongCacheStorage or - SoftCacheStorage instead, as they can be used by - TemplateCache concurrently without any synchronization on a 5.0 or - later JRE. - -

      This class is NOT thread-safe. If it's accessed from multiple - threads concurrently, proper synchronization must be provided by the callers. - Note that TemplateCache, the natural user of this class provides the - necessary synchronizations when it uses the class. - Also you might consider whether you need this sort of a mixed storage at all - in your solution, as in most cases SoftCacheStorage can also be sufficient. - SoftCacheStorage will use Java soft references, and they already use access - timestamps internally to bias the garbage collector against clearing - recently used references, so you can get reasonably good (and - memory-sensitive) most-recently-used caching through - SoftCacheStorage as well.

      -
      -
      See Also:
      -
      Configuration.setCacheStorage(CacheStorage)
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          MruCacheStorage

          -
          public MruCacheStorage(int strongSizeLimit,
          -                       int softSizeLimit)
          -
          Creates a new MRU cache storage with specified maximum cache sizes. Each - cache size can vary between 0 and Integer.MAX_VALUE.
          -
          -
          Parameters:
          -
          strongSizeLimit - the maximum number of strongly referenced templates; when exceeded, the entry used - the least recently will be moved into the soft cache.
          -
          softSizeLimit - the maximum number of softly referenced templates; when exceeded, the entry used - the least recently will be discarded.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - - - - - - - - - - - - - -
          -
        • -

          clear

          -
          public void clear()
          -
          -
          Specified by:
          -
          clear in interface CacheStorage
          -
          -
        • -
        - - - -
          -
        • -

          getStrongSizeLimit

          -
          public int getStrongSizeLimit()
          -
          Returns the configured upper limit of the number of strong cache entries.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getSoftSizeLimit

          -
          public int getSoftSizeLimit()
          -
          Returns the configured upper limit of the number of soft cache entries.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getStrongSize

          -
          public int getStrongSize()
          -
          Returns the current number of strong cache entries.
          -
          -
          Since:
          -
          2.3.21
          -
          See Also:
          -
          getStrongSizeLimit()
          -
          -
        • -
        - - - -
          -
        • -

          getSoftSize

          -
          public int getSoftSize()
          -
          Returns a close approximation of the current number of soft cache entries.
          -
          -
          Since:
          -
          2.3.21
          -
          See Also:
          -
          getSoftSizeLimit()
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/MultiTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/MultiTemplateLoader.html deleted file mode 100644 index 3d64156..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/MultiTemplateLoader.html +++ /dev/null @@ -1,493 +0,0 @@ - - - - - - -MultiTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class MultiTemplateLoader

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      StatefulTemplateLoader, TemplateLoader
      -
      -
      -
      -
      public class MultiTemplateLoader
      -extends Object
      -implements StatefulTemplateLoader
      -
      A TemplateLoader that uses a set of other loaders to load the templates. - On every request, loaders are queried in the order of their appearance in the - array of loaders provided to the constructor. However, if a request for some template - name was already satisfied in the past by one of the loaders, that Loader is queried - first (a soft affinity). - -

      This class is not thread-safe. If it's accessed from multiple - threads concurrently, proper synchronization must be provided by the callers. - Note that TemplateCache, the natural user of this class, provides the - necessary synchronizations when it uses this class, so then you don't have to worry - this.

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          MultiTemplateLoader

          -
          public MultiTemplateLoader(TemplateLoader[] loaders)
          -
          Creates a new multi template Loader that will use the specified loaders.
          -
          -
          Parameters:
          -
          loaders - the loaders that are used to load templates.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          findTemplateSource

          -
          public Object findTemplateSource(String name)
          -                          throws IOException
          -
          Description copied from interface: TemplateLoader
          -
          Finds the object that acts as the source of the template with the - given name. This method is called by the TemplateCache when a template - is requested, before calling either TemplateLoader.getLastModified(Object) or - TemplateLoader.getReader(Object, String).
          -
          -
          Specified by:
          -
          findTemplateSource in interface TemplateLoader
          -
          Parameters:
          -
          name - the name of the template, already localized and normalized by - the cache. - It is completely up to the loader implementation to interpret - the name, however it should expect to receive hierarchical paths where - path components are separated by a slash (not backslash). Backslashes - (or any other OS specific separator character) are not considered as separators by - FreeMarker, and thus they will not be replaced with slash before passing to this method, - so it's up to the template loader to handle them (say, be throwing and exception that - tells the user that the path (s)he has entered is invalid, as (s)he must use slash -- - typical mistake of Windows users). - The passed names are always considered relative to some loader-defined root - location (often referred as the "template root directory"), and will never start with - a slash, nor will they contain a path component consisting of either a single or a double - dot -- these are all resolved by the template cache before passing the name to the - loader. As a side effect, paths that trivially reach outside template root directory, - such as ../my.ftl, will be rejected by the template cache, so they never - reach the template loader. Note again, that if the path uses backslash as path separator - instead of slash as (the template loader should not accept that), the normalization will - not properly happen, as FreeMarker (the cache) recognizes only the slashes as separators.
          -
          Returns:
          -
          an object representing the template source, which can be - supplied in subsequent calls to TemplateLoader.getLastModified(Object) and - TemplateLoader.getReader(Object, String). Null must be returned if the source - for the template can not be found (do not throw FileNotFoundException!). - The returned object may will be compared with a cached template source - object for equality, using the equals method. Thus, - objects returned for the same physical source must be equivalent - according to equals method, otherwise template caching - can become very ineffective!
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          getLastModified

          -
          public long getLastModified(Object templateSource)
          -
          Description copied from interface: TemplateLoader
          -
          Returns the time of last modification of the specified template source. - This method is called after findTemplateSource().
          -
          -
          Specified by:
          -
          getLastModified in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          Returns:
          -
          the time of last modification of the specified template source, - or -1 if the time is not known.
          -
          -
        • -
        - - - -
          -
        • -

          getReader

          -
          public Reader getReader(Object templateSource,
          -                        String encoding)
          -                 throws IOException
          -
          Description copied from interface: TemplateLoader
          -
          Returns the character stream of a template represented by the specified - template source. This method is possibly called for multiple times for the - same template source object, and it must always return a Reader that - reads the template from its beginning. Before this method is called for the - second time (or later), its caller must close the previously returned - Reader, and it must not use it anymore. That is, this method is not - required to support multiple concurrent readers for the same source - templateSource object. - -

          Typically, this method is called if the template is missing from the cache, - or if after calling TemplateLoader.findTemplateSource(String) and TemplateLoader.getLastModified(Object) - it was determined that the cached copy of the template is stale. Then, if it turns out that the - encoding parameter passed doesn't match the actual template content, this method will be called for a - second time with the correct encoding parameter value.

          -
          -
          Specified by:
          -
          getReader in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          encoding - the character encoding used to translate source bytes - to characters. Some loaders may not have access to the byte - representation of the template stream, and instead directly obtain a - character stream. These loaders should ignore the encoding parameter.
          -
          Returns:
          -
          a reader representing the template character stream. It's - the responsibility of the caller (TemplateCache usually) to - close() it.
          -
          Throws:
          -
          IOException - if an I/O error occurs while accessing the stream.
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Show class name and some details that are useful in template-not-found errors.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/NullCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/NullCacheStorage.html deleted file mode 100644 index 332b42a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/NullCacheStorage.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - -NullCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class NullCacheStorage

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NullCacheStorage

          -
          public NullCacheStorage()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          isConcurrent

          -
          public boolean isConcurrent()
          -
          Description copied from interface: ConcurrentCacheStorage
          -
          Returns true if this instance of cache storage is concurrently - accessible from multiple threads without synchronization.
          -
          -
          Specified by:
          -
          isConcurrent in interface ConcurrentCacheStorage
          -
          Returns:
          -
          true if this instance of cache storage is concurrently - accessible from multiple threads without synchronization.
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          clear

          -
          public void clear()
          -
          -
          Specified by:
          -
          clear in interface CacheStorage
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/SoftCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/SoftCacheStorage.html deleted file mode 100644 index 2302542..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/SoftCacheStorage.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - -SoftCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class SoftCacheStorage

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          SoftCacheStorage

          -
          public SoftCacheStorage()
          -
        • -
        - - - -
          -
        • -

          SoftCacheStorage

          -
          public SoftCacheStorage(Map backingMap)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          isConcurrent

          -
          public boolean isConcurrent()
          -
          Description copied from interface: ConcurrentCacheStorage
          -
          Returns true if this instance of cache storage is concurrently - accessible from multiple threads without synchronization.
          -
          -
          Specified by:
          -
          isConcurrent in interface ConcurrentCacheStorage
          -
          Returns:
          -
          true if this instance of cache storage is concurrently - accessible from multiple threads without synchronization.
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          clear

          -
          public void clear()
          -
          -
          Specified by:
          -
          clear in interface CacheStorage
          -
          -
        • -
        - - - -
          -
        • -

          getSize

          -
          public int getSize()
          -
          Returns a close approximation of the number of cache entries.
          -
          -
          Specified by:
          -
          getSize in interface CacheStorageWithGetSize
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/StatefulTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/StatefulTemplateLoader.html deleted file mode 100644 index dfdf9da..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/StatefulTemplateLoader.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - -StatefulTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Interface StatefulTemplateLoader

    -
    -
    -
    -
      -
    • -
      -
      All Superinterfaces:
      -
      TemplateLoader
      -
      -
      -
      All Known Implementing Classes:
      -
      MultiTemplateLoader
      -
      -
      -
      -
      public interface StatefulTemplateLoader
      -extends TemplateLoader
      -
      Interface that can be implemented by template loaders that maintain some - sort of internal state (i.e. caches of earlier lookups for performance - optimization purposes etc.) and support resetting of their state.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/StringTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/StringTemplateLoader.html deleted file mode 100644 index 408a3c9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/StringTemplateLoader.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - - - -StringTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class StringTemplateLoader

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateLoader
      -
      -
      -
      -
      public class StringTemplateLoader
      -extends Object
      -implements TemplateLoader
      -
      A TemplateLoader that uses a Map with Strings as its source of - templates. - - In most case the regular way of loading templates from files will be fine. - However, there can be situations where you don't want to or can't load a - template from a file, e.g. if you have to deploy a single jar for - JavaWebStart or if they are contained within a database. - A single template can be created manually - e.g. -
      -   String templateStr="Hello ${user}";
      -   Template t = new Template("name", new StringReader(templateStr),
      -               new Configuration());
      - 
      - If, however, you want to create templates from strings which import other - templates this method doesn't work. - - In that case you can create a StringTemplateLoader and add each template to - it: -
      -   StringTemplateLoader stringLoader = new StringTemplateLoader();
      -   stringLoader.putTemplate("greetTemplate", "<#macro greet>Hello</#macro>");
      -   stringLoader.putTemplate("myTemplate", "<#include \"greetTemplate\"><@greet/> World!");
      - 
      - Then you tell your Configuration object to use it: -
      -   cfg.setTemplateLoader(stringLoader);
      - 
      - After that you should be able to use the templates as usual. Often you will - want to combine a StringTemplateLoader with another loader. You can - do so using a MultiTemplateLoader.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          StringTemplateLoader

          -
          public StringTemplateLoader()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          putTemplate

          -
          public void putTemplate(String name,
          -                        String templateSource)
          -
          Puts a template into the loader. A call to this method is identical to - the call to the three-arg putTemplate(String, String, long) - passing System.currentTimeMillis() as the third argument.
          -
          -
          Parameters:
          -
          name - the name of the template.
          -
          templateSource - the source code of the template.
          -
          -
        • -
        - - - -
          -
        • -

          putTemplate

          -
          public void putTemplate(String name,
          -                        String templateSource,
          -                        long lastModified)
          -
          Puts a template into the loader. The name can contain slashes to denote - logical directory structure, but must not start with a slash. If the - method is called multiple times for the same name and with different - last modified time, the configuration's template cache will reload the - template according to its own refresh settings (note that if the refresh - is disabled in the template cache, the template will not be reloaded). - Also, since the cache uses lastModified to trigger reloads, calling the - method with different source and identical timestamp won't trigger - reloading.
          -
          -
          Parameters:
          -
          name - the name of the template.
          -
          templateSource - the source code of the template.
          -
          lastModified - the time of last modification of the template in - terms of System.currentTimeMillis()
          -
          -
        • -
        - - - - - - - -
          -
        • -

          findTemplateSource

          -
          public Object findTemplateSource(String name)
          -
          Description copied from interface: TemplateLoader
          -
          Finds the object that acts as the source of the template with the - given name. This method is called by the TemplateCache when a template - is requested, before calling either TemplateLoader.getLastModified(Object) or - TemplateLoader.getReader(Object, String).
          -
          -
          Specified by:
          -
          findTemplateSource in interface TemplateLoader
          -
          Parameters:
          -
          name - the name of the template, already localized and normalized by - the cache. - It is completely up to the loader implementation to interpret - the name, however it should expect to receive hierarchical paths where - path components are separated by a slash (not backslash). Backslashes - (or any other OS specific separator character) are not considered as separators by - FreeMarker, and thus they will not be replaced with slash before passing to this method, - so it's up to the template loader to handle them (say, be throwing and exception that - tells the user that the path (s)he has entered is invalid, as (s)he must use slash -- - typical mistake of Windows users). - The passed names are always considered relative to some loader-defined root - location (often referred as the "template root directory"), and will never start with - a slash, nor will they contain a path component consisting of either a single or a double - dot -- these are all resolved by the template cache before passing the name to the - loader. As a side effect, paths that trivially reach outside template root directory, - such as ../my.ftl, will be rejected by the template cache, so they never - reach the template loader. Note again, that if the path uses backslash as path separator - instead of slash as (the template loader should not accept that), the normalization will - not properly happen, as FreeMarker (the cache) recognizes only the slashes as separators.
          -
          Returns:
          -
          an object representing the template source, which can be - supplied in subsequent calls to TemplateLoader.getLastModified(Object) and - TemplateLoader.getReader(Object, String). Null must be returned if the source - for the template can not be found (do not throw FileNotFoundException!). - The returned object may will be compared with a cached template source - object for equality, using the equals method. Thus, - objects returned for the same physical source must be equivalent - according to equals method, otherwise template caching - can become very ineffective!
          -
          -
        • -
        - - - -
          -
        • -

          getLastModified

          -
          public long getLastModified(Object templateSource)
          -
          Description copied from interface: TemplateLoader
          -
          Returns the time of last modification of the specified template source. - This method is called after findTemplateSource().
          -
          -
          Specified by:
          -
          getLastModified in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          Returns:
          -
          the time of last modification of the specified template source, - or -1 if the time is not known.
          -
          -
        • -
        - - - -
          -
        • -

          getReader

          -
          public Reader getReader(Object templateSource,
          -                        String encoding)
          -
          Description copied from interface: TemplateLoader
          -
          Returns the character stream of a template represented by the specified - template source. This method is possibly called for multiple times for the - same template source object, and it must always return a Reader that - reads the template from its beginning. Before this method is called for the - second time (or later), its caller must close the previously returned - Reader, and it must not use it anymore. That is, this method is not - required to support multiple concurrent readers for the same source - templateSource object. - -

          Typically, this method is called if the template is missing from the cache, - or if after calling TemplateLoader.findTemplateSource(String) and TemplateLoader.getLastModified(Object) - it was determined that the cached copy of the template is stale. Then, if it turns out that the - encoding parameter passed doesn't match the actual template content, this method will be called for a - second time with the correct encoding parameter value.

          -
          -
          Specified by:
          -
          getReader in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          encoding - the character encoding used to translate source bytes - to characters. Some loaders may not have access to the byte - representation of the template stream, and instead directly obtain a - character stream. These loaders should ignore the encoding parameter.
          -
          Returns:
          -
          a reader representing the template character stream. It's - the responsibility of the caller (TemplateCache usually) to - close() it.
          -
          -
        • -
        - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Show class name and some details that are useful in template-not-found errors.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/StrongCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/StrongCacheStorage.html deleted file mode 100644 index 25a6f63..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/StrongCacheStorage.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - -StrongCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class StrongCacheStorage

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          StrongCacheStorage

          -
          public StrongCacheStorage()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          isConcurrent

          -
          public boolean isConcurrent()
          -
          Returns true if the underlying Map is a ConcurrentMap.
          -
          -
          Specified by:
          -
          isConcurrent in interface ConcurrentCacheStorage
          -
          Returns:
          -
          true if this instance of cache storage is concurrently - accessible from multiple threads without synchronization.
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          getSize

          -
          public int getSize()
          -
          Returns a close approximation of the number of cache entries.
          -
          -
          Specified by:
          -
          getSize in interface CacheStorageWithGetSize
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          clear

          -
          public void clear()
          -
          -
          Specified by:
          -
          clear in interface CacheStorage
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/TemplateCache.html b/fmpp/docs/freemarker/api/freemarker/cache/TemplateCache.html deleted file mode 100644 index 942e43d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/TemplateCache.html +++ /dev/null @@ -1,618 +0,0 @@ - - - - - - -TemplateCache (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class TemplateCache

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          createLegacyDefaultTemplateLoader

          -
          protected static TemplateLoader createLegacyDefaultTemplateLoader()
          -
          Creates the default TemplateLoader used in 2.3.0-compatible mode.
          -
        • -
        - - - - - - - -
          -
        • -

          getTemplateLoader

          -
          public TemplateLoader getTemplateLoader()
          -
        • -
        - - - -
          -
        • -

          getCacheStorage

          -
          public CacheStorage getCacheStorage()
          -
        • -
        - - - - - - - -
          -
        • -

          getDelay

          -
          public long getDelay()
          -
          Gets the delay in milliseconds between checking for newer versions of a - template source.
          -
          -
          Returns:
          -
          the current value of the delay
          -
          -
        • -
        - - - -
          -
        • -

          setDelay

          -
          public void setDelay(long delay)
          -
          Sets the delay in milliseconds between checking for newer versions of a - template sources.
          -
          -
          Parameters:
          -
          delay - the new value of the delay
          -
          -
        • -
        - - - -
          -
        • -

          getLocalizedLookup

          -
          public boolean getLocalizedLookup()
          -
          Returns if localized template lookup is enabled or not.
          -
        • -
        - - - -
          -
        • -

          setLocalizedLookup

          -
          public void setLocalizedLookup(boolean localizedLookup)
          -
          Setis if localized template lookup is enabled or not.
          -
        • -
        - - - - - - - -
          -
        • -

          removeTemplate

          -
          public void removeTemplate(String name,
          -                           Locale locale,
          -                           String encoding,
          -                           boolean parse)
          -                    throws IOException
          -
          Removes an entry from the cache, hence forcing the re-loading of it when - it's next time requested. It doesn't delete the template file itself. - This is to give the application finer control over cache updating than - setDelay(long) alone does. - - For the meaning of the parameters, see - getTemplate(String, Locale, String, boolean).
          -
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          getFullTemplatePath

          -
          public static String getFullTemplatePath(Environment env,
          -                                         String currentTemplateDir,
          -                                         String targetTemplatePath)
          -
          Resolves a path-like reference to a template (like the one used in #include or #import), assuming - a current directory. This gives a full, even if non-normalized template name, that could be used for - getTemplate(String, Locale, String, boolean). This is mostly used when a template refers to another - template.
          -
          -
          Parameters:
          -
          targetTemplatePath - If starts with "/" or contains "://", it's an absolute path and currentDir - will be ignored, otherwise it's interpreted as relative to currentDir
          -
          currentTemplateDir - must end with "/", might contains "://".
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/TemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/TemplateLoader.html deleted file mode 100644 index e1edbf8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/TemplateLoader.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - -TemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Interface TemplateLoader

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          findTemplateSource

          -
          Object findTemplateSource(String name)
          -                   throws IOException
          -
          Finds the object that acts as the source of the template with the - given name. This method is called by the TemplateCache when a template - is requested, before calling either getLastModified(Object) or - getReader(Object, String).
          -
          -
          Parameters:
          -
          name - the name of the template, already localized and normalized by - the cache. - It is completely up to the loader implementation to interpret - the name, however it should expect to receive hierarchical paths where - path components are separated by a slash (not backslash). Backslashes - (or any other OS specific separator character) are not considered as separators by - FreeMarker, and thus they will not be replaced with slash before passing to this method, - so it's up to the template loader to handle them (say, be throwing and exception that - tells the user that the path (s)he has entered is invalid, as (s)he must use slash -- - typical mistake of Windows users). - The passed names are always considered relative to some loader-defined root - location (often referred as the "template root directory"), and will never start with - a slash, nor will they contain a path component consisting of either a single or a double - dot -- these are all resolved by the template cache before passing the name to the - loader. As a side effect, paths that trivially reach outside template root directory, - such as ../my.ftl, will be rejected by the template cache, so they never - reach the template loader. Note again, that if the path uses backslash as path separator - instead of slash as (the template loader should not accept that), the normalization will - not properly happen, as FreeMarker (the cache) recognizes only the slashes as separators.
          -
          Returns:
          -
          an object representing the template source, which can be - supplied in subsequent calls to getLastModified(Object) and - getReader(Object, String). Null must be returned if the source - for the template can not be found (do not throw FileNotFoundException!). - The returned object may will be compared with a cached template source - object for equality, using the equals method. Thus, - objects returned for the same physical source must be equivalent - according to equals method, otherwise template caching - can become very ineffective!
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          getLastModified

          -
          long getLastModified(Object templateSource)
          -
          Returns the time of last modification of the specified template source. - This method is called after findTemplateSource().
          -
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to findTemplateSource(String).
          -
          Returns:
          -
          the time of last modification of the specified template source, - or -1 if the time is not known.
          -
          -
        • -
        - - - -
          -
        • -

          getReader

          -
          Reader getReader(Object templateSource,
          -                 String encoding)
          -          throws IOException
          -
          Returns the character stream of a template represented by the specified - template source. This method is possibly called for multiple times for the - same template source object, and it must always return a Reader that - reads the template from its beginning. Before this method is called for the - second time (or later), its caller must close the previously returned - Reader, and it must not use it anymore. That is, this method is not - required to support multiple concurrent readers for the same source - templateSource object. - -

          Typically, this method is called if the template is missing from the cache, - or if after calling findTemplateSource(String) and getLastModified(Object) - it was determined that the cached copy of the template is stale. Then, if it turns out that the - encoding parameter passed doesn't match the actual template content, this method will be called for a - second time with the correct encoding parameter value.

          -
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to findTemplateSource(String).
          -
          encoding - the character encoding used to translate source bytes - to characters. Some loaders may not have access to the byte - representation of the template stream, and instead directly obtain a - character stream. These loaders should ignore the encoding parameter.
          -
          Returns:
          -
          a reader representing the template character stream. It's - the responsibility of the caller (TemplateCache usually) to - close() it.
          -
          Throws:
          -
          IOException - if an I/O error occurs while accessing the stream.
          -
          -
        • -
        - - - -
          -
        • -

          closeTemplateSource

          -
          void closeTemplateSource(Object templateSource)
          -                  throws IOException
          -
          Closes the template source. This is the last method that is called by - the TemplateCache for a template source. TemplateCache ensures that - this method will be called on every object that is returned from - findTemplateSource(String).
          -
          -
          Parameters:
          -
          templateSource - the template source that should be closed.
          -
          Throws:
          -
          IOException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/URLTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/URLTemplateLoader.html deleted file mode 100644 index 7b390d5..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/URLTemplateLoader.html +++ /dev/null @@ -1,539 +0,0 @@ - - - - - - -URLTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class URLTemplateLoader

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          URLTemplateLoader

          -
          public URLTemplateLoader()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          findTemplateSource

          -
          public Object findTemplateSource(String name)
          -                          throws IOException
          -
          Description copied from interface: TemplateLoader
          -
          Finds the object that acts as the source of the template with the - given name. This method is called by the TemplateCache when a template - is requested, before calling either TemplateLoader.getLastModified(Object) or - TemplateLoader.getReader(Object, String).
          -
          -
          Specified by:
          -
          findTemplateSource in interface TemplateLoader
          -
          Parameters:
          -
          name - the name of the template, already localized and normalized by - the cache. - It is completely up to the loader implementation to interpret - the name, however it should expect to receive hierarchical paths where - path components are separated by a slash (not backslash). Backslashes - (or any other OS specific separator character) are not considered as separators by - FreeMarker, and thus they will not be replaced with slash before passing to this method, - so it's up to the template loader to handle them (say, be throwing and exception that - tells the user that the path (s)he has entered is invalid, as (s)he must use slash -- - typical mistake of Windows users). - The passed names are always considered relative to some loader-defined root - location (often referred as the "template root directory"), and will never start with - a slash, nor will they contain a path component consisting of either a single or a double - dot -- these are all resolved by the template cache before passing the name to the - loader. As a side effect, paths that trivially reach outside template root directory, - such as ../my.ftl, will be rejected by the template cache, so they never - reach the template loader. Note again, that if the path uses backslash as path separator - instead of slash as (the template loader should not accept that), the normalization will - not properly happen, as FreeMarker (the cache) recognizes only the slashes as separators.
          -
          Returns:
          -
          an object representing the template source, which can be - supplied in subsequent calls to TemplateLoader.getLastModified(Object) and - TemplateLoader.getReader(Object, String). Null must be returned if the source - for the template can not be found (do not throw FileNotFoundException!). - The returned object may will be compared with a cached template source - object for equality, using the equals method. Thus, - objects returned for the same physical source must be equivalent - according to equals method, otherwise template caching - can become very ineffective!
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          getURL

          -
          protected abstract URL getURL(String name)
          -
          Given a template name (plus potential locale decorations) retrieves - an URL that points the template source.
          -
          -
          Parameters:
          -
          name - the name of the sought template, including the locale - decorations.
          -
          Returns:
          -
          an URL that points to the template source, or null if it can - determine that the template source does not exist.
          -
          -
        • -
        - - - -
          -
        • -

          getLastModified

          -
          public long getLastModified(Object templateSource)
          -
          Description copied from interface: TemplateLoader
          -
          Returns the time of last modification of the specified template source. - This method is called after findTemplateSource().
          -
          -
          Specified by:
          -
          getLastModified in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          Returns:
          -
          the time of last modification of the specified template source, - or -1 if the time is not known.
          -
          -
        • -
        - - - -
          -
        • -

          getReader

          -
          public Reader getReader(Object templateSource,
          -                        String encoding)
          -                 throws IOException
          -
          Description copied from interface: TemplateLoader
          -
          Returns the character stream of a template represented by the specified - template source. This method is possibly called for multiple times for the - same template source object, and it must always return a Reader that - reads the template from its beginning. Before this method is called for the - second time (or later), its caller must close the previously returned - Reader, and it must not use it anymore. That is, this method is not - required to support multiple concurrent readers for the same source - templateSource object. - -

          Typically, this method is called if the template is missing from the cache, - or if after calling TemplateLoader.findTemplateSource(String) and TemplateLoader.getLastModified(Object) - it was determined that the cached copy of the template is stale. Then, if it turns out that the - encoding parameter passed doesn't match the actual template content, this method will be called for a - second time with the correct encoding parameter value.

          -
          -
          Specified by:
          -
          getReader in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          encoding - the character encoding used to translate source bytes - to characters. Some loaders may not have access to the byte - representation of the template stream, and instead directly obtain a - character stream. These loaders should ignore the encoding parameter.
          -
          Returns:
          -
          a reader representing the template character stream. It's - the responsibility of the caller (TemplateCache usually) to - close() it.
          -
          Throws:
          -
          IOException - if an I/O error occurs while accessing the stream.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          canonicalizePrefix

          -
          protected static String canonicalizePrefix(String prefix)
          -
          Can be used by subclasses to canonicalize URL path prefixes.
          -
          -
          Parameters:
          -
          prefix - the path prefix to canonicalize
          -
          Returns:
          -
          the canonicalized prefix. All backslashes are replaced with - forward slashes, and a trailing slash is appended if the original - prefix wasn't empty and didn't already end with a slash.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          setURLConnectionUsesCaches

          -
          public void setURLConnectionUsesCaches(Boolean urlConnectionUsesCaches)
          -
          Sets if URLConnection.setUseCaches(boolean) will be called, and with what value. By default this is - null; see the behavior then below. The recommended value is false, so that FreeMarker can always - reliably detect when a template was changed. The default is null only for backward compatibility, - and certainly will be changed to false in 2.4.0. As FreeMarker has its own template cache with its - own update delay setting (Configuration.setTemplateUpdateDelay(int)), setting this to false - shouldn't cause performance problems. - -

          Regarding null value: By default then URLConnection.setUseCaches(boolean) won't be called, - and so the default of the URLConnection subclass will be in effect (usually true). That's the - 2.3.0-compatible mode. However, if Configuration.getIncompatibleImprovements() is at least 2.3.21, then - when Configuration.getTemplate is used, null will mean false. Note that this 2.3.21 trick - only works if the template is loaded through Configuration.getTemplate (or TemplateCache).

          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/WebappTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/WebappTemplateLoader.html deleted file mode 100644 index be1bdcd..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/WebappTemplateLoader.html +++ /dev/null @@ -1,537 +0,0 @@ - - - - - - -WebappTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.cache
    -

    Class WebappTemplateLoader

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateLoader
      -
      -
      -
      -
      public class WebappTemplateLoader
      -extends Object
      -implements TemplateLoader
      -
      A TemplateLoader that uses streams reachable through - ServletContext.getResource(String) as its source of templates.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          WebappTemplateLoader

          -
          public WebappTemplateLoader(javax.servlet.ServletContext servletContext)
          -
          Creates a resource template cache that will use the specified servlet - context to load the resources. It will use the base path of - "/" meaning templates will be resolved relative to the - servlet context root location.
          -
          -
          Parameters:
          -
          servletContext - the servlet context whose - ServletContext.getResource(String) will be used to load the - templates.
          -
          -
        • -
        - - - -
          -
        • -

          WebappTemplateLoader

          -
          public WebappTemplateLoader(javax.servlet.ServletContext servletContext,
          -                            String subdirPath)
          -
          Creates a template loader that will use the specified servlet - context to load the resources. It will use the specified base path, - which is interpreted relatively to the context root (does not mater - if you start it with "/" or not). Path components - should be separated by forward slashes independently of the separator - character used by the underlying operating system.
          -
          -
          Parameters:
          -
          servletContext - the servlet context whose - ServletContext.getResource(String) will be used to load the - templates.
          -
          subdirPath - the base path to template resources.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          findTemplateSource

          -
          public Object findTemplateSource(String name)
          -                          throws IOException
          -
          Description copied from interface: TemplateLoader
          -
          Finds the object that acts as the source of the template with the - given name. This method is called by the TemplateCache when a template - is requested, before calling either TemplateLoader.getLastModified(Object) or - TemplateLoader.getReader(Object, String).
          -
          -
          Specified by:
          -
          findTemplateSource in interface TemplateLoader
          -
          Parameters:
          -
          name - the name of the template, already localized and normalized by - the cache. - It is completely up to the loader implementation to interpret - the name, however it should expect to receive hierarchical paths where - path components are separated by a slash (not backslash). Backslashes - (or any other OS specific separator character) are not considered as separators by - FreeMarker, and thus they will not be replaced with slash before passing to this method, - so it's up to the template loader to handle them (say, be throwing and exception that - tells the user that the path (s)he has entered is invalid, as (s)he must use slash -- - typical mistake of Windows users). - The passed names are always considered relative to some loader-defined root - location (often referred as the "template root directory"), and will never start with - a slash, nor will they contain a path component consisting of either a single or a double - dot -- these are all resolved by the template cache before passing the name to the - loader. As a side effect, paths that trivially reach outside template root directory, - such as ../my.ftl, will be rejected by the template cache, so they never - reach the template loader. Note again, that if the path uses backslash as path separator - instead of slash as (the template loader should not accept that), the normalization will - not properly happen, as FreeMarker (the cache) recognizes only the slashes as separators.
          -
          Returns:
          -
          an object representing the template source, which can be - supplied in subsequent calls to TemplateLoader.getLastModified(Object) and - TemplateLoader.getReader(Object, String). Null must be returned if the source - for the template can not be found (do not throw FileNotFoundException!). - The returned object may will be compared with a cached template source - object for equality, using the equals method. Thus, - objects returned for the same physical source must be equivalent - according to equals method, otherwise template caching - can become very ineffective!
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          getLastModified

          -
          public long getLastModified(Object templateSource)
          -
          Description copied from interface: TemplateLoader
          -
          Returns the time of last modification of the specified template source. - This method is called after findTemplateSource().
          -
          -
          Specified by:
          -
          getLastModified in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          Returns:
          -
          the time of last modification of the specified template source, - or -1 if the time is not known.
          -
          -
        • -
        - - - -
          -
        • -

          getReader

          -
          public Reader getReader(Object templateSource,
          -                        String encoding)
          -                 throws IOException
          -
          Description copied from interface: TemplateLoader
          -
          Returns the character stream of a template represented by the specified - template source. This method is possibly called for multiple times for the - same template source object, and it must always return a Reader that - reads the template from its beginning. Before this method is called for the - second time (or later), its caller must close the previously returned - Reader, and it must not use it anymore. That is, this method is not - required to support multiple concurrent readers for the same source - templateSource object. - -

          Typically, this method is called if the template is missing from the cache, - or if after calling TemplateLoader.findTemplateSource(String) and TemplateLoader.getLastModified(Object) - it was determined that the cached copy of the template is stale. Then, if it turns out that the - encoding parameter passed doesn't match the actual template content, this method will be called for a - second time with the correct encoding parameter value.

          -
          -
          Specified by:
          -
          getReader in interface TemplateLoader
          -
          Parameters:
          -
          templateSource - an object representing a template source, obtained - through a prior call to TemplateLoader.findTemplateSource(String).
          -
          encoding - the character encoding used to translate source bytes - to characters. Some loaders may not have access to the byte - representation of the template stream, and instead directly obtain a - character stream. These loaders should ignore the encoding parameter.
          -
          Returns:
          -
          a reader representing the template character stream. It's - the responsibility of the caller (TemplateCache usually) to - close() it.
          -
          Throws:
          -
          IOException - if an I/O error occurs while accessing the stream.
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Show class name and some details that are useful in template-not-found errors.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/CacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/CacheStorage.html deleted file mode 100644 index 89dadad..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/CacheStorage.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - -Uses of Interface freemarker.cache.CacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.cache.CacheStorage

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/CacheStorageWithGetSize.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/CacheStorageWithGetSize.html deleted file mode 100644 index ab70ff3..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/CacheStorageWithGetSize.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - -Uses of Interface freemarker.cache.CacheStorageWithGetSize (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.cache.CacheStorageWithGetSize

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/ClassTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/ClassTemplateLoader.html deleted file mode 100644 index 2acd951..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/ClassTemplateLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.ClassTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.ClassTemplateLoader

    -
    -
    No usage of freemarker.cache.ClassTemplateLoader
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/ConcurrentCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/ConcurrentCacheStorage.html deleted file mode 100644 index f7be492..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/ConcurrentCacheStorage.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - -Uses of Interface freemarker.cache.ConcurrentCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.cache.ConcurrentCacheStorage

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/FileTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/FileTemplateLoader.html deleted file mode 100644 index dce4413..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/FileTemplateLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.FileTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.FileTemplateLoader

    -
    -
    No usage of freemarker.cache.FileTemplateLoader
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/MruCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/MruCacheStorage.html deleted file mode 100644 index 63663fd..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/MruCacheStorage.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.MruCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.MruCacheStorage

    -
    -
    No usage of freemarker.cache.MruCacheStorage
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/MultiTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/MultiTemplateLoader.html deleted file mode 100644 index 001f758..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/MultiTemplateLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.MultiTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.MultiTemplateLoader

    -
    -
    No usage of freemarker.cache.MultiTemplateLoader
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/NullCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/NullCacheStorage.html deleted file mode 100644 index a3f57ba..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/NullCacheStorage.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.NullCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.NullCacheStorage

    -
    -
    No usage of freemarker.cache.NullCacheStorage
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/SoftCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/SoftCacheStorage.html deleted file mode 100644 index 974d677..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/SoftCacheStorage.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.SoftCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.SoftCacheStorage

    -
    -
    No usage of freemarker.cache.SoftCacheStorage
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/StatefulTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/StatefulTemplateLoader.html deleted file mode 100644 index a9adaf2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/StatefulTemplateLoader.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Interface freemarker.cache.StatefulTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.cache.StatefulTemplateLoader

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/StringTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/StringTemplateLoader.html deleted file mode 100644 index 38d788f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/StringTemplateLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.StringTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.StringTemplateLoader

    -
    -
    No usage of freemarker.cache.StringTemplateLoader
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/StrongCacheStorage.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/StrongCacheStorage.html deleted file mode 100644 index c42b1ce..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/StrongCacheStorage.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.StrongCacheStorage (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.StrongCacheStorage

    -
    -
    No usage of freemarker.cache.StrongCacheStorage
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/TemplateCache.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/TemplateCache.html deleted file mode 100644 index 23cf051..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/TemplateCache.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.TemplateCache (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.TemplateCache

    -
    -
    No usage of freemarker.cache.TemplateCache
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/TemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/TemplateLoader.html deleted file mode 100644 index 3ff189b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/TemplateLoader.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - -Uses of Interface freemarker.cache.TemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.cache.TemplateLoader

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/URLTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/URLTemplateLoader.html deleted file mode 100644 index d610b50..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/URLTemplateLoader.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.URLTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.URLTemplateLoader

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/class-use/WebappTemplateLoader.html b/fmpp/docs/freemarker/api/freemarker/cache/class-use/WebappTemplateLoader.html deleted file mode 100644 index 8d7364c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/class-use/WebappTemplateLoader.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.cache.WebappTemplateLoader (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.cache.WebappTemplateLoader

    -
    -
    No usage of freemarker.cache.WebappTemplateLoader
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/package-frame.html b/fmpp/docs/freemarker/api/freemarker/cache/package-frame.html deleted file mode 100644 index 58339ee..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/package-frame.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -freemarker.cache (FreeMarker 2.3.21 API) - - - - - -

    freemarker.cache

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/package-summary.html b/fmpp/docs/freemarker/api/freemarker/cache/package-summary.html deleted file mode 100644 index 96f32c7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/package-summary.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - -freemarker.cache (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.cache

    -
    -
    Template loading and caching.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Interface Summary 
      InterfaceDescription
      CacheStorage -
      Cache storage abstracts away the storage aspects of a cache - associating - an object with a key, retrieval and removal via the key.
      -
      CacheStorageWithGetSize -
      A cache storage that has a getSize() method for returning the current number of cache entries.
      -
      ConcurrentCacheStorage -
      An optional interface for cache storage that knows whether it can be - concurrently accessible without synchronization.
      -
      StatefulTemplateLoader -
      Interface that can be implemented by template loaders that maintain some - sort of internal state (i.e.
      -
      TemplateLoader -
      FreeMarker loads template "files" through objects that implement this interface, - thus the templates need not be real files, and can come from any kind of data source - (like classpath, servlet context, database, etc).
      -
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      ClassTemplateLoader -
      A TemplateLoader that uses streams reachable through - Class.getResourceAsStream(String) as its source of templates.
      -
      FileTemplateLoader -
      A TemplateLoader that uses files in a specified directory as the - source of templates.
      -
      MruCacheStorage -
      A cache storage that implements a two-level Most Recently Used cache.
      -
      MultiTemplateLoader -
      A TemplateLoader that uses a set of other loaders to load the templates.
      -
      NullCacheStorage -
      A cache storage that doesn't store anything.
      -
      SoftCacheStorage -
      Soft cache storage is a cache storage that uses SoftReference - objects to hold the objects it was passed, therefore allows the garbage - collector to purge the cache when it determines that it wants to free up - memory.
      -
      StringTemplateLoader -
      A TemplateLoader that uses a Map with Strings as its source of - templates.
      -
      StrongCacheStorage -
      Strong cache storage is a cache storage that simply wraps a Map.
      -
      TemplateCache -
      Performs caching and on-demand loading of the templates.
      -
      URLTemplateLoader -
      This is an abstract template loader that can load templates whose - location can be described by an URL.
      -
      WebappTemplateLoader -
      A TemplateLoader that uses streams reachable through - ServletContext.getResource(String) as its source of templates.
      -
      -
    • -
    - - - -

    Package freemarker.cache Description

    -

    Template loading and caching. -Beside the actual template cache, it contains loaders that can load template -files from the file system, from the classpath, or from a web application -context. If you have specific needs, you can plug custom template loaders into -the system by implementing the template loader interface. -

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/package-tree.html b/fmpp/docs/freemarker/api/freemarker/cache/package-tree.html deleted file mode 100644 index deb9054..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/package-tree.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - -freemarker.cache Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.cache

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/cache/package-use.html b/fmpp/docs/freemarker/api/freemarker/cache/package-use.html deleted file mode 100644 index 961cf00..0000000 --- a/fmpp/docs/freemarker/api/freemarker/cache/package-use.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - -Uses of Package freemarker.cache (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.cache

    -
    -
    -
      -
    • - - - - - - - - - - - - - - - - - - - - -
      Packages that use freemarker.cache 
      PackageDescription
      freemarker.cache -
      Template loading and caching.
      -
      freemarker.ext.servlet -
      Servlet for legacy "Model 2" frameworks that allows using FreeMarker -templates instead of JSP as the MVC View -(see in the Manual).
      -
      freemarker.template -
      The fundamental, most commonly used API-s of FreeMarker; -start with Configuration (also see -Getting Stared in the Manual.)
      -
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Classes in freemarker.cache used by freemarker.cache 
      Class and Description
      CacheStorage -
      Cache storage abstracts away the storage aspects of a cache - associating - an object with a key, retrieval and removal via the key.
      -
      CacheStorageWithGetSize -
      A cache storage that has a getSize() method for returning the current number of cache entries.
      -
      ConcurrentCacheStorage -
      An optional interface for cache storage that knows whether it can be - concurrently accessible without synchronization.
      -
      StatefulTemplateLoader -
      Interface that can be implemented by template loaders that maintain some - sort of internal state (i.e.
      -
      TemplateLoader -
      FreeMarker loads template "files" through objects that implement this interface, - thus the templates need not be real files, and can come from any kind of data source - (like classpath, servlet context, database, etc).
      -
      URLTemplateLoader -
      This is an abstract template loader that can load templates whose - location can be described by an URL.
      -
      -
    • -
    • - - - - - - - - - - - - -
      Classes in freemarker.cache used by freemarker.ext.servlet 
      Class and Description
      TemplateLoader -
      FreeMarker loads template "files" through objects that implement this interface, - thus the templates need not be real files, and can come from any kind of data source - (like classpath, servlet context, database, etc).
      -
      -
    • -
    • - - - - - - - - - - - - - - - -
      Classes in freemarker.cache used by freemarker.template 
      Class and Description
      CacheStorage -
      Cache storage abstracts away the storage aspects of a cache - associating - an object with a key, retrieval and removal via the key.
      -
      TemplateLoader -
      FreeMarker loads template "files" through objects that implement this interface, - thus the templates need not be real files, and can come from any kind of data source - (like classpath, servlet context, database, etc).
      -
      -
    • -
    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.BigDecimalEngine.html b/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.BigDecimalEngine.html deleted file mode 100644 index 45b8249..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.BigDecimalEngine.html +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - -ArithmeticEngine.BigDecimalEngine (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class ArithmeticEngine.BigDecimalEngine

    -
    -
    - -
    -
      -
    • -
      -
      Enclosing class:
      -
      ArithmeticEngine
      -
      -
      -
      -
      public static class ArithmeticEngine.BigDecimalEngine
      -extends ArithmeticEngine
      -
      This is the default arithmetic engine in FreeMarker. It converts every - number it receives into BigDecimal, then operates on these - converted BigDecimals.
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.ConservativeEngine.html b/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.ConservativeEngine.html deleted file mode 100644 index 7d62555..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.ConservativeEngine.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - -ArithmeticEngine.ConservativeEngine (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class ArithmeticEngine.ConservativeEngine

    -
    -
    - -
    -
      -
    • -
      -
      Enclosing class:
      -
      ArithmeticEngine
      -
      -
      -
      -
      public static class ArithmeticEngine.ConservativeEngine
      -extends ArithmeticEngine
      -
      An arithmetic engine that conservatively widens the operation arguments - to extent that they can hold the result of the operation. Widening - conversions occur in following situations: -
        -
      • byte and short are always widened to int (alike to Java language).
      • -
      • To preserve magnitude: when operands are of different types, the - result type is the type of the wider operand.
      • -
      • to avoid overflows: if add, subtract, or multiply would overflow on - integer types, the result is widened from int to long, or from long to - BigInteger.
      • -
      • to preserve fractional part: if a division of integer types would - have a fractional part, int and long are converted to double, and - BigInteger is converted to BigDecimal. An operation on a float and a - long results in a double. An operation on a float or double and a - BigInteger results in a BigDecimal.
      • -
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.html b/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.html deleted file mode 100644 index c01c45d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/ArithmeticEngine.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - -ArithmeticEngine (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class ArithmeticEngine

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          BIGDECIMAL_ENGINE

          -
          public static final ArithmeticEngine.BigDecimalEngine BIGDECIMAL_ENGINE
          -
          Arithmetic engine that converts all numbers to BigDecimal and - then operates on them. This is FreeMarker's default arithmetic engine.
          -
        • -
        - - - -
          -
        • -

          CONSERVATIVE_ENGINE

          -
          public static final ArithmeticEngine.ConservativeEngine CONSERVATIVE_ENGINE
          -
          Arithmetic engine that uses (more-or-less) the widening conversions of - Java language to determine the type of result of operation, instead of - converting everything to BigDecimal up front.
          -
        • -
        - - - -
          -
        • -

          minScale

          -
          protected int minScale
          -
        • -
        - - - -
          -
        • -

          maxScale

          -
          protected int maxScale
          -
        • -
        - - - -
          -
        • -

          roundingPolicy

          -
          protected int roundingPolicy
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          ArithmeticEngine

          -
          public ArithmeticEngine()
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/BugException.html b/fmpp/docs/freemarker/api/freemarker/core/BugException.html deleted file mode 100644 index 53e6472..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/BugException.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - -BugException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class BugException

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      -
      public class BugException
      -extends RuntimeException
      -
      An unexpected state was reached that is certainly caused by a bug in FreeMarker.
      -
      -
      Since:
      -
      2.3.21
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          BugException

          -
          public BugException()
          -
        • -
        - - - -
          -
        • -

          BugException

          -
          public BugException(String message)
          -
        • -
        - - - -
          -
        • -

          BugException

          -
          public BugException(Throwable cause)
          -
        • -
        - - - -
          -
        • -

          BugException

          -
          public BugException(String message,
          -                    Throwable cause)
          -
        • -
        - - - -
          -
        • -

          BugException

          -
          public BugException(int value)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/CommandLine.html b/fmpp/docs/freemarker/api/freemarker/core/CommandLine.html deleted file mode 100644 index 79423e7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/CommandLine.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - -CommandLine (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class CommandLine

    -
    -
    - -
    -
      -
    • -
      -
      Deprecated.  -
      Will be removed, as a main method in a server-side library is marked as a security issue by many tools.
      -
      -
      -
      public class CommandLine
      -extends Object
      -
      FreeMarker command-line utility, the Main-Class of freemarker.jar. - Currently it just prints the version number.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          CommandLine

          -
          public CommandLine()
          -
          Deprecated. 
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          main

          -
          public static void main(String[] args)
          -
          Deprecated. 
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/Configurable.SettingValueAssignmentException.html b/fmpp/docs/freemarker/api/freemarker/core/Configurable.SettingValueAssignmentException.html deleted file mode 100644 index 0b35ea2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/Configurable.SettingValueAssignmentException.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - -Configurable.SettingValueAssignmentException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class Configurable.SettingValueAssignmentException

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      Enclosing class:
      -
      Configurable
      -
      -
      -
      -
      public static class Configurable.SettingValueAssignmentException
      -extends freemarker.core._MiscTemplateException
      -
      The setting name was recognized, but its value couldn't be parsed or the setting couldn't be set for some - other reason. This exception always has a cause exception.
      -
      -
      Since:
      -
      2.3.21
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    - -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/Configurable.UnknownSettingException.html b/fmpp/docs/freemarker/api/freemarker/core/Configurable.UnknownSettingException.html deleted file mode 100644 index 184c3ea..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/Configurable.UnknownSettingException.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - -Configurable.UnknownSettingException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class Configurable.UnknownSettingException

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      Enclosing class:
      -
      Configurable
      -
      -
      -
      -
      public static class Configurable.UnknownSettingException
      -extends freemarker.core._MiscTemplateException
      -
      The setting name was not recognized.
      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    - -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/Configurable.html b/fmpp/docs/freemarker/api/freemarker/core/Configurable.html deleted file mode 100644 index e6a69f3..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/Configurable.html +++ /dev/null @@ -1,2291 +0,0 @@ - - - - - - -Configurable (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class Configurable

    -
    -
    - -
    -
      -
    • -
      -
      Direct Known Subclasses:
      -
      Configuration, Environment, Template
      -
      -
      -
      -
      public class Configurable
      -extends Object
      -
      This is a common superclass of Configuration, - Template, and Environment classes. - It provides settings that are common to each of them. FreeMarker - uses a three-level setting hierarchy - the return value of every setting - getter method on Configurable objects inherits its value from its parent - Configurable object, unless explicitly overridden by a call to a - corresponding setter method on the object itself. The parent of an - Environment object is a Template object, the - parent of a Template object is a Configuration - object.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          Configurable

          -
          public Configurable()
          -
          Deprecated. This shouldn't even be public; don't use it.
          -
          Creates a top-level configurable, one that doesn't inherit from a parent, and thus stores the default values.
          -
        • -
        - - - -
          -
        • -

          Configurable

          -
          protected Configurable(Version incompatibleImprovements)
          -
          Intended to be called from inside FreeMarker only. - Creates a top-level configurable, one that doesn't inherit from a parent, and thus stores the default values. - Called by the Configuration constructor.
          -
        • -
        - - - -
          -
        • -

          Configurable

          -
          public Configurable(Configurable parent)
          -
          Creates a new instance. Normally you do not need to use this constructor, - as you don't use Configurable directly, but its subclasses.
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - - - - - -
          -
        • -

          getParent

          -
          public final Configurable getParent()
          -
          Returns the parent Configurable object of this object. - The parent stores the default values for this configurable. For example, - the parent of the Template object is the - Configuration object, so setting values not - specified on template level are specified by the confuration object.
          -
          -
          Returns:
          -
          the parent Configurable object, or null, if this is - the root Configurable object.
          -
          -
        • -
        - - - -
          -
        • -

          setClassicCompatible

          -
          public void setClassicCompatible(boolean classicCompatibility)
          -
          Toggles the "Classic Compatible" mode. For a comprehensive description - of this mode, see isClassicCompatible().
          -
        • -
        - - - -
          -
        • -

          setClassicCompatibleAsInt

          -
          public void setClassicCompatibleAsInt(int classicCompatibility)
          -
          Same as setClassicCompatible(boolean), but allows some extra values.
          -
          -
          Parameters:
          -
          classicCompatibility - 0 means false, 1 means true, - 2 means true but with emulating bugs in early 2.x classic-compatibility mode. Currently - 2 affects how booleans are converted to string; with 1 it's always "true"/"", - but with 2 it's "true"/"false" for values wrapped by BeansWrapper as then - Boolean.toString() prevails. Note that someBoolean?string will always consistently format the - boolean according the boolean_format setting, just like in FreeMarker 2.3 and later.
          -
          -
        • -
        - - - -
          -
        • -

          isClassicCompatible

          -
          public boolean isClassicCompatible()
          -
          Returns whether the engine runs in the "Classic Compatibile" mode. - When this mode is active, the engine behavior is altered in following - way: (these resemble the behavior of the 1.7.x line of FreeMarker engine, - now named "FreeMarker Classic", hence the name). -
            -
          • handle undefined expressions gracefully. Namely when an expression - "expr" evaluates to null: -
              -
            • - in <assign varname=expr> directive, - or in ${expr} directive, - or in otherexpr == expr, - or in otherexpr != expr, - or in hash[expr], - or in expr[keyOrIndex] (since 2.3.20), - or in expr.key (since 2.3.20), - then it's treated as empty string. -
            • -
            • as argument of <list expr as item> or - <foreach item in expr>, the loop body is not executed - (as if it were a 0-length list) -
            • -
            • as argument of <if> directive, or on other places where a - boolean expression is expected, it's treated as false -
            • -
            -
          • -
          • Non-boolean models are accepted in <if> directive, - or as operands of logical operators. "Empty" models (zero-length string, - empty sequence or hash) are evaluated as false, all others are evaluated as - true.
          • -
          • When boolean value is treated as a string (i.e. output in - ${...} directive, or concatenated with other string), true - values are converted to string "true", false values are converted to - empty string. Except, if the value of the setting is 2, it will be - formatted according the boolean_format setting, just like in - 2.3.20 and later. -
          • -
          • Scalar models supplied to <list> and - <foreach> are treated as a one-element list consisting - of the passed model. -
          • -
          • Paths parameter of <include> will be interpreted as - absolute path. -
          • -
          - In all other aspects, the engine is a 2.1 engine even in compatibility - mode - you don't lose any of the new functionality by enabling it.
          -
        • -
        - - - -
          -
        • -

          getClassicCompatibleAsInt

          -
          public int getClassicCompatibleAsInt()
          -
        • -
        - - - -
          -
        • -

          setLocale

          -
          public void setLocale(Locale locale)
          -
          Sets the default locale used for number and date formatting (among others), also the locale used for searching - localized template variations when no locale was explicitly requested.
          -
          -
          See Also:
          -
          Configuration.getTemplate(String, Locale)
          -
          -
        • -
        - - - - - - - -
          -
        • -

          setTimeZone

          -
          public void setTimeZone(TimeZone timeZone)
          -
          Sets the time zone to use when formatting date/time values. - Defaults to the system time zone (TimeZone.getDefault()), regardless of the "locale" FreeMarker setting, - so in a server application you probably want to set it explicitly in the Environment to match the - preferred time zone of target audience (like the Web page visitor). - -

          If you or the templates set the time zone, you should probably also set - setSQLDateAndTimeTimeZone(TimeZone)!

          -
          -
          See Also:
          -
          setSQLDateAndTimeTimeZone(TimeZone)
          -
          -
        • -
        - - - -
          -
        • -

          setSQLDateAndTimeTimeZone

          -
          public void setSQLDateAndTimeTimeZone(TimeZone tz)
          -
          Sets the time zone used when dealing with java.sql.Date and - java.sql.Time values. It defaults to null for backward compatibility, but in most - application this should be set to the JVM default time zone (server default time zone), because that's what - most JDBC drivers will use when constructing the java.sql.Date and - java.sql.Time values. If this setting is null, FreeMarker will use the value of - (getTimeZone()) for java.sql.Date and java.sql.Time values, - which often gives bad results. - -

          This setting doesn't influence the formatting of other kind of values (like of - java.sql.Timestamp or plain java.util.Date values). - -

          To decide what value you need, a few things has to be understood: -

            -
          • Date-only and time-only values in SQL-oriented databases are usually store calendar and clock field - values directly (year, month, day, or hour, minute, seconds (with decimals)), as opposed to a set of points - on the physical time line. Thus, unlike SQL timestamps, these values usually aren't meant to be shown - differently depending on the time zone of the audience. - -
          • When a JDBC query has to return a date-only or time-only value, it has to convert it to a point on the - physical time line, because that's what Date and its subclasses store (milliseconds since - the epoch). Obviously, this is impossible to do. So JDBC just chooses a physical time which, when rendered - with the JVM default time zone, will give the same field values as those stored - in the database. (Actually, you can give JDBC a calendar, and so it can use other time zones too, but most - application won't care using those overloads.) For example, assume that the system time zone is GMT+02:00. - Then, 2014-07-12 in the database will be translated to physical time 2014-07-11 22:00:00 UTC, because that - rendered in GMT+02:00 gives 2014-07-12 00:00:00. Similarly, 11:57:00 in the database will be translated to - physical time 1970-01-01 09:57:00 UTC. Thus, the physical time stored in the returned value depends on the - default system time zone of the JDBC client, not just on the content in the database. (This used to be the - default behavior of ORM-s, like Hibernate, too.) - -
          • The value of the time_zone FreeMarker configuration setting sets the time zone used for the - template output. For example, when a web page visitor has a preferred time zone, the web application framework - may calls Environment.setTimeZone(TimeZone) with that time zone. Thus, the visitor will - see java.sql.Timestamp and plain java.util.Date values as - they look in his own time zone. While - this is desirable for those types, as they meant to represent physical points on the time line, this is not - necessarily desirable for date-only and time-only values. When sql_date_and_time_time_zone is - null, time_zone is used for rendering all kind of date/time/dateTime values, including - java.sql.Date and java.sql.Time, and then if, for example, - time_zone is GMT+00:00, the - values from the earlier examples will be shown as 2014-07-11 (one day off) and 09:57:00 (2 hours off). While - those are the time zone correct renderings, those values probably was meant to shown "as is". - -
          • You may wonder why this setting isn't simply "SQL time zone", since the time zone related behavior of JDBC - applies to java.sql.Timestamp too. FreeMarker assumes that you have set up your - application so that time stamps coming from the database go through the necessary conversion to store the - correct distance from the epoch (1970-01-01 00:00:00 UTC), as requested by Date. In that case - the time stamp can be safely rendered in different time zones, and thus it needs no special treatment. -
          -
          -
          Parameters:
          -
          tz - Maybe null, in which case java.sql.Date and - java.sql.Time values will be formatted in the time zone returned by - getTimeZone(). - (Note that since null is an allowed value for this setting, it will not cause - getSQLDateAndTimeTimeZone() to fall back to the parent configuration.)
          -
          Since:
          -
          2.3.21
          -
          See Also:
          -
          setTimeZone(TimeZone)
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getLocale

          -
          public Locale getLocale()
          -
          Returns the assumed locale when searching for template files with no - explicit requested locale. Defaults to system locale.
          -
        • -
        - - - -
          -
        • -

          setNumberFormat

          -
          public void setNumberFormat(String numberFormat)
          -
          Sets the number format used to convert numbers to strings.
          -
        • -
        - - - -
          -
        • -

          getNumberFormat

          -
          public String getNumberFormat()
          -
          Returns the default number format used to convert numbers to strings. - Defaults to "number"
          -
        • -
        - - - -
          -
        • -

          setBooleanFormat

          -
          public void setBooleanFormat(String booleanFormat)
          -
          The string value for the boolean true and false values, intended for human audience (not for a - computer language), separated with comma. For example, "yes,no". Note that white-space is significant, - so "yes, no" is WRONG (unless you want that leading space before "no"). - -

          For backward compatibility the default is "true,false", but using that value is denied for automatic - boolean-to-string conversion (like ${myBoolean} will fail with it), only myBool?string will - allow it, which is deprecated since FreeMarker 2.3.20. - -

          Note that automatic boolean-to-string conversion only exists since FreeMarker 2.3.20. Earlier this setting - only influenced the result of myBool?string.

          -
        • -
        - - - - - - - -
          -
        • -

          setTimeFormat

          -
          public void setTimeFormat(String timeFormat)
          -
          Sets the format used to convert Date-s to string-s that are time (no date part) values, - also the format that someString?time will use to parse strings. - -

          For the possible values see setDateTimeFormat(String). - -

          Defaults to "", which means "use the FreeMarker default", which is currently "medium".

          -
        • -
        - - - - - - - -
          -
        • -

          setDateFormat

          -
          public void setDateFormat(String dateFormat)
          -
          Sets the format used to convert Date-s to string-s that are date (no time part) values, - also the format that someString?date will use to parse strings. - -

          For the possible values see setDateTimeFormat(String). - -

          Defaults to "", which means "use the FreeMarker default", which is currently "code".

          -
        • -
        - - - - - - - -
          -
        • -

          setDateTimeFormat

          -
          public void setDateTimeFormat(String dateTimeFormat)
          -
          Sets the format used to convert Date-s to string-s that are date-time (timestamp) values, - also the format that someString?datetime will use to parse strings. - -

          The possible setting values are (the quotation marks aren't part of the value itself): - -

            -
          • Patterns accepted by Java's SimpleDateFormat, for example "dd.MM.yyyy HH:mm:ss" (where - HH means 24 hours format) or "MM/dd/yyyy hh:mm:ss a" (where a prints AM or PM, if - the current language is English). - -

          • "xs" for XML Schema format, or "iso" for ISO 8601:2004 format. - These formats allow various additional options, separated with space, like in - "iso m nz" (or with _, like in "iso_m_nz"; this is useful in a case like - lastModified?string.iso_m_nz). The options and their meanings are: - -

              -
            • Accuracy options:
              - ms = Milliseconds, always shown with all 3 digits, even if it's all 0-s. - Example: 13:45:05.800
              - s = Seconds (fraction seconds are dropped even if non-0), like 13:45:05
              - m = Minutes, like 13:45. This isn't allowed for "xs".
              - h = Hours, like 13. This isn't allowed for "xs".
              - Neither = Up to millisecond accuracy, but trailing millisecond 0-s are removed, also the whole - milliseconds part if it would be 0 otherwise. Example: 13:45:05.8 - -

            • Time zone offset visibility options:
              - fz = "Force Zone", always show time zone offset (even for for - java.sql.Date and java.sql.Time values). - But, because ISO 8601 doesn't allow for dates (means date without time of the day) to - show the zone offset, this option will have no effect in the case of "iso" with - dates.
              - nz = "No Zone", never show time zone offset
              - Neither = always show time zone offset, except for java.sql.Date - and java.sql.Time, and for "iso" date values. - -

            • Time zone options:
              - u = Use UTC instead of what the time_zone setting suggests. However, - java.sql.Date and java.sql.Time aren't affected - by this (see setSQLDateAndTimeTimeZone(TimeZone) to understand why)
              - fu = "Force UTC", that is, use UTC instead of what the time_zone or the - sql_date_and_time_time_zone setting suggests. This also effects - java.sql.Date and java.sql.Time values
              - Neither = Use the time zone suggested by the time_zone or the - sql_date_and_time_time_zone configuration setting (setTimeZone(TimeZone) and - setSQLDateAndTimeTimeZone(TimeZone)). -

            - -

            The options can be specified in any order.

            - -

            Options from the same category are mutually exclusive, like using m and s - together is an error. - -

            The accuracy and time zone offset visibility options don't influence parsing, only formatting. - For example, even if you use "iso m nz", "2012-01-01T15:30:05.125+01" will be parsed successfully and with - milliseconds accuracy. - The time zone options (like "u") influence what time zone is chosen only when parsing a string that doesn't - contain time zone offset. - -

            Parsing with "iso" understands both extend format and basic format, like - 20141225T235018. It doesn't, however, support the parsing of all kind of ISO 8601 strings: if - there's a date part, it must use year, month and day of the month values (not week of the year), and the - day can't be omitted. - -

            The output of "iso" is deliberately so that it's also a good representation of the value with - XML Schema format, except for 0 and negative years, where it's impossible. Also note that the time zone - offset is omitted for date values in the "iso" format, while it's preserved for the "xs" - format. - -

          • "short", "medium", "long", or "full", which that has locale-dependent - meaning defined by the Java platform (see in the documentation of DateFormat). - For date-time values, you can specify the length of the date and time part independently, be separating - them with _, like "short_medium". ("medium" means - "medium_medium" for date-time values.) -

          - -

          Defaults to "", which means "use the FreeMarker default", which is currently "code".

          -
        • -
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          -
        • -

          setOutputEncoding

          -
          public void setOutputEncoding(String outputEncoding)
          -
          Informs FreeMarker about the charset used for the output. As FreeMarker outputs character stream (not - byte stream), it's not aware of the output charset unless the software that encloses it tells it - with this setting. Some templates may use FreeMarker features that require this information. - Setting this to null means that the output encoding is not known. - -

          Defaults to null (unknown).

          -
        • -
        - - - -
          -
        • -

          getOutputEncoding

          -
          public String getOutputEncoding()
          -
        • -
        - - - -
          -
        • -

          setURLEscapingCharset

          -
          public void setURLEscapingCharset(String urlEscapingCharset)
          -
          Sets the URL escaping charset. If not set (null), the output encoding - (setOutputEncoding(String)) will be used for URL escaping. - - Defaults to null.
          -
        • -
        - - - -
          -
        • -

          getURLEscapingCharset

          -
          public String getURLEscapingCharset()
          -
        • -
        - - - - - - - -
          -
        • -

          getNewBuiltinClassResolver

          -
          public TemplateClassResolver getNewBuiltinClassResolver()
          -
          Retrieves the TemplateClassResolver used - to resolve classes when "SomeClassName"?new is called in a template.
          -
          -
          Since:
          -
          2.3.17
          -
          -
        • -
        - - - -
          -
        • -

          setAutoFlush

          -
          public void setAutoFlush(boolean autoFlush)
          -
          Sets whether the output Writer is automatically flushed at - the end of Template.process(Object, Writer) (and its - overloads). The default is true. - -

          Using false is needed for example when a Web page is composed - from several boxes (like portlets, GUI panels, etc.) that aren't inserted - with #include (or with similar directives) into a master - FreeMarker template, rather they are all processed with a separate - Template.process(Object, Writer) call. In a such scenario the - automatic flushes would commit the HTTP response after each box, hence - interfering with full-page buffering, and also possibly decreasing - performance with too frequent and too early response buffer flushes.

          -
          -
          Since:
          -
          2.3.17
          -
          -
        • -
        - - - - - - - -
          -
        • -

          setShowErrorTips

          -
          public void setShowErrorTips(boolean showTips)
          -
          Sets if tips should be shown in error messages of errors arising during template processing. - The default is true.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - - - - - -
          -
        • -

          setSetting

          -
          public void setSetting(String name,
          -                       String value)
          -                throws TemplateException
          -
          Sets a FreeMarker setting by a name and string value. If you can configure FreeMarker directly with Java (or - other programming language), you should use the dedicated setter methods instead (like - setObjectWrapper(ObjectWrapper). This meant to be used if you get the settings from somewhere - as text. Regardless, below you will find an overview of the settings available no matter how you set them. - -

          The list of settings commonly supported in all Configurable subclasses: -

          - -

          Configuration (a subclass of Configurable) also understands these:

          - - -

          Regarding object builder expressions (used by the setting values where it was - indicated): -

            -
          • Before FreeMarker 2.3.21 it had to be a fully qualified class name, and nothing else.

          • -
          • Since 2.3.21, the generic syntax is: - className(constrArg1, constrArg2, ... constrArgN, - propName1=propValue1, propName2=propValue2, ... - propNameN=propValueN), - where - className is the fully qualified class name of the instance to create (except if we have - builder class or INSTANCE field around, but see that later), - constrArg-s are the values of constructor arguments, - and propName=propValue-s set JavaBean properties (like x=1 means - setX(1)) on the created instance. You can have any number of constructor arguments and property - setters, including 0. Constructor arguments must precede any property setters. -

          • -
          • - Example: com.example.MyObjectWrapper(1, 2, exposeFields=true, cacheSize=5000) is nearly - equivalent with this Java code: - obj = new com.example.MyObjectWrapper(1, 2); obj.setExposeFields(true); obj.setCacheSize(5000); -
          • -
          • -

            If you have no constructor arguments and property setters, and the className class has - a public static INSTANCE field, the value of that filed will be the value of the expression, and - the constructor won't be called. -

          • -
          • -

            If there exists a class named classNameBuilder, then that class will be instantiated - instead with the given constructor arguments, and the JavaBean properties of that builder instance will be - set. After that, the public build() method of the instance will be called, whose return value - will be the value of the whole expression. (The builder class and the build() method is simply - found by name, there's no special interface to implement.) Note that if you use the backward compatible - syntax, where these's no parenthesis after the class name, then it will not look for builder class. -

          • -
          • -

            Currently, the values of arguments and properties can only be one of these: -

              -
            • A numerical literal, like 123 or -1.5. Like in FTL, there are no numerical types, - the value will be automatically converted to the type of the target.
            • -
            • A boolean literal: true or false -
            • The null literal: null -
            • A string literal with FTL syntax, except that it can't contain ${...}-s and - #{...}-s. Examples: "Line 1\nLine 2" or r"C:\temp". -
            • An object builder expression. That is, object builder expressions can be nested into each other. -
            -
          • -
          • -

            The top-level object builder expressions may omit (). In that case, for backward compatibility, - the INSTANCE field and the builder class is not searched, so the instance will be always - created with its parameterless constructor. (This behavior will possibly change in 2.4.) The () - can't be omitted for nested expressions. -

          • -
          • -

            The classes and methods that the expression meant to access must be all public. -

          • -
          -
          -
          Parameters:
          -
          name - the name of the setting.
          -
          value - the string that describes the new value of the setting.
          -
          Throws:
          -
          Configurable.UnknownSettingException - if the name is wrong.
          -
          TemplateException - if the new value of the setting can't be set for any other reasons.
          -
          -
        • -
        - - - -
          -
        • -

          setStrictBeanModels

          -
          public void setStrictBeanModels(boolean strict)
          -
        • -
        - - - -
          -
        • -

          getSetting

          -
          public String getSetting(String key)
          -
          Deprecated. It's not possible in general to convert setting values to string, - and thus it's impossible to ensure that setSetting(String, String) will work with - the returned value correctly.
          -
          Returns the textual representation of a setting.
          -
          -
          Parameters:
          -
          key - the setting key. Can be any of standard XXX_KEY - constants, or a custom key.
          -
          -
        • -
        - - - -
          -
        • -

          getSettings

          -
          public Map getSettings()
          -
          Deprecated. This method was always defective, and certainly it always - will be. Don't use it. (Simply, it's hardly possible in general to - convert setting values to text in a way that ensures that - setSettings(Properties) will work with them correctly.)
          -
          This meant to return the String-to-String Map of the - settings. So it actually should return a Properties object, - but it doesn't by mistake. The returned Map is read-only, - but it will reflect the further configuration changes (aliasing effect).
          -
        • -
        - - - -
          -
        • -

          getEnvironment

          -
          protected Environment getEnvironment()
          -
        • -
        - - - - - - - -
          -
        • -

          getCorrectedNameForUnknownSetting

          -
          protected String getCorrectedNameForUnknownSetting(String name)
          -
          -
          Parameters:
          -
          name - The wrong name
          -
          Returns:
          -
          The corrected name, or null if there's no known correction
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          setSettings

          -
          public void setSettings(Properties props)
          -                 throws TemplateException
          -
          Set the settings stored in a Properties object.
          -
          -
          Throws:
          -
          TemplateException - if the Properties object contains - invalid keys, or invalid setting values, or any other error occurs - while changing the settings.
          -
          -
        • -
        - - - -
          -
        • -

          setSettings

          -
          public void setSettings(InputStream propsIn)
          -                 throws TemplateException,
          -                        IOException
          -
          Reads a setting list (key and element pairs) from the input stream. - The stream has to follow the usual .properties format.
          -
          -
          Throws:
          -
          TemplateException - if the stream contains - invalid keys, or invalid setting values, or any other error occurs - while changing the settings.
          -
          IOException - if an error occurred when reading from the input stream.
          -
          -
        • -
        - - - -
          -
        • -

          setCustomAttribute

          -
          public void setCustomAttribute(String name,
          -                               Object value)
          -
          Sets a named custom attribute for this configurable.
          -
          -
          Parameters:
          -
          name - the name of the custom attribute
          -
          value - the value of the custom attribute. You can set the value to - null, however note that there is a semantic difference between an - attribute set to null and an attribute that is not present, see - removeCustomAttribute(String).
          -
          -
        • -
        - - - -
          -
        • -

          getCustomAttributeNames

          -
          public String[] getCustomAttributeNames()
          -
          Returns an array with names of all custom attributes defined directly - on this configurable. (That is, it doesn't contain the names of custom attributes - defined indirectly on its parent configurables.) The returned array is never null, - but can be zero-length. - The order of elements in the returned array is not defined and can change - between invocations.
          -
        • -
        - - - -
          -
        • -

          removeCustomAttribute

          -
          public void removeCustomAttribute(String name)
          -
          Removes a named custom attribute for this configurable. Note that this - is different than setting the custom attribute value to null. If you - set the value to null, getCustomAttribute(String) will return - null, while if you remove the attribute, it will return the value of - the attribute in the parent configurable (if there is a parent - configurable, that is).
          -
          -
          Parameters:
          -
          name - the name of the custom attribute
          -
          -
        • -
        - - - -
          -
        • -

          getCustomAttribute

          -
          public Object getCustomAttribute(String name)
          -
          Retrieves a named custom attribute for this configurable. If the - attribute is not present in the configurable, and the configurable has - a parent, then the parent is looked up as well.
          -
          -
          Parameters:
          -
          name - the name of the custom attribute
          -
          Returns:
          -
          the value of the custom attribute. Note that if the custom attribute - was created with <#ftl attributes={...}>, then this value is already - unwrapped (i.e. it's a String, or a List, or a - Map, ...etc., not a FreeMarker specific class).
          -
          -
        • -
        - - - - - - - - - - - - - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/CustomAttribute.html b/fmpp/docs/freemarker/api/freemarker/core/CustomAttribute.html deleted file mode 100644 index b62fc10..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/CustomAttribute.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - -CustomAttribute (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class CustomAttribute

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class CustomAttribute
      -extends Object
      -
      A class that allows one to associate custom data with a configuration, - a template, or environment. It works pretty much like ThreadLocal, a - class that allows one to associate custom data with a thread.
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Summary

        - - - - - - - - - - - - - - - - - - -
        Fields 
        Modifier and TypeField and Description
        static intSCOPE_CONFIGURATION -
        Constant used in the constructor specifying that this attribute is - scoped by the configuration.
        -
        static intSCOPE_ENVIRONMENT -
        Constant used in the constructor specifying that this attribute is - scoped by the environment.
        -
        static intSCOPE_TEMPLATE -
        Constant used in the constructor specifying that this attribute is - scoped by the template.
        -
        -
      • -
      - -
        -
      • - - -

        Constructor Summary

        - - - - - - - - -
        Constructors 
        Constructor and Description
        CustomAttribute(int scope) -
        Creates a new custom attribute with the specified scope
        -
        -
      • -
      - - -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          SCOPE_ENVIRONMENT

          -
          public static final int SCOPE_ENVIRONMENT
          -
          Constant used in the constructor specifying that this attribute is - scoped by the environment.
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          SCOPE_TEMPLATE

          -
          public static final int SCOPE_TEMPLATE
          -
          Constant used in the constructor specifying that this attribute is - scoped by the template.
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          SCOPE_CONFIGURATION

          -
          public static final int SCOPE_CONFIGURATION
          -
          Constant used in the constructor specifying that this attribute is - scoped by the configuration.
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          CustomAttribute

          -
          public CustomAttribute(int scope)
          -
          Creates a new custom attribute with the specified scope
          -
          -
          Parameters:
          -
          scope - one of SCOPE_ constants.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          create

          -
          protected Object create()
          -
          This method is invoked when get() is invoked without - set(Object) being invoked before it to define the value in the - current scope. Override it to create the attribute value on-demand.
          -
          -
          Returns:
          -
          the initial value for the custom attribute. By default returns null.
          -
          -
        • -
        - - - -
          -
        • -

          get

          -
          public final Object get()
          -
          -
          Returns:
          -
          the value of the attribute in the context of the current environment.
          -
          Throws:
          -
          IllegalStateException - if there is no current environment (and - hence also no current template and configuration), therefore the - attribute's current scope object can't be resolved.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          set

          -
          public final void set(Object value)
          -
          Sets the value of the attribute in the context of the current environment.
          -
          -
          Parameters:
          -
          value - the new value of the attribute
          -
          Throws:
          -
          IllegalStateException - if there is no current environment (and - hence also no current template and configuration), therefore the - attribute's current scope object can't be resolved.
          -
          -
        • -
        - - - -
          -
        • -

          set

          -
          public final void set(Object value,
          -                      Template t)
          -
          Sets the value of a template-scope attribute in the context of the given - template.
          -
          -
          Parameters:
          -
          value - the new value of the attribute
          -
          t - the template
          -
          Throws:
          -
          UnsupportedOperationException - if this custom attribute is not a - template-scope attribute
          -
          NullPointerException - if t is null
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/Environment.Namespace.html b/fmpp/docs/freemarker/api/freemarker/core/Environment.Namespace.html deleted file mode 100644 index 81e546e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/Environment.Namespace.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - -Environment.Namespace (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class Environment.Namespace

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getTemplate

          -
          public Template getTemplate()
          -
          -
          Returns:
          -
          the Template object with which this Namespace is associated.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/Environment.html b/fmpp/docs/freemarker/api/freemarker/core/Environment.html deleted file mode 100644 index 4f2857d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/Environment.html +++ /dev/null @@ -1,1707 +0,0 @@ - - - - - - -Environment (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class Environment

    -
    -
    - -
    -
      -
    • -
      -
      -
      public final class Environment
      -extends Configurable
      -
      Object that represents the runtime environment during template processing. - For every invocation of a Template.process() method, a new instance - of this object is created, and then discarded when process() returns. - This object stores the set of temporary variables created by the template, - the value of settings set by the template, the reference to the data model root, - etc. Everything that is needed to fulfill the template processing job. - -

      Data models that need to access the Environment - object that represents the template processing on the current thread can use - the getCurrentEnvironment() method. - -

      If you need to modify or read this object before or after the process - call, use Template.createProcessingEnvironment(Object rootMap, Writer out, ObjectWrapper wrapper)

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getCurrentEnvironment

          -
          public static Environment getCurrentEnvironment()
          -
          Retrieves the environment object associated with the current - thread. Data model implementations that need access to the - environment can call this method to obtain the environment object - that represents the template processing that is currently running - on the current thread.
          -
        • -
        - - - -
          -
        • -

          getTemplate

          -
          public Template getTemplate()
          -
          Retrieves the currently processed template.
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          isInAttemptBlock

          -
          public boolean isInAttemptBlock()
          -
          Tells if we are inside an #attempt block (but before #recover). This can be useful for - TemplateExceptionHandler-s, as then they may don't want to print the error to the output, as - #attempt will roll it back anyway.
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          setSQLDateAndTimeTimeZone

          -
          public void setSQLDateAndTimeTimeZone(TimeZone timeZone)
          -
          Description copied from class: Configurable
          -
          Sets the time zone used when dealing with java.sql.Date and - java.sql.Time values. It defaults to null for backward compatibility, but in most - application this should be set to the JVM default time zone (server default time zone), because that's what - most JDBC drivers will use when constructing the java.sql.Date and - java.sql.Time values. If this setting is null, FreeMarker will use the value of - (Configurable.getTimeZone()) for java.sql.Date and java.sql.Time values, - which often gives bad results. - -

          This setting doesn't influence the formatting of other kind of values (like of - java.sql.Timestamp or plain java.util.Date values). - -

          To decide what value you need, a few things has to be understood: -

            -
          • Date-only and time-only values in SQL-oriented databases are usually store calendar and clock field - values directly (year, month, day, or hour, minute, seconds (with decimals)), as opposed to a set of points - on the physical time line. Thus, unlike SQL timestamps, these values usually aren't meant to be shown - differently depending on the time zone of the audience. - -
          • When a JDBC query has to return a date-only or time-only value, it has to convert it to a point on the - physical time line, because that's what Date and its subclasses store (milliseconds since - the epoch). Obviously, this is impossible to do. So JDBC just chooses a physical time which, when rendered - with the JVM default time zone, will give the same field values as those stored - in the database. (Actually, you can give JDBC a calendar, and so it can use other time zones too, but most - application won't care using those overloads.) For example, assume that the system time zone is GMT+02:00. - Then, 2014-07-12 in the database will be translated to physical time 2014-07-11 22:00:00 UTC, because that - rendered in GMT+02:00 gives 2014-07-12 00:00:00. Similarly, 11:57:00 in the database will be translated to - physical time 1970-01-01 09:57:00 UTC. Thus, the physical time stored in the returned value depends on the - default system time zone of the JDBC client, not just on the content in the database. (This used to be the - default behavior of ORM-s, like Hibernate, too.) - -
          • The value of the time_zone FreeMarker configuration setting sets the time zone used for the - template output. For example, when a web page visitor has a preferred time zone, the web application framework - may calls setTimeZone(TimeZone) with that time zone. Thus, the visitor will - see java.sql.Timestamp and plain java.util.Date values as - they look in his own time zone. While - this is desirable for those types, as they meant to represent physical points on the time line, this is not - necessarily desirable for date-only and time-only values. When sql_date_and_time_time_zone is - null, time_zone is used for rendering all kind of date/time/dateTime values, including - java.sql.Date and java.sql.Time, and then if, for example, - time_zone is GMT+00:00, the - values from the earlier examples will be shown as 2014-07-11 (one day off) and 09:57:00 (2 hours off). While - those are the time zone correct renderings, those values probably was meant to shown "as is". - -
          • You may wonder why this setting isn't simply "SQL time zone", since the time zone related behavior of JDBC - applies to java.sql.Timestamp too. FreeMarker assumes that you have set up your - application so that time stamps coming from the database go through the necessary conversion to store the - correct distance from the epoch (1970-01-01 00:00:00 UTC), as requested by Date. In that case - the time stamp can be safely rendered in different time zones, and thus it needs no special treatment. -
          -
          -
          Overrides:
          -
          setSQLDateAndTimeTimeZone in class Configurable
          -
          Parameters:
          -
          timeZone - Maybe null, in which case java.sql.Date and - java.sql.Time values will be formatted in the time zone returned by - Configurable.getTimeZone(). - (Note that since null is an allowed value for this setting, it will not cause - Configurable.getSQLDateAndTimeTimeZone() to fall back to the parent configuration.)
          -
          See Also:
          -
          Configurable.setTimeZone(TimeZone)
          -
          -
        • -
        - - - - - - - -
          -
        • -

          setOutputEncoding

          -
          public void setOutputEncoding(String outputEncoding)
          -
          Description copied from class: Configurable
          -
          Informs FreeMarker about the charset used for the output. As FreeMarker outputs character stream (not - byte stream), it's not aware of the output charset unless the software that encloses it tells it - with this setting. Some templates may use FreeMarker features that require this information. - Setting this to null means that the output encoding is not known. - -

          Defaults to null (unknown).

          -
          -
          Overrides:
          -
          setOutputEncoding in class Configurable
          -
          -
        • -
        - - - - - - - -
          -
        • -

          applyEqualsOperatorLenient

          -
          public boolean applyEqualsOperatorLenient(TemplateModel leftValue,
          -                                          TemplateModel rightValue)
          -                                   throws TemplateException
          -
          Compares two TemplateModel-s according the rules of the FTL "==" operator, except that if the two types - are incompatible, they are treated as non-equal instead of throwing an exception. Comparing dates of - different types (date-only VS time-only VS date-time) will still throw an exception, however.
          -
          -
          Throws:
          -
          TemplateException
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - - - - - - - - - - - - - - - - - -
          -
        • -

          setOut

          -
          public void setOut(Writer out)
          -
        • -
        - - - -
          -
        • -

          getOut

          -
          public Writer getOut()
          -
        • -
        - - - -
          -
        • -

          setNumberFormat

          -
          public void setNumberFormat(String formatName)
          -
          Description copied from class: Configurable
          -
          Sets the number format used to convert numbers to strings.
          -
          -
          Overrides:
          -
          setNumberFormat in class Configurable
          -
          -
        • -
        - - - -
          -
        • -

          setTimeFormat

          -
          public void setTimeFormat(String timeFormat)
          -
          Description copied from class: Configurable
          -
          Sets the format used to convert Date-s to string-s that are time (no date part) values, - also the format that someString?time will use to parse strings. - -

          For the possible values see Configurable.setDateTimeFormat(String). - -

          Defaults to "", which means "use the FreeMarker default", which is currently "medium".

          -
          -
          Overrides:
          -
          setTimeFormat in class Configurable
          -
          -
        • -
        - - - -
          -
        • -

          setDateFormat

          -
          public void setDateFormat(String dateFormat)
          -
          Description copied from class: Configurable
          -
          Sets the format used to convert Date-s to string-s that are date (no time part) values, - also the format that someString?date will use to parse strings. - -

          For the possible values see Configurable.setDateTimeFormat(String). - -

          Defaults to "", which means "use the FreeMarker default", which is currently "code".

          -
          -
          Overrides:
          -
          setDateFormat in class Configurable
          -
          -
        • -
        - - - -
          -
        • -

          setDateTimeFormat

          -
          public void setDateTimeFormat(String dateTimeFormat)
          -
          Description copied from class: Configurable
          -
          Sets the format used to convert Date-s to string-s that are date-time (timestamp) values, - also the format that someString?datetime will use to parse strings. - -

          The possible setting values are (the quotation marks aren't part of the value itself): - -

            -
          • Patterns accepted by Java's SimpleDateFormat, for example "dd.MM.yyyy HH:mm:ss" (where - HH means 24 hours format) or "MM/dd/yyyy hh:mm:ss a" (where a prints AM or PM, if - the current language is English). - -

          • "xs" for XML Schema format, or "iso" for ISO 8601:2004 format. - These formats allow various additional options, separated with space, like in - "iso m nz" (or with _, like in "iso_m_nz"; this is useful in a case like - lastModified?string.iso_m_nz). The options and their meanings are: - -

              -
            • Accuracy options:
              - ms = Milliseconds, always shown with all 3 digits, even if it's all 0-s. - Example: 13:45:05.800
              - s = Seconds (fraction seconds are dropped even if non-0), like 13:45:05
              - m = Minutes, like 13:45. This isn't allowed for "xs".
              - h = Hours, like 13. This isn't allowed for "xs".
              - Neither = Up to millisecond accuracy, but trailing millisecond 0-s are removed, also the whole - milliseconds part if it would be 0 otherwise. Example: 13:45:05.8 - -

            • Time zone offset visibility options:
              - fz = "Force Zone", always show time zone offset (even for for - java.sql.Date and java.sql.Time values). - But, because ISO 8601 doesn't allow for dates (means date without time of the day) to - show the zone offset, this option will have no effect in the case of "iso" with - dates.
              - nz = "No Zone", never show time zone offset
              - Neither = always show time zone offset, except for java.sql.Date - and java.sql.Time, and for "iso" date values. - -

            • Time zone options:
              - u = Use UTC instead of what the time_zone setting suggests. However, - java.sql.Date and java.sql.Time aren't affected - by this (see Configurable.setSQLDateAndTimeTimeZone(TimeZone) to understand why)
              - fu = "Force UTC", that is, use UTC instead of what the time_zone or the - sql_date_and_time_time_zone setting suggests. This also effects - java.sql.Date and java.sql.Time values
              - Neither = Use the time zone suggested by the time_zone or the - sql_date_and_time_time_zone configuration setting (Configurable.setTimeZone(TimeZone) and - Configurable.setSQLDateAndTimeTimeZone(TimeZone)). -

            - -

            The options can be specified in any order.

            - -

            Options from the same category are mutually exclusive, like using m and s - together is an error. - -

            The accuracy and time zone offset visibility options don't influence parsing, only formatting. - For example, even if you use "iso m nz", "2012-01-01T15:30:05.125+01" will be parsed successfully and with - milliseconds accuracy. - The time zone options (like "u") influence what time zone is chosen only when parsing a string that doesn't - contain time zone offset. - -

            Parsing with "iso" understands both extend format and basic format, like - 20141225T235018. It doesn't, however, support the parsing of all kind of ISO 8601 strings: if - there's a date part, it must use year, month and day of the month values (not week of the year), and the - day can't be omitted. - -

            The output of "iso" is deliberately so that it's also a good representation of the value with - XML Schema format, except for 0 and negative years, where it's impossible. Also note that the time zone - offset is omitted for date values in the "iso" format, while it's preserved for the "xs" - format. - -

          • "short", "medium", "long", or "full", which that has locale-dependent - meaning defined by the Java platform (see in the documentation of DateFormat). - For date-time values, you can specify the length of the date and time part independently, be separating - them with _, like "short_medium". ("medium" means - "medium_medium" for date-time values.) -

          - -

          Defaults to "", which means "use the FreeMarker default", which is currently "code".

          -
          -
          Overrides:
          -
          setDateTimeFormat in class Configurable
          -
          -
        • -
        - - - -
          -
        • -

          getConfiguration

          -
          public Configuration getConfiguration()
          -
        • -
        - - - -
          -
        • -

          getCNumberFormat

          -
          public NumberFormat getCNumberFormat()
          -
          Returns the NumberFormat used for the c built-in. - This is always US English "0.################", without - grouping and without superfluous decimal separator.
          -
        • -
        - - - -
          -
        • -

          getLocalVariable

          -
          public TemplateModel getLocalVariable(String name)
          -                               throws TemplateModelException
          -
          Returns the loop or macro local variable corresponding to this - variable name. Possibly null. - (Note that the misnomer is kept for backward compatibility: loop variables - are not local variables according to our terminology.)
          -
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          getVariable

          -
          public TemplateModel getVariable(String name)
          -                          throws TemplateModelException
          -
          Returns the variable that is visible in this context. - This is the correspondent to an FTL top-level variable reading expression. - That is, it tries to find the the variable in this order: -
            -
          1. An loop variable (if we're in a loop or user defined directive body) such as foo_has_next -
          2. A local variable (if we're in a macro) -
          3. A variable defined in the current namespace (say, via <#assign ...>) -
          4. A variable defined globally (say, via <#global ....>) -
          5. Variable in the data model: -
              -
            1. A variable in the root hash that was exposed to this - rendering environment in the Template.process(...) call -
            2. A shared variable set in the configuration via a call to Configuration.setSharedVariable(...) -
            -
          6. -
          -
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          getGlobalVariable

          -
          public TemplateModel getGlobalVariable(String name)
          -                                throws TemplateModelException
          -
          Returns the globally visible variable of the given name (or null). - This is correspondent to FTL .globals.name. - This will first look at variables that were assigned globally via: - <#global ...> and then at the data model exposed to the template.
          -
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          setGlobalVariable

          -
          public void setGlobalVariable(String name,
          -                              TemplateModel model)
          -
          Sets a variable that is visible globally. - This is correspondent to FTL <#global name=model>. - This can be considered a convenient shorthand for: - getGlobalNamespace().put(name, model)
          -
        • -
        - - - -
          -
        • -

          setVariable

          -
          public void setVariable(String name,
          -                        TemplateModel model)
          -
          Sets a variable in the current namespace. - This is correspondent to FTL <#assign name=model>. - This can be considered a convenient shorthand for: - getCurrentNamespace().put(name, model)
          -
        • -
        - - - -
          -
        • -

          setLocalVariable

          -
          public void setLocalVariable(String name,
          -                             TemplateModel model)
          -
          Sets a local variable (one effective only during a macro invocation). - This is correspondent to FTL <#local name=model>.
          -
          -
          Parameters:
          -
          name - the identifier of the variable
          -
          model - the value of the variable.
          -
          Throws:
          -
          IllegalStateException - if the environment is not executing a - macro body.
          -
          -
        • -
        - - - -
          -
        • -

          getKnownVariableNames

          -
          public Set getKnownVariableNames()
          -                          throws TemplateModelException
          -
          Returns a set of variable names that are known at the time of call. This - includes names of all shared variables in the Configuration, - names of all global variables that were assigned during the template processing, - names of all variables in the current name-space, names of all local variables - and loop variables. If the passed root data model implements the - TemplateHashModelEx interface, then all names it retrieves through a call to - TemplateHashModelEx.keys() method are returned as well. - The method returns a new Set object on each call that is completely - disconnected from the Environment. That is, modifying the set will have - no effect on the Environment object.
          -
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          outputInstructionStack

          -
          public void outputInstructionStack(PrintWriter pw)
          -
          Prints the current FTL stack trace. Useful for debugging. - TemplateExceptions incorporate this information in their stack traces.
          -
        • -
        - - - -
          -
        • -

          getNamespace

          -
          public Environment.Namespace getNamespace(String name)
          -
          Returns the name-space for the name if exists, or null.
          -
          -
          Parameters:
          -
          name - the template path that you have used with the import directive - or importLib(String, String) call, in normalized form. That is, the path must be an absolute - path, and it must not contain "/../" or "/./". The leading "/" is optional.
          -
          -
        • -
        - - - -
          -
        • -

          getMainNamespace

          -
          public Environment.Namespace getMainNamespace()
          -
          Returns the main name-space. - This is correspondent of FTL .main hash.
          -
        • -
        - - - -
          -
        • -

          getCurrentNamespace

          -
          public Environment.Namespace getCurrentNamespace()
          -
          Returns the main name-space. - This is correspondent of FTL .namespace hash.
          -
        • -
        - - - -
          -
        • -

          getGlobalNamespace

          -
          public Environment.Namespace getGlobalNamespace()
          -
          Returns a fictitious name-space that contains the globally visible variables - that were created in the template, but not the variables of the data-model. - There is no such thing in FTL; this strange method was added because of the - JSP taglib support, since this imaginary name-space contains the page-scope - attributes.
          -
        • -
        - - - - - - - -
          -
        • -

          getGlobalVariables

          -
          public TemplateHashModel getGlobalVariables()
          -
          Returns the read-only hash of globally visible variables. - This is the correspondent of FTL .globals hash. - That is, you see the variables created with - <#global ...>, and the variables of the data-model. - To create new global variables, use setGlobalVariable.
          -
        • -
        - - - - - - - -
          -
        • -

          setCurrentVisitorNode

          -
          public void setCurrentVisitorNode(TemplateNodeModel node)
          -
          sets TemplateNodeModel as the current visitor node. .current_node
          -
        • -
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          -
        • -

          getNamespaceForPrefix

          -
          public String getNamespaceForPrefix(String prefix)
          -
          -
          Returns:
          -
          the namespace URI registered for this prefix, or null. - This is based on the mappings registered in the current namespace.
          -
          -
        • -
        - - - -
          -
        • -

          getPrefixForNamespace

          -
          public String getPrefixForNamespace(String nsURI)
          -
        • -
        - - - -
          -
        • -

          getDefaultNS

          -
          public String getDefaultNS()
          -
          -
          Returns:
          -
          the default node namespace for the current FTL namespace
          -
          -
        • -
        - - - - - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/FreeMarkerTree.html b/fmpp/docs/freemarker/api/freemarker/core/FreeMarkerTree.html deleted file mode 100644 index 978fe64..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/FreeMarkerTree.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - -FreeMarkerTree (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class FreeMarkerTree

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          FreeMarkerTree

          -
          public FreeMarkerTree(Template template)
          -
          Deprecated. 
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          setTemplate

          -
          public void setTemplate(Template template)
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          convertValueToText

          -
          public String convertValueToText(Object value,
          -                                 boolean selected,
          -                                 boolean expanded,
          -                                 boolean leaf,
          -                                 int row,
          -                                 boolean hasFocus)
          -
          Deprecated. 
          -
          -
          Overrides:
          -
          convertValueToText in class JTree
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/InvalidReferenceException.html b/fmpp/docs/freemarker/api/freemarker/core/InvalidReferenceException.html deleted file mode 100644 index 9c2d301..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/InvalidReferenceException.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - -InvalidReferenceException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class InvalidReferenceException

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      -
      public class InvalidReferenceException
      -extends TemplateException
      -
      A subclass of TemplateException that says that an FTL expression has evaluated to null or it refers - to something that doesn't exist. At least in FreeMarker 2.3.x these two cases aren't distinguished.
      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          InvalidReferenceException

          -
          public InvalidReferenceException(Environment env)
          -
          Creates and invalid reference exception that contains no information about what was missing or null. - As such, try to avoid this constructor.
          -
        • -
        - - - -
          -
        • -

          InvalidReferenceException

          -
          public InvalidReferenceException(String description,
          -                                 Environment env)
          -
          Creates and invalid reference exception that contains no programmatically extractable information about the - blamed expression. As such, try to avoid this constructor, unless need to raise this expression from outside - the FreeMarker core.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonBooleanException.html b/fmpp/docs/freemarker/api/freemarker/core/NonBooleanException.html deleted file mode 100644 index 91bbba9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonBooleanException.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -NonBooleanException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonBooleanException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonBooleanException

          -
          public NonBooleanException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonBooleanException

          -
          public NonBooleanException(String description,
          -                           Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonDateException.html b/fmpp/docs/freemarker/api/freemarker/core/NonDateException.html deleted file mode 100644 index b089ca5..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonDateException.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -NonDateException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonDateException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonDateException

          -
          public NonDateException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonDateException

          -
          public NonDateException(String description,
          -                        Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonExtendedHashException.html b/fmpp/docs/freemarker/api/freemarker/core/NonExtendedHashException.html deleted file mode 100644 index 7dfe79f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonExtendedHashException.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -NonExtendedHashException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonExtendedHashException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonExtendedHashException

          -
          public NonExtendedHashException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonExtendedHashException

          -
          public NonExtendedHashException(String description,
          -                                Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonHashException.html b/fmpp/docs/freemarker/api/freemarker/core/NonHashException.html deleted file mode 100644 index a70c8ed..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonHashException.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -NonHashException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonHashException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonHashException

          -
          public NonHashException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonHashException

          -
          public NonHashException(String description,
          -                        Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonMethodException.html b/fmpp/docs/freemarker/api/freemarker/core/NonMethodException.html deleted file mode 100644 index 4d37110..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonMethodException.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -NonMethodException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonMethodException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonMethodException

          -
          public NonMethodException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonMethodException

          -
          public NonMethodException(String description,
          -                          Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonNodeException.html b/fmpp/docs/freemarker/api/freemarker/core/NonNodeException.html deleted file mode 100644 index aeec84f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonNodeException.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -NonNodeException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonNodeException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonNodeException

          -
          public NonNodeException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonNodeException

          -
          public NonNodeException(String description,
          -                        Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonNumericalException.html b/fmpp/docs/freemarker/api/freemarker/core/NonNumericalException.html deleted file mode 100644 index 2754103..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonNumericalException.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - -NonNumericalException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonNumericalException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonNumericalException

          -
          public NonNumericalException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonNumericalException

          -
          public NonNumericalException(String description,
          -                             Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonSequenceException.html b/fmpp/docs/freemarker/api/freemarker/core/NonSequenceException.html deleted file mode 100644 index e8876e2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonSequenceException.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -NonSequenceException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonSequenceException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonSequenceException

          -
          public NonSequenceException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonSequenceException

          -
          public NonSequenceException(String description,
          -                            Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonSequenceOrCollectionException.html b/fmpp/docs/freemarker/api/freemarker/core/NonSequenceOrCollectionException.html deleted file mode 100644 index a27435d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonSequenceOrCollectionException.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - -NonSequenceOrCollectionException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonSequenceOrCollectionException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonSequenceOrCollectionException

          -
          public NonSequenceOrCollectionException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonSequenceOrCollectionException

          -
          public NonSequenceOrCollectionException(String description,
          -                                        Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/NonStringException.html b/fmpp/docs/freemarker/api/freemarker/core/NonStringException.html deleted file mode 100644 index 413a913..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/NonStringException.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -NonStringException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class NonStringException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NonStringException

          -
          public NonStringException(Environment env)
          -
        • -
        - - - -
          -
        • -

          NonStringException

          -
          public NonStringException(String description,
          -                          Environment env)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/OptInTemplateClassResolver.html b/fmpp/docs/freemarker/api/freemarker/core/OptInTemplateClassResolver.html deleted file mode 100644 index 8f8bb90..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/OptInTemplateClassResolver.html +++ /dev/null @@ -1,362 +0,0 @@ - - - - - - -OptInTemplateClassResolver (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class OptInTemplateClassResolver

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          OptInTemplateClassResolver

          -
          public OptInTemplateClassResolver(Set allowedClasses,
          -                                  List trustedTemplates)
          -
          Creates a new instance.
          -
          -
          Parameters:
          -
          allowedClasses - the Set of String-s that contains - the full-qualified names of the allowed classes. - Can be null (means not class is allowed).
          -
          trustedTemplates - the List of String-s that contains - template names (i.e., template root directory relative paths) - and prefix patterns (like "include/*") of templates - for which TemplateClassResolver.SAFER_RESOLVER will be - used (which is not as safe as OptInTemplateClassResolver). - The list items need not start with "/" (if they are, it - will be removed). List items ending with "*" are treated - as prefixes (i.e. "foo*" matches "foobar", - "foo/bar/baaz", "foowhatever/bar/baaz", - etc.). The "*" has no special meaning anywhere else. - The matched template name is the name (template root directory - relative path) of the template that directly (lexically) contains the - operation (like ?new) that wants to get the class. Thus, - if a trusted template includes a non-trusted template, the - allowedClasses restriction will apply in the included - template. - This parameter can be null (means no trusted templates).
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          resolve

          -
          public Class resolve(String className,
          -                     Environment env,
          -                     Template template)
          -              throws TemplateException
          -
          Description copied from interface: TemplateClassResolver
          -
          Gets a Class based on the class name.
          -
          -
          Specified by:
          -
          resolve in interface TemplateClassResolver
          -
          Parameters:
          -
          className - the full-qualified class name
          -
          env - the environment in which the template executes
          -
          template - the template where the operation that require the - class resolution resides in. This is null if the - call doesn't come from a template.
          -
          Throws:
          -
          TemplateException - if the class can't be found or shouldn't be - accessed from a template for security reasons.
          -
          -
        • -
        - - - -
          -
        • -

          safeGetTemplateName

          -
          protected String safeGetTemplateName(Template template)
          -
          Extract the template name from the template object which will be matched - against the trusted template names and pattern.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/ParseException.html b/fmpp/docs/freemarker/api/freemarker/core/ParseException.html deleted file mode 100644 index d4a2ecd..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/ParseException.html +++ /dev/null @@ -1,3238 +0,0 @@ - - - - - - -ParseException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class ParseException

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      Direct Known Subclasses:
      -
      Template.WrongEncodingException
      -
      -
      -
      -
      public class ParseException
      -extends IOException
      -
      Parsing-time exception in a template (as opposed to a runtime exception, a TemplateException). This usually - signals syntactical/lexical errors. - - Note that on JavaCC-level lexical errors throw TokenMgrError instead of this, however with the API-s that - most users use those will be wrapped into ParseException-s. - - This is a modified version of file generated by JavaCC from FTL.jj. - You can modify this class to customize the error reporting mechanisms so long as the public interface - remains compatible with the original.
      -
      -
      See Also:
      -
      TokenMgrError, -Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          ParseException

          -
          public ParseException(freemarker.core.Token currentTokenVal,
          -                      int[][] expectedTokenSequencesVal,
          -                      String[] tokenImageVal)
          -
          This constructor is used by the method "generateParseException" - in the generated parser. Calling this constructor generates - a new object of this type with the fields "currentToken", - "expectedTokenSequences", and "tokenImage" set. - This constructor calls its super class with the empty string - to force the "toString" method of parent class "Throwable" to - print the error message in the form: - ParseException: <result of getMessage>
          -
        • -
        - - - -
          -
        • -

          ParseException

          -
          protected ParseException()
          -
          Deprecated. Use a constructor to which you pass description, template, and positions.
          -
          The following constructors are for use by you for whatever - purpose you can think of. Constructing the exception in this - manner makes the exception behave in the normal way - i.e., as - documented in the class "Throwable". The fields "errorToken", - "expectedTokenSequences", and "tokenImage" do not contain - relevant information. The JavaCC generated code does not use - these constructors.
          -
        • -
        - - - -
          -
        • -

          ParseException

          -
          public ParseException(String description,
          -                      int lineNumber,
          -                      int columnNumber)
          -
          Deprecated. Use a constructor to which you can also pass the template, and the end positions.
          -
        • -
        - - - -
          -
        • -

          ParseException

          -
          public ParseException(String description,
          -                      Template template,
          -                      int lineNumber,
          -                      int columnNumber,
          -                      int endLineNumber,
          -                      int endColumnNumber)
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          ParseException

          -
          public ParseException(String description,
          -                      Template template,
          -                      int lineNumber,
          -                      int columnNumber,
          -                      int endLineNumber,
          -                      int endColumnNumber,
          -                      Throwable cause)
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          ParseException

          -
          public ParseException(String description,
          -                      Template template,
          -                      freemarker.core.Token tk)
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          ParseException

          -
          public ParseException(String description,
          -                      Template template,
          -                      freemarker.core.Token tk,
          -                      Throwable cause)
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          ParseException

          -
          public ParseException(String description,
          -                      freemarker.core.TemplateObject tobj)
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          ParseException

          -
          public ParseException(String description,
          -                      freemarker.core.TemplateObject tobj,
          -                      Throwable cause)
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          setTemplateName

          -
          public void setTemplateName(String templateName)
          -
          Should be used internally only; sets the name of the template that contains the error. - This is needed as the constructor that JavaCC automatically calls doesn't pass in the template, so we - set it somewhere later in an exception handler.
          -
        • -
        - - - - - - - -
          -
        • -

          getEditorMessage

          -
          public String getEditorMessage()
          -
          Returns the description of the error without error location or source quotations, or null if there's no - description available. This is useful in editors (IDE-s) where the error markers and the editor window itself - already carry this information, so it's redundant the repeat in the error dialog.
          -
        • -
        - - - -
          -
        • -

          getTemplateName

          -
          public String getTemplateName()
          -
          Returns the name (template-root relative path) of the template whose parsing was failed. - Maybe null if this is a non-stored template.
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          getLineNumber

          -
          public int getLineNumber()
          -
          1-based line number of the failing section, or 0 is the information is not available.
          -
        • -
        - - - -
          -
        • -

          getColumnNumber

          -
          public int getColumnNumber()
          -
          1-based column number of the failing section, or 0 is the information is not available.
          -
        • -
        - - - -
          -
        • -

          getEndLineNumber

          -
          public int getEndLineNumber()
          -
          1-based line number of the last line that contains the failing section, or 0 if the information is not available.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getEndColumnNumber

          -
          public int getEndColumnNumber()
          -
          1-based column number of the last character of the failing section, or 0 if the information is not available. - Note that unlike with Java string API-s, this column number is inclusive.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          add_escapes

          -
          protected String add_escapes(String str)
          -
          Used to convert raw characters to their escaped version - when these raw version cannot be used as part of an ASCII - string literal.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/StopException.html b/fmpp/docs/freemarker/api/freemarker/core/StopException.html deleted file mode 100644 index 1d3226f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/StopException.html +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - -StopException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class StopException

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/TemplateClassResolver.html b/fmpp/docs/freemarker/api/freemarker/core/TemplateClassResolver.html deleted file mode 100644 index 3873f18..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/TemplateClassResolver.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - -TemplateClassResolver (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Interface TemplateClassResolver

    -
    -
    -
    -
      -
    • -
      -
      All Known Implementing Classes:
      -
      OptInTemplateClassResolver
      -
      -
      -
      -
      public interface TemplateClassResolver
      -
      Used by built-ins and other template language features that get a class - based on a string. This can be handy both for implementing security - restrictions and for working around local class-loader issues. - - The implementation should be thread-safe, unless an - instance is always only used in a single Environment object.
      -
      -
      Since:
      -
      2.3.17
      -
      See Also:
      -
      Configurable.setNewBuiltinClassResolver(TemplateClassResolver)
      -
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/UnexpectedTypeException.html b/fmpp/docs/freemarker/api/freemarker/core/UnexpectedTypeException.html deleted file mode 100644 index dc95183..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/UnexpectedTypeException.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - -UnexpectedTypeException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.core
    -

    Class UnexpectedTypeException

    -
    -
    - -
    - -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          UnexpectedTypeException

          -
          public UnexpectedTypeException(Environment env,
          -                               String description)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.BigDecimalEngine.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.BigDecimalEngine.html deleted file mode 100644 index 178475b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.BigDecimalEngine.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Class freemarker.core.ArithmeticEngine.BigDecimalEngine (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.ArithmeticEngine.BigDecimalEngine

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.ConservativeEngine.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.ConservativeEngine.html deleted file mode 100644 index 61a6777..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.ConservativeEngine.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - -Uses of Class freemarker.core.ArithmeticEngine.ConservativeEngine (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.ArithmeticEngine.ConservativeEngine

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.html deleted file mode 100644 index b11f7d1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/ArithmeticEngine.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - -Uses of Class freemarker.core.ArithmeticEngine (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.ArithmeticEngine

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/BugException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/BugException.html deleted file mode 100644 index 22bfc51..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/BugException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.BugException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.BugException

    -
    -
    No usage of freemarker.core.BugException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/CommandLine.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/CommandLine.html deleted file mode 100644 index c3dfddd..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/CommandLine.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.CommandLine (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.CommandLine

    -
    -
    No usage of freemarker.core.CommandLine
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.SettingValueAssignmentException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.SettingValueAssignmentException.html deleted file mode 100644 index cdd0d97..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.SettingValueAssignmentException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.Configurable.SettingValueAssignmentException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.Configurable.SettingValueAssignmentException

    -
    -
    No usage of freemarker.core.Configurable.SettingValueAssignmentException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.UnknownSettingException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.UnknownSettingException.html deleted file mode 100644 index 8e9889d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.UnknownSettingException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.Configurable.UnknownSettingException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.Configurable.UnknownSettingException

    -
    -
    No usage of freemarker.core.Configurable.UnknownSettingException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.html deleted file mode 100644 index a70814b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/Configurable.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - -Uses of Class freemarker.core.Configurable (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.Configurable

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/CustomAttribute.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/CustomAttribute.html deleted file mode 100644 index 4ed3e51..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/CustomAttribute.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.CustomAttribute (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.CustomAttribute

    -
    -
    No usage of freemarker.core.CustomAttribute
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/Environment.Namespace.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/Environment.Namespace.html deleted file mode 100644 index 93908d7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/Environment.Namespace.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - -Uses of Class freemarker.core.Environment.Namespace (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.Environment.Namespace

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/Environment.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/Environment.html deleted file mode 100644 index bc2fae0..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/Environment.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - - -Uses of Class freemarker.core.Environment (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.Environment

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/FreeMarkerTree.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/FreeMarkerTree.html deleted file mode 100644 index 5016b65..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/FreeMarkerTree.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.FreeMarkerTree (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.FreeMarkerTree

    -
    -
    No usage of freemarker.core.FreeMarkerTree
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/InvalidReferenceException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/InvalidReferenceException.html deleted file mode 100644 index c245223..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/InvalidReferenceException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.InvalidReferenceException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.InvalidReferenceException

    -
    -
    No usage of freemarker.core.InvalidReferenceException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonBooleanException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonBooleanException.html deleted file mode 100644 index 95228f2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonBooleanException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonBooleanException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonBooleanException

    -
    -
    No usage of freemarker.core.NonBooleanException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonDateException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonDateException.html deleted file mode 100644 index 490bb24..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonDateException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonDateException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonDateException

    -
    -
    No usage of freemarker.core.NonDateException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonExtendedHashException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonExtendedHashException.html deleted file mode 100644 index 024326e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonExtendedHashException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonExtendedHashException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonExtendedHashException

    -
    -
    No usage of freemarker.core.NonExtendedHashException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonHashException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonHashException.html deleted file mode 100644 index c10cdf4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonHashException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonHashException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonHashException

    -
    -
    No usage of freemarker.core.NonHashException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonMethodException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonMethodException.html deleted file mode 100644 index 39a0762..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonMethodException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonMethodException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonMethodException

    -
    -
    No usage of freemarker.core.NonMethodException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonNodeException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonNodeException.html deleted file mode 100644 index ad2b0d6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonNodeException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonNodeException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonNodeException

    -
    -
    No usage of freemarker.core.NonNodeException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonNumericalException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonNumericalException.html deleted file mode 100644 index f6b0cc4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonNumericalException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonNumericalException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonNumericalException

    -
    -
    No usage of freemarker.core.NonNumericalException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonSequenceException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonSequenceException.html deleted file mode 100644 index 1d82014..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonSequenceException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonSequenceException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonSequenceException

    -
    -
    No usage of freemarker.core.NonSequenceException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonSequenceOrCollectionException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonSequenceOrCollectionException.html deleted file mode 100644 index d4a55b4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonSequenceOrCollectionException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonSequenceOrCollectionException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonSequenceOrCollectionException

    -
    -
    No usage of freemarker.core.NonSequenceOrCollectionException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonStringException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/NonStringException.html deleted file mode 100644 index 8c16399..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/NonStringException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.NonStringException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.NonStringException

    -
    -
    No usage of freemarker.core.NonStringException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/OptInTemplateClassResolver.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/OptInTemplateClassResolver.html deleted file mode 100644 index 5e35742..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/OptInTemplateClassResolver.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.OptInTemplateClassResolver (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.OptInTemplateClassResolver

    -
    -
    No usage of freemarker.core.OptInTemplateClassResolver
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/ParseException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/ParseException.html deleted file mode 100644 index f74c58e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/ParseException.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - -Uses of Class freemarker.core.ParseException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.ParseException

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/StopException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/StopException.html deleted file mode 100644 index 5e9fb8b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/StopException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.core.StopException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.StopException

    -
    -
    No usage of freemarker.core.StopException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/TemplateClassResolver.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/TemplateClassResolver.html deleted file mode 100644 index 30e08f8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/TemplateClassResolver.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -Uses of Interface freemarker.core.TemplateClassResolver (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.core.TemplateClassResolver

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/class-use/UnexpectedTypeException.html b/fmpp/docs/freemarker/api/freemarker/core/class-use/UnexpectedTypeException.html deleted file mode 100644 index 64d451f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/class-use/UnexpectedTypeException.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - -Uses of Class freemarker.core.UnexpectedTypeException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.core.UnexpectedTypeException

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/package-frame.html b/fmpp/docs/freemarker/api/freemarker/core/package-frame.html deleted file mode 100644 index 5653c76..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/package-frame.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - -freemarker.core (FreeMarker 2.3.21 API) - - - - - -

    freemarker.core

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/package-summary.html b/fmpp/docs/freemarker/api/freemarker/core/package-summary.html deleted file mode 100644 index 04bc541..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/package-summary.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - -freemarker.core (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.core

    -
    -
    The seldom used or advanced parts of the fundamental FreeMarker API, compared to freemarker.template.
    -
    -

    See: Description

    -
    -
    - - - - -

    Package freemarker.core Description

    -

    The seldom used or advanced parts of the fundamental FreeMarker API, compared to freemarker.template. -This package also encloses FreeMarker's core parsing/rendering functionality.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/package-tree.html b/fmpp/docs/freemarker/api/freemarker/core/package-tree.html deleted file mode 100644 index 9096558..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/package-tree.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - -freemarker.core Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.core

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/core/package-use.html b/fmpp/docs/freemarker/api/freemarker/core/package-use.html deleted file mode 100644 index eaf7f1d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/core/package-use.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - -Uses of Package freemarker.core (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.core

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/Breakpoint.html b/fmpp/docs/freemarker/api/freemarker/debug/Breakpoint.html deleted file mode 100644 index 1b1a4a8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/Breakpoint.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - - -Breakpoint (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.debug
    -

    Class Breakpoint

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          Breakpoint

          -
          public Breakpoint(String templateName,
          -                  int line)
          -
          Creates a new breakpoint.
          -
          -
          Parameters:
          -
          templateName - the name of the template
          -
          line - the line number in the template where to put the breakpoint
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getLine

          -
          public int getLine()
          -
          Returns the line number of the breakpoint
          -
        • -
        - - - -
          -
        • -

          getTemplateName

          -
          public String getTemplateName()
          -
          Returns the template name of the breakpoint
          -
        • -
        - - - -
          -
        • -

          hashCode

          -
          public int hashCode()
          -
          -
          Overrides:
          -
          hashCode in class Object
          -
          -
        • -
        - - - -
          -
        • -

          equals

          -
          public boolean equals(Object o)
          -
          -
          Overrides:
          -
          equals in class Object
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getLocationString

          -
          public String getLocationString()
          -
          Returns the template name and the line number separated with a colon
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/DebugModel.html b/fmpp/docs/freemarker/api/freemarker/debug/DebugModel.html deleted file mode 100644 index dbe6d12..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/DebugModel.html +++ /dev/null @@ -1,748 +0,0 @@ - - - - - - -DebugModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.debug
    -

    Interface DebugModel

    -
    -
    -
    -
      -
    • -
      -
      All Superinterfaces:
      -
      Remote
      -
      -
      -
      All Known Subinterfaces:
      -
      DebuggedEnvironment
      -
      -
      -
      -
      public interface DebugModel
      -extends Remote
      -
      Represents the debugger-side mirror of a TemplateModel object, a Template - object, or a Configuration object. The Environment objects are also represented - by instances of this model, although not directly but through a separate - subinterface DebuggedEnvironment. The interface is a union of - almost all of FreeMarker template models with identical method signatures. - For purposes of optimizing network traffic there are bulk retrieval methods - for sequences and hashes, as well as a getModelTypes() method that - returns a bit mask of various TYPE_xxx constants flagging which - template models are implemented by the mirrored object.
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/DebuggedEnvironment.html b/fmpp/docs/freemarker/api/freemarker/debug/DebuggedEnvironment.html deleted file mode 100644 index 8132865..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/DebuggedEnvironment.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - -DebuggedEnvironment (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.debug
    -

    Interface DebuggedEnvironment

    -
    -
    -
    -
      -
    • -
      -
      All Superinterfaces:
      -
      DebugModel, Remote
      -
      -
      -
      -
      public interface DebuggedEnvironment
      -extends DebugModel
      -
      Represents the debugger-side mirror of a debugged - Environment object in the remote VM. This interface - extends DebugModel, and the properties of the Environment are exposed - as hash keys on it. Specifically, the following keys are supported: - "currentNamespace", "dataModel", "globalNamespace", "knownVariables", - "mainNamespace", and "template". -

      The debug model for the template supports keys "configuration" and "name". -

      The debug model for the configuration supports key "sharedVariables". -

      Additionally, all of the debug models for environment, template, and - configuration also support all the setting keys of - Configurable objects.

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          resume

          -
          void resume()
          -     throws RemoteException
          -
          Resumes the processing of the environment in the remote VM after it was - stopped on a breakpoint.
          -
          -
          Throws:
          -
          RemoteException
          -
          -
        • -
        - - - -
          -
        • -

          stop

          -
          void stop()
          -   throws RemoteException
          -
          Stops the processing of the environment after it was stopped on - a breakpoint. Causes a StopException to be - thrown in the processing thread in the remote VM.
          -
          -
          Throws:
          -
          RemoteException
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/Debugger.html b/fmpp/docs/freemarker/api/freemarker/debug/Debugger.html deleted file mode 100644 index 7cd2072..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/Debugger.html +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - -Debugger (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.debug
    -

    Interface Debugger

    -
    -
    -
    -
      -
    • -
      -
      All Superinterfaces:
      -
      Remote
      -
      -
      -
      -
      public interface Debugger
      -extends Remote
      -
      The main debugger interface. Allows management of breakpoints as well as - installation of listeners for debug events.
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/DebuggerClient.html b/fmpp/docs/freemarker/api/freemarker/debug/DebuggerClient.html deleted file mode 100644 index 8f14651..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/DebuggerClient.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - -DebuggerClient (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.debug
    -

    Class DebuggerClient

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class DebuggerClient
      -extends Object
      -
      A utility class that allows you to connect to the FreeMarker debugger service - running on a specific host and port.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getDebugger

          -
          public static Debugger getDebugger(InetAddress host,
          -                                   int port,
          -                                   String password)
          -                            throws IOException
          -
          Connects to the FreeMarker debugger service running on a specific host - and port. The Java VM to which the connection is made must have defined - the system property freemarker.debug.password in order to enable - the debugger service. Additionally, the freemarker.debug.port - system property can be set to specify the port where the debugger service - is listening. When not specified, it defaults to - Debugger.DEFAULT_PORT.
          -
          -
          Parameters:
          -
          host - the host address of the machine where the debugger service is - running.
          -
          port - the port of the debugger service
          -
          password - the password required to connect to the debugger service
          -
          Returns:
          -
          Debugger a debugger object. null is returned in case incorrect - password was supplied.
          -
          Throws:
          -
          IOException - if an exception occurs.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/DebuggerListener.html b/fmpp/docs/freemarker/api/freemarker/debug/DebuggerListener.html deleted file mode 100644 index 63c11df..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/DebuggerListener.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - -DebuggerListener (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.debug
    -

    Interface DebuggerListener

    -
    -
    -
    -
      -
    • -
      -
      All Superinterfaces:
      -
      EventListener, Remote
      -
      -
      -
      -
      public interface DebuggerListener
      -extends Remote, EventListener
      -
      An interface for components that wish to receive debugging events.
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/EnvironmentSuspendedEvent.html b/fmpp/docs/freemarker/api/freemarker/debug/EnvironmentSuspendedEvent.html deleted file mode 100644 index 35e7783..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/EnvironmentSuspendedEvent.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - -EnvironmentSuspendedEvent (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.debug
    -

    Class EnvironmentSuspendedEvent

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      -
      public class EnvironmentSuspendedEvent
      -extends EventObject
      -
      Event describing a suspension of an environment (ie because it hit a - breakpoint).
      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getName

          -
          public String getName()
          -
          The name of the template where the execution of the environment - was suspended
          -
          -
          Returns:
          -
          String the template name
          -
          -
        • -
        - - - -
          -
        • -

          getLine

          -
          public int getLine()
          -
          The line number in the template where the execution of the environment - was suspended.
          -
          -
          Returns:
          -
          int the line number
          -
          -
        • -
        - - - -
          -
        • -

          getEnvironment

          -
          public DebuggedEnvironment getEnvironment()
          -
          The environment that was suspended
          -
          -
          Returns:
          -
          DebuggedEnvironment
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/class-use/Breakpoint.html b/fmpp/docs/freemarker/api/freemarker/debug/class-use/Breakpoint.html deleted file mode 100644 index 70cad68..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/class-use/Breakpoint.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - -Uses of Class freemarker.debug.Breakpoint (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.debug.Breakpoint

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebugModel.html b/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebugModel.html deleted file mode 100644 index cc51247..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebugModel.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - -Uses of Interface freemarker.debug.DebugModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.debug.DebugModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggedEnvironment.html b/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggedEnvironment.html deleted file mode 100644 index 8def250..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggedEnvironment.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - -Uses of Interface freemarker.debug.DebuggedEnvironment (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.debug.DebuggedEnvironment

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/class-use/Debugger.html b/fmpp/docs/freemarker/api/freemarker/debug/class-use/Debugger.html deleted file mode 100644 index 24fb497..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/class-use/Debugger.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - -Uses of Interface freemarker.debug.Debugger (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.debug.Debugger

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggerClient.html b/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggerClient.html deleted file mode 100644 index 18d9229..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggerClient.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.debug.DebuggerClient (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.debug.DebuggerClient

    -
    -
    No usage of freemarker.debug.DebuggerClient
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggerListener.html b/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggerListener.html deleted file mode 100644 index 2734282..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/class-use/DebuggerListener.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Interface freemarker.debug.DebuggerListener (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.debug.DebuggerListener

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/class-use/EnvironmentSuspendedEvent.html b/fmpp/docs/freemarker/api/freemarker/debug/class-use/EnvironmentSuspendedEvent.html deleted file mode 100644 index b663da8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/class-use/EnvironmentSuspendedEvent.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Class freemarker.debug.EnvironmentSuspendedEvent (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.debug.EnvironmentSuspendedEvent

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/package-frame.html b/fmpp/docs/freemarker/api/freemarker/debug/package-frame.html deleted file mode 100644 index 884015a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/package-frame.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - -freemarker.debug (FreeMarker 2.3.21 API) - - - - - -

    freemarker.debug

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/package-summary.html b/fmpp/docs/freemarker/api/freemarker/debug/package-summary.html deleted file mode 100644 index 511c1fe..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/package-summary.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - -freemarker.debug (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.debug

    -
    -
    Debugging API; experimental status, might change! -This is to support debugging in IDE-s.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - - - - - - - - - - - - - -
      Interface Summary 
      InterfaceDescription
      DebuggedEnvironment -
      Represents the debugger-side mirror of a debugged - Environment object in the remote VM.
      -
      Debugger -
      The main debugger interface.
      -
      DebuggerListener -
      An interface for components that wish to receive debugging events.
      -
      DebugModel -
      Represents the debugger-side mirror of a TemplateModel object, a Template - object, or a Configuration object.
      -
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      Breakpoint -
      Represents a breakpoint location consisting of a template name and a line number.
      -
      DebuggerClient -
      A utility class that allows you to connect to the FreeMarker debugger service - running on a specific host and port.
      -
      EnvironmentSuspendedEvent -
      Event describing a suspension of an environment (ie because it hit a - breakpoint).
      -
      -
    • -
    - - - -

    Package freemarker.debug Description

    -

    Debugging API; experimental status, might change! -This is to support debugging in IDE-s. If you are working on a client for this, -don't hesitate to contact us!

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/package-tree.html b/fmpp/docs/freemarker/api/freemarker/debug/package-tree.html deleted file mode 100644 index a134c22..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/package-tree.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - -freemarker.debug Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.debug

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/debug/package-use.html b/fmpp/docs/freemarker/api/freemarker/debug/package-use.html deleted file mode 100644 index 4972440..0000000 --- a/fmpp/docs/freemarker/api/freemarker/debug/package-use.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - -Uses of Package freemarker.debug (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.debug

    -
    -
    -
      -
    • - - - - - - - - - - - - -
      Packages that use freemarker.debug 
      PackageDescription
      freemarker.debug -
      Debugging API; experimental status, might change! -This is to support debugging in IDE-s.
      -
      -
    • -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Classes in freemarker.debug used by freemarker.debug 
      Class and Description
      Breakpoint -
      Represents a breakpoint location consisting of a template name and a line number.
      -
      DebuggedEnvironment -
      Represents the debugger-side mirror of a debugged - Environment object in the remote VM.
      -
      Debugger -
      The main debugger interface.
      -
      DebuggerListener -
      An interface for components that wish to receive debugging events.
      -
      DebugModel -
      Represents the debugger-side mirror of a TemplateModel object, a Template - object, or a Configuration object.
      -
      EnvironmentSuspendedEvent -
      Event describing a suspension of an environment (ie because it hit a - breakpoint).
      -
      -
    • -
    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/FreemarkerXmlTask.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/FreemarkerXmlTask.html deleted file mode 100644 index 40e9ec6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/FreemarkerXmlTask.html +++ /dev/null @@ -1,796 +0,0 @@ - - - - - - -FreemarkerXmlTask (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.ant
    -

    Class FreemarkerXmlTask

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • org.apache.tools.ant.ProjectComponent
      • -
      • -
          -
        • org.apache.tools.ant.Task
        • -
        • -
            -
          • org.apache.tools.ant.taskdefs.MatchingTask
          • -
          • -
              -
            • freemarker.ext.ant.FreemarkerXmlTask
            • -
            -
          • -
          -
        • -
        -
      • -
      -
    • -
    -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      org.apache.tools.ant.types.selectors.SelectorContainer
      -
      -
      -
      Deprecated.  -
      FMPP is a more complete solution.
      -
      -
      -
      public class FreemarkerXmlTask
      -extends org.apache.tools.ant.taskdefs.MatchingTask
      -

      This is an Ant task for transforming - XML documents using FreeMarker templates. It uses the adapter class - NodeListModel. It will read a set of XML documents, and pass them to - the template for processing, building the corresponding output files in the - destination directory.

      -

      It makes the following variables available to the template in the data model:

      -
        -
      • document: Deprecated! The DOM tree of the currently processed XML file wrapped - with the legacy NodeListModel. - For new projects you should use the .node instead, which initially - contains the DOM Document wrapped with NodeModel.
      • -
      • properties: a SimpleHash containing - properties of the project that executes the task
      • -
      • userProperties: a SimpleHash containing - user properties of the project that executes the task
      • -
      • project: the DOM tree of the XML file specified by the - projectfile. It will not be available if you didn't specify the - projectfile attribute.
      • -
      • further custom models can be instantiated and made available to the - templates using the models attribute.
      • -
      -

      It supports the following attributes:

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      AttributeDescriptionRequired
      basedirlocation of the XML files. Defaults to the project's - basedir.No
      destdirlocation to store the generated files.Yes
      includescomma-separated list of patterns of files that must be - included; all files are included when omitted.No
      includesfilethe name of a file that contains - include patterns.No
      excludescomma-separated list of patterns of files that must be - excluded; no files (except default excludes) are excluded when omitted.No
      excludesfilethe name of a file that contains - exclude patterns.No
      defaultexcludesindicates whether default excludes should be used - (yes | no); default excludes are used when omitted.No
      extensionextension of generated files. Defaults to .html.No
      templatename of the FreeMarker template file that will be - applied by default to XML filesNo
      templateDirlocation of the FreeMarker template(s) to be used, defaults - to the project's baseDirNo
      projectfilepath to the project file. The poject file must be an XML file. - If omitted, it will not be available to templates No
      incrementalindicates whether all files should be regenerated (no), or - only those that are older than the XML file, the template file, or the - project file (yes). Defaults to yes. No
      encodingThe encoding of the output files. Defaults to platform - default encoding.No
      templateEncodingThe encoding of the template files. Defaults to platform - default encoding.No
      validationWhether to validate the XML input. Defaults to off.No
      modelsA list of [name=]className pairs separated by spaces, - commas, or semicolons that specifies further models that should be - available to templates. If name is omitted, the unqualified class name - is used as the name. Every class that is specified must implement the - TemplateModel interface and have a no-args constructor.No
      - -

      It supports the following nesed elements:

      - - - - - - - - - - - - - - - - - -
      ElementDescriptionRequired
      prepareModel - This element executes Jython script before the processing of each XML - files, that you can use to modify the data model. - You either enter the Jython script directly nested into this - element, or specify a Jython script file with the file - attribute. - The following variables are added to the Jython runtime's local - namespace before the script is invoked: -
        -
      • model: The data model as java.util.HashMap. - You can read and modify the data model with this variable. -
      • doc: The XML document as org.w3c.dom.Document. -
      • project: The project document (if used) as - org.w3c.dom.Document. -
      - If this element is used, Jython classes (tried with Jython 2.1) - must be available. -
      No
      prepareEnvironmentThis element executes Jython script before the processing - of each XML files, that you can use to modify the freemarker environment - (Environment). The script is executed after the - prepareModel element. The accessible Jython variables are the - same as with the prepareModel element, except that there is no - model variable, but there is env variable, which is - the FreeMarker environment (Environment). - If this element is used, Jython classes (tried with Jython 2.1) - must be available. - No
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Summary

        -
          -
        • - - -

          Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask

          -fileset
        • -
        -
          -
        • - - -

          Fields inherited from class org.apache.tools.ant.Task

          -description, location, target, taskName, taskType, wrapper
        • -
        -
          -
        • - - -

          Fields inherited from class org.apache.tools.ant.ProjectComponent

          -project
        • -
        -
      • -
      - -
        -
      • - - -

        Constructor Summary

        - - - - - - - - -
        Constructors 
        Constructor and Description
        FreemarkerXmlTask() -
        Deprecated. 
        -
        Constructor creates the SAXBuilder.
        -
        -
      • -
      - -
        -
      • - - -

        Method Summary

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        All Methods Instance Methods Concrete Methods Deprecated Methods 
        Modifier and TypeMethod and Description
        voidaddConfiguredJython(JythonAntTask jythonAntTask) -
        Deprecated. 
        voidaddConfiguredPrepareEnvironment(JythonAntTask prepareEnvironment) -
        Deprecated. 
        voidaddConfiguredPrepareModel(JythonAntTask prepareModel) -
        Deprecated. 
        voidexecute() -
        Deprecated. 
        protected voidinsertDefaults(Map root) -
        Deprecated. 
        voidsetBasedir(File dir) -
        Deprecated. 
        -
        Set the base directory.
        -
        voidsetDestdir(File dir) -
        Deprecated. 
        -
        Set the destination directory into which the generated - files should be copied to
        -
        voidsetEncoding(String encoding) -
        Deprecated. 
        -
        Set encoding for generated files.
        -
        voidsetExtension(String extension) -
        Deprecated. 
        -
        Set the output file extension.
        -
        voidsetIncremental(String incremental) -
        Deprecated. 
        -
        Turn on/off incremental processing.
        -
        voidsetModels(String models) -
        Deprecated. 
        voidsetProjectfile(String projectAttribute) -
        Deprecated. 
        -
        Set the path to the project XML file
        -
        voidsetTemplate(String templateName) -
        Deprecated. 
        voidsetTemplateDir(File templateDir) -
        Deprecated. 
        voidsetTemplateEncoding(String inputEncoding) -
        Deprecated. 
        voidsetValidation(boolean validation) -
        Deprecated. 
        -
        Sets whether to validate the XML input.
        -
        -
          -
        • - - -

          Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask

          -add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
        • -
        -
          -
        • - - -

          Methods inherited from class org.apache.tools.ant.Task

          -getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
        • -
        -
          -
        • - - -

          Methods inherited from class org.apache.tools.ant.ProjectComponent

          -getProject
        • -
        - -
      • -
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          FreemarkerXmlTask

          -
          public FreemarkerXmlTask()
          -
          Deprecated. 
          -
          Constructor creates the SAXBuilder.
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          setBasedir

          -
          public void setBasedir(File dir)
          -
          Deprecated. 
          -
          Set the base directory. Defaults to .
          -
        • -
        - - - -
          -
        • -

          setDestdir

          -
          public void setDestdir(File dir)
          -
          Deprecated. 
          -
          Set the destination directory into which the generated - files should be copied to
          -
          -
          Parameters:
          -
          dir - the name of the destination directory
          -
          -
        • -
        - - - -
          -
        • -

          setExtension

          -
          public void setExtension(String extension)
          -
          Deprecated. 
          -
          Set the output file extension. .html by default.
          -
        • -
        - - - -
          -
        • -

          setTemplate

          -
          public void setTemplate(String templateName)
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          setTemplateDir

          -
          public void setTemplateDir(File templateDir)
          -                    throws org.apache.tools.ant.BuildException
          -
          Deprecated. 
          -
          -
          Throws:
          -
          org.apache.tools.ant.BuildException
          -
          -
        • -
        - - - -
          -
        • -

          setProjectfile

          -
          public void setProjectfile(String projectAttribute)
          -
          Deprecated. 
          -
          Set the path to the project XML file
          -
        • -
        - - - -
          -
        • -

          setIncremental

          -
          public void setIncremental(String incremental)
          -
          Deprecated. 
          -
          Turn on/off incremental processing. On by default
          -
        • -
        - - - -
          -
        • -

          setEncoding

          -
          public void setEncoding(String encoding)
          -
          Deprecated. 
          -
          Set encoding for generated files. Defaults to platform default encoding.
          -
        • -
        - - - -
          -
        • -

          setTemplateEncoding

          -
          public void setTemplateEncoding(String inputEncoding)
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          setValidation

          -
          public void setValidation(boolean validation)
          -
          Deprecated. 
          -
          Sets whether to validate the XML input.
          -
        • -
        - - - -
          -
        • -

          setModels

          -
          public void setModels(String models)
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          execute

          -
          public void execute()
          -             throws org.apache.tools.ant.BuildException
          -
          Deprecated. 
          -
          -
          Overrides:
          -
          execute in class org.apache.tools.ant.Task
          -
          Throws:
          -
          org.apache.tools.ant.BuildException
          -
          -
        • -
        - - - -
          -
        • -

          addConfiguredJython

          -
          public void addConfiguredJython(JythonAntTask jythonAntTask)
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          addConfiguredPrepareModel

          -
          public void addConfiguredPrepareModel(JythonAntTask prepareModel)
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          addConfiguredPrepareEnvironment

          -
          public void addConfiguredPrepareEnvironment(JythonAntTask prepareEnvironment)
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          insertDefaults

          -
          protected void insertDefaults(Map root)
          -
          Deprecated. 
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/JythonAntTask.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/JythonAntTask.html deleted file mode 100644 index 85180af..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/JythonAntTask.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - -JythonAntTask (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.ant
    -

    Class JythonAntTask

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • org.apache.tools.ant.ProjectComponent
      • -
      • -
          -
        • org.apache.tools.ant.Task
        • -
        • -
            -
          • freemarker.ext.ant.JythonAntTask
          • -
          -
        • -
        -
      • -
      -
    • -
    -
    -
      -
    • -
      -
      -
      public class JythonAntTask
      -extends org.apache.tools.ant.Task
      -
      Used internally, public for technical reasons only. - -

      This is an Ant sub-task of the FreemarkerXmlTask task. - -

      Warning! It must not be statically linked with Jython classes, - so users can use the XML ant task even if Jython is not installed.

      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Summary

        -
          -
        • - - -

          Fields inherited from class org.apache.tools.ant.Task

          -description, location, target, taskName, taskType, wrapper
        • -
        -
          -
        • - - -

          Fields inherited from class org.apache.tools.ant.ProjectComponent

          -project
        • -
        -
      • -
      - -
        -
      • - - -

        Constructor Summary

        - - - - - - - - -
        Constructors 
        Constructor and Description
        JythonAntTask() 
        -
      • -
      - -
        -
      • - - -

        Method Summary

        - - - - - - - - - - - - - - - - - - -
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidaddText(String text) 
        voidexecute(Map vars) 
        voidsetFile(File scriptFile) 
        -
          -
        • - - -

          Methods inherited from class org.apache.tools.ant.Task

          -execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
        • -
        -
          -
        • - - -

          Methods inherited from class org.apache.tools.ant.ProjectComponent

          -getProject, setProject
        • -
        - -
      • -
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          JythonAntTask

          -
          public JythonAntTask()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          setFile

          -
          public void setFile(File scriptFile)
          -             throws org.apache.tools.ant.BuildException
          -
          -
          Throws:
          -
          org.apache.tools.ant.BuildException
          -
          -
        • -
        - - - -
          -
        • -

          addText

          -
          public void addText(String text)
          -
        • -
        - - - -
          -
        • -

          execute

          -
          public void execute(Map vars)
          -             throws org.apache.tools.ant.BuildException
          -
          -
          Throws:
          -
          org.apache.tools.ant.BuildException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/UnlinkedJythonOperationsImpl.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/UnlinkedJythonOperationsImpl.html deleted file mode 100644 index 2dc7d49..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/UnlinkedJythonOperationsImpl.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - -UnlinkedJythonOperationsImpl (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.ant
    -

    Class UnlinkedJythonOperationsImpl

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class UnlinkedJythonOperationsImpl
      -extends Object
      -
      Used internally, public for technical reasons only.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          UnlinkedJythonOperationsImpl

          -
          public UnlinkedJythonOperationsImpl()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          execute

          -
          public void execute(String script,
          -                    Map vars)
          -             throws org.apache.tools.ant.BuildException
          -
          -
          Throws:
          -
          org.apache.tools.ant.BuildException
          -
          -
        • -
        - - - -
          -
        • -

          execute

          -
          public void execute(File file,
          -                    Map vars)
          -             throws org.apache.tools.ant.BuildException
          -
          -
          Throws:
          -
          org.apache.tools.ant.BuildException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/FreemarkerXmlTask.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/FreemarkerXmlTask.html deleted file mode 100644 index beb0f2b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/FreemarkerXmlTask.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.ant.FreemarkerXmlTask (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.ant.FreemarkerXmlTask

    -
    -
    No usage of freemarker.ext.ant.FreemarkerXmlTask
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/JythonAntTask.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/JythonAntTask.html deleted file mode 100644 index d7660b2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/JythonAntTask.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.ant.JythonAntTask (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.ant.JythonAntTask

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/UnlinkedJythonOperationsImpl.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/UnlinkedJythonOperationsImpl.html deleted file mode 100644 index 432063a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/class-use/UnlinkedJythonOperationsImpl.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.ant.UnlinkedJythonOperationsImpl (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.ant.UnlinkedJythonOperationsImpl

    -
    -
    No usage of freemarker.ext.ant.UnlinkedJythonOperationsImpl
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/package-frame.html deleted file mode 100644 index c069494..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/package-frame.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -freemarker.ext.ant (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.ant

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/package-summary.html deleted file mode 100644 index f60425c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/package-summary.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -freemarker.ext.ant (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.ant

    -
    -
    -Ant task to transform XML files -with a template; a more powerful alternative is FMPP.
    -
    -

    See: Description

    -
    -
    - - - - -

    Package freemarker.ext.ant Description

    -

    -Ant task to transform XML files -with a template; a more powerful alternative is FMPP.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/package-tree.html deleted file mode 100644 index 3cf4f4f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/package-tree.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -freemarker.ext.ant Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.ant

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    -
      -
    • java.lang.Object -
        -
      • org.apache.tools.ant.ProjectComponent -
          -
        • org.apache.tools.ant.Task -
            -
          • freemarker.ext.ant.JythonAntTask
          • -
          • org.apache.tools.ant.taskdefs.MatchingTask (implements org.apache.tools.ant.types.selectors.SelectorContainer) - -
          • -
          -
        • -
        -
      • -
      • freemarker.ext.ant.UnlinkedJythonOperationsImpl
      • -
      -
    • -
    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/ant/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/ant/package-use.html deleted file mode 100644 index 79e6337..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/ant/package-use.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.ant (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.ant

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/ArrayModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/ArrayModel.html deleted file mode 100644 index ea39645..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/ArrayModel.html +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - -ArrayModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class ArrayModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          ArrayModel

          -
          public ArrayModel(Object array,
          -                  BeansWrapper wrapper)
          -
          Creates a new model that wraps the specified array object.
          -
          -
          Parameters:
          -
          array - the array object to wrap into a model.
          -
          wrapper - the BeansWrapper associated with this model. - Every model has to have an associated BeansWrapper instance. The - model gains many attributes from its wrapper, including the caching - behavior, method exposure level, method-over-item shadowing policy etc.
          -
          Throws:
          -
          IllegalArgumentException - if the passed object is not a Java array.
          -
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeanModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/BeanModel.html deleted file mode 100644 index c78285b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeanModel.html +++ /dev/null @@ -1,655 +0,0 @@ - - - - - - -BeanModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class BeanModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          BeanModel

          -
          public BeanModel(Object object,
          -                 BeansWrapper wrapper)
          -
          Creates a new model that wraps the specified object. Note that there are - specialized subclasses of this class for wrapping arrays, collections, - enumeration, iterators, and maps. Note also that the superclass can be - used to wrap String objects if only scalar functionality is needed. You - can also choose to delegate the choice over which model class is used for - wrapping to BeansWrapper.wrap(Object).
          -
          -
          Parameters:
          -
          object - the object to wrap into a model.
          -
          wrapper - the BeansWrapper associated with this model. - Every model has to have an associated BeansWrapper instance. The - model gains many attributes from its wrapper, including the caching - behavior, method exposure level, method-over-item shadowing policy etc.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          get

          -
          public TemplateModel get(String key)
          -                  throws TemplateModelException
          -
          Uses Beans introspection to locate a property or method with name - matching the key name. If a method or property is found, it's wrapped - into TemplateMethodModelEx (for a method or - indexed property), or evaluated on-the-fly and the return value wrapped - into appropriate model (for a simple property) Models for various - properties and methods are cached on a per-class basis, so the costly - introspection is performed only once per property or method of a class. - (Side-note: this also implies that any class whose method has been called - will be strongly referred to by the framework and will not become - unloadable until this class has been unloaded first. Normally this is not - an issue, but can be in a rare scenario where you create many classes on- - the-fly. Also, as the cache grows with new classes and methods introduced - to the framework, it may appear as if it were leaking memory. The - framework does, however detect class reloads (if you happen to be in an - environment that does this kind of things--servlet containers do it when - they reload a web application) and flushes the cache. If no method or - property matching the key is found, the framework will try to invoke - methods with signature - non-void-return-type get(java.lang.String), - then non-void-return-type get(java.lang.Object), or - alternatively (if the wrapped object is a resource bundle) - Object getObject(java.lang.String).
          -
          -
          Specified by:
          -
          get in interface TemplateHashModel
          -
          Parameters:
          -
          key - the name by which the TemplateModel - is identified in the template.
          -
          Returns:
          -
          the TemplateModel referred to by the key, - or null if not found.
          -
          Throws:
          -
          TemplateModelException - if there was no property nor method nor - a generic get method to invoke.
          -
          -
        • -
        - - - -
          -
        • -

          hasPlainGetMethod

          -
          protected boolean hasPlainGetMethod()
          -
          Whether the model has a plain get(String) or get(Object) method
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          isEmpty

          -
          public boolean isEmpty()
          -
          Tells whether the model is empty. It is empty if either the wrapped - object is null, or it's a Boolean with false value.
          -
          -
          Specified by:
          -
          isEmpty in interface TemplateHashModel
          -
          -
        • -
        - - - -
          -
        • -

          getAdaptedObject

          -
          public Object getAdaptedObject(Class hint)
          -
          Returns the same as getWrappedObject(); to ensure that, this method will be final starting from 2.4. - This behavior of BeanModel is assumed by some FreeMarker code.
          -
          -
          Specified by:
          -
          getAdaptedObject in interface AdapterTemplateModel
          -
          Parameters:
          -
          hint - the desired class of the returned value. An implementation - should make reasonable effort to retrieve an object of the requested - class, but if that is impossible, it must at least return the underlying - object as-is. As a minimal requirement, an implementation must always - return the exact underlying object when - hint.isInstance(underlyingObject) holds. When called - with java.lang.Object.class, it should return a generic Java - object (i.e. if the model is wrapping a scripting language object that is - further wrapping a Java object, the deepest underlying Java object should - be returned).
          -
          Returns:
          -
          the underlying object, or its value accommodated for the hint - class.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          size

          -
          public int size()
          -
          -
          Specified by:
          -
          size in interface TemplateHashModelEx
          -
          Returns:
          -
          the number of key/value mappings in the hash.
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          keySet

          -
          protected Set keySet()
          -
          Helper method to support TemplateHashModelEx. Returns the Set of - Strings which are available via the TemplateHashModel - interface. Subclasses that override invokeGenericGet to - provide additional hash keys should also override this method.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansModelCache.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansModelCache.html deleted file mode 100644 index db6e104..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansModelCache.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - -BeansModelCache (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class BeansModelCache

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class BeansModelCache
      -extends ModelCache
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.MethodAppearanceDecision.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.MethodAppearanceDecision.html deleted file mode 100644 index fc4da14..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.MethodAppearanceDecision.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - -BeansWrapper.MethodAppearanceDecision (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class BeansWrapper.MethodAppearanceDecision

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
      • -
      -
    • -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          MethodAppearanceDecision

          -
          public MethodAppearanceDecision()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - - - - - -
          -
        • -

          setExposeAsProperty

          -
          public void setExposeAsProperty(PropertyDescriptor exposeAsProperty)
          -
        • -
        - - - -
          -
        • -

          getExposeMethodAs

          -
          public String getExposeMethodAs()
          -
        • -
        - - - -
          -
        • -

          setExposeMethodAs

          -
          public void setExposeMethodAs(String exposeAsMethod)
          -
        • -
        - - - -
          -
        • -

          getMethodShadowsProperty

          -
          public boolean getMethodShadowsProperty()
          -
        • -
        - - - -
          -
        • -

          setMethodShadowsProperty

          -
          public void setMethodShadowsProperty(boolean shadowEarlierProperty)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.MethodAppearanceDecisionInput.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.MethodAppearanceDecisionInput.html deleted file mode 100644 index 70c1ba0..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.MethodAppearanceDecisionInput.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - -BeansWrapper.MethodAppearanceDecisionInput (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class BeansWrapper.MethodAppearanceDecisionInput

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput
      • -
      -
    • -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          MethodAppearanceDecisionInput

          -
          public MethodAppearanceDecisionInput()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getMethod

          -
          public Method getMethod()
          -
        • -
        - - - -
          -
        • -

          getContainingClass

          -
          public Class getContainingClass()
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.html deleted file mode 100644 index ceb9c08..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapper.html +++ /dev/null @@ -1,1499 +0,0 @@ - - - - - - -BeansWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class BeansWrapper

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          EXPOSE_ALL

          -
          public static final int EXPOSE_ALL
          -
          At this level of exposure, all methods and properties of the - wrapped objects are exposed to the template.
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          EXPOSE_SAFE

          -
          public static final int EXPOSE_SAFE
          -
          At this level of exposure, all methods and properties of the wrapped - objects are exposed to the template except methods that are deemed - not safe. The not safe methods are java.lang.Object methods wait() and - notify(), java.lang.Class methods getClassLoader() and newInstance(), - java.lang.reflect.Method and java.lang.reflect.Constructor invoke() and - newInstance() methods, all java.lang.reflect.Field set methods, all - java.lang.Thread and java.lang.ThreadGroup methods that can change its - state, as well as the usual suspects in java.lang.System and - java.lang.Runtime.
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          EXPOSE_PROPERTIES_ONLY

          -
          public static final int EXPOSE_PROPERTIES_ONLY
          -
          At this level of exposure, only property getters are exposed. - Additionally, property getters that map to unsafe methods are not - exposed (i.e. Class.classLoader and Thread.contextClassLoader).
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          EXPOSE_NOTHING

          -
          public static final int EXPOSE_NOTHING
          -
          At this level of exposure, no bean properties and methods are exposed. - Only map items, resource bundle items, and objects retrieved through - the generic get method (on objects of classes that have a generic get - method) can be retrieved through the hash interface. You might want to - call setMethodsShadowItems(boolean) with false value to - speed up map item retrieval.
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Constructor Detail

        - - - - - - - -
          -
        • -

          BeansWrapper

          -
          public BeansWrapper(Version incompatibleImprovements)
          -
          Use BeansWrapperBuilder instead of the public constructors if possible. - The main disadvantage of using the public constructors is that the instances won't share caches. So unless having - a private cache is your goal, don't use them. See
          -
          -
          Parameters:
          -
          incompatibleImprovements - Sets which of the non-backward-compatible improvements should be enabled. Not null. This version number - is the same as the FreeMarker version number with which the improvements were implemented. - -

          For new projects, it's recommended to set this to the FreeMarker version that's used during the development. - For released products that are still actively developed it's a low risk change to increase the 3rd - version number further as FreeMarker is updated, but of course you should always check the list of effects - below. Increasing the 2nd or 1st version number possibly mean substantial changes with higher risk of breaking - the application, but again, see the list of effects below. - -

          The reason it's separate from Configuration.setIncompatibleImprovements(Version) is that - ObjectWrapper objects are often shared among multiple Configuration-s, so the two version - numbers are technically independent. But it's recommended to keep those two version numbers the same. - -

          The changes enabled by incompatibleImprovements are: -

            -
          • -

            2.3.0: No changes; this is the starting point, the version used in older projects. -

          • -
          • -

            2.3.21 (or higher): - Several glitches were fixed in overloaded method selection. This usually just gets - rid of errors (like ambiguity exceptions and numerical precision loses due to bad overloaded method - choices), still, as in some cases the method chosen can be a different one now (that was the point of - the reworking after all), it can mean a change in the behavior of the application. The most important - change is that the treatment of null arguments were fixed, as earlier they were only seen - applicable to parameters of type Object. Now null-s are seen to be applicable to any - non-primitive parameters, and among those the one with the most specific type will be preferred (just - like in Java), which is hence never the one with the Object parameter type. For more details - about overloaded method selection changes see the version history in the FreeMarker Manual. -

          • -
          - -

          Note that the version will be normalized to the lowest version where the same incompatible - BeansWrapper improvements were already present, so getIncompatibleImprovements() might returns - a lower version than what you have specified.

          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - - -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          writeProtect

          -
          public void writeProtect()
          -
          Makes the configuration properties (settings) of this BeansWrapper object read-only. As changing them - after the object has become visible to multiple threads leads to undefined behavior, it's recommended to call - this when you have finished configuring the object. - -

          Consider using BeansWrapperBuilder instead, which gives an instance that's already - write protected and also uses some shared caches/pools.

          -
          -
          Specified by:
          -
          writeProtect in interface WriteProtectable
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - - - - - -
          -
        • -

          checkModifiable

          -
          protected void checkModifiable()
          -
          If this object is already read-only according to WriteProtectable, throws IllegalStateException, - otherwise does nothing.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - - - - - -
          -
        • -

          setStrict

          -
          public void setStrict(boolean strict)
          -
          Specifies if an attempt to read a bean property that doesn't exist in the - wrapped object should throw an InvalidPropertyException. - -

          If this property is false (the default) then an attempt to read - a missing bean property is the same as reading an existing bean property whose - value is null. The template can't tell the difference, and thus always - can use ?default('something') and ?exists and similar built-ins - to handle the situation. - -

          If this property is true then an attempt to read a bean propertly in - the template (like myBean.aProperty) that doesn't exist in the bean - object (as opposed to just holding null value) will cause - InvalidPropertyException, which can't be suppressed in the template - (not even with myBean.noSuchProperty?default('something')). This way - ?default('something') and ?exists and similar built-ins can be used to - handle existing properties whose value is null, without the risk of - hiding typos in the property names. Typos will always cause error. But mind you, it - goes against the basic approach of FreeMarker, so use this feature only if you really - know what you are doing.

          -
        • -
        - - - -
          -
        • -

          setOuterIdentity

          -
          public void setOuterIdentity(ObjectWrapper outerIdentity)
          -
          When wrapping an object, the BeansWrapper commonly needs to wrap - "sub-objects", for example each element in a wrapped collection. - Normally it wraps these objects using itself. However, this makes - it difficult to delegate to a BeansWrapper as part of a custom - aggregate ObjectWrapper. This method lets you set the ObjectWrapper - which will be used to wrap the sub-objects.
          -
          -
          Parameters:
          -
          outerIdentity - the aggregate ObjectWrapper
          -
          -
        • -
        - - - - - - - -
          -
        • -

          setSimpleMapWrapper

          -
          public void setSimpleMapWrapper(boolean simpleMapWrapper)
          -
          When set to true, the keys in Map-s won't mix with the method names when looking at them - from templates. The default is false for backward-compatibility, but is not recommended. - -

          When this is false, myMap.foo or myMap['foo'] either returns the method foo, - or calls Map.get("foo"). If both exists (the method and the Map key), one will hide the other, - depending on the isMethodsShadowItems(), which default to true (the method - wins). Some frameworks use this so that you can call myMap.get(nonStringKey) from templates [*], but it - comes on the cost of polluting the key-set with the method names, and risking methods accidentally hiding - Map entries (or the other way around). Thus, this setup is not recommended. - (Technical note: Map-s will be wrapped into MapModel in this case.) - -

          When this is true, myMap.foo or myMap['foo'] always calls Map.get("foo"). - The methods of the Map object aren't visible from templates in this case. This, however, spoils the - myMap.get(nonStringKey) workaround. But now you can use myMap(nonStringKey) instead, that is, you - can use the map itself as the get method. - (Technical note: Map-s will be wrapped into SimpleMapModel in this case.) - -

          *: For historical reasons, FreeMarker 2.3.X doesn't support non-string keys with the [] operator, - hence the workarounds. This will be likely fixed in FreeMarker 2.4.0. Also note that the method- and - the "field"-namespaces aren't separate in FreeMarker, hence myMap.get can return the get - method.

          -
        • -
        - - - -
          -
        • -

          isSimpleMapWrapper

          -
          public boolean isSimpleMapWrapper()
          -
          Tells whether Maps are exposed as simple maps, without access to their - method. See setSimpleMapWrapper(boolean) for details.
          -
          -
          Returns:
          -
          true if Maps are exposed as simple hashes, false if they're - exposed as full JavaBeans.
          -
          -
        • -
        - - - -
          -
        • -

          setExposureLevel

          -
          public void setExposureLevel(int exposureLevel)
          -
          Sets the method exposure level. By default, set to EXPOSE_SAFE.
          -
          -
          Parameters:
          -
          exposureLevel - can be any of the EXPOSE_xxx - constants.
          -
          -
        • -
        - - - -
          -
        • -

          getExposureLevel

          -
          public int getExposureLevel()
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          setExposeFields

          -
          public void setExposeFields(boolean exposeFields)
          -
          Controls whether public instance fields of classes are exposed to - templates.
          -
          -
          Parameters:
          -
          exposeFields - if set to true, public instance fields of classes - that do not have a property getter defined can be accessed directly by - their name. If there is a property getter for a property of the same - name as the field (i.e. getter "getFoo()" and field "foo"), then - referring to "foo" in template invokes the getter. If set to false, no - access to public instance fields of classes is given. Default is false.
          -
          -
        • -
        - - - -
          -
        • -

          isExposeFields

          -
          public boolean isExposeFields()
          -
          Returns whether exposure of public instance fields of classes is - enabled. See setExposeFields(boolean) for details.
          -
          -
          Returns:
          -
          true if public instance fields are exposed, false otherwise.
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          isClassIntrospectionCacheRestricted

          -
          public boolean isClassIntrospectionCacheRestricted()
          -
          Tells if this instance acts like if its class introspection cache is sharable with other BeansWrapper-s. - A restricted cache denies certain too "antisocial" operations, like clearClassIntrospecitonCache(). - The value depends on how the instance - was created; with a public constructor (then this is false), or with BeansWrapperBuilder - (then it's true). Note that in the last case it's possible that the introspection cache - will not be actually shared because there's no one to share with, but this will true even then.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          setMethodsShadowItems

          -
          public void setMethodsShadowItems(boolean methodsShadowItems)
          -
          Sets whether methods shadow items in beans. When true (this is the - default value), ${object.name} will first try to locate - a bean method or property with the specified name on the object, and - only if it doesn't find it will it try to call - object.get(name), the so-called "generic get method" that - is usually used to access items of a container (i.e. elements of a map). - When set to false, the lookup order is reversed and generic get method - is called first, and only if it returns null is method lookup attempted.
          -
        • -
        - - - -
          -
        • -

          setDefaultDateType

          -
          public void setDefaultDateType(int defaultDateType)
          -
          Sets the default date type to use for date models that result from - a plain java.util.Date instead of java.sql.Date or - java.sql.Time or java.sql.Timestamp. Default value is - TemplateDateModel.UNKNOWN.
          -
          -
          Parameters:
          -
          defaultDateType - the new default date type.
          -
          -
        • -
        - - - -
          -
        • -

          getDefaultDateType

          -
          public int getDefaultDateType()
          -
          Returns the default date type. See setDefaultDateType(int) for - details.
          -
          -
          Returns:
          -
          the default date type
          -
          -
        • -
        - - - -
          -
        • -

          setUseCache

          -
          public void setUseCache(boolean useCache)
          -
          Sets whether this wrapper caches the TemplateModel-s created for the Java objects that has wrapped with - this object wrapper. Default is false. - When set to true, calling wrap(Object) multiple times for - the same object will likely return the same model (although there is - no guarantee as the cache items can be cleared any time).
          -
        • -
        - - - -
          -
        • -

          getUseCache

          -
          public boolean getUseCache()
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          setNullModel

          -
          public void setNullModel(TemplateModel nullModel)
          -
          Sets the null model. This model is returned from the - wrap(Object) method whenever the underlying object - reference is null. It defaults to null reference, which is dealt - with quite strictly on engine level, however you can substitute an - arbitrary (perhaps more lenient) model, such as - TemplateScalarModel.EMPTY_STRING.
          -
        • -
        - - - -
          -
        • -

          getIncompatibleImprovements

          -
          public Version getIncompatibleImprovements()
          -
          Returns the version given with BeansWrapper(Version), normalized to the lowest version where a change - has occurred. Thus, this is not necessarily the same version than that was given to the constructor.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          normalizeIncompatibleImprovementsVersion

          -
          protected static Version normalizeIncompatibleImprovementsVersion(Version incompatibleImprovements)
          -
          Returns the lowest version number that is equivalent with the parameter version.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getDefaultInstance

          -
          public static final BeansWrapper getDefaultInstance()
          -
          Deprecated. Use BeansWrapperBuilder instead. The instance returned here is not read-only, so it's - dangerous to use.
          -
          Returns the default instance of the wrapper. This instance is used - when you construct various bean models without explicitly specifying - a wrapper. It is also returned by - ObjectWrapper.BEANS_WRAPPER - and this is the sole instance that is used by the JSP adapter. - You can modify the properties of the default instance (caching, - exposure level, null model) to affect its operation. By default, the - default instance is not caching, uses the EXPOSE_SAFE - exposure level, and uses null reference as the null model.
          -
        • -
        - - - - - - - -
          -
        • -

          getInstance

          -
          protected TemplateModel getInstance(Object object,
          -                                    ModelFactory factory)
          -
          Deprecated. override getModelFactory(Class) instead. Using this - method will now bypass wrapper caching (if it's enabled) and always - result in creation of a new wrapper. This method will be removed in 2.4
          -
          -
          Parameters:
          -
          object - The object to wrap
          -
          factory - The factory that wraps the object
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          unwrap

          -
          public Object unwrap(TemplateModel model,
          -                     Class hint)
          -              throws TemplateModelException
          -
          Attempts to unwrap a model into an object of the desired class. - Generally, this method is the inverse of the wrap(Object) - method. It recognizes a wide range of hint classes - all Java built-in - primitives, primitive wrappers, numbers, dates, sets, lists, maps, and - native arrays.
          -
          -
          Parameters:
          -
          model - the model to unwrap
          -
          hint - the class of the unwrapped result
          -
          Returns:
          -
          the unwrapped result of the desired class
          -
          Throws:
          -
          TemplateModelException - if an attempted unwrapping fails.
          -
          -
        • -
        - - - -
          -
        • -

          getStaticModels

          -
          public TemplateHashModel getStaticModels()
          -
          Returns a hash model that represents the so-called class static models. - Every class static model is itself a hash through which you can call - static methods on the specified class. To obtain a static model for a - class, get the element of this hash with the fully qualified class name. - For example, if you place this hash model inside the root data model - under name "statics", you can use i.e. statics["java.lang. - System"]. currentTimeMillis() to call the System.currentTimeMillis() method.
          -
          -
          Returns:
          -
          a hash model whose keys are fully qualified class names, and - that returns hash models whose elements are the static models of the - classes.
          -
          -
        • -
        - - - -
          -
        • -

          getEnumModels

          -
          public TemplateHashModel getEnumModels()
          -
          Returns a hash model that represents the so-called class enum models. - Every class' enum model is itself a hash through which you can access - enum value declared by the specified class, assuming that class is an - enumeration. To obtain an enum model for a class, get the element of this - hash with the fully qualified class name. For example, if you place this - hash model inside the root data model under name "enums", you can use - i.e. statics["java.math.RoundingMode"].UP to access the - RoundingMode.UP value.
          -
          -
          Returns:
          -
          a hash model whose keys are fully qualified class names, and - that returns hash models whose elements are the enum models of the - classes.
          -
          Throws:
          -
          UnsupportedOperationException - if this method is invoked on a - pre-1.5 JRE, as Java enums aren't supported there.
          -
          -
        • -
        - - - -
          -
        • -

          newInstance

          -
          public Object newInstance(Class clazz,
          -                          List arguments)
          -                   throws TemplateModelException
          -
          Creates a new instance of the specified class using the method call logic of this object wrapper for calling the - constructor. Overloaded constructors and varargs are supported. Only public constructors will be called.
          -
          -
          Parameters:
          -
          clazz - The class whose constructor we will call.
          -
          arguments - The list of TemplateModel-s to pass to the constructor after unwrapping them
          -
          Returns:
          -
          The instance created; it's not wrapped into TemplateModel.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          removeFromClassIntrospectionCache

          -
          public void removeFromClassIntrospectionCache(Class clazz)
          -
          Removes the introspection data for a class from the cache. - Use this if you know that a class is not used anymore in templates. - If the class will be still used, the cache entry will be silently - re-created, so this isn't a dangerous operation.
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          clearClassIntrospecitonCache

          -
          public void clearClassIntrospecitonCache()
          -
          Removes all class introspection data from the cache. - -

          Use this if you want to free up memory on the expense of recreating - the cache entries for the classes that will be used later in templates.

          -
          -
          Throws:
          -
          IllegalStateException - if isClassIntrospectionCacheRestricted() is true.
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - - - - - -
          -
        • -

          coerceBigDecimals

          -
          public static void coerceBigDecimals(AccessibleObject callable,
          -                                     Object[] args)
          -
          Converts any BigDecimals in the passed array to the type of - the corresponding formal argument of the method.
          -
        • -
        - - - -
          -
        • -

          coerceBigDecimals

          -
          public static void coerceBigDecimals(Class[] formalTypes,
          -                                     Object[] args)
          -
          Converts any BigDecimals in the passed array to the type of - the corresponding formal argument of the method.
          -
        • -
        - - - - - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Returns the exact class name and the identity hash, also the values of the most often used BeansWrapper - configuration properties, also if which (if any) shared class introspection cache it uses.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapperBuilder.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapperBuilder.html deleted file mode 100644 index 0a7ce03..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapperBuilder.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - -BeansWrapperBuilder (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class BeansWrapperBuilder

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Cloneable
      -
      -
      -
      -
      public class BeansWrapperBuilder
      -extends BeansWrapperConfiguration
      -
      Gets/creates a BeansWrapper singleton instance that's already configured as specified in the properties of - this object; this is recommended over using the BeansWrapper constructors. The returned instance can't be - further configured (it's write protected). - -

      The builder meant to be used as a drop-away object (not stored in a field), like in this example: -

      -    BeansWrapper beansWrapper = new BeansWrapperBuilder(Configuration.VERSION_2_3_21).build();
      - 
      - -

      Or, a more complex example:

      -
      -    // Create the builder:
      -    BeansWrapperBuilder builder = new BeansWrapperBuilder(Configuration.VERSION_2_3_21);
      -    // Set desired BeansWrapper configuration properties:
      -    builder.setUseMoldeCache(true);
      -    builder.setExposeFields(true);
      -    
      -    // Get the singleton:
      -    BeansWrapper beansWrapper = builder.build();
      -    // You don't need the builder anymore.
      - 
      - -

      Despite that builders aren't meant to be used as long-lived objects (singletons), the builder is thread-safe after - you have stopped calling its setters and it was safely published (see JSR 133) to other threads. This can be useful - if you have to put the builder into an IoC container, rather than the singleton it produces. - -

      The main benefit of using a builder instead of a BeansWrapper constructor is that this way the - internal object wrapping-related caches (most notably the class introspection cache) will come from a global, - JVM-level (more precisely, freemarker.jar-class-loader-level) cache. Also the BeansWrapper singletons - themselves are stored in this global cache. Some of the wrapping-related caches are expensive to build and can take - significant amount of memory. Using builders, components that use FreeMarker will share BeansWrapper - instances and said caches even if they use separate FreeMarker Configuration-s. (Many Java libraries use - FreeMarker internally, so Configuration sharing is not an option.) - -

      Note that the returned BeansWrapper instances are only weak-referenced from inside the builder mechanism, - so singletons are garbage collected when they go out of usage, just like non-singletons. - -

      About the object wrapping-related caches: -

        -
      • Class introspection cache: Stores information about classes that once had to be wrapped. The cache is - stored in the static fields of certain FreeMarker classes. Thus, if you have two BeansWrapper - instances, they might share the same class introspection cache. But if you have two - freemarker.jar-s (typically, in two Web Application's WEB-INF/lib directories), those won't - share their caches (as they don't share the same FreeMarker classes). - Also, currently there's a separate cache for each permutation of the property values that influence class - introspection: expose_fields and - exposure_level. So only BeansWrapper where those - properties are the same may share class introspection caches among each other. -

      • -
      • Model caches: These are local to a BeansWrapper. BeansWrapperBuilder returns the same - BeansWrapper instance for equivalent properties (unless the existing instance was garbage collected - and thus a new one had to be created), hence these caches will be re-used too. BeansWrapper instances - are cached in the static fields of FreeMarker too, but there's a separate cache for each - Thread Context Class Loader, which in a servlet container practically means a separate cache for each Web - Application (each servlet context). (This is like so because for resolving class names to classes FreeMarker - uses the Thread Context Class Loader, so the result of the resolution can be different for different - Thread Context Class Loaders.) The model caches are: -

          -
        • - Static model caches: These are used by the hash returned by BeansWrapper.getEnumModels() and - BeansWrapper.getStaticModels(), for caching TemplateModel-s for the static methods/fields - and Java 5 enums that were accessed through them. To use said hashes, you have to put them - explicitly into the data-model or expose them to the template explicitly otherwise, so in most applications - these caches aren't unused. -

        • -
        • - Instance model cache: By default off (see BeansWrapper.setUseCache(boolean)). Caches the - TemplateModel-s for all Java objects that were accessed from templates. -

        • -
        -
      • -
      - -

      Note that what this method documentation says about BeansWrapper also applies to - DefaultObjectWrapperBuilder.

      -
      -
      Since:
      -
      2.3.21
      -
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapperConfiguration.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapperConfiguration.html deleted file mode 100644 index 6fedc07..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/BeansWrapperConfiguration.html +++ /dev/null @@ -1,625 +0,0 @@ - - - - - - -BeansWrapperConfiguration (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class BeansWrapperConfiguration

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Cloneable
      -
      -
      -
      Direct Known Subclasses:
      -
      BeansWrapperBuilder, DefaultObjectWrapperBuilder
      -
      -
      -
      -
      public abstract class BeansWrapperConfiguration
      -extends Object
      -implements Cloneable
      -
      Holds BeansWrapper configuration settings and defines their defaults. - You will not use this abstract class directly, but concrete subclasses like BeansWrapperBuilder and - DefaultObjectWrapperBuilder. Unless, you are developing a builder for a custom BeansWrapper subclass. - -

      This class is designed so that its instances can be used as lookup keys in a singleton cache. This is also why - this class defines the configuration setting defaults for BeansWrapper, instead of leaving that to - BeansWrapper itself. (Because, the default values influence the lookup key, and the singleton needs to be - looked up without creating a BeansWrapper instance.) However, because instances are mutable, you should - deep-clone it with clone(boolean) before using it as cache key.

      -
      -
      Since:
      -
      2.3.21
      -
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/BooleanModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/BooleanModel.html deleted file mode 100644 index 7ab9953..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/BooleanModel.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - -BooleanModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class BooleanModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getAsBoolean

          -
          public boolean getAsBoolean()
          -
          -
          Specified by:
          -
          getAsBoolean in interface TemplateBooleanModel
          -
          Returns:
          -
          whether to interpret this object as true or false in a boolean context
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/CollectionModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/CollectionModel.html deleted file mode 100644 index 48e4108..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/CollectionModel.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - -CollectionModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class CollectionModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          CollectionModel

          -
          public CollectionModel(Collection collection,
          -                       BeansWrapper wrapper)
          -
          Creates a new model that wraps the specified collection object.
          -
          -
          Parameters:
          -
          collection - the collection object to wrap into a model.
          -
          wrapper - the BeansWrapper associated with this model. - Every model has to have an associated BeansWrapper instance. The - model gains many attributes from its wrapper, including the caching - behavior, method exposure level, method-over-item shadowing policy etc.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          get

          -
          public TemplateModel get(int index)
          -                  throws TemplateModelException
          -
          Retrieves the i-th object from the collection, wrapped as a TemplateModel.
          -
          -
          Specified by:
          -
          get in interface TemplateSequenceModel
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          Throws:
          -
          TemplateModelException - if the index is out of bounds, or the - underlying collection is not a List.
          -
          -
        • -
        - - - -
          -
        • -

          getSupportsIndexedAccess

          -
          public boolean getSupportsIndexedAccess()
          -
          Tells if get(int) will always fail for this object. - As this object implements TemplateSequenceModel, - get(int) should always work, but due to a design flaw, for - non-List wrapped objects get(int) will always fail. - This method exists to ease working this problem around.
          -
          -
          Since:
          -
          2.3.17
          -
          -
        • -
        - - - - - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/DateModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/DateModel.html deleted file mode 100644 index 4340a73..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/DateModel.html +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - -DateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class DateModel

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/EnumerationModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/EnumerationModel.html deleted file mode 100644 index 6f6a7e3..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/EnumerationModel.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - -EnumerationModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class EnumerationModel

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/HashAdapter.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/HashAdapter.html deleted file mode 100644 index b5eb66b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/HashAdapter.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - -HashAdapter (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class HashAdapter

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/InvalidPropertyException.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/InvalidPropertyException.html deleted file mode 100644 index fc15842..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/InvalidPropertyException.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - -InvalidPropertyException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class InvalidPropertyException

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      -
      public class InvalidPropertyException
      -extends TemplateModelException
      -
      An exception thrown when there is an attempt to access - an invalid bean property when we are in a "strict bean" mode
      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    - -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          InvalidPropertyException

          -
          public InvalidPropertyException(String description)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/IteratorModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/IteratorModel.html deleted file mode 100644 index 738386f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/IteratorModel.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - -IteratorModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class IteratorModel

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/MapModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/MapModel.html deleted file mode 100644 index 95f304c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/MapModel.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - -MapModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class MapModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          MapModel

          -
          public MapModel(Map map,
          -                BeansWrapper wrapper)
          -
          Creates a new model that wraps the specified map object.
          -
          -
          Parameters:
          -
          map - the map object to wrap into a model.
          -
          wrapper - the BeansWrapper associated with this model. - Every model has to have an associated BeansWrapper instance. The - model gains many attributes from its wrapper, including the caching - behavior, method exposure level, method-over-item shadowing policy etc.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - - - - - - - - - -
          -
        • -

          isEmpty

          -
          public boolean isEmpty()
          -
          Description copied from class: BeanModel
          -
          Tells whether the model is empty. It is empty if either the wrapped - object is null, or it's a Boolean with false value.
          -
          -
          Specified by:
          -
          isEmpty in interface TemplateHashModel
          -
          Overrides:
          -
          isEmpty in class BeanModel
          -
          -
        • -
        - - - -
          -
        • -

          size

          -
          public int size()
          -
          -
          Specified by:
          -
          size in interface TemplateHashModelEx
          -
          Overrides:
          -
          size in class BeanModel
          -
          Returns:
          -
          the number of key/value mappings in the hash.
          -
          -
        • -
        - - - -
          -
        • -

          keySet

          -
          protected Set keySet()
          -
          Description copied from class: BeanModel
          -
          Helper method to support TemplateHashModelEx. Returns the Set of - Strings which are available via the TemplateHashModel - interface. Subclasses that override invokeGenericGet to - provide additional hash keys should also override this method.
          -
          -
          Overrides:
          -
          keySet in class BeanModel
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/MethodAppearanceFineTuner.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/MethodAppearanceFineTuner.html deleted file mode 100644 index d7b7407..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/MethodAppearanceFineTuner.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - -MethodAppearanceFineTuner (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Interface MethodAppearanceFineTuner

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/NumberModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/NumberModel.html deleted file mode 100644 index 5561d5d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/NumberModel.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - -NumberModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class NumberModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NumberModel

          -
          public NumberModel(Number number,
          -                   BeansWrapper wrapper)
          -
          Creates a new model that wraps the specified number object.
          -
          -
          Parameters:
          -
          number - the number object to wrap into a model.
          -
          wrapper - the BeansWrapper associated with this model. - Every model has to have an associated BeansWrapper instance. The - model gains many attributes from its wrapper, including the caching - behavior, method exposure level, method-over-item shadowing policy etc.
          -
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/OverloadedMethodsModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/OverloadedMethodsModel.html deleted file mode 100644 index 6acc412..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/OverloadedMethodsModel.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - -OverloadedMethodsModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class OverloadedMethodsModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          exec

          -
          public Object exec(List arguments)
          -            throws TemplateModelException
          -
          Invokes the method, passing it the arguments from the list. The actual - method to call from several overloaded methods will be chosen based - on the classes of the arguments.
          -
          -
          Specified by:
          -
          exec in interface TemplateMethodModel
          -
          Specified by:
          -
          exec in interface TemplateMethodModelEx
          -
          Parameters:
          -
          arguments - a List of TemplateModel-s, - containing the arguments passed to the method. If the implementation absolutely wants - to operate on POJOs, it can use the static utility methods in the DeepUnwrap - class to easily obtain them. However, unwrapping is not always possible (or not perfectly), and isn't always - efficient, so it's recommended to use the original TemplateModel value as much as possible.
          -
          Returns:
          -
          the return value of the method, or null. If the returned value - does not implement TemplateModel, it will be automatically - wrapped using the environment's - object wrapper.
          -
          Throws:
          -
          TemplateModelException - if the method cannot be chosen - unambiguously.
          -
          -
        • -
        - - - -
          -
        • -

          get

          -
          public TemplateModel get(int index)
          -                  throws TemplateModelException
          -
          Description copied from interface: TemplateSequenceModel
          -
          Retrieves the i-th template model in this sequence.
          -
          -
          Specified by:
          -
          get in interface TemplateSequenceModel
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/ResourceBundleModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/ResourceBundleModel.html deleted file mode 100644 index f067dc5..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/ResourceBundleModel.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - -ResourceBundleModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class ResourceBundleModel

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      WrapperTemplateModel, AdapterTemplateModel, TemplateHashModel, TemplateHashModelEx, TemplateMethodModel, TemplateMethodModelEx, TemplateModel
      -
      -
      -
      -
      public class ResourceBundleModel
      -extends BeanModel
      -implements TemplateMethodModelEx
      -

      A hash model that wraps a resource bundle. Makes it convenient to store - localized content in the data model. It also acts as a method model that will - take a resource key and arbitrary number of arguments and will apply - MessageFormat with arguments on the string represented by the key.

      - -

      Typical usages:

      -
        -
      • bundle.resourceKey will retrieve the object from resource bundle - with key resourceKey
      • -
      • bundle("patternKey", arg1, arg2, arg3) will retrieve the string - from resource bundle with key patternKey, and will use it as a pattern - for MessageFormat with arguments arg1, arg2 and arg3
      • -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - - - - - - - - - -
          -
        • -

          size

          -
          public int size()
          -
          -
          Specified by:
          -
          size in interface TemplateHashModelEx
          -
          Overrides:
          -
          size in class BeanModel
          -
          Returns:
          -
          the number of key/value mappings in the hash.
          -
          -
        • -
        - - - -
          -
        • -

          keySet

          -
          protected Set keySet()
          -
          Description copied from class: BeanModel
          -
          Helper method to support TemplateHashModelEx. Returns the Set of - Strings which are available via the TemplateHashModel - interface. Subclasses that override invokeGenericGet to - provide additional hash keys should also override this method.
          -
          -
          Overrides:
          -
          keySet in class BeanModel
          -
          -
        • -
        - - - -
          -
        • -

          exec

          -
          public Object exec(List arguments)
          -            throws TemplateModelException
          -
          Takes first argument as a resource key, looks up a string in resource bundle - with this key, then applies a MessageFormat.format on the string with the - rest of the arguments. The created MessageFormats are cached for later reuse.
          -
          -
          Specified by:
          -
          exec in interface TemplateMethodModel
          -
          Specified by:
          -
          exec in interface TemplateMethodModelEx
          -
          Parameters:
          -
          arguments - a List of TemplateModel-s, - containing the arguments passed to the method. If the implementation absolutely wants - to operate on POJOs, it can use the static utility methods in the DeepUnwrap - class to easily obtain them. However, unwrapping is not always possible (or not perfectly), and isn't always - efficient, so it's recommended to use the original TemplateModel value as much as possible.
          -
          Returns:
          -
          the return value of the method, or null. If the returned value - does not implement TemplateModel, it will be automatically - wrapped using the environment's - object wrapper.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - - - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/SimpleMapModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/SimpleMapModel.html deleted file mode 100644 index 635ca98..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/SimpleMapModel.html +++ /dev/null @@ -1,499 +0,0 @@ - - - - - - -SimpleMapModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class SimpleMapModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          SimpleMapModel

          -
          public SimpleMapModel(Map map,
          -                      BeansWrapper wrapper)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - - - - - - - - - - - - - -
          -
        • -

          size

          -
          public int size()
          -
          -
          Specified by:
          -
          size in interface TemplateHashModelEx
          -
          Returns:
          -
          the number of key/value mappings in the hash.
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          getAdaptedObject

          -
          public Object getAdaptedObject(Class hint)
          -
          Description copied from interface: AdapterTemplateModel
          -
          Retrieves the underlying object, or some other object semantically - equivalent to its value narrowed by the class hint.
          -
          -
          Specified by:
          -
          getAdaptedObject in interface AdapterTemplateModel
          -
          Parameters:
          -
          hint - the desired class of the returned value. An implementation - should make reasonable effort to retrieve an object of the requested - class, but if that is impossible, it must at least return the underlying - object as-is. As a minimal requirement, an implementation must always - return the exact underlying object when - hint.isInstance(underlyingObject) holds. When called - with java.lang.Object.class, it should return a generic Java - object (i.e. if the model is wrapping a scripting language object that is - further wrapping a Java object, the deepest underlying Java object should - be returned).
          -
          Returns:
          -
          the underlying object, or its value accommodated for the hint - class.
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/SimpleMethodModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/SimpleMethodModel.html deleted file mode 100644 index 03ff155..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/SimpleMethodModel.html +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - -SimpleMethodModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class SimpleMethodModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - - - - - -
          -
        • -

          get

          -
          public TemplateModel get(int index)
          -                  throws TemplateModelException
          -
          Description copied from interface: TemplateSequenceModel
          -
          Retrieves the i-th template model in this sequence.
          -
          -
          Specified by:
          -
          get in interface TemplateSequenceModel
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          explainTypeError

          -
          public Object[] explainTypeError(Class[] expectedClasses)
          -
          Implementation of experimental interface; don't use it, no backward compatibility guarantee!
          -
          -
          Specified by:
          -
          explainTypeError in interface freemarker.core._UnexpectedTypeErrorExplainerTemplateModel
          -
          -
        • -
        - - - -
          -
        • -

          getMember

          -
          protected Member getMember()
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/SingletonCustomizer.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/SingletonCustomizer.html deleted file mode 100644 index e2aa2d6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/SingletonCustomizer.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - -SingletonCustomizer (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Interface SingletonCustomizer

    -
    -
    -
    -
      -
    • -
      -
      -
      public interface SingletonCustomizer
      -
      Marker interface useful when used together with MethodAppearanceFineTuner and such customizer objects, to - indicate that it doesn't contain reference to the ObjectWrapper (so beware with non-static inner - classes) and can be and should be used in call introspection cache keys. This also implies that you won't - create many instances of the class, rather just reuse the same (or same few) instances over and over. Furthermore, - the instances must be thread-safe. The typical pattern in which this instance should be used is like this: - -
      static class MyMethodAppearanceFineTuner implements MethodAppearanceFineTuner, SingletonCustomizer {
      -      
      -    // This is the singleton:
      -    static final MyMethodAppearanceFineTuner INSTANCE = new MyMethodAppearanceFineTuner();
      -     
      -    // Private, so it can't be constructed from outside this class.
      -    private MyMethodAppearanceFineTuner() { }
      -
      -    @Override
      -    public void fineTuneMethodAppearance(...) {
      -       // Do something here, only using the parameters and maybe some other singletons. 
      -       ...
      -    }
      -     
      - }
      -
      -
      Since:
      -
      2.3.21
      -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/StringModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/StringModel.html deleted file mode 100644 index d39fcef..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/StringModel.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - -StringModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.beans
    -

    Class StringModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          StringModel

          -
          public StringModel(Object object,
          -                   BeansWrapper wrapper)
          -
          Creates a new model that wraps the specified object with BeanModel + scalar - functionality.
          -
          -
          Parameters:
          -
          object - the object to wrap into a model.
          -
          wrapper - the BeansWrapper associated with this model. - Every model has to have an associated BeansWrapper instance. The - model gains many attributes from its wrapper, including the caching - behavior, method exposure level, method-over-item shadowing policy etc.
          -
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/ArrayModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/ArrayModel.html deleted file mode 100644 index 664b1dc..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/ArrayModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.ArrayModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.ArrayModel

    -
    -
    No usage of freemarker.ext.beans.ArrayModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeanModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeanModel.html deleted file mode 100644 index a0a5bd6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeanModel.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.BeanModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.BeanModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansModelCache.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansModelCache.html deleted file mode 100644 index a625e64..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansModelCache.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.BeansModelCache (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.BeansModelCache

    -
    -
    No usage of freemarker.ext.beans.BeansModelCache
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.MethodAppearanceDecision.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.MethodAppearanceDecision.html deleted file mode 100644 index 59cf9da..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.MethodAppearanceDecision.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.MethodAppearanceDecisionInput.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.MethodAppearanceDecisionInput.html deleted file mode 100644 index 3192a54..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.MethodAppearanceDecisionInput.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.html deleted file mode 100644 index 7fd20fa..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapper.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.BeansWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.BeansWrapper

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapperBuilder.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapperBuilder.html deleted file mode 100644 index f7169f1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapperBuilder.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.BeansWrapperBuilder (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.BeansWrapperBuilder

    -
    -
    No usage of freemarker.ext.beans.BeansWrapperBuilder
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapperConfiguration.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapperConfiguration.html deleted file mode 100644 index 764b518..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BeansWrapperConfiguration.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.BeansWrapperConfiguration (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.BeansWrapperConfiguration

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BooleanModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BooleanModel.html deleted file mode 100644 index 4d007ab..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/BooleanModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.BooleanModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.BooleanModel

    -
    -
    No usage of freemarker.ext.beans.BooleanModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/CollectionModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/CollectionModel.html deleted file mode 100644 index c836ffe..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/CollectionModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.CollectionModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.CollectionModel

    -
    -
    No usage of freemarker.ext.beans.CollectionModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/DateModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/DateModel.html deleted file mode 100644 index 9cacbe1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/DateModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.DateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.DateModel

    -
    -
    No usage of freemarker.ext.beans.DateModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/EnumerationModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/EnumerationModel.html deleted file mode 100644 index 40de8bf..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/EnumerationModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.EnumerationModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.EnumerationModel

    -
    -
    No usage of freemarker.ext.beans.EnumerationModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/HashAdapter.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/HashAdapter.html deleted file mode 100644 index 2907764..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/HashAdapter.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.HashAdapter (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.HashAdapter

    -
    -
    No usage of freemarker.ext.beans.HashAdapter
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/InvalidPropertyException.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/InvalidPropertyException.html deleted file mode 100644 index 0050204..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/InvalidPropertyException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.InvalidPropertyException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.InvalidPropertyException

    -
    -
    No usage of freemarker.ext.beans.InvalidPropertyException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/IteratorModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/IteratorModel.html deleted file mode 100644 index d9de3ee..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/IteratorModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.IteratorModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.IteratorModel

    -
    -
    No usage of freemarker.ext.beans.IteratorModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/MapModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/MapModel.html deleted file mode 100644 index 3ccc6fe..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/MapModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.MapModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.MapModel

    -
    -
    No usage of freemarker.ext.beans.MapModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/MethodAppearanceFineTuner.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/MethodAppearanceFineTuner.html deleted file mode 100644 index dcc1bb4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/MethodAppearanceFineTuner.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -Uses of Interface freemarker.ext.beans.MethodAppearanceFineTuner (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.ext.beans.MethodAppearanceFineTuner

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/NumberModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/NumberModel.html deleted file mode 100644 index e216825..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/NumberModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.NumberModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.NumberModel

    -
    -
    No usage of freemarker.ext.beans.NumberModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/OverloadedMethodsModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/OverloadedMethodsModel.html deleted file mode 100644 index df64522..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/OverloadedMethodsModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.OverloadedMethodsModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.OverloadedMethodsModel

    -
    -
    No usage of freemarker.ext.beans.OverloadedMethodsModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/ResourceBundleModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/ResourceBundleModel.html deleted file mode 100644 index a375034..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/ResourceBundleModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.ResourceBundleModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.ResourceBundleModel

    -
    -
    No usage of freemarker.ext.beans.ResourceBundleModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SimpleMapModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SimpleMapModel.html deleted file mode 100644 index 1de5f8b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SimpleMapModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.SimpleMapModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.SimpleMapModel

    -
    -
    No usage of freemarker.ext.beans.SimpleMapModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SimpleMethodModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SimpleMethodModel.html deleted file mode 100644 index 4f275fd..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SimpleMethodModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.SimpleMethodModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.SimpleMethodModel

    -
    -
    No usage of freemarker.ext.beans.SimpleMethodModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SingletonCustomizer.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SingletonCustomizer.html deleted file mode 100644 index 9c3fc6d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/SingletonCustomizer.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Interface freemarker.ext.beans.SingletonCustomizer (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.ext.beans.SingletonCustomizer

    -
    -
    No usage of freemarker.ext.beans.SingletonCustomizer
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/StringModel.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/StringModel.html deleted file mode 100644 index 698459b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/class-use/StringModel.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.beans.StringModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.beans.StringModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/package-frame.html deleted file mode 100644 index 8058eed..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/package-frame.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - -freemarker.ext.beans (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.beans

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/package-summary.html deleted file mode 100644 index 56d378b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/package-summary.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - -freemarker.ext.beans (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.beans

    -
    -
    The default object wrapper of FreeMarker uses -this to expose Java Beans and POJO-s to templates, but it can also be used in itself as a -better alternative ObjectWrapper.
    -
    -

    See: Description

    -
    -
    - - - - -

    Package freemarker.ext.beans Description

    -

    The default object wrapper of FreeMarker uses -this to expose Java Beans and POJO-s to templates, but it can also be used in itself as a -better alternative ObjectWrapper.

    - -

    Most of the issues dealing with beans are handled by the -BeansWrapper.wrap(Object)and BeansWrapper.getStaticModels() methods. In normal cases, - these are the only methods -you should use to turn an arbitrary Java object into a -FreeMarker TemplateModel. Additionally, you can manually create -instance of any wrapper class using its constructors. -Note, however that in such cases you bypass the eventual model caching -of the wrapper.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/package-tree.html deleted file mode 100644 index d356ae2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/package-tree.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - -freemarker.ext.beans Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.beans

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/beans/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/beans/package-use.html deleted file mode 100644 index 21a6ca3..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/beans/package-use.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.beans (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.beans

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/NodeModel.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/NodeModel.html deleted file mode 100644 index a507e53..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/NodeModel.html +++ /dev/null @@ -1,1013 +0,0 @@ - - - - - - -NodeModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.dom
    -

    Class NodeModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NodeModel

          -
          protected NodeModel(Node node)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          setDocumentBuilderFactory

          -
          public static void setDocumentBuilderFactory(DocumentBuilderFactory docBuilderFactory)
          -
          Sets the DOM Parser implementation to be used when building NodeModel - objects from XML files.
          -
        • -
        - - - -
          -
        • -

          getDocumentBuilderFactory

          -
          public static DocumentBuilderFactory getDocumentBuilderFactory()
          -
          -
          Returns:
          -
          the DOM Parser implementation that is used when - building NodeModel objects from XML files.
          -
          -
        • -
        - - - -
          -
        • -

          setErrorHandler

          -
          public static void setErrorHandler(ErrorHandler errorHandler)
          -
          sets the error handler to use when parsing the document.
          -
        • -
        - - - -
          -
        • -

          getErrorHandler

          -
          public static ErrorHandler getErrorHandler()
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          parse

          -
          public static NodeModel parse(InputSource is,
          -                              boolean removeComments,
          -                              boolean removePIs)
          -                       throws SAXException,
          -                              IOException,
          -                              ParserConfigurationException
          -
          Create a NodeModel from a SAX input source. Adjacent text nodes will be merged (and CDATA sections - are considered as text nodes).
          -
          -
          Parameters:
          -
          removeComments - whether to remove all comment nodes - (recursively) from the tree before processing
          -
          removePIs - whether to remove all processing instruction nodes - (recursively from the tree before processing
          -
          Throws:
          -
          SAXException
          -
          IOException
          -
          ParserConfigurationException
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          getNode

          -
          public Node getNode()
          -
          -
          Returns:
          -
          the underling W3C DOM Node object that this TemplateNodeModel - is wrapping.
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          getChildNodes

          -
          public TemplateSequenceModel getChildNodes()
          -
          -
          Specified by:
          -
          getChildNodes in interface TemplateNodeModel
          -
          Returns:
          -
          a sequence containing this node's children. - If the returned value is null or empty, this is essentially - a leaf node.
          -
          -
        • -
        - - - -
          -
        • -

          getNodeType

          -
          public final String getNodeType()
          -                         throws TemplateModelException
          -
          -
          Specified by:
          -
          getNodeType in interface TemplateNodeModel
          -
          Returns:
          -
          a String describing the type of node this is. - In the W3C DOM, this should be "element", "text", "attribute", etc. - A TemplateNodeModel implementation that models other kinds of - trees could return whatever it appropriate for that application. It - can be null, if you don't want to use node-types.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - - - - - -
          -
        • -

          size

          -
          public final int size()
          -
          -
          Specified by:
          -
          size in interface TemplateSequenceModel
          -
          Returns:
          -
          the number of items in the list.
          -
          -
        • -
        - - - -
          -
        • -

          get

          -
          public final TemplateModel get(int i)
          -
          Description copied from interface: TemplateSequenceModel
          -
          Retrieves the i-th template model in this sequence.
          -
          -
          Specified by:
          -
          get in interface TemplateSequenceModel
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          -
        • -
        - - - -
          -
        • -

          getNodeNamespace

          -
          public String getNodeNamespace()
          -
          -
          Specified by:
          -
          getNodeNamespace in interface TemplateNodeModel
          -
          Returns:
          -
          the XML namespace URI with which this node is - associated. If this TemplateNodeModel implementation is - not XML-related, it will almost certainly be null. Even - for XML nodes, this will often be null.
          -
          -
        • -
        - - - -
          -
        • -

          hashCode

          -
          public final int hashCode()
          -
          -
          Overrides:
          -
          hashCode in class Object
          -
          -
        • -
        - - - -
          -
        • -

          equals

          -
          public boolean equals(Object other)
          -
          -
          Overrides:
          -
          equals in class Object
          -
          -
        • -
        - - - - - - - -
          -
        • -

          removeComments

          -
          public static void removeComments(Node node)
          -
          Recursively removes all comment nodes - from the subtree.
          -
          -
          See Also:
          -
          simplify(org.w3c.dom.Node)
          -
          -
        • -
        - - - -
          -
        • -

          removePIs

          -
          public static void removePIs(Node node)
          -
          Recursively removes all processing instruction nodes - from the subtree.
          -
          -
          See Also:
          -
          simplify(org.w3c.dom.Node)
          -
          -
        • -
        - - - -
          -
        • -

          mergeAdjacentText

          -
          public static void mergeAdjacentText(Node node)
          -
          Merges adjacent text/cdata nodes, so that there are no - adjacent text/cdata nodes. Operates recursively - on the entire subtree. You thus lose information - about any CDATA sections occurring in the doc.
          -
          -
          See Also:
          -
          simplify(org.w3c.dom.Node)
          -
          -
        • -
        - - - -
          -
        • -

          simplify

          -
          public static void simplify(Node node)
          -
          Removes comments and processing instruction, and then unites adjacent text nodes. - Note that CDATA sections count as text nodes.
          -
        • -
        - - - -
          -
        • -

          useDefaultXPathSupport

          -
          public static void useDefaultXPathSupport()
          -
          Tells the system to use (restore) the default (initial) XPath system used by - this FreeMarker version on this system.
          -
        • -
        - - - -
          -
        • -

          useJaxenXPathSupport

          -
          public static void useJaxenXPathSupport()
          -                                 throws Exception
          -
          Convenience method. Tells the system to use Jaxen for XPath queries.
          -
          -
          Throws:
          -
          Exception - if the Jaxen classes are not present.
          -
          -
        • -
        - - - -
          -
        • -

          useXalanXPathSupport

          -
          public static void useXalanXPathSupport()
          -                                 throws Exception
          -
          Convenience method. Tells the system to use Xalan for XPath queries.
          -
          -
          Throws:
          -
          Exception - if the Xalan XPath classes are not present.
          -
          -
        • -
        - - - -
          -
        • -

          useSunInternalXPathSupport

          -
          public static void useSunInternalXPathSupport()
          -                                       throws Exception
          -
          -
          Throws:
          -
          Exception
          -
          -
        • -
        - - - -
          -
        • -

          setXPathSupportClass

          -
          public static void setXPathSupportClass(Class cl)
          -
          Set an alternative implementation of freemarker.ext.dom.XPathSupport to use - as the XPath engine.
          -
          -
          Parameters:
          -
          cl - the class, or null to disable XPath support.
          -
          -
        • -
        - - - -
          -
        • -

          getXPathSupportClass

          -
          public static Class getXPathSupportClass()
          -
          Get the currently used freemarker.ext.dom.XPathSupport used as the XPath engine. - Returns null if XPath support is disabled.
          -
        • -
        - - - -
          -
        • -

          getAdaptedObject

          -
          public Object getAdaptedObject(Class hint)
          -
          Description copied from interface: AdapterTemplateModel
          -
          Retrieves the underlying object, or some other object semantically - equivalent to its value narrowed by the class hint.
          -
          -
          Specified by:
          -
          getAdaptedObject in interface AdapterTemplateModel
          -
          Parameters:
          -
          hint - the desired class of the returned value. An implementation - should make reasonable effort to retrieve an object of the requested - class, but if that is impossible, it must at least return the underlying - object as-is. As a minimal requirement, an implementation must always - return the exact underlying object when - hint.isInstance(underlyingObject) holds. When called - with java.lang.Object.class, it should return a generic Java - object (i.e. if the model is wrapping a scripting language object that is - further wrapping a Java object, the deepest underlying Java object should - be returned).
          -
          Returns:
          -
          the underlying object, or its value accommodated for the hint - class.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          explainTypeError

          -
          public Object[] explainTypeError(Class[] expectedClasses)
          -
          -
          Specified by:
          -
          explainTypeError in interface freemarker.core._UnexpectedTypeErrorExplainerTemplateModel
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/Transform.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/Transform.html deleted file mode 100644 index d048cf2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/Transform.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - -Transform (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.dom
    -

    Class Transform

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class Transform
      -extends Object
      -
      A class that contains a main() method for command-line invocation - of a FreeMarker XML transformation.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          main

          -
          public static void main(String[] args)
          -
          A convenient main() method for command-line invocation.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/XPathSupport.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/XPathSupport.html deleted file mode 100644 index 290e2be..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/XPathSupport.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - -XPathSupport (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.dom
    -

    Interface XPathSupport

    -
    -
    -
    -
      -
    • -
      -
      -
      public interface XPathSupport
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/NodeModel.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/NodeModel.html deleted file mode 100644 index 5df1550..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/NodeModel.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.dom.NodeModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.dom.NodeModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/Transform.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/Transform.html deleted file mode 100644 index 4e99243..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/Transform.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.dom.Transform (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.dom.Transform

    -
    -
    No usage of freemarker.ext.dom.Transform
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/XPathSupport.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/XPathSupport.html deleted file mode 100644 index 33f7bfd..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/class-use/XPathSupport.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Interface freemarker.ext.dom.XPathSupport (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.ext.dom.XPathSupport

    -
    -
    No usage of freemarker.ext.dom.XPathSupport
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/package-frame.html deleted file mode 100644 index ac427e8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/package-frame.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - -freemarker.ext.dom (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.dom

    -
    -

    Interfaces

    - -

    Classes

    - -
    - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/package-summary.html deleted file mode 100644 index 03589d9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/package-summary.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - -freemarker.ext.dom (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.dom

    -
    -
    Exposes DOM XML nodes to templates as easily traversable trees; -see in the Manual.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - -
      Interface Summary 
      InterfaceDescription
      XPathSupport 
      -
    • -
    • - - - - - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      NodeModel -
      A base class for wrapping a W3C DOM Node as a FreeMarker template model.
      -
      Transform -
      A class that contains a main() method for command-line invocation - of a FreeMarker XML transformation.
      -
      -
    • -
    - - - -

    Package freemarker.ext.dom Description

    -

    Exposes DOM XML nodes to templates as easily traversable trees; -see in the Manual. -The default object wrapper of FreeMarker -automatically wraps W3C nodes with this.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/package-tree.html deleted file mode 100644 index b729492..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/package-tree.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - -freemarker.ext.dom Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.dom

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/dom/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/dom/package-use.html deleted file mode 100644 index f088261..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/dom/package-use.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.dom (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.dom

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jdom/NodeListModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jdom/NodeListModel.html deleted file mode 100644 index 1dc27a7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jdom/NodeListModel.html +++ /dev/null @@ -1,762 +0,0 @@ - - - - - - -NodeListModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jdom
    -

    Class NodeListModel

    -
    -
    - -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Summary

        - - - - - - - - - - - - - - - - - -
        Constructors 
        Constructor and Description
        NodeListModel(org.jdom.Document document) -
        Deprecated. 
        -
        Creates a node list that holds a single Document node.
        -
        NodeListModel(org.jdom.Element element) -
        Deprecated. 
        -
        Creates a node list that holds a single Element node.
        -
        NodeListModel(List nodes) -
        Deprecated. 
        -
        Creates a node list that holds a list of nodes.
        -
        NodeListModel(List nodes, - boolean copy) -
        Deprecated. 
        -
        Creates a node list that holds a list of nodes.
        -
        -
      • -
      - -
        -
      • - - -

        Method Summary

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
        Modifier and TypeMethod and Description
        Objectexec(List arguments) -
        Deprecated. 
        -
        Applies an XPath expression to the node list and returns the resulting node list.
        -
        TemplateModelget(int i) -
        Deprecated. 
        -
        Retrieves the i-th element of the node list.
        -
        TemplateModelget(String key) -
        Deprecated. 
        -
        Provides node list traversal as well as special functions: filtering by name, - filtering by node type, shallow-copying, and duplicate removal.
        -
        StringgetAsString() -
        Deprecated. 
        -
        This method returns the string resulting from concatenation - of string representations of its nodes.
        -
        booleanisEmpty() -
        Deprecated. 
        -
        Returns true if this model contains no nodes.
        -
        TemplateModelIteratoriterator() -
        Deprecated. 
        -
        Retrieves a template model iterator that is used to iterate over - the elements in this collection.
        -
        static voidmain(String[] args) -
        Deprecated. 
        -
        Loads a template from a file passed as the first argument, loads an XML - document from the standard input, passes it to the template as variable - document and writes the result of template processing to - standard output.
        -
        voidregisterNamespace(String prefix, - String uri) -
        Deprecated. 
        -
        Registers an XML namespace with this node list.
        -
        intsize() -
        Deprecated. 
        - -
      • -
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NodeListModel

          -
          public NodeListModel(org.jdom.Document document)
          -
          Deprecated. 
          -
          Creates a node list that holds a single Document node.
          -
        • -
        - - - -
          -
        • -

          NodeListModel

          -
          public NodeListModel(org.jdom.Element element)
          -
          Deprecated. 
          -
          Creates a node list that holds a single Element node.
          -
        • -
        - - - -
          -
        • -

          NodeListModel

          -
          public NodeListModel(List nodes)
          -
          Deprecated. 
          -
          Creates a node list that holds a list of nodes.
          -
          -
          Parameters:
          -
          nodes - the list of nodes this template should hold. The created template - will copy the passed nodes list, so changes to the passed list will not affect - the model.
          -
          -
        • -
        - - - -
          -
        • -

          NodeListModel

          -
          public NodeListModel(List nodes,
          -                     boolean copy)
          -
          Deprecated. 
          -
          Creates a node list that holds a list of nodes.
          -
          -
          Parameters:
          -
          nodes - the list of nodes this template should hold.
          -
          copy - if true, the created template will copy the passed nodes list, - so changes to the passed list will not affect the model. If false, the model - will reference the passed list and will sense changes in it, although no - operations on the list will be synchronized.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          isEmpty

          -
          public boolean isEmpty()
          -
          Deprecated. 
          -
          Returns true if this model contains no nodes.
          -
          -
          Specified by:
          -
          isEmpty in interface TemplateHashModel
          -
          -
        • -
        - - - -
          -
        • -

          getAsString

          -
          public String getAsString()
          -                   throws TemplateModelException
          -
          Deprecated. 
          -
          This method returns the string resulting from concatenation - of string representations of its nodes. Each node is rendered using its XML - serialization format, while text (String) is rendered as itself. This greatly - simplifies creating XML-transformation templates, as to output a node contained - in variable x as XML fragment, you simply write ${x} in the template.
          -
          -
          Specified by:
          -
          getAsString in interface TemplateScalarModel
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          get

          -
          public TemplateModel get(String key)
          -                  throws TemplateModelException
          -
          Deprecated. 
          -
          Provides node list traversal as well as special functions: filtering by name, - filtering by node type, shallow-copying, and duplicate removal. - While not as powerful as the full XPath support built into the - exec(List) method, it does not require the external Jaxen - library to be present at run time. Below are listed the recognized keys. - In key descriptions, "applicable to this-and-that node type" means that if - a key is applied to a node list that contains a node of non-applicable type - a TemplateMethodModel will be thrown. However, you can use _ftype - key to explicitly filter out undesired node types prior to applying the - restricted-applicability key. Also "current nodes" means nodes contained in this - set. -
            -
          • * or _children: all direct element children of current nodes (non-recursive). Applicable - to element and document nodes.
          • -
          • @* or _attributes: all attributes of current nodes. Applicable to elements only.
          • -
          • _content the complete content of current nodes (non-recursive). - Applicable to elements and documents.
          • -
          • _text: the text of current nodes, one string per node (non-recursive). - Applicable to elements, attributes, comments, processing instructions (returns its data) - and CDATA sections. The reserved XML characters ('<' and '&') are escaped.
          • -
          • _plaintext: same as _text, but does not escape any characters, - and instead of returning a NodeList returns a SimpleScalar.
          • -
          • _name: the names of current nodes, one string per node (non-recursive). - Applicable to elements and attributes (returns their local name), - entities, processing instructions (returns its target), doctypes - (returns its public ID)
          • -
          • _qname: the qualified names of current nodes in [namespacePrefix:]localName - form, one string per node (non-recursive). Applicable to elements and attributes
          • -
          • _cname: the canonical names of current nodes (namespace URI + local name), - one string per node (non-recursive). Applicable to elements and attributes
          • -
          • _nsprefix: namespace prefixes of current nodes, - one string per node (non-recursive). Applicable to elements and attributes
          • -
          • _nsuri: namespace URIs of current nodes, - one string per node (non-recursive). Applicable to elements and attributes
          • -
          • _parent: parent elements of current nodes. Applicable to element, attribute, comment, - entity, processing instruction.
          • -
          • _ancestor: all ancestors up to root element (recursive) of current nodes. Applicable - to same node types as _parent.
          • -
          • _ancestorOrSelf: all ancestors of current nodes plus current nodes. Applicable - to same node types as _parent.
          • -
          • _descendant: all recursive descendant element children of current nodes. Applicable to - document and element nodes. -
          • _descendantOrSelf: all recursive descendant element children of current nodes - plus current nodes. Applicable to document and element nodes. -
          • _document: all documents the current nodes belong to. - Applicable to all nodes except text. -
          • _doctype: doctypes of the current nodes. - Applicable to document nodes only. -
          • _fname: is a filter-by-name template method model. When called, - it will yield a node list that contains only those current nodes whose name - matches one of names passed as argument. Attribute names should NOT be prefixed with the - at sign (@). Applicable on all node types, however has no effect on unnamed nodes.
          • -
          • _ftype: is a filter-by-type template method model. When called, - it will yield a node list that contains only those current nodes whose type matches one - of types passed as argument. You should pass a single string to this method - containing the characters of all types to keep. Valid characters are: - e (Element), a (Attribute), n (Entity), d (Document), t (DocType), - c (Comment), p (ProcessingInstruction), x (text). If the string anywhere contains - the exclamation mark (!), the filter's effect is inverted.
          • -
          • _type: Returns a one-character String SimpleScalar containing - the typecode of the first node in the node list. Valid characters are: - e (Element), a (Attribute), n (Entity), d (Document), t (DocType), - c (Comment), p (ProcessingInstruction), x (text). If the type of the node - is unknown, returns '?'. If the node list is empty, returns an empty string scalar.
          • -
          • _unique: a copy of the current nodes that keeps only the - first occurrence of every node, eliminating duplicates. Duplicates can - occur in the node list by applying uptree-traversals _parent, - _ancestor, _ancestorOrSelf, and _document. - I.e. foo._children._parent will return a node list that has - duplicates of nodes in foo - each node will have the number of occurrences - equal to the number of its children. In these cases, use - foo._children._parent._unique to eliminate duplicates. Applicable - to all node types.
          • -
          • _copy: a copy of the current node list. It is a shallow copy that - shares the underlying node list with this node list, however it has a - separate namespace registry, so it can be used to guarantee that subsequent - changes to the set of registered namespaces does not affect the node lists - that were used to create this node list. Applicable to all node types.
          • -
          • _registerNamespace(prefix, uri): register a XML namespace - with the specified prefix and URI for the current node list and all node - lists that are derived from the current node list. After registering, - you can use the nodelist["prefix:localname"] or - nodelist["@prefix:localname"] syntaxes to reach elements and - attributes whose names are namespace-scoped. Note that the namespace - prefix need not match the actual prefix used by the XML document itself - since namespaces are compared solely by their URI. You can also register - namespaces from Java code using the - registerNamespace(String, String) method. -
          • -
          • @attributeName: named attributes of current nodes. Applicable to - elements, doctypes and processing instructions. On doctypes it supports - attributes publicId, systemId and elementName. On processing - instructions, it supports attributes target and data, as - well as any other attribute name specified in data as name="value" pair. - The attribute nodes for doctype and processing instruction are synthetic, and - as such have no parent. Note, however that @* does NOT operate on - doctypes or processing instructions.
          • -
          • any other key: element children of current nodes with name matching the key. - This allows for convenience child traversal in book.chapter.title style syntax. - Note that nodeset.childname is technically equivalent to - nodeset._children._fname("childname"), but is both shorter to write - and evaluates faster. Applicable to document and element nodes.
          • -
          - The order of nodes in the resulting set is the order of evaluation of the key - on each node in this set from left to right. Evaluation of the key on a single - node always yields the results in "natural" order (that of the document preorder - traversal), even for uptree traversals. As a consequence, if this node list's nodes - are listed in natural order, applying any of the keys will produce a node list that - is also naturally ordered. As a special case, all node lists that are directly or - indirectly generated from a single Document or Element node through repeated - invocations of this method will be naturally ordered.
          -
          -
          Specified by:
          -
          get in interface TemplateHashModel
          -
          Parameters:
          -
          key - a key that identifies a required set of nodes
          -
          Returns:
          -
          a new NodeListModel that represents the requested set of nodes.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - - - - - -
          -
        • -

          get

          -
          public TemplateModel get(int i)
          -                  throws TemplateModelException
          -
          Deprecated. 
          -
          Retrieves the i-th element of the node list.
          -
          -
          Specified by:
          -
          get in interface TemplateSequenceModel
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          size

          -
          public int size()
          -
          Deprecated. 
          -
          -
          Specified by:
          -
          size in interface TemplateSequenceModel
          -
          Returns:
          -
          the number of items in the list.
          -
          -
        • -
        - - - -
          -
        • -

          exec

          -
          public Object exec(List arguments)
          -            throws TemplateModelException
          -
          Deprecated. 
          -
          Applies an XPath expression to the node list and returns the resulting node list. - In order for this method to work, your application must have access - Jaxen library classes. The - implementation does cache the parsed format of XPath expressions in a weak hash - map, keyed by the string representation of the XPath expression. As the string - object passed as the argument is usually kept in the parsed FreeMarker template, - this ensures that each XPath expression is parsed only once during the lifetime - of the FreeMarker template that contains it.
          -
          -
          Specified by:
          -
          exec in interface TemplateMethodModel
          -
          Parameters:
          -
          arguments - the list of arguments. Must contain exactly one string that is - the XPath expression you wish to apply. The XPath expression can use any namespace - prefixes that were defined using the registerNamespace(String, String) - method or the nodelist._registerNamespace(prefix, uri) expression in the - template.
          -
          Returns:
          -
          a NodeListModel representing the nodes that are the result of application - of the XPath to the current node list.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          registerNamespace

          -
          public void registerNamespace(String prefix,
          -                              String uri)
          -
          Deprecated. 
          -
          Registers an XML namespace with this node list. Once registered, you can - refer to the registered namespace using its prefix in the - get(String) method from this node list and all other - node lists that are derived from this node list. Use the - nodelist["prefix:localname"] or the - nodelist["@prefix:localname"] syntax to reach elements and - attributes whose names are namespace-scoped. Note that the namespace - prefix need not match the actual prefix used by the XML document itself - since namespaces are compared solely by their URI. You can also register - namespaces during template evaluation using the - nodelist._registerNamespace(prefix, uri) syntax in the template. - This mechanism is completely independent from the namespace declarations - in the XML document itself; its purpose is to give you an easy way - to refer to namespace-scoped elements in get(String) and - in XPath expressions passed to exec(List). Note also that - the namespace prefix registry is shared among all node lists that - are created from a single node list - modifying the registry in one - affects all others as well. If you want to obtain a namespace - "detached" copy of the node list, use the _copy key on - it (or call nodeList.get("_copy") directly from your - Java code. The returned node list has all the namespaces that the - original node list has, but they can be manipulated independently - thereon.
          -
        • -
        - - - -
          -
        • -

          main

          -
          public static void main(String[] args)
          -                 throws Exception
          -
          Deprecated. 
          -
          Loads a template from a file passed as the first argument, loads an XML - document from the standard input, passes it to the template as variable - document and writes the result of template processing to - standard output.
          -
          -
          Throws:
          -
          Exception
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jdom/class-use/NodeListModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jdom/class-use/NodeListModel.html deleted file mode 100644 index 726816f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jdom/class-use/NodeListModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jdom.NodeListModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jdom.NodeListModel

    -
    -
    No usage of freemarker.ext.jdom.NodeListModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-frame.html deleted file mode 100644 index 75d038b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-frame.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - -freemarker.ext.jdom (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.jdom

    -
    -

    Classes

    - -
    - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-summary.html deleted file mode 100644 index 117d020..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-summary.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - -freemarker.ext.jdom (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.jdom

    -
    -
    Deprecated, use W3C DOM (freemarker.ext.dom) instead; -Exposes JDOM XML nodes to templates.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      NodeListModelDeprecated -
      Use NodeModel instead.
      -
      -
    • -
    - - - -

    Package freemarker.ext.jdom Description

    -

    Deprecated, use W3C DOM (freemarker.ext.dom) instead; -Exposes JDOM XML nodes to templates.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-tree.html deleted file mode 100644 index 9a75893..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-tree.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -freemarker.ext.jdom Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.jdom

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-use.html deleted file mode 100644 index e0e5738..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jdom/package-use.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.jdom (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.jdom

    -
    -
    No usage of freemarker.ext.jdom
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/EventForwarding.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/EventForwarding.html deleted file mode 100644 index cc8425b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/EventForwarding.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - -EventForwarding (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jsp
    -

    Class EventForwarding

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      EventListener, javax.servlet.http.HttpSessionAttributeListener, javax.servlet.http.HttpSessionListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener
      -
      -
      -
      -
      public class EventForwarding
      -extends Object
      -implements javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener, javax.servlet.http.HttpSessionListener, javax.servlet.http.HttpSessionAttributeListener
      -
      An instance of this class should be registered as a <listener> in - the web.xml descriptor in order to correctly dispatch events to - event listeners that are specified in TLD files.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          EventForwarding

          -
          public EventForwarding()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          attributeAdded

          -
          public void attributeAdded(javax.servlet.ServletContextAttributeEvent arg0)
          -
          -
          Specified by:
          -
          attributeAdded in interface javax.servlet.ServletContextAttributeListener
          -
          -
        • -
        - - - -
          -
        • -

          attributeRemoved

          -
          public void attributeRemoved(javax.servlet.ServletContextAttributeEvent arg0)
          -
          -
          Specified by:
          -
          attributeRemoved in interface javax.servlet.ServletContextAttributeListener
          -
          -
        • -
        - - - -
          -
        • -

          attributeReplaced

          -
          public void attributeReplaced(javax.servlet.ServletContextAttributeEvent arg0)
          -
          -
          Specified by:
          -
          attributeReplaced in interface javax.servlet.ServletContextAttributeListener
          -
          -
        • -
        - - - -
          -
        • -

          contextInitialized

          -
          public void contextInitialized(javax.servlet.ServletContextEvent arg0)
          -
          -
          Specified by:
          -
          contextInitialized in interface javax.servlet.ServletContextListener
          -
          -
        • -
        - - - -
          -
        • -

          contextDestroyed

          -
          public void contextDestroyed(javax.servlet.ServletContextEvent arg0)
          -
          -
          Specified by:
          -
          contextDestroyed in interface javax.servlet.ServletContextListener
          -
          -
        • -
        - - - -
          -
        • -

          sessionCreated

          -
          public void sessionCreated(javax.servlet.http.HttpSessionEvent arg0)
          -
          -
          Specified by:
          -
          sessionCreated in interface javax.servlet.http.HttpSessionListener
          -
          -
        • -
        - - - -
          -
        • -

          sessionDestroyed

          -
          public void sessionDestroyed(javax.servlet.http.HttpSessionEvent arg0)
          -
          -
          Specified by:
          -
          sessionDestroyed in interface javax.servlet.http.HttpSessionListener
          -
          -
        • -
        - - - -
          -
        • -

          attributeAdded

          -
          public void attributeAdded(javax.servlet.http.HttpSessionBindingEvent arg0)
          -
          -
          Specified by:
          -
          attributeAdded in interface javax.servlet.http.HttpSessionAttributeListener
          -
          -
        • -
        - - - -
          -
        • -

          attributeRemoved

          -
          public void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent arg0)
          -
          -
          Specified by:
          -
          attributeRemoved in interface javax.servlet.http.HttpSessionAttributeListener
          -
          -
        • -
        - - - -
          -
        • -

          attributeReplaced

          -
          public void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent arg0)
          -
          -
          Specified by:
          -
          attributeReplaced in interface javax.servlet.http.HttpSessionAttributeListener
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/FreemarkerTag.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/FreemarkerTag.html deleted file mode 100644 index daf34f7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/FreemarkerTag.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - - -FreemarkerTag (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jsp
    -

    Class FreemarkerTag

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
      -
      -
      -
      -
      public class FreemarkerTag
      -extends Object
      -implements javax.servlet.jsp.tagext.BodyTag
      -
      Simple implementation of JSP tag to allow use of FreeMarker templates in - JSP. Inspired by similar class in Velocity template engine developed by - Geir Magnusson Jr.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          FreemarkerTag

          -
          public FreemarkerTag()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getCaching

          -
          public boolean getCaching()
          -
        • -
        - - - -
          -
        • -

          setCaching

          -
          public void setCaching(boolean caching)
          -
        • -
        - - - -
          -
        • -

          setName

          -
          public void setName(String name)
          -
        • -
        - - - -
          -
        • -

          getParent

          -
          public javax.servlet.jsp.tagext.Tag getParent()
          -
          -
          Specified by:
          -
          getParent in interface javax.servlet.jsp.tagext.Tag
          -
          -
        • -
        - - - -
          -
        • -

          setParent

          -
          public void setParent(javax.servlet.jsp.tagext.Tag parent)
          -
          -
          Specified by:
          -
          setParent in interface javax.servlet.jsp.tagext.Tag
          -
          -
        • -
        - - - -
          -
        • -

          doStartTag

          -
          public int doStartTag()
          -
          -
          Specified by:
          -
          doStartTag in interface javax.servlet.jsp.tagext.Tag
          -
          -
        • -
        - - - -
          -
        • -

          setBodyContent

          -
          public void setBodyContent(javax.servlet.jsp.tagext.BodyContent bodyContent)
          -
          -
          Specified by:
          -
          setBodyContent in interface javax.servlet.jsp.tagext.BodyTag
          -
          -
        • -
        - - - -
          -
        • -

          setPageContext

          -
          public void setPageContext(javax.servlet.jsp.PageContext pageContext)
          -
          -
          Specified by:
          -
          setPageContext in interface javax.servlet.jsp.tagext.Tag
          -
          -
        • -
        - - - -
          -
        • -

          doInitBody

          -
          public void doInitBody()
          -
          -
          Specified by:
          -
          doInitBody in interface javax.servlet.jsp.tagext.BodyTag
          -
          -
        • -
        - - - -
          -
        • -

          doAfterBody

          -
          public int doAfterBody()
          -
          -
          Specified by:
          -
          doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
          -
          -
        • -
        - - - -
          -
        • -

          release

          -
          public void release()
          -
          -
          Specified by:
          -
          release in interface javax.servlet.jsp.tagext.Tag
          -
          -
        • -
        - - - -
          -
        • -

          doEndTag

          -
          public int doEndTag()
          -             throws javax.servlet.jsp.JspException
          -
          -
          Specified by:
          -
          doEndTag in interface javax.servlet.jsp.tagext.Tag
          -
          Throws:
          -
          javax.servlet.jsp.JspException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/TaglibFactory.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/TaglibFactory.html deleted file mode 100644 index c25ef24..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/TaglibFactory.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - -TaglibFactory (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jsp
    -

    Class TaglibFactory

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateHashModel, TemplateModel
      -
      -
      -
      -
      public class TaglibFactory
      -extends Object
      -implements TemplateHashModel
      -
      A hash model associated with a servlet context that can load JSP tag - libraries associated with that servlet context. An instance of this class is - made available in the root data model of templates executed by - FreemarkerServlet under key - JspTaglibs. It can be added to custom servlets as well to enable JSP - taglib integration in them as well.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          TaglibFactory

          -
          public TaglibFactory(javax.servlet.ServletContext ctx)
          -
          Creates a new JSP taglib factory that will be used to load JSP taglibs - for the web application represented by the passed servlet context.
          -
          -
          Parameters:
          -
          ctx - the servlet context whose JSP tag libraries will this factory - load.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          get

          -
          public TemplateModel get(String uri)
          -                  throws TemplateModelException
          -
          Retrieves a JSP tag library identified by an URI. The matching of the URI - to a JSP taglib is done as described in the JSP 1.2 FCS specification.
          -
          -
          Specified by:
          -
          get in interface TemplateHashModel
          -
          Parameters:
          -
          uri - the URI that describes the JSP taglib. It can be any of the - three forms allowed by the JSP specification: absolute URI, root relative - URI and non-root relative URI. Note that if a non-root relative URI is - used it's resolved relative to the URL of the current request. In this - case, the current request is obtained by looking up a - HttpRequestHashModel object named Request in the root - data model. FreemarkerServlet provides this object under the expected - name, and custom servlets that want to integrate JSP taglib support - should do the same.
          -
          Returns:
          -
          a hash model representing the JSP taglib. Each element of this - hash model represents a single custom tag from the library, implemented - as a TemplateTransformModel.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          isEmpty

          -
          public boolean isEmpty()
          -
          Returns false.
          -
          -
          Specified by:
          -
          isEmpty in interface TemplateHashModel
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/EventForwarding.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/EventForwarding.html deleted file mode 100644 index 1c5db60..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/EventForwarding.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jsp.EventForwarding (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jsp.EventForwarding

    -
    -
    No usage of freemarker.ext.jsp.EventForwarding
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/FreemarkerTag.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/FreemarkerTag.html deleted file mode 100644 index 4ecfb8b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/FreemarkerTag.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jsp.FreemarkerTag (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jsp.FreemarkerTag

    -
    -
    No usage of freemarker.ext.jsp.FreemarkerTag
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/TaglibFactory.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/TaglibFactory.html deleted file mode 100644 index dcb5bae..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/class-use/TaglibFactory.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jsp.TaglibFactory (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jsp.TaglibFactory

    -
    -
    No usage of freemarker.ext.jsp.TaglibFactory
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-frame.html deleted file mode 100644 index c28bed0..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-frame.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -freemarker.ext.jsp (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.jsp

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-summary.html deleted file mode 100644 index afdbdfa..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-summary.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - -freemarker.ext.jsp (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.jsp

    -
    -
    -Classes for two-way FreeMarker-JSP integration.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      EventForwarding -
      An instance of this class should be registered as a <listener> in - the web.xml descriptor in order to correctly dispatch events to - event listeners that are specified in TLD files.
      -
      FreemarkerTag -
      Simple implementation of JSP tag to allow use of FreeMarker templates in - JSP.
      -
      TaglibFactory -
      A hash model associated with a servlet context that can load JSP tag - libraries associated with that servlet context.
      -
      -
    • -
    - - - -

    Package freemarker.ext.jsp Description

    -

    -Classes for two-way FreeMarker-JSP integration. It contains both a JSP -custom tag that allows embedding of FreeMarker templates inside JSP -pages, as well as the infrastructure that allows JSP custom tags to be -used inside FreeMarker templates.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-tree.html deleted file mode 100644 index 163b647..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-tree.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - -freemarker.ext.jsp Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.jsp

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    -
      -
    • java.lang.Object -
        -
      • freemarker.ext.jsp.EventForwarding (implements javax.servlet.http.HttpSessionAttributeListener, javax.servlet.http.HttpSessionListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener)
      • -
      • freemarker.ext.jsp.FreemarkerTag (implements javax.servlet.jsp.tagext.BodyTag)
      • -
      • freemarker.ext.jsp.TaglibFactory (implements freemarker.template.TemplateHashModel)
      • -
      -
    • -
    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-use.html deleted file mode 100644 index 5ba032d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jsp/package-use.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.jsp (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.jsp

    -
    -
    No usage of freemarker.ext.jsp
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonHashModel.html deleted file mode 100644 index 40c90f4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonHashModel.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - -JythonHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jython
    -

    Class JythonHashModel

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonModel.html deleted file mode 100644 index 7e33bc7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonModel.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - -JythonModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jython
    -

    Class JythonModel

    -
    -
    - - -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonNumberModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonNumberModel.html deleted file mode 100644 index d009587..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonNumberModel.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - -JythonNumberModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jython
    -

    Class JythonNumberModel

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonSequenceModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonSequenceModel.html deleted file mode 100644 index b38bfaa..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonSequenceModel.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - -JythonSequenceModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jython
    -

    Class JythonSequenceModel

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonVersionAdapter.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonVersionAdapter.html deleted file mode 100644 index 2d4fd98..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonVersionAdapter.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - -JythonVersionAdapter (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jython
    -

    Class JythonVersionAdapter

    -
    -
    - -
    -
      -
    • -
      -
      -
      public abstract class JythonVersionAdapter
      -extends Object
      -
      Functions that has a different implementation depending on the Jython version - used. This was introduced to work around class-loading errors because of - different classes/methods being present in different Jython versions.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          JythonVersionAdapter

          -
          public JythonVersionAdapter()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          isPyInstance

          -
          public abstract boolean isPyInstance(Object obj)
          -
          Returns - obj instanceof Py[Java]Instance.
          -
        • -
        - - - -
          -
        • -

          pyInstanceToJava

          -
          public abstract Object pyInstanceToJava(Object pyInstance)
          -
          Returns - ((PyInstance) py[Java]Instance).__tojava__(java.lang.Object.class).
          -
        • -
        - - - -
          -
        • -

          getPythonClassName

          -
          public abstract String getPythonClassName(org.python.core.PyObject pyObject)
          -
          Returns pyObject.__class__.__name__
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonWrapper.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonWrapper.html deleted file mode 100644 index 287642d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/JythonWrapper.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - -JythonWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.jython
    -

    Class JythonWrapper

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      ObjectWrapper
      -
      -
      -
      -
      public class JythonWrapper
      -extends Object
      -implements ObjectWrapper
      -
      An object wrapper that wraps Jython objects into FreeMarker template models - and vice versa.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          JythonWrapper

          -
          public JythonWrapper()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          setUseCache

          -
          public void setUseCache(boolean useCache)
          -
          Sets whether this wrapper caches model instances. Default is false. - When set to true, calling wrap(Object) multiple times for - the same object will return the same model.
          -
        • -
        - - - -
          -
        • -

          setAttributesShadowItems

          -
          public void setAttributesShadowItems(boolean attributesShadowItems)
          -
          Sets whether attributes shadow items in wrapped objects. When true - (this is the default value), ${object.name} will first - try to locate a python attribute with the specified name on the object - using PyObject.__findattr__(java.lang.String), and only if it - doesn't find the attribute will it call - PyObject.__getitem__(org.python.core.PyObject). - When set to false, the lookup order is reversed and items - are looked up before attributes.
          -
        • -
        - - - -
          -
        • -

          wrap

          -
          public TemplateModel wrap(Object obj)
          -
          Wraps the passed Jython object into a FreeMarker template model. If - the object is not a Jython object, it's first coerced into one using - Py.java2py(java.lang.Object). PyDictionary and PyStringMap are wrapped into a hash model, PySequence - descendants are wrapped into a sequence model, PyInteger, PyLong, and PyFloat are wrapped into a number model. All objects - are wrapped into a scalar model (using Object.toString() and a - boolean model (using PyObject.__nonzero__(). For internal - general-purpose PyObjects returned from a call to unwrap(TemplateModel), the template model that was passed to - unwrap is returned.
          -
          -
          Specified by:
          -
          wrap in interface ObjectWrapper
          -
          Parameters:
          -
          obj - The object to wrap into a TemplateModel. If it already implements TemplateModel, - it should just return the object as is.
          -
          Returns:
          -
          a TemplateModel wrapper of the object passed in. To support un-wrapping, you may consider the - return value to implement WrapperTemplateModel and AdapterTemplateModel. - The default expectation is that the TemplateModel isn't less thread safe than the wrapped object. - If the ObjectWrapper returns less thread safe objects, that should be clearly documented, as it - restricts how it can be used, like, then it can't be used to wrap "shared variables" - (Configuration.setSharedVaribles(Map)).
          -
          -
        • -
        - - - -
          -
        • -

          unwrap

          -
          public org.python.core.PyObject unwrap(TemplateModel model)
          -                                throws TemplateModelException
          -
          Coerces a template model into a PyObject.
          -
          -
          Parameters:
          -
          model - the model to coerce
          -
          Returns:
          -
          the coerced model. -
            -
          • -
          • AdapterTemplateModels (i.e. BeanModel) are marshalled - using the standard Python marshaller Py.java2py(Object) on - the result of getWrappedObject(PyObject.class)s. The - native JythonModel instances will just return the underlying PyObject. -
          • All other models that are scalars are - marshalled as PyString. -
          • All other models that are numbers are - marshalled using the standard Python marshaller - Py.java2py(Object) on their underlying Number
          • -
          • All other models are marshalled to a generic internal - PyObject subclass that'll correctly pass - __finditem__, __len__, - __nonzero__, and __call__ invocations to - appropriate hash, sequence, and method models.
          • -
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonHashModel.html deleted file mode 100644 index dc3414d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonHashModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jython.JythonHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jython.JythonHashModel

    -
    -
    No usage of freemarker.ext.jython.JythonHashModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonModel.html deleted file mode 100644 index 0d94029..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonModel.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jython.JythonModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jython.JythonModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonNumberModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonNumberModel.html deleted file mode 100644 index b2b0111..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonNumberModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jython.JythonNumberModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jython.JythonNumberModel

    -
    -
    No usage of freemarker.ext.jython.JythonNumberModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonSequenceModel.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonSequenceModel.html deleted file mode 100644 index 627f475..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonSequenceModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jython.JythonSequenceModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jython.JythonSequenceModel

    -
    -
    No usage of freemarker.ext.jython.JythonSequenceModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonVersionAdapter.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonVersionAdapter.html deleted file mode 100644 index 2b9e06c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonVersionAdapter.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jython.JythonVersionAdapter (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jython.JythonVersionAdapter

    -
    -
    No usage of freemarker.ext.jython.JythonVersionAdapter
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonWrapper.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonWrapper.html deleted file mode 100644 index d9031c7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/class-use/JythonWrapper.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.jython.JythonWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.jython.JythonWrapper

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/package-frame.html deleted file mode 100644 index 58e4d09..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/package-frame.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - -freemarker.ext.jython (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.jython

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/package-summary.html deleted file mode 100644 index 47c35f8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/package-summary.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -freemarker.ext.jython (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.jython

    -
    -
    Exposes Jython objects to templates.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      JythonHashModel -
      Model for Jython dictionaries (PyDictionary - and PyStringMap).
      -
      JythonModel -
      Generic model for arbitrary Jython objects.
      -
      JythonNumberModel -
      Model for Jython numeric objects (PyInteger, PyLong, - PyFloat).
      -
      JythonSequenceModel -
      Model for Jython sequence objects (PySequence descendants).
      -
      JythonVersionAdapter -
      Functions that has a different implementation depending on the Jython version - used.
      -
      JythonWrapper -
      An object wrapper that wraps Jython objects into FreeMarker template models - and vice versa.
      -
      -
    • -
    - - - -

    Package freemarker.ext.jython Description

    -

    Exposes Jython objects to templates. -The default object wrapper of FreeMarker -automatically wraps Jython nodes with this. - -

    Most of the issues dealing with Jython objects are handled by the -JythonWrapper.wrap(Object) method. In -normal cases, this is the only method you should use to turn an -arbitrary Jython object into a FreeMarker -TemplateModel. Additionally, you can -manually create instances of any wrapper class using its constructors.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/package-tree.html deleted file mode 100644 index e73016a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/package-tree.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -freemarker.ext.jython Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.jython

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/jython/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/jython/package-use.html deleted file mode 100644 index 2ece8d5..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/jython/package-use.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.jython (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.jython

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoFunctionModel.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoFunctionModel.html deleted file mode 100644 index 849ff28..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoFunctionModel.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - -RhinoFunctionModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.rhino
    -

    Class RhinoFunctionModel

    -
    -
    - - -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          RhinoFunctionModel

          -
          public RhinoFunctionModel(org.mozilla.javascript.Function function,
          -                          org.mozilla.javascript.Scriptable fnThis,
          -                          BeansWrapper wrapper)
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoScriptableModel.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoScriptableModel.html deleted file mode 100644 index 6a626a4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoScriptableModel.html +++ /dev/null @@ -1,545 +0,0 @@ - - - - - - -RhinoScriptableModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.rhino
    -

    Class RhinoScriptableModel

    -
    -
    - - -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          RhinoScriptableModel

          -
          public RhinoScriptableModel(org.mozilla.javascript.Scriptable scriptable,
          -                            BeansWrapper wrapper)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - - - - - -
          -
        • -

          get

          -
          public TemplateModel get(int index)
          -                  throws TemplateModelException
          -
          Description copied from interface: TemplateSequenceModel
          -
          Retrieves the i-th template model in this sequence.
          -
          -
          Specified by:
          -
          get in interface TemplateSequenceModel
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - - - - - - - - - - - - - - - - - -
          -
        • -

          getAsBoolean

          -
          public boolean getAsBoolean()
          -
          -
          Specified by:
          -
          getAsBoolean in interface TemplateBooleanModel
          -
          Returns:
          -
          whether to interpret this object as true or false in a boolean context
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getAsString

          -
          public String getAsString()
          -
          Description copied from interface: TemplateScalarModel
          -
          Returns the string representation of this model. Don't return null, as that will cause exception. - (In classic-compatible mode the engine will convert null into empty string, though.)
          -
          -
          Specified by:
          -
          getAsString in interface TemplateScalarModel
          -
          -
        • -
        - - - -
          -
        • -

          getAdaptedObject

          -
          public Object getAdaptedObject(Class hint)
          -
          Description copied from interface: AdapterTemplateModel
          -
          Retrieves the underlying object, or some other object semantically - equivalent to its value narrowed by the class hint.
          -
          -
          Specified by:
          -
          getAdaptedObject in interface AdapterTemplateModel
          -
          Parameters:
          -
          hint - the desired class of the returned value. An implementation - should make reasonable effort to retrieve an object of the requested - class, but if that is impossible, it must at least return the underlying - object as-is. As a minimal requirement, an implementation must always - return the exact underlying object when - hint.isInstance(underlyingObject) holds. When called - with java.lang.Object.class, it should return a generic Java - object (i.e. if the model is wrapping a scripting language object that is - further wrapping a Java object, the deepest underlying Java object should - be returned).
          -
          Returns:
          -
          the underlying object, or its value accommodated for the hint - class.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoWrapper.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoWrapper.html deleted file mode 100644 index 9d23ec7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/RhinoWrapper.html +++ /dev/null @@ -1,383 +0,0 @@ - - - - - - -RhinoWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.rhino
    -

    Class RhinoWrapper

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoFunctionModel.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoFunctionModel.html deleted file mode 100644 index 1c296f9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoFunctionModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.rhino.RhinoFunctionModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.rhino.RhinoFunctionModel

    -
    -
    No usage of freemarker.ext.rhino.RhinoFunctionModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoScriptableModel.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoScriptableModel.html deleted file mode 100644 index 8652e5d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoScriptableModel.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.rhino.RhinoScriptableModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.rhino.RhinoScriptableModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoWrapper.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoWrapper.html deleted file mode 100644 index 50de297..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/class-use/RhinoWrapper.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.rhino.RhinoWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.rhino.RhinoWrapper

    -
    -
    No usage of freemarker.ext.rhino.RhinoWrapper
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-frame.html deleted file mode 100644 index 69d5a45..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-frame.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -freemarker.ext.rhino (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.rhino

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-summary.html deleted file mode 100644 index 30fef51..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-summary.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -freemarker.ext.rhino (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.rhino

    -
    -
    Exposes Rhino (ECMAScript) objects to templates.
    -
    -

    See: Description

    -
    -
    - - - - -

    Package freemarker.ext.rhino Description

    -

    Exposes Rhino (ECMAScript) objects to templates.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-tree.html deleted file mode 100644 index d7ff882..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-tree.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -freemarker.ext.rhino Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.rhino

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-use.html deleted file mode 100644 index 1ebbd04..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/rhino/package-use.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.rhino (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.rhino

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/AllHttpScopesHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/AllHttpScopesHashModel.html deleted file mode 100644 index 4324286..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/AllHttpScopesHashModel.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - -AllHttpScopesHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.servlet
    -

    Class AllHttpScopesHashModel

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateHashModel, TemplateHashModelEx, TemplateModel, Serializable
      -
      -
      -
      -
      public class AllHttpScopesHashModel
      -extends SimpleHash
      -
      An extension of SimpleHash that looks up keys in the hash, then in the - request, session, and servlet context scopes. Makes "Application", "Session" - and "Request" keys largely obsolete, however we keep them for backward - compatibility (also, "Request" is required for proper operation of JSP - taglibs). - It is on purpose that we didn't override keys and values - methods. That way, only those variables assigned into the hash directly by a - subclass of FreemarkerServlet that overrides - preTemplateProcess) are discovered as "page" variables by the FM - JSP PageContext implementation.
      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          AllHttpScopesHashModel

          -
          public AllHttpScopesHashModel(ObjectWrapper wrapper,
          -                              javax.servlet.ServletContext context,
          -                              javax.servlet.http.HttpServletRequest request)
          -
          Creates a new instance of AllHttpScopesHashModel for handling a single - HTTP servlet request.
          -
          -
          Parameters:
          -
          wrapper - the object wrapper to use
          -
          context - the servlet context of the web application
          -
          request - the HTTP servlet request being processed
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          putUnlistedModel

          -
          public void putUnlistedModel(String key,
          -                             TemplateModel model)
          -
          Stores a model in the hash so that it doesn't show up in keys() - and values() methods. Used to put the Application, Session, - Request, RequestParameters and JspTaglibs objects.
          -
          -
          Parameters:
          -
          key - the key under which the model is stored
          -
          model - the stored model
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/FreemarkerServlet.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/FreemarkerServlet.html deleted file mode 100644 index e874fed..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/FreemarkerServlet.html +++ /dev/null @@ -1,1033 +0,0 @@ - - - - - - -FreemarkerServlet (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.servlet
    -

    Class FreemarkerServlet

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • javax.servlet.GenericServlet
      • -
      • -
          -
        • javax.servlet.http.HttpServlet
        • -
        • -
            -
          • freemarker.ext.servlet.FreemarkerServlet
          • -
          -
        • -
        -
      • -
      -
    • -
    -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
      -
      -
      -
      -
      public class FreemarkerServlet
      -extends javax.servlet.http.HttpServlet
      -

      This is a general-purpose FreeMarker view servlet.

      - -

      The main features are: - -

        - -
      • It makes all request, request parameters, session, and servlet - context attributes available to templates through Request, - RequestParameters, Session, and Application - variables. - -
      • The scope variables are also available via automatic scope discovery. That is, - writing Application.attrName, Session.attrName, - Request.attrName is not mandatory; it's enough to write attrName, - and if no such variable was created in the template, it will search the - variable in Request, and then in Session, - and finally in Application. - -
      • It creates a variable with name JspTaglibs, that can be used - to load JSP taglibs. For example:
        - <#assign tiles=JspTaglibs["/WEB-INF/struts-tiles.tld"]> - -
      • A custom directive named include_page allows you to - include the output of another servlet resource from your servlet container, - just as if you used ServletRequest.getRequestDispatcher(path).include():
        - <@include_page path="/myWebapp/somePage.jsp"/>. You can also - pass parameters to the newly included page by passing a hash named 'params': - <@include_page path="/myWebapp/somePage.jsp" params={lang: "en", q="5"}/>. - By default, the request parameters of the original request (the one being - processed by FreemarkerServlet) are also inherited by the include. You can - explicitly control this inheritance using the 'inherit_params' parameter: - <@include_page path="/myWebapp/somePage.jsp" params={lang: "en", q="5"} inherit_params=false/>. -
      - -

      The servlet will rethrow the errors occurring during template processing, - wrapped into ServletException, except if the class name of the - class set by the template_exception_handler contains the - substring "Debug". If it contains "Debug", then it - is assumed that the template exception handler prints the error message to the - page, thus FreemarkerServlet will suppress the exception, and - logs the problem with the servlet logger - (javax.servlet.GenericServlet.log(...)). - -

      Supported init-params are:

      - -
        - -
      • TemplatePath specifies the location of the templates. - By default, this is interpreted as web application directory relative URI.
        - Alternatively, you can prepend it with file:// to indicate a literal - path in the file system (i.e. file:///var/www/project/templates/). - Note that three slashes were used to specify an absolute path.
        - Also, you can prepend it with class://path/to/template/package to - indicate that you want to load templates from the specified package - accessible through the classloader of the servlet.
        - Default value is class:// (that is, the root of the class hierarchy). - Note that this default is different than the default in FreeMarker 1.x, when - it defaulted /, that is to loading from the webapp root directory.
      • - -
      • NoCache if set to true, generates headers in the response - that advise the HTTP client not to cache the returned page. - The default is false.
      • - -
      • ContentType if specified, response uses the specified - Content-type HTTP header. The value may include the charset (e.g. - "text/html; charset=ISO-8859-1"). If not specified, "text/html" - is used. If the charset is not specified in this init-param, then the charset - (encoding) of the actual template file will be used (in the response HTTP header - and for encoding the output stream). Note that this setting can be overridden - on a per-template basis by specifying a custom attribute named - content_type in the attributes parameter of the - <#ftl> directive. -
      • - -
      • The following init-params are supported only for backward compatibility, and - their usage is discouraged: TemplateUpdateInterval, DefaultEncoding, - ObjectWrapper, TemplateExceptionHandler. Use setting init-params such as - object_wrapper instead. - -
      • Any other init-param will be interpreted as Configuration - level setting. See Configuration.setSetting(java.lang.String, java.lang.String)
      • - -
      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          FreemarkerServlet

          -
          public FreemarkerServlet()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          init

          -
          public void init()
          -          throws javax.servlet.ServletException
          -
          -
          Overrides:
          -
          init in class javax.servlet.GenericServlet
          -
          Throws:
          -
          javax.servlet.ServletException
          -
          -
        • -
        - - - -
          -
        • -

          createTemplateLoader

          -
          protected TemplateLoader createTemplateLoader(String templatePath)
          -                                       throws IOException
          -
          Create the template loader. The default implementation will create a - ClassTemplateLoader if the template path starts with "class://", - a FileTemplateLoader if the template path starts with "file://", - and a WebappTemplateLoader otherwise.
          -
          -
          Parameters:
          -
          templatePath - the template path to create a loader for
          -
          Returns:
          -
          a newly created template loader
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          doGet

          -
          public void doGet(javax.servlet.http.HttpServletRequest request,
          -                  javax.servlet.http.HttpServletResponse response)
          -           throws javax.servlet.ServletException,
          -                  IOException
          -
          -
          Overrides:
          -
          doGet in class javax.servlet.http.HttpServlet
          -
          Throws:
          -
          javax.servlet.ServletException
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          doPost

          -
          public void doPost(javax.servlet.http.HttpServletRequest request,
          -                   javax.servlet.http.HttpServletResponse response)
          -            throws javax.servlet.ServletException,
          -                   IOException
          -
          -
          Overrides:
          -
          doPost in class javax.servlet.http.HttpServlet
          -
          Throws:
          -
          javax.servlet.ServletException
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          deduceLocale

          -
          protected Locale deduceLocale(String templatePath,
          -                              javax.servlet.http.HttpServletRequest request,
          -                              javax.servlet.http.HttpServletResponse response)
          -
          Returns the locale used for the - Configuration.getTemplate(String, Locale) call. - The base implementation simply returns the locale setting of the - configuration. Override this method to provide different behaviour, i.e. - to use the locale indicated in the request.
          -
        • -
        - - - - - - - -
          -
        • -

          requestUrlToTemplatePath

          -
          protected String requestUrlToTemplatePath(javax.servlet.http.HttpServletRequest request)
          -
          Maps the request URL to a template path that is passed to - Configuration.getTemplate(String, Locale). You can override it - (i.e. to provide advanced rewriting capabilities), but you are strongly - encouraged to call the overridden method first, then only modify its - return value.
          -
          -
          Parameters:
          -
          request - the currently processed request
          -
          Returns:
          -
          a String representing the template path
          -
          -
        • -
        - - - -
          -
        • -

          preprocessRequest

          -
          protected boolean preprocessRequest(javax.servlet.http.HttpServletRequest request,
          -                                    javax.servlet.http.HttpServletResponse response)
          -                             throws javax.servlet.ServletException,
          -                                    IOException
          -
          Called as the first step in request processing, before the templating mechanism - is put to work. By default does nothing and returns false. This method is - typically overridden to manage serving of non-template resources (i.e. images) - that reside in the template directory.
          -
          -
          Parameters:
          -
          request - the HTTP request
          -
          response - the HTTP response
          -
          Returns:
          -
          true to indicate this method has processed the request entirely, - and that the further request processing should not take place.
          -
          Throws:
          -
          javax.servlet.ServletException
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          createConfiguration

          -
          protected Configuration createConfiguration()
          -
          This method is called from init() to create the - FreeMarker configuration object that this servlet will use - for template loading. This is a hook that allows you - to custom-configure the configuration object in a subclass. - The default implementation returns a new Configuration - instance.
          -
        • -
        - - - -
          -
        • -

          createObjectWrapper

          -
          protected ObjectWrapper createObjectWrapper()
          -
          This method is called from init() to create the - FreeMarker object wrapper object that this servlet will use - for adapting request, session, and servlet context attributes into - template models.. This is a hook that allows you - to custom-configure the wrapper object in a subclass. - The default implementation returns a wrapper that depends on the value - of ObjectWrapper init parameter. If simple is - specified, ObjectWrapper.SIMPLE_WRAPPER is used; if jython - is specified, JythonWrapper is used. In - every other case ObjectWrapper.DEFAULT_WRAPPER is used.
          -
        • -
        - - - -
          -
        • -

          getObjectWrapper

          -
          protected ObjectWrapper getObjectWrapper()
          -
        • -
        - - - -
          -
        • -

          getTemplatePath

          -
          protected final String getTemplatePath()
          -
        • -
        - - - -
          -
        • -

          createRequestParametersHashModel

          -
          protected HttpRequestParametersHashModel createRequestParametersHashModel(javax.servlet.http.HttpServletRequest request)
          -
        • -
        - - - -
          -
        • -

          initializeServletContext

          -
          protected void initializeServletContext(javax.servlet.http.HttpServletRequest request,
          -                                        javax.servlet.http.HttpServletResponse response)
          -                                 throws javax.servlet.ServletException,
          -                                        IOException
          -
          Called when servlet detects in a request processing that - application-global (that is, ServletContext-specific) attributes are not yet - set. - This is a generic hook you might use in subclasses to perform a specific - action on first request in the context. By default it does nothing.
          -
          -
          Parameters:
          -
          request - the actual HTTP request
          -
          response - the actual HTTP response
          -
          Throws:
          -
          javax.servlet.ServletException
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          initializeSession

          -
          protected void initializeSession(javax.servlet.http.HttpServletRequest request,
          -                                 javax.servlet.http.HttpServletResponse response)
          -                          throws javax.servlet.ServletException,
          -                                 IOException
          -
          Called when servlet detects in a request processing that session-global - (that is, HttpSession-specific) attributes are not yet set. - This is a generic hook you might use in subclasses to perform a specific - action on first request in the session. By default it does nothing. It - is only invoked on newly created sessions; it's not invoked when a - replicated session is reinstantiated in another servlet container.
          -
          -
          Parameters:
          -
          request - the actual HTTP request
          -
          response - the actual HTTP response
          -
          Throws:
          -
          javax.servlet.ServletException
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          preTemplateProcess

          -
          protected boolean preTemplateProcess(javax.servlet.http.HttpServletRequest request,
          -                                     javax.servlet.http.HttpServletResponse response,
          -                                     Template template,
          -                                     TemplateModel data)
          -                              throws javax.servlet.ServletException,
          -                                     IOException
          -
          Called before the execution is passed to template.process(). - This is a generic hook you might use in subclasses to perform a specific - action before the template is processed. By default does nothing. - A typical action to perform here is to inject application-specific - objects into the model root - -

          Example: Expose the Serlvet context path as "baseDir" for all templates: - -

          -    ((SimpleHash) data).put("baseDir", request.getContextPath() + "/");
          -    return true;
          -
          -
          -
          Parameters:
          -
          request - the actual HTTP request
          -
          response - the actual HTTP response
          -
          template - the template that will get executed
          -
          data - the data that will be passed to the template. By default this will be - an AllHttpScopesHashModel (which is a SimpleHash subclass). - Thus, you can add new variables to the data-model with the - SimpleHash.put(String, Object) subclass) method.
          -
          Returns:
          -
          true to process the template, false to suppress template processing.
          -
          Throws:
          -
          javax.servlet.ServletException
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          postTemplateProcess

          -
          protected void postTemplateProcess(javax.servlet.http.HttpServletRequest request,
          -                                   javax.servlet.http.HttpServletResponse response,
          -                                   Template template,
          -                                   TemplateModel data)
          -                            throws javax.servlet.ServletException,
          -                                   IOException
          -
          Called after the execution returns from template.process(). - This is a generic hook you might use in subclasses to perform a specific - action after the template is processed. It will be invoked even if the - template processing throws an exception. By default does nothing.
          -
          -
          Parameters:
          -
          request - the actual HTTP request
          -
          response - the actual HTTP response
          -
          template - the template that was executed
          -
          data - the data that was passed to the template
          -
          Throws:
          -
          javax.servlet.ServletException
          -
          IOException
          -
          -
        • -
        - - - -
          -
        • -

          getConfiguration

          -
          protected Configuration getConfiguration()
          -
          Returns the Configuration object used by this servlet. - Please don't forget that Configuration is not thread-safe - when you modify it.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpRequestHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpRequestHashModel.html deleted file mode 100644 index e53ed3c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpRequestHashModel.html +++ /dev/null @@ -1,444 +0,0 @@ - - - - - - -HttpRequestHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.servlet
    -

    Class HttpRequestHashModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          HttpRequestHashModel

          -
          public HttpRequestHashModel(javax.servlet.http.HttpServletRequest request,
          -                            ObjectWrapper wrapper)
          -
        • -
        - - - -
          -
        • -

          HttpRequestHashModel

          -
          public HttpRequestHashModel(javax.servlet.http.HttpServletRequest request,
          -                            javax.servlet.http.HttpServletResponse response,
          -                            ObjectWrapper wrapper)
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpRequestParametersHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpRequestParametersHashModel.html deleted file mode 100644 index ed3d1d3..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpRequestParametersHashModel.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - -HttpRequestParametersHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.servlet
    -

    Class HttpRequestParametersHashModel

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • freemarker.ext.servlet.HttpRequestParametersHashModel
      • -
      -
    • -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          HttpRequestParametersHashModel

          -
          public HttpRequestParametersHashModel(javax.servlet.http.HttpServletRequest request)
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpSessionHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpSessionHashModel.html deleted file mode 100644 index 4a3e971..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/HttpSessionHashModel.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - -HttpSessionHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.servlet
    -

    Class HttpSessionHashModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          HttpSessionHashModel

          -
          public HttpSessionHashModel(javax.servlet.http.HttpSession session,
          -                            ObjectWrapper wrapper)
          -
          Use this constructor when the session already exists.
          -
          -
          Parameters:
          -
          session - the session
          -
          wrapper - an object wrapper used to wrap session attributes
          -
          -
        • -
        - - - -
          -
        • -

          HttpSessionHashModel

          -
          public HttpSessionHashModel(FreemarkerServlet servlet,
          -                            javax.servlet.http.HttpServletRequest request,
          -                            javax.servlet.http.HttpServletResponse response,
          -                            ObjectWrapper wrapper)
          -
          Use this constructor when the session isn't already created. It is passed - enough parameters so that the session can be properly initialized after - it's detected that it was created.
          -
          -
          Parameters:
          -
          servlet - the FreemarkerServlet that created this model. If the - model is not created through FreemarkerServlet, leave this argument as - null.
          -
          request - the actual request
          -
          response - the actual response
          -
          wrapper - an object wrapper used to wrap session attributes
          -
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/IncludePage.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/IncludePage.html deleted file mode 100644 index 550d182..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/IncludePage.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - -IncludePage (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.servlet
    -

    Class IncludePage

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateDirectiveModel, TemplateModel
      -
      -
      -
      -
      public class IncludePage
      -extends Object
      -implements TemplateDirectiveModel
      -
      A model that when invoked with a 'path' parameter will perform a servlet - include. It also support an optional hash named 'params' which specifies - request parameters for the include - its keys are strings, its values - should be either strings or sequences of strings (for multiple valued - parameters). A third optional parameter 'inherit_params' should be a boolean - when specified, and it defaults to true when not specified. A value of true - means that the include inherits the request parameters from the current - request. In this case values in 'params' will get prepended to the existing - values of parameters.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          IncludePage

          -
          public IncludePage(javax.servlet.http.HttpServletRequest request,
          -                   javax.servlet.http.HttpServletResponse response)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          execute

          -
          public void execute(Environment env,
          -                    Map params,
          -                    TemplateModel[] loopVars,
          -                    TemplateDirectiveBody body)
          -             throws TemplateException,
          -                    IOException
          -
          Description copied from interface: TemplateDirectiveModel
          -
          Executes this user-defined directive; called by FreeMarker when the user-defined - directive is called in the template.
          -
          -
          Specified by:
          -
          execute in interface TemplateDirectiveModel
          -
          Parameters:
          -
          env - the current processing environment. Note that you can access - the output Writer by Environment.getOut().
          -
          params - the parameters (if any) passed to the directive as a - map of key/value pairs where the keys are String-s and the - values are TemplateModel instances. This is never - null. If you need to convert the template models to POJOs, - you can use the utility methods in the DeepUnwrap class.
          -
          loopVars - an array that corresponds to the "loop variables", in - the order as they appear in the directive call. ("Loop variables" are out-parameters - that are available to the nested body of the directive; see in the Manual.) - You set the loop variables by writing this array. The length of the array gives the - number of loop-variables that the caller has specified. - Never null, but can be a zero-length array.
          -
          body - an object that can be used to render the nested content (body) of - the directive call. If the directive call has no nested content (i.e., it's like - <@myDirective /> or <@myDirective></@myDirective>), then this will be - null.
          -
          Throws:
          -
          TemplateException - If any problem occurs that's not an IOException during writing the template - output.
          -
          IOException - When writing the template output fails.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/ServletContextHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/ServletContextHashModel.html deleted file mode 100644 index c4a242a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/ServletContextHashModel.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - -ServletContextHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.servlet
    -

    Class ServletContextHashModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - - - - - - - - - -
          -
        • -

          getServlet

          -
          public javax.servlet.GenericServlet getServlet()
          -
          Returns the underlying servlet. Can return null if this object was - created using the deprecated constructor.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/AllHttpScopesHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/AllHttpScopesHashModel.html deleted file mode 100644 index d2a9fca..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/AllHttpScopesHashModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.servlet.AllHttpScopesHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.servlet.AllHttpScopesHashModel

    -
    -
    No usage of freemarker.ext.servlet.AllHttpScopesHashModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/FreemarkerServlet.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/FreemarkerServlet.html deleted file mode 100644 index 325fdbb..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/FreemarkerServlet.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.servlet.FreemarkerServlet (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.servlet.FreemarkerServlet

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpRequestHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpRequestHashModel.html deleted file mode 100644 index 49b5e86..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpRequestHashModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.servlet.HttpRequestHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.servlet.HttpRequestHashModel

    -
    -
    No usage of freemarker.ext.servlet.HttpRequestHashModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpRequestParametersHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpRequestParametersHashModel.html deleted file mode 100644 index a956a06..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpRequestParametersHashModel.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.servlet.HttpRequestParametersHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.servlet.HttpRequestParametersHashModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpSessionHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpSessionHashModel.html deleted file mode 100644 index 606df09..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/HttpSessionHashModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.servlet.HttpSessionHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.servlet.HttpSessionHashModel

    -
    -
    No usage of freemarker.ext.servlet.HttpSessionHashModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/IncludePage.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/IncludePage.html deleted file mode 100644 index 33d4541..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/IncludePage.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.servlet.IncludePage (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.servlet.IncludePage

    -
    -
    No usage of freemarker.ext.servlet.IncludePage
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/ServletContextHashModel.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/ServletContextHashModel.html deleted file mode 100644 index 910dd67..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/class-use/ServletContextHashModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.servlet.ServletContextHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.servlet.ServletContextHashModel

    -
    -
    No usage of freemarker.ext.servlet.ServletContextHashModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-frame.html deleted file mode 100644 index 8d98bb1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-frame.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -freemarker.ext.servlet (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.servlet

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-summary.html deleted file mode 100644 index b57982a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-summary.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - -freemarker.ext.servlet (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.servlet

    -
    -
    Servlet for legacy "Model 2" frameworks that allows using FreeMarker -templates instead of JSP as the MVC View -(see in the Manual).
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      AllHttpScopesHashModel -
      An extension of SimpleHash that looks up keys in the hash, then in the - request, session, and servlet context scopes.
      -
      FreemarkerServlet -
      This is a general-purpose FreeMarker view servlet.
      -
      HttpRequestHashModel -
      TemplateHashModel wrapper for a HttpServletRequest attributes.
      -
      HttpRequestParametersHashModel -
      TemplateHashModel wrapper for a HttpServletRequest parameters.
      -
      HttpSessionHashModel -
      TemplateHashModel wrapper for a HttpSession attributes.
      -
      IncludePage -
      A model that when invoked with a 'path' parameter will perform a servlet - include.
      -
      ServletContextHashModel -
      TemplateHashModel wrapper for a ServletContext attributes.
      -
      -
    • -
    - - - -

    Package freemarker.ext.servlet Description

    -

    Servlet for legacy "Model 2" frameworks that allows using FreeMarker -templates instead of JSP as the MVC View -(see in the Manual).

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-tree.html deleted file mode 100644 index c6f84a8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-tree.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -freemarker.ext.servlet Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.servlet

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-use.html deleted file mode 100644 index 48efa23..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/servlet/package-use.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.servlet (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.servlet

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/IdentityHashMap.html b/fmpp/docs/freemarker/api/freemarker/ext/util/IdentityHashMap.html deleted file mode 100644 index e907be2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/IdentityHashMap.html +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - -IdentityHashMap (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.util
    -

    Class IdentityHashMap

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          IdentityHashMap

          -
          public IdentityHashMap(int initialCapacity,
          -                       float loadFactor)
          -
          Constructs a new, empty map with the specified initial - capacity and the specified load factor.
          -
          -
          Parameters:
          -
          initialCapacity - the initial capacity of the IdentityHashMap.
          -
          loadFactor - the load factor of the IdentityHashMap
          -
          Throws:
          -
          IllegalArgumentException - if the initial capacity is less - than zero, or if the load factor is nonpositive.
          -
          -
        • -
        - - - -
          -
        • -

          IdentityHashMap

          -
          public IdentityHashMap(int initialCapacity)
          -
          Constructs a new, empty map with the specified initial capacity - and default load factor, which is 0.75.
          -
          -
          Parameters:
          -
          initialCapacity - the initial capacity of the IdentityHashMap.
          -
          Throws:
          -
          IllegalArgumentException - if the initial capacity is less - than zero.
          -
          -
        • -
        - - - -
          -
        • -

          IdentityHashMap

          -
          public IdentityHashMap()
          -
          Constructs a new, empty map with a default capacity and load - factor, which is 0.75.
          -
        • -
        - - - -
          -
        • -

          IdentityHashMap

          -
          public IdentityHashMap(Map t)
          -
          Constructs a new map with the same mappings as the given map. The - map is created with a capacity of twice the number of mappings in - the given map or 11 (whichever is greater), and a default load factor, - which is 0.75.
          -
          -
          Parameters:
          -
          t - the map whose mappings are to be placed in this map.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          size

          -
          public int size()
          -
          Returns the number of key-value mappings in this map.
          -
          -
          Specified by:
          -
          size in interface Map
          -
          Overrides:
          -
          size in class AbstractMap
          -
          Returns:
          -
          the number of key-value mappings in this map.
          -
          -
        • -
        - - - -
          -
        • -

          isEmpty

          -
          public boolean isEmpty()
          -
          Returns true if this map contains no key-value mappings.
          -
          -
          Specified by:
          -
          isEmpty in interface Map
          -
          Overrides:
          -
          isEmpty in class AbstractMap
          -
          Returns:
          -
          true if this map contains no key-value mappings.
          -
          -
        • -
        - - - -
          -
        • -

          containsValue

          -
          public boolean containsValue(Object value)
          -
          Returns true if this map maps one or more keys to the - specified value.
          -
          -
          Specified by:
          -
          containsValue in interface Map
          -
          Overrides:
          -
          containsValue in class AbstractMap
          -
          Parameters:
          -
          value - value whose presence in this map is to be tested.
          -
          Returns:
          -
          true if this map maps one or more keys to the - specified value.
          -
          -
        • -
        - - - -
          -
        • -

          containsKey

          -
          public boolean containsKey(Object key)
          -
          Returns true if this map contains a mapping for the specified - key.
          -
          -
          Specified by:
          -
          containsKey in interface Map
          -
          Overrides:
          -
          containsKey in class AbstractMap
          -
          Parameters:
          -
          key - key whose presence in this Map is to be tested.
          -
          Returns:
          -
          true if this map contains a mapping for the specified - key.
          -
          -
        • -
        - - - -
          -
        • -

          get

          -
          public Object get(Object key)
          -
          Returns the value to which this map maps the specified key. Returns - null if the map contains no mapping for this key. A return - value of null does not necessarily indicate that the - map contains no mapping for the key; it's also possible that the map - explicitly maps the key to null. The containsKey - operation may be used to distinguish these two cases.
          -
          -
          Specified by:
          -
          get in interface Map
          -
          Overrides:
          -
          get in class AbstractMap
          -
          Parameters:
          -
          key - key whose associated value is to be returned.
          -
          Returns:
          -
          the value to which this map maps the specified key.
          -
          -
        • -
        - - - -
          -
        • -

          put

          -
          public Object put(Object key,
          -                  Object value)
          -
          Associates the specified value with the specified key in this map. - If the map previously contained a mapping for this key, the old - value is replaced.
          -
          -
          Specified by:
          -
          put in interface Map
          -
          Overrides:
          -
          put in class AbstractMap
          -
          Parameters:
          -
          key - key with which the specified value is to be associated.
          -
          value - value to be associated with the specified key.
          -
          Returns:
          -
          previous value associated with specified key, or null - if there was no mapping for key. A null return can - also indicate that the IdentityHashMap previously associated - null with the specified key.
          -
          -
        • -
        - - - -
          -
        • -

          remove

          -
          public Object remove(Object key)
          -
          Removes the mapping for this key from this map if present.
          -
          -
          Specified by:
          -
          remove in interface Map
          -
          Overrides:
          -
          remove in class AbstractMap
          -
          Parameters:
          -
          key - key whose mapping is to be removed from the map.
          -
          Returns:
          -
          previous value associated with specified key, or null - if there was no mapping for key. A null return can - also indicate that the map previously associated null - with the specified key.
          -
          -
        • -
        - - - -
          -
        • -

          putAll

          -
          public void putAll(Map t)
          -
          Copies all of the mappings from the specified map to this one. - - These mappings replace any mappings that this map had for any of the - keys currently in the specified Map.
          -
          -
          Specified by:
          -
          putAll in interface Map
          -
          Overrides:
          -
          putAll in class AbstractMap
          -
          Parameters:
          -
          t - Mappings to be stored in this map.
          -
          -
        • -
        - - - -
          -
        • -

          clear

          -
          public void clear()
          -
          Removes all mappings from this map.
          -
          -
          Specified by:
          -
          clear in interface Map
          -
          Overrides:
          -
          clear in class AbstractMap
          -
          -
        • -
        - - - -
          -
        • -

          clone

          -
          public Object clone()
          -
          Returns a shallow copy of this IdentityHashMap instance: the keys and - values themselves are not cloned.
          -
          -
          Overrides:
          -
          clone in class AbstractMap
          -
          Returns:
          -
          a shallow copy of this map.
          -
          -
        • -
        - - - -
          -
        • -

          keySet

          -
          public Set keySet()
          -
          Returns a set view of the keys contained in this map. The set is - backed by the map, so changes to the map are reflected in the set, and - vice versa. The set supports element removal, which removes the - corresponding mapping from this map, via the Iterator.remove, - Set.remove, removeAll, retainAll, and - clear operations. It does not support the add or - addAll operations.
          -
          -
          Specified by:
          -
          keySet in interface Map
          -
          Overrides:
          -
          keySet in class AbstractMap
          -
          Returns:
          -
          a set view of the keys contained in this map.
          -
          -
        • -
        - - - -
          -
        • -

          values

          -
          public Collection values()
          -
          Returns a collection view of the values contained in this map. The - collection is backed by the map, so changes to the map are reflected in - the collection, and vice versa. The collection supports element - removal, which removes the corresponding mapping from this map, via the - Iterator.remove, Collection.remove, - removeAll, retainAll, and clear operations. - It does not support the add or addAll operations.
          -
          -
          Specified by:
          -
          values in interface Map
          -
          Overrides:
          -
          values in class AbstractMap
          -
          Returns:
          -
          a collection view of the values contained in this map.
          -
          -
        • -
        - - - -
          -
        • -

          entrySet

          -
          public Set entrySet()
          -
          Returns a collection view of the mappings contained in this map. Each - element in the returned collection is a Map.Entry. The - collection is backed by the map, so changes to the map are reflected in - the collection, and vice versa. The collection supports element - removal, which removes the corresponding mapping from the map, via the - Iterator.remove, Collection.remove, - removeAll, retainAll, and clear operations. - It does not support the add or addAll operations.
          -
          -
          Specified by:
          -
          entrySet in interface Map
          -
          Specified by:
          -
          entrySet in class AbstractMap
          -
          Returns:
          -
          a collection view of the mappings contained in this map.
          -
          See Also:
          -
          Map.Entry
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/ModelCache.html b/fmpp/docs/freemarker/api/freemarker/ext/util/ModelCache.html deleted file mode 100644 index bf4e2f7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/ModelCache.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - -ModelCache (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.util
    -

    Class ModelCache

    -
    -
    - -
    -
      -
    • -
      -
      Direct Known Subclasses:
      -
      BeansModelCache
      -
      -
      -
      -
      public abstract class ModelCache
      -extends Object
      -
      Internally used by various wrapper implementations to implement model - caching.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          ModelCache

          -
          protected ModelCache()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          setUseCache

          -
          public void setUseCache(boolean useCache)
          -
          Sets whether this wrapper caches model instances. Default is false. - When set to true, calling getInstance(Object) - multiple times for the same object will return the same model.
          -
        • -
        - - - -
          -
        • -

          getUseCache

          -
          public boolean getUseCache()
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          isCacheable

          -
          protected abstract boolean isCacheable(Object object)
          -
        • -
        - - - -
          -
        • -

          clearCache

          -
          public void clearCache()
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/ModelFactory.html b/fmpp/docs/freemarker/api/freemarker/ext/util/ModelFactory.html deleted file mode 100644 index faf4c8f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/ModelFactory.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -ModelFactory (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.util
    -

    Interface ModelFactory

    -
    -
    -
    -
      -
    • -
      -
      -
      public interface ModelFactory
      -
      Interface used to create various wrapper models in the ModelCache.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          create

          -
          TemplateModel create(Object object,
          -                     ObjectWrapper wrapper)
          -
          Create a wrapping model for the specified object that belongs to - the specified wrapper.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/WrapperTemplateModel.html b/fmpp/docs/freemarker/api/freemarker/ext/util/WrapperTemplateModel.html deleted file mode 100644 index 4ea9b74..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/WrapperTemplateModel.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - -WrapperTemplateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.util
    -

    Interface WrapperTemplateModel

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getWrappedObject

          -
          Object getWrappedObject()
          -
          Retrieves the original object wrapped by this model.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/IdentityHashMap.html b/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/IdentityHashMap.html deleted file mode 100644 index e789463..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/IdentityHashMap.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.util.IdentityHashMap (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.util.IdentityHashMap

    -
    -
    No usage of freemarker.ext.util.IdentityHashMap
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/ModelCache.html b/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/ModelCache.html deleted file mode 100644 index b769eac..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/ModelCache.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.util.ModelCache (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.util.ModelCache

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/ModelFactory.html b/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/ModelFactory.html deleted file mode 100644 index 40e438b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/ModelFactory.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -Uses of Interface freemarker.ext.util.ModelFactory (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.ext.util.ModelFactory

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/WrapperTemplateModel.html b/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/WrapperTemplateModel.html deleted file mode 100644 index 8687ca1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/class-use/WrapperTemplateModel.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - -Uses of Interface freemarker.ext.util.WrapperTemplateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.ext.util.WrapperTemplateModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/util/package-frame.html deleted file mode 100644 index eefb4b1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/package-frame.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -freemarker.ext.util (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.util

    -
    -

    Interfaces

    - -

    Classes

    - -
    - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/util/package-summary.html deleted file mode 100644 index 6437785..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/package-summary.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - -freemarker.ext.util (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.util

    -
    -
    Various classes used by freemarker.ext but might be useful outside it too.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - - - - - -
      Interface Summary 
      InterfaceDescription
      ModelFactory -
      Interface used to create various wrapper models in the ModelCache.
      -
      WrapperTemplateModel -
      A generic interface for template models that wrap some underlying - object, and wish to provide access to that wrapped object.
      -
      -
    • -
    • - - - - - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      IdentityHashMap -
      A variant of HashMap that uses - System.identityHashCode(Object) for hashing, and reference comparison - instead of Object.equals(Object).
      -
      ModelCache -
      Internally used by various wrapper implementations to implement model - caching.
      -
      -
    • -
    - - - -

    Package freemarker.ext.util Description

    -

    Various classes used by freemarker.ext but might be useful outside it too.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/util/package-tree.html deleted file mode 100644 index dad6dea..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/package-tree.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -freemarker.ext.util Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.util

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/util/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/util/package-use.html deleted file mode 100644 index abc0e1b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/util/package-use.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.util (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.util

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/xml/NodeListModel.html b/fmpp/docs/freemarker/api/freemarker/ext/xml/NodeListModel.html deleted file mode 100644 index 5b71652..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/xml/NodeListModel.html +++ /dev/null @@ -1,849 +0,0 @@ - - - - - - -NodeListModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.ext.xml
    -

    Class NodeListModel

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateHashModel, TemplateMethodModel, TemplateModel, TemplateNodeModel, TemplateScalarModel, TemplateSequenceModel
      -
      -
      -
      Deprecated.  -
      Use NodeModel instead.
      -
      -
      -
      public class NodeListModel
      -extends Object
      -implements TemplateHashModel, TemplateMethodModel, TemplateScalarModel, TemplateSequenceModel, TemplateNodeModel
      -

      A data model adapter for three widespread XML document object model - representations: W3C DOM, dom4j, and JDOM. The adapter automatically - recognizes the used XML object model and provides a unified interface for it - toward the template. The model provides access to all XML InfoSet features - of the XML document and includes XPath support if it has access to the XPath- - evaluator library Jaxen. The model's philosophy (which closely follows that - of XML InfoSet and XPath) is as follows: it always wraps a list of XML nodes - (the "nodelist"). The list can be empty, can have a single element, or can - have multiple elements. Every operation applied to the model is applied to - all nodes in its nodelist. You usually start with a single- element nodelist, - usually the root element node or the document node of the XML tree. - Additionally, the nodes can contain String objects as a result of certain - evaluations (getting the names of elements, values of attributes, etc.)

      -

      Implementation note: If you are using W3C DOM documents - built by the Crimson XML parser (or you are using the built-in JDK 1.4 XML - parser, which is essentially Crimson), make sure you call - setNamespaceAware(true) on the - javax.xml.parsers.DocumentBuilderFactory instance used for document - building even when your documents don't use XML namespaces. Failing to do so, - you will experience incorrect behavior when using the documents wrapped with - this model.

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NodeListModel

          -
          public NodeListModel(Object nodes)
          -
          Deprecated. 
          -
          Creates a new NodeListModel, wrapping the passed nodes.
          -
          -
          Parameters:
          -
          nodes - you can pass it a single XML node from any supported - document model, or a Java collection containing any number of nodes. - Passing null is prohibited. To create an empty model, pass it an empty - collection. If a collection is passed, all passed nodes must belong to - the same XML object model, i.e. you can't mix JDOM and dom4j in a single - instance of NodeListModel. The model itself doesn't check for this condition, - as it can be time consuming, but will throw spurious - ClassCastExceptions when it encounters mixed objects.
          -
          Throws:
          -
          IllegalArgumentException - if you pass null
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - - - - - - - - - -
          -
        • -

          getAsString

          -
          public String getAsString()
          -                   throws TemplateModelException
          -
          Deprecated. 
          -
          Returns the string representation of the wrapped nodes. String objects in - the nodelist are rendered as-is (with no XML escaping applied). All other - nodes are rendered in the default XML serialization format ("plain XML"). - This makes the model quite suited for use as an XML-transformation tool.
          -
          -
          Specified by:
          -
          getAsString in interface TemplateScalarModel
          -
          Returns:
          -
          the string representation of the wrapped nodes. String objects - in the nodelist are rendered as-is (with no XML escaping applied). All - other nodes are rendered in the default XML serialization format ("plain - XML").
          -
          Throws:
          -
          TemplateModelException
          -
          See Also:
          -
          TemplateScalarModel.getAsString()
          -
          -
        • -
        - - - -
          -
        • -

          get

          -
          public TemplateModel get(int index)
          -
          Deprecated. 
          -
          Selects a single node from this model's nodelist by its list index and - returns a new NodeListModel containing that single node.
          -
          -
          Specified by:
          -
          get in interface TemplateSequenceModel
          -
          Parameters:
          -
          index - the ordinal number of the selected node
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          See Also:
          -
          TemplateSequenceModel.get(int)
          -
          -
        • -
        - - - -
          -
        • -

          get

          -
          public TemplateModel get(String key)
          -                  throws TemplateModelException
          -
          Deprecated. 
          -
          Returns a new NodeListModel containing the nodes that result from applying - an operator to this model's nodes.
          -
          -
          Specified by:
          -
          get in interface TemplateHashModel
          -
          Parameters:
          -
          key - the operator to apply to nodes. Available operators are: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          Key nameEvaluates to
          * or _childrenall direct element children of current nodes (non-recursive). - Applicable to element and document nodes.
          @* or _attributesall attributes of current nodes. Applicable to elements only. -
          @attributeNamenamed attributes of current nodes. Applicable to elements, - doctypes and processing instructions. On doctypes it supports - attributes publicId, systemId and - elementName. On processing instructions, it supports - attributes target and data, as well as any - other attribute name specified in data as - name="value" pair on dom4j or JDOM models. - The attribute nodes for doctype and processing instruction are - synthetic, and as such have no parent. Note, however that - @* does NOT operate on doctypes or processing - instructions.
          _ancestorall ancestors up to root element (recursive) of current nodes. - Applicable to same node types as _parent.
          _ancestorOrSelfall ancestors of current nodes plus current nodes. Applicable - to same node types as _parent.
          _cnamethe canonical names of current nodes (namespace URI + local - name), one string per node (non-recursive). Applicable to - elements and attributes
          _contentthe complete content of current nodes, including children - elements, text, entity references, and processing instructions - (non-recursive). Applicable to elements and documents.
          _descendantall recursive descendant element children of current nodes. - Applicable to document and element nodes.
          _descendantOrSelfall recursive descendant element children of current nodes - plus current nodes. Applicable to document and element nodes. -
          _documentall documents the current nodes belong to. Applicable to all - nodes except text.
          _doctypedoctypes of the current nodes. Applicable to document nodes - only.
          _filterTypeis a filter-by-type template method model. When called, it - will yield a node list that contains only those current nodes - whose type matches one of types passed as argument. You can pass - as many string arguments as you want, each representing one of - the types to select: "attribute", "cdata", - "comment", "document", - "documentType", "element", - "entity", "entityReference", - "namespace", "processingInstruction", or - "text".
          _namethe names of current nodes, one string per node - (non-recursive). Applicable to elements and attributes - (returns their local names), entity references, processing - instructions (returns its target), doctypes (returns its public - ID)
          _nsprefixthe namespace prefixes of current nodes, one string per node - (non-recursive). Applicable to elements and attributes
          _nsurithe namespace URIs of current nodes, one string per node - (non-recursive). Applicable to elements and attributes
          _parentparent elements of current nodes. Applicable to element, - attribute, comment, entity, processing instruction.
          _qnamethe qualified names of current nodes in - [namespacePrefix:]localName form, one string per node - (non-recursive). Applicable to elements and attributes
          _registerNamespace(prefix, uri)register a XML namespace with the specified prefix and URI for - the current node list and all node lists that are derived from - the current node list. After registering, you can use the - nodelist["prefix:localname"] or - nodelist["@prefix:localname"] syntaxes to - reach elements and attributes whose names are namespace-scoped. - Note that the namespace prefix need not match the actual prefix - used by the XML document itself since namespaces are compared - solely by their URI.
          _textthe text of current nodes, one string per node - (non-recursive). Applicable to elements, attributes, comments, - processing instructions (returns its data) and CDATA sections. - The reserved XML characters ('<' and '&') are NOT - escaped.
          _typeReturns a string describing the type of nodes, one - string per node. The returned values are "attribute", - "cdata", "comment", "document", - "documentType", "element", - "entity", "entityReference", - "namespace", "processingInstruction", - "text", or "unknown".
          _uniquea copy of the current nodes that keeps only the first - occurrence of every node, eliminating duplicates. Duplicates can - occur in the node list by applying uptree-traversals - _parent, _ancestor, _ancestorOrSelf, - and _document on a node list with multiple elements. - I.e. foo._children._parent will return a node list that - has duplicates of nodes in foo - each node will have the number - of occurrences equal to the number of its children. In these - cases, use foo._children._parent._unique to eliminate - duplicates. Applicable to all node types.
          any other keyelement children of current nodes with name matching the key. - This allows for convenience child traversal in - book.chapter.title style syntax. Applicable to document - and element nodes.
          -
          Returns:
          -
          a new NodeListModel containing the nodes that result from applying - the operator to this model's nodes.
          -
          Throws:
          -
          TemplateModelException
          -
          See Also:
          -
          TemplateHashModel.get(String)
          -
          -
        • -
        - - - - - - - -
          -
        • -

          registerNamespace

          -
          public void registerNamespace(String prefix,
          -                              String uri)
          -
          Deprecated. 
          -
          Registers a namespace prefix-URI pair for subsequent use in get(String) as well as for use in XPath expressions.
          -
          -
          Parameters:
          -
          prefix - the namespace prefix to use for the namespace
          -
          uri - the namespace URI that identifies the namespace.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getNodeName

          -
          public String getNodeName()
          -                   throws TemplateModelException
          -
          Deprecated. 
          -
          -
          Specified by:
          -
          getNodeName in interface TemplateNodeModel
          -
          Returns:
          -
          a String that is used to determine the processing - routine to use. In the XML implementation, if the node - is an element, it returns the element's tag name. If it - is an attribute, it returns the attribute's name. It - returns "@text" for text nodes, "@pi" for processing instructions, - and so on.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          getNodeNamespace

          -
          public String getNodeNamespace()
          -                        throws TemplateModelException
          -
          Deprecated. 
          -
          -
          Specified by:
          -
          getNodeNamespace in interface TemplateNodeModel
          -
          Returns:
          -
          the XML namespace URI with which this node is - associated. If this TemplateNodeModel implementation is - not XML-related, it will almost certainly be null. Even - for XML nodes, this will often be null.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          getNodeType

          -
          public String getNodeType()
          -                   throws TemplateModelException
          -
          Deprecated. 
          -
          -
          Specified by:
          -
          getNodeType in interface TemplateNodeModel
          -
          Returns:
          -
          a String describing the type of node this is. - In the W3C DOM, this should be "element", "text", "attribute", etc. - A TemplateNodeModel implementation that models other kinds of - trees could return whatever it appropriate for that application. It - can be null, if you don't want to use node-types.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/xml/class-use/NodeListModel.html b/fmpp/docs/freemarker/api/freemarker/ext/xml/class-use/NodeListModel.html deleted file mode 100644 index 65760b6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/xml/class-use/NodeListModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.ext.xml.NodeListModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.ext.xml.NodeListModel

    -
    -
    No usage of freemarker.ext.xml.NodeListModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/xml/package-frame.html b/fmpp/docs/freemarker/api/freemarker/ext/xml/package-frame.html deleted file mode 100644 index d5187e1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/xml/package-frame.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - -freemarker.ext.xml (FreeMarker 2.3.21 API) - - - - - -

    freemarker.ext.xml

    -
    -

    Classes

    - -
    - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/xml/package-summary.html b/fmpp/docs/freemarker/api/freemarker/ext/xml/package-summary.html deleted file mode 100644 index ca18160..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/xml/package-summary.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - -freemarker.ext.xml (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.ext.xml

    -
    -
    Deprecated, use W3C DOM with freemarker.ext.dom instead; -Exposes XML from DOM, dom4j or JDOM nodes, uniformly.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      NodeListModelDeprecated -
      Use NodeModel instead.
      -
      -
    • -
    - - - -

    Package freemarker.ext.xml Description

    -

    Deprecated, use W3C DOM with freemarker.ext.dom instead; -Exposes XML from DOM, dom4j or JDOM nodes, uniformly.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/xml/package-tree.html b/fmpp/docs/freemarker/api/freemarker/ext/xml/package-tree.html deleted file mode 100644 index f72e7d9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/xml/package-tree.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -freemarker.ext.xml Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.ext.xml

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/ext/xml/package-use.html b/fmpp/docs/freemarker/api/freemarker/ext/xml/package-use.html deleted file mode 100644 index 78ba766..0000000 --- a/fmpp/docs/freemarker/api/freemarker/ext/xml/package-use.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Package freemarker.ext.xml (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.ext.xml

    -
    -
    No usage of freemarker.ext.xml
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/log/Logger.html b/fmpp/docs/freemarker/api/freemarker/log/Logger.html deleted file mode 100644 index c1e0b00..0000000 --- a/fmpp/docs/freemarker/api/freemarker/log/Logger.html +++ /dev/null @@ -1,739 +0,0 @@ - - - - - - -Logger (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.log
    -

    Class Logger

    -
    -
    - -
    -
      -
    • -
      -
      -
      public abstract class Logger
      -extends Object
      -
      The FreeMarker logging facility. This is a polymorphic implementation - that will use whatever logging package it can find on the system: - Apache Log4J, Apache Avalon LogKit, java.util.logging (in this - order). If it fails to find any of the above, logging will be suppressed - and a short notice will be printed to System.err. - -

      You can use the selectLoggerLibrary(int) static method to force - use of a specific logger package, or to turn off logging. - -

      SLF4J or Apache Commons Logging are supported (since FreeMarker 2.3.17) - and recommended, but are never selected automatically (until FreeMarker 2.4) - due to backward compatibility constraints; you have to select them - explicitly with selectLoggerLibrary(int).

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          Logger

          -
          public Logger()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          selectLoggerLibrary

          -
          public static void selectLoggerLibrary(int library)
          -                                throws ClassNotFoundException
          -
          Selects the logger library to use. - If you want to change the default setting, do it early in application - initialization phase, before calling any other FreeMarker API since once - various parts of the FreeMarker library bind to the logging subsystem, - the change in this value will have no effect on them.
          -
          -
          Parameters:
          -
          library - one of LIBRARY_XXX constants. By default, - LIBRARY_AUTO is used.
          -
          Throws:
          -
          ClassNotFoundException - if an explicit logging library is asked for - (that is, neither NONE, nor AUTO), and it's not found in the classpath.
          -
          -
        • -
        - - - -
          -
        • -

          setCategoryPrefix

          -
          public static void setCategoryPrefix(String prefix)
          -
          Sets a category prefix. This prefix is prepended to any logger category - name. This makes it possible to have different FreeMarker logger categories - on a per-application basis (better said, per-classloader basis). By default - the category prefix is the empty string. If you set a non-empty category - prefix, be sure to include the trailing separator dot (i.e. "MyApp.") - If you want to change the default setting, do it early in application - initialization phase, before calling any other FreeMarker API since once - various parts of the FreeMarker library bind to the logging subsystem, - the change in this value will have no effect on them.
          -
        • -
        - - - -
          -
        • -

          debug

          -
          public abstract void debug(String message)
          -
          Logs a debugging message.
          -
        • -
        - - - -
          -
        • -

          debug

          -
          public abstract void debug(String message,
          -                           Throwable t)
          -
          Logs a debugging message with accompanying throwable.
          -
        • -
        - - - -
          -
        • -

          info

          -
          public abstract void info(String message)
          -
          Logs an informational message.
          -
        • -
        - - - -
          -
        • -

          info

          -
          public abstract void info(String message,
          -                          Throwable t)
          -
          Logs an informational message with accompanying throwable.
          -
        • -
        - - - -
          -
        • -

          warn

          -
          public abstract void warn(String message)
          -
          Logs a warning message.
          -
        • -
        - - - -
          -
        • -

          warn

          -
          public abstract void warn(String message,
          -                          Throwable t)
          -
          Logs a warning message with accompanying throwable.
          -
        • -
        - - - -
          -
        • -

          error

          -
          public abstract void error(String message)
          -
          Logs an error message.
          -
        • -
        - - - -
          -
        • -

          error

          -
          public abstract void error(String message,
          -                           Throwable t)
          -
          Logs an error message with accompanying throwable.
          -
        • -
        - - - -
          -
        • -

          isDebugEnabled

          -
          public abstract boolean isDebugEnabled()
          -
          Returns true if this logger will log debug messages.
          -
        • -
        - - - -
          -
        • -

          isInfoEnabled

          -
          public abstract boolean isInfoEnabled()
          -
          Returns true if this logger will log informational messages.
          -
        • -
        - - - -
          -
        • -

          isWarnEnabled

          -
          public abstract boolean isWarnEnabled()
          -
          Returns true if this logger will log warning messages.
          -
        • -
        - - - -
          -
        • -

          isErrorEnabled

          -
          public abstract boolean isErrorEnabled()
          -
          Returns true if this logger will log error messages.
          -
        • -
        - - - -
          -
        • -

          isFatalEnabled

          -
          public abstract boolean isFatalEnabled()
          -
          Returns true if this logger will log fatal error messages.
          -
        • -
        - - - -
          -
        • -

          getLogger

          -
          public static Logger getLogger(String category)
          -
          Returns a logger for the specified category.
          -
          -
          Parameters:
          -
          category - a dot separated hierarchical category name. If a category - prefix is in effect, it's prepended to the category name.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/log/class-use/Logger.html b/fmpp/docs/freemarker/api/freemarker/log/class-use/Logger.html deleted file mode 100644 index 0ae3eec..0000000 --- a/fmpp/docs/freemarker/api/freemarker/log/class-use/Logger.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -Uses of Class freemarker.log.Logger (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.log.Logger

    -
    -
    -
      -
    • - - - - - - - - - - - - -
      Packages that use Logger 
      PackageDescription
      freemarker.log -
      -Logging facility; dispatches FreeMarker log messages to the chosen logger library.
      -
      -
    • -
    • - -
    • -
    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/log/package-frame.html b/fmpp/docs/freemarker/api/freemarker/log/package-frame.html deleted file mode 100644 index 7493dc4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/log/package-frame.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - -freemarker.log (FreeMarker 2.3.21 API) - - - - - -

    freemarker.log

    -
    -

    Classes

    - -
    - - diff --git a/fmpp/docs/freemarker/api/freemarker/log/package-summary.html b/fmpp/docs/freemarker/api/freemarker/log/package-summary.html deleted file mode 100644 index 4180b48..0000000 --- a/fmpp/docs/freemarker/api/freemarker/log/package-summary.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - -freemarker.log (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.log

    -
    -
    -Logging facility; dispatches FreeMarker log messages to the chosen logger library.
    -
    -

    See: Description

    -
    -
    -
      -
    • - - - - - - - - - - - - -
      Class Summary 
      ClassDescription
      Logger -
      The FreeMarker logging facility.
      -
      -
    • -
    - - - -

    Package freemarker.log Description

    -

    -Logging facility; dispatches FreeMarker log messages to the chosen logger library.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/log/package-tree.html b/fmpp/docs/freemarker/api/freemarker/log/package-tree.html deleted file mode 100644 index d7d750e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/log/package-tree.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - -freemarker.log Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.log

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/log/package-use.html b/fmpp/docs/freemarker/api/freemarker/log/package-use.html deleted file mode 100644 index ce34854..0000000 --- a/fmpp/docs/freemarker/api/freemarker/log/package-use.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - -Uses of Package freemarker.log (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.log

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/AdapterTemplateModel.html b/fmpp/docs/freemarker/api/freemarker/template/AdapterTemplateModel.html deleted file mode 100644 index 775da27..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/AdapterTemplateModel.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - -AdapterTemplateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface AdapterTemplateModel

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getAdaptedObject

          -
          Object getAdaptedObject(Class hint)
          -
          Retrieves the underlying object, or some other object semantically - equivalent to its value narrowed by the class hint.
          -
          -
          Parameters:
          -
          hint - the desired class of the returned value. An implementation - should make reasonable effort to retrieve an object of the requested - class, but if that is impossible, it must at least return the underlying - object as-is. As a minimal requirement, an implementation must always - return the exact underlying object when - hint.isInstance(underlyingObject) holds. When called - with java.lang.Object.class, it should return a generic Java - object (i.e. if the model is wrapping a scripting language object that is - further wrapping a Java object, the deepest underlying Java object should - be returned).
          -
          Returns:
          -
          the underlying object, or its value accommodated for the hint - class.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/Configuration.html b/fmpp/docs/freemarker/api/freemarker/template/Configuration.html deleted file mode 100644 index 42e9281..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/Configuration.html +++ /dev/null @@ -1,2812 +0,0 @@ - - - - - - -Configuration (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class Configuration

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Cloneable
      -
      -
      -
      -
      public class Configuration
      -extends Configurable
      -implements Cloneable
      -
      The main entry point into the FreeMarker API; encapsulates the configuration settings of FreeMarker, - also serves as a central template-loading and caching service. - -

      This class is meant to be used in a singleton pattern. That is, you create an instance of this at the beginning of - the application life-cycle, set its configuration settings there (either with the - setter methods like setTemplateLoader(TemplateLoader) or by loading a .properties file), and then - use that single instance everywhere in your application. Frequently re-creating Configuration is a typical - and grave mistake from performance standpoint, as the Configuration holds the template cache, and often also - the class introspection cache, which then will be lost. (Note that, naturally, having multiple long-lived instances, - like one per component that internally uses FreeMarker is fine.) - -

      The basic usage pattern is like: - -

      -  // Where the application is initialized; in general you do this ONLY ONCE in the application life-cycle!
      -  Configuration cfg = new Configuration(VERSION_X_Y_Z));
      -  // Where X, Y, Z enables the not-100%-backward-compatible fixes introduced in
      -  // FreeMarker version X.Y.Z  and earlier (see Configuration(Version)).
      -  cfg.setSomeSetting(...);
      -  cfg.setOtherSetting(...);
      -  ...
      -  
      -  // Later, whenever the application needs a template (so you may do this a lot, and from multiple threads):
      -  Template myTemplate = cfg.getTemplate("myTemplate.html");
      -  myTemplate.process(dataModel, out);
      - -

      A couple of settings that you should not leave on its default value are: -

      - -

      A Configuration object is thread-safe only after you have stopped modifying the configuration settings, - and you have safely published it (see JSR 133 and related literature) to other threads. Generally, you set - everything directly after you have instantiated the Configuration object, then you don't change the settings - anymore, so then it's safe to make it accessible (again, via a "safe publication" technique) from multiple threads. - The methods that aren't for modifying settings, like getTemplate(String), are thread-safe.

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - - - - - -
          -
        • -

          Configuration

          -
          public Configuration(Version incompatibleImprovements)
          -
          Creates a new instance and sets which of the non-backward-compatible bugfixes/improvements should be enabled. - Note that the specified versions corresponds to the incompatible_improvements configuration setting, and - can be changed later, with setIncompatibleImprovements(Version) for example. - -

          About the "incompatible improvements" setting - -

          The setting value is the FreeMarker version number where the bugfixes/improvements to enable were already - implemented (but possibly wasn't active by default, as that would break backward-compatibility). - -

          The default value is 2.3.0 for maximum backward-compatibility when upgrading freemkarer.jar under an - existing application. For actively developed applications usually you should set this to the highest possible - value where the 1st or 2nd version is still the same as in the version where you have started development. - As far as the 1st and 2nd version number remains, these changes are always very low-risk, so usually they don't - break anything. Of course, you are still encouraged to read the list of changes below. - -

          Note that at FreeMarker minor (2nd) or major (1st) version number increments, it's possible that emulating - some of the old bugs will become unsupported, that is, even if you set this setting to a low value, it silently - wont bring back the old behavior anymore. - -

          This setting doesn't affect important not-fully-backward compatible security fixes; they are always enabled, - regardless of what you set here. - -

          Currently the effects of this setting are: -

            -
          • - 2.3.0: This is the lowest supported value, the version used in older projects. This is the default in the - FreeMarker 2.3.x series. -

          • -
          • - 2.3.19 (or higher): Bug fix: Wrong # tags were printed as static text instead of - causing parsing error when there was no correct # or @ tag earlier in the - same template. -

          • -
          • - 2.3.20 (or higher): ?html will escape apostrophe-quotes just like ?xhtml does. Utilizing - this is highly recommended, because otherwise if interpolations are used inside attribute values that use - apostrophe-quotation (<foo bar='${val}'>) instead of plain quotation mark - (<foo bar="${val}">), they might produce HTML/XML that's not well-formed. Note that - ?html didn't do this because long ago there was no cross-browser way of doing this, but it's not a - concern anymore. -

          • -
          • - 2.3.21 (or higher): -

              -
            • - The default of the object_wrapper setting (Configurable.getObjectWrapper()) changes from - ObjectWrapper.DEFAULT_WRAPPER to another almost identical DefaultObjectWrapper singleton, - returned by DefaultObjectWrapperBuilder.build(). The new default object wrapper's - "incompatible improvements" version is set to the same as of the Configuration. - See BeansWrapper.BeansWrapper(Version) for further details. Furthermore, the new default - object wrapper doesn't allow changing its settings; setter methods throw IllegalStateException). - (If anything tries to call setters on the old default in your application, that's a dangerous bug that - won't remain hidden now. As the old default is a singleton too, potentially shared by independently - developed components, most of them expects the out-of-the-box behavior from it (and the others are - necessarily buggy). Also, then concurrency glitches can occur (and even pollute the class introspection - cache) because the singleton is modified after publishing to other threads.) - Furthermore the new default object wrapper shares class introspection cache with other - BeansWrapper-s created with BeansWrapperBuilder, which has an impact as - BeansWrapper.clearClassIntrospecitonCache() will be disallowed; see more about it there. -

            • -
            • - The ?iso_... built-ins won't show the time zone offset for Time values anymore, - because most databases store time values that aren't in any time zone, but just store hour, minute, - second, and decimal second field values. If you still want to show the offset (like for PostgreSQL - "time with time zone" columns you should), you can force showing the time zone offset by using - myTime?string.iso_fz (and its other variants). -

            • -
            • ?is_enumerable correctly returns false for Java methods get from Java objects that - are wrapped with BeansWrapper and its subclasses, like DefaultObjectWrapper. Although - method values implement TemplateSequenceModel (because of a historical design quirk in - BeansWrapper), trying to #list them will cause error, hence they aren't enumerable. -

            • -
            • - ?c will return "INF", "-INF" and "NaN" for positive/negative infinity - and IEEE floating point Not-a-Number, respectively. These are the XML Schema compatible representations - of these special values. Earlier it has returned what DecimalFormat did with US locale, none of - which was understood by any (common) computer language. -

            • -
            • - FTL hash literals that repeat keys now only have the key once with ?keys, and only has the last - value associated to that key with ?values. This is consistent with the behavior of - hash[key] and how maps work in Java. -

            • -
            • In most cases (where FreeMarker is able to do that), for TemplateLoader-s that use - URLConnection, URLConnection#setUseCaches(boolean) will called with false, - so that only FreeMarker will do caching, not the URL scheme's handler. - See URLTemplateLoader.setURLConnectionUsesCaches(Boolean) for more details. -

            • -
            • - The default of the template_loader setting (getTemplateLoader()) changes - to null, which means that FreeMarker will not find any templates. Earlier - the default was a FileTemplateLoader that used the current directory as the root. This was - dangerous and fragile as you usually don't have good control over what the current directory will be. - Luckily, the old default almost never looked for the templates at the right place - anyway, so pretty much all applications had to set the template_loader setting, so it's unlikely - that changing the default breaks your application. -

            • -
            • - Right-unlimited ranges become readable (like listable), so <#list 1.. as i>...</#list> works. - Earlier they were only usable for slicing (like hits[10..]). -

            • -
            • - Empty ranges return Constants.EMPTY_SEQUENCE instead of an empty SimpleSequence. This - is in theory backward compatible, as the API only promises to give something that implements - TemplateSequenceModel. -

            • -
            • - Unclosed comments (<#-- ...) and #noparse-s won't be silently closed at the end of - template anymore, but cause a parsing error instead. -

            • -
            -
          • -
          -
          -
          Throws:
          -
          IllegalArgumentException - if incompatibleImmprovements is greater than the current FreeMarker - version, or less than 2.3.0.
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - - - - - -
          -
        • -

          loadBuiltInEncodingMap

          -
          public void loadBuiltInEncodingMap()
          -
          Loads a preset language-to-encoding map, similarly as if you have called - clearEncodingMap() and then did multiple setEncoding(Locale, String) calls. - It assumes the usual character encodings for most languages. - The previous content of the encoding map will be lost. - This default map currently contains the following mappings: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          arISO-8859-6
          beISO-8859-5
          bgISO-8859-5
          caISO-8859-1
          csISO-8859-2
          daISO-8859-1
          deISO-8859-1
          elISO-8859-7
          enISO-8859-1
          esISO-8859-1
          etISO-8859-1
          fiISO-8859-1
          frISO-8859-1
          hrISO-8859-2
          huISO-8859-2
          isISO-8859-1
          itISO-8859-1
          iwISO-8859-8
          jaShift_JIS
          koEUC-KR
          ltISO-8859-2
          lvISO-8859-2
          mkISO-8859-5
          nlISO-8859-1
          noISO-8859-1
          plISO-8859-2
          ptISO-8859-1
          roISO-8859-2
          ruISO-8859-5
          shISO-8859-5
          skISO-8859-2
          slISO-8859-2
          sqISO-8859-2
          srISO-8859-5
          svISO-8859-1
          trISO-8859-9
          ukISO-8859-5
          zhGB2312
          zh_TWBig5
          -
          -
          See Also:
          -
          clearEncodingMap(), -setEncoding(Locale, String), -setDefaultEncoding(String)
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getDefaultConfiguration

          -
          public static Configuration getDefaultConfiguration()
          -
          Deprecated. The usage of the static singleton (the "default") - Configuration instance can easily cause erroneous, unpredictable - behavior. This is because multiple independent software components may use - FreeMarker internally inside the same application, so they will interfere - because of the common Configuration instance. Each such component - should use its own private Configuration object instead, that it - typically creates with new Configuration() when the component - is initialized.
          -
          Returns the default (singleton) Configuration object. Note that you can - create as many separate configurations as you wish; this global instance - is provided for convenience, or when you have no reason to use a separate - instance.
          -
        • -
        - - - -
          -
        • -

          setDefaultConfiguration

          -
          public static void setDefaultConfiguration(Configuration config)
          -
          Deprecated. Using the "default" Configuration instance can - easily lead to erroneous, unpredictable behaviour. - See more here....
          -
          Sets the Configuration object that will be retrieved from future calls - to getDefaultConfiguration().
          -
        • -
        - - - -
          -
        • -

          setTemplateLoader

          -
          public void setTemplateLoader(TemplateLoader templateLoader)
          -
          Sets a TemplateLoader that is used to look up and load templates; - as a side effect the template cache will be emptied. - By providing your own TemplateLoader implementation, you can load templates from whatever kind of - storages, like from relational databases, NoSQL-storages, etc. - -

          Convenience methods exists to install commonly used loaders, instead of using this method: - setClassForTemplateLoading(Class, String), - setDirectoryForTemplateLoading(File), and - setServletContextForTemplateLoading(Object, String). - -

          You can chain several TemplateLoader-s together with MultiTemplateLoader. - -

          Default value: You should always set the template loader instead of relying on the default value. - (But if you still care what it is, before "incompatible improvements" 2.3.21 it's a FileTemplateLoader - that uses the current directory as its root; as it's hard tell what that directory will be, it's not very useful - and dangerous. Starting with "incompatible improvements" 2.3.21 the default is null.) - -

          Note that setting the template loader will re-create the template cache, so - all its content will be lost.

          -
        • -
        - - - - - - - -
          -
        • -

          setCacheStorage

          -
          public void setCacheStorage(CacheStorage storage)
          -
          Sets the CacheStorage used for caching Template-s; - the earlier content of the template cache will be dropt. - - The default is a SoftCacheStorage. If the total size of the Template - objects is significant but most templates are used rarely, using a - MruCacheStorage instead might be advisable. If you don't want caching at - all, use NullCacheStorage (you can't use null). - -

          Note that setting the cache storage will re-create the template cache, so - all its content will be lost.

          -
        • -
        - - - - - - - - - - - -
          -
        • -

          setServletContextForTemplateLoading

          -
          public void setServletContextForTemplateLoading(Object servletContext,
          -                                                String path)
          -
          Sets the servlet context from which to load templates. - This is equivalent to setTemplateLoader(new WebappTemplateLoader(sctxt, path)) - or setTemplateLoader(new WebappTemplateLoader(sctxt)) if path was - null, so see WebappTemplateLoader for more details.
          -
          -
          Parameters:
          -
          servletContext - the ServletContext object. (The declared type is Object - to prevent class loading error when using FreeMarker in an environment where - there's no servlet classes available.)
          -
          path - the path relative to the ServletContext.
          -
          See Also:
          -
          setTemplateLoader(TemplateLoader)
          -
          -
        • -
        - - - - - - - -
          -
        • -

          setTemplateUpdateDelay

          -
          public void setTemplateUpdateDelay(int seconds)
          -
          Sets the time in seconds that must elapse before checking whether there is a newer version of a template file - than the cached one. - -

          Historical note: Despite what the API documentation said earlier, this method is not thread-safe. - While it works well on most hardware, it's not guaranteed that FreeMarker will see the update in all threads, - and theoretically it's also possible that it will see a value that's a binary mixture of the new and the old one.

          -
        • -
        - - - -
          -
        • -

          setStrictSyntaxMode

          -
          public void setStrictSyntaxMode(boolean b)
          -
          Deprecated. Only true (the default) value will be supported sometimes in the future.
          -
          Sets whether directives such as if, else, etc must be written as #if, #else, etc. - Defaults to true. - -

          When this is true, - any tag not starting with <# or </# or <@ or </@ is considered as plain text - and will go to the output as is. Tag starting with <# or </# must - be valid FTL tag, or else the template is invalid (i.e. <#noSuchDirective> - is an error).

          -
        • -
        - - - - - - - - - - - -
          -
        • -

          setIncompatibleImprovements

          -
          public void setIncompatibleImprovements(Version incompatibleImprovements)
          -
          Use Configuration(Version) instead if possible; see the meaning of the parameter there. - If the default value of a setting depends on the incompatibleImprovements and the value of that setting - was never set in this Configuration object through the public API, its value will be set to the default - value appropriate for the new incompatibleImprovements. (This adjustment of a setting value doesn't - count as setting that setting, so setting incompatibleImprovements for multiple times also works as - expected.) Note that if the template_loader have to be changed because of this, the template cache will - be emptied.
          -
          -
          Throws:
          -
          IllegalArgumentException - if incompatibleImmprovements is greater than the current FreeMarker - version, or less than 2.3.0, or null.
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          getParsedIncompatibleEnhancements

          -
          public int getParsedIncompatibleEnhancements()
          -
          Deprecated. Use getIncompatibleImprovements() instead.
          -
        • -
        - - - -
          -
        • -

          setWhitespaceStripping

          -
          public void setWhitespaceStripping(boolean b)
          -
          Sets whether the FTL parser will try to remove - superfluous white-space around certain FTL tags.
          -
        • -
        - - - -
          -
        • -

          getWhitespaceStripping

          -
          public boolean getWhitespaceStripping()
          -
          Gets whether the FTL parser will try to remove - superfluous white-space around certain FTL tags.
          -
          -
          See Also:
          -
          setWhitespaceStripping(boolean)
          -
          -
        • -
        - - - -
          -
        • -

          setTagSyntax

          -
          public void setTagSyntax(int tagSyntax)
          -
          Determines the syntax of the template files (angle bracket VS square bracket) - that has no #ftl in it. The tagSyntax - parameter must be one of: - - -

          In FreeMarker 2.3.x ANGLE_BRACKET_TAG_SYNTAX is the - default for better backward compatibility. Starting from 2.4.x AUTO_DETECT_TAG_SYNTAX is the default, so it's recommended to use - that even for 2.3.x. - -

          This setting is ignored for the templates that have ftl directive in - it. For those templates the syntax used for the ftl directive determines - the syntax.

          -
        • -
        - - - -
          -
        • -

          getTagSyntax

          -
          public int getTagSyntax()
          -
          The getter pair of setTagSyntax(int).
          -
        • -
        - - - - - - - - - - - - - - - - - - - - - - - -
          -
        • -

          getTemplate

          -
          public Template getTemplate(String name,
          -                            Locale locale,
          -                            String encoding,
          -                            boolean parseAsFTL,
          -                            boolean ignoreMissing)
          -                     throws IOException
          -
          Retrieves the template with the given name (and according the specified further parameters) from the template - cache, loading it into the cache first if it's missing/staled. - -

          This method is thread-safe. - -

          See Configuration for an example of basic usage.

          -
          -
          Parameters:
          -
          name - The name or path of the template, which is not a real path, - but interpreted inside the current TemplateLoader. - Can't be null. The exact syntax of the name - is interpreted by the underlying TemplateLoader, but the - cache makes some assumptions. First, the name is expected to be - a hierarchical path, with path components separated by a slash - character (not with backslash!). The path (the name) given here must not begin with slash; - it's always interpreted relative to the "template root directory". - Then, the .. and . path meta-elements will be resolved. - For example, if the name is a/../b/./c.ftl, then it will be - simplified to b/c.ftl. The rules regarding this are the same as with conventional - UN*X paths. The path must not reach outside the template root directory, that is, - it can't be something like "../templates/my.ftl" (not even if this path - happens to be equivalent with "/my.ftl"). - Further, the path is allowed to contain at most - one path element whose name is * (asterisk). This path meta-element triggers the - acquisition mechanism. If the template is not found in - the location described by the concatenation of the path left to the - asterisk (called base path) and the part to the right of the asterisk - (called resource path), the cache will attempt to remove the rightmost - path component from the base path ("go up one directory") and concatenate - that with the resource path. The process is repeated until either a - template is found, or the base path is completely exhausted.
          -
          locale - The requested locale of the template. Can't be null. - Assuming you have specified en_US as the locale and - myTemplate.ftl as the name of the template, the cache will - first try to retrieve myTemplate_en_US.html, then - myTemplate.en.ftl, and finally myTemplate.ftl.
          -
          encoding - The charset used to interpret the template source code bytes. Can't be null.
          -
          parseAsFTL - If true, the loaded template is parsed and interpreted normally, - as a regular FreeMarker template. If false, the loaded template is - treated as a static text, so ${...}, <#...> etc. will not have special meaning - in it.
          -
          ignoreMissing - If true, the method won't throw FileNotFoundException if the template - doesn't exist, instead it returns null. Other kind of exceptions won't be suppressed.
          -
          Returns:
          -
          the requested template; maybe null when the ignoreMissing parameter is true.
          -
          Throws:
          -
          FileNotFoundException - if the template could not be found.
          -
          IOException - if there was a problem loading the template.
          -
          ParseException - (extends IOException) if the template is syntactically bad.
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          setDefaultEncoding

          -
          public void setDefaultEncoding(String encoding)
          -
          Sets the charset used for decoding byte sequences to character sequences when - reading template files in a locale for which no explicit encoding - was specified via setEncoding(Locale, String). Note that by default there is no locale specified for - any locale, so the default encoding is always in effect. - -

          Defaults to the default system encoding, which can change from one server to - another, so you should always set this setting. If you don't know what charset your should chose, - "UTF-8" is usually a good choice. - -

          Note that individual templates may specify their own charset by starting with - <#ftl encoding="...">

          -
          -
          Parameters:
          -
          encoding - The name of the charset, such as "UTF-8" or "ISO-8859-1"
          -
          -
        • -
        - - - -
          -
        • -

          getDefaultEncoding

          -
          public String getDefaultEncoding()
          -
          Gets the default encoding for converting bytes to characters when - reading template files in a locale for which no explicit encoding - was specified. Defaults to default system encoding.
          -
        • -
        - - - -
          -
        • -

          getEncoding

          -
          public String getEncoding(Locale locale)
          -
          Gets the preferred character encoding for the given locale, or the - default encoding if no encoding is set explicitly for the specified - locale. You can associate encodings with locales using - setEncoding(Locale, String) or loadBuiltInEncodingMap().
          -
        • -
        - - - - - - - -
          -
        • -

          setSharedVariable

          -
          public void setSharedVariable(String name,
          -                              TemplateModel tm)
          -
          Adds a shared variable to the configuration. - Shared sharedVariables are sharedVariables that are visible - as top-level sharedVariables for all templates which use this - configuration, if the data model does not contain a - variable with the same name. - -

          Never use TemplateModel implementation that is not thread-safe for shared sharedVariables, - if the configuration is used by multiple threads! It is the typical situation for Servlet based Web sites. - -

          This method is not thread safe; use it with the same restrictions as those that modify setting values.

          -
          -
          Parameters:
          -
          name - the name used to access the data object from your template. - If a shared variable with this name already exists, it will replace - that.
          -
          See Also:
          -
          setAllSharedVariables(freemarker.template.TemplateHashModelEx), -setSharedVariable(String,Object)
          -
          -
        • -
        - - - -
          -
        • -

          getSharedVariableNames

          -
          public Set getSharedVariableNames()
          -
          Returns the set containing the names of all defined shared sharedVariables. - The method returns a new Set object on each call that is completely - disconnected from the Configuration. That is, modifying the set will have - no effect on the Configuration object.
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          setAllSharedVariables

          -
          public void setAllSharedVariables(TemplateHashModelEx hash)
          -                           throws TemplateModelException
          -
          Adds all object in the hash as shared variable to the configuration; it's like doing several - setSharedVariable(String, Object) calls, one for each hash entry. It doesn't remove the already added - shared variable before doing this. - -

          Never use TemplateModel implementation that is not thread-safe for shared shared variable values, - if the configuration is used by multiple threads! It is the typical situation for Servlet based Web sites. - -

          This method is not thread safe; use it with the same restrictions as those that modify setting values.

          -
          -
          Parameters:
          -
          hash - a hash model whose objects will be copied to the - configuration with same names as they are given in the hash. - If a shared variable with these names already exist, it will be replaced - with those from the map.
          -
          Throws:
          -
          TemplateModelException
          -
          See Also:
          -
          setSharedVariable(String,Object), -setSharedVariable(String,TemplateModel)
          -
          -
        • -
        - - - - - - - -
          -
        • -

          clearSharedVariables

          -
          public void clearSharedVariables()
          -
          Removes all shared sharedVariables, except the predefined ones (compress, html_escape, etc.).
          -
        • -
        - - - -
          -
        • -

          clearTemplateCache

          -
          public void clearTemplateCache()
          -
          Removes all entries from the template cache, thus forcing reloading of templates - on subsequent getTemplate calls. - -

          This method is thread-safe and can be called while the engine processes templates.

          -
        • -
        - - - -
          -
        • -

          removeTemplateFromCache

          -
          public void removeTemplateFromCache(String name)
          -                             throws IOException
          -
          Equivalent to removeTemplateFromCache(name, thisCfg.getLocale(), thisCfg.getEncoding(thisCfg.getLocale()), true).
          -
          -
          Throws:
          -
          IOException
          -
          Since:
          -
          2.3.19
          -
          -
        • -
        - - - -
          -
        • -

          removeTemplateFromCache

          -
          public void removeTemplateFromCache(String name,
          -                                    Locale locale)
          -                             throws IOException
          -
          Equivalent to removeTemplateFromCache(name, locale, thisCfg.getEncoding(locale), true).
          -
          -
          Throws:
          -
          IOException
          -
          Since:
          -
          2.3.19
          -
          -
        • -
        - - - -
          -
        • -

          removeTemplateFromCache

          -
          public void removeTemplateFromCache(String name,
          -                                    String encoding)
          -                             throws IOException
          -
          Equivalent to removeTemplateFromCache(name, thisCfg.getLocale(), encoding, true).
          -
          -
          Throws:
          -
          IOException
          -
          Since:
          -
          2.3.19
          -
          -
        • -
        - - - -
          -
        • -

          removeTemplateFromCache

          -
          public void removeTemplateFromCache(String name,
          -                                    Locale locale,
          -                                    String encoding)
          -                             throws IOException
          -
          Equivalent to removeTemplateFromCache(name, locale, encoding, true).
          -
          -
          Throws:
          -
          IOException
          -
          Since:
          -
          2.3.19
          -
          -
        • -
        - - - -
          -
        • -

          removeTemplateFromCache

          -
          public void removeTemplateFromCache(String name,
          -                                    Locale locale,
          -                                    String encoding,
          -                                    boolean parse)
          -                             throws IOException
          -
          Removes a template from the template cache, hence forcing the re-loading - of it when it's next time requested. This is to give the application - finer control over cache updating than setTemplateUpdateDelay(int) - alone does. - -

          For the meaning of the parameters, see - getTemplate(String, Locale, String, boolean). - -

          This method is thread-safe and can be called while the engine processes templates.

          -
          -
          Throws:
          -
          IOException
          -
          Since:
          -
          2.3.19
          -
          -
        • -
        - - - -
          -
        • -

          getLocalizedLookup

          -
          public boolean getLocalizedLookup()
          -
          The getter pair of setLocalizedLookup(boolean). - -

          This method is thread-safe and can be called while the engine works.

          -
        • -
        - - - -
          -
        • -

          setLocalizedLookup

          -
          public void setLocalizedLookup(boolean localizedLookup)
          -
          Enables/disables localized template lookup. Enabled by default. - -

          Localized lookup works like this: Let's say your locale setting is "en_AU", and you call - cfg.getTemplate("foo.ftl"). Then FreeMarker will look for the template - under names, stopping at the first that exists: "foo_en_AU.ftl", "foo_en.ftl", "foo.ftl". - -

          Historical note: Despite what the API documentation said earlier, this method is not thread-safe. - While setting it can't cause any serious problems, and in fact it works well on most hardware, it's not - guaranteed that FreeMarker will see the update in all threads.

          -
        • -
        - - - -
          -
        • -

          setSetting

          -
          public void setSetting(String name,
          -                       String value)
          -                throws TemplateException
          -
          Description copied from class: Configurable
          -
          Sets a FreeMarker setting by a name and string value. If you can configure FreeMarker directly with Java (or - other programming language), you should use the dedicated setter methods instead (like - Configurable.setObjectWrapper(ObjectWrapper). This meant to be used if you get the settings from somewhere - as text. Regardless, below you will find an overview of the settings available no matter how you set them. - -

          The list of settings commonly supported in all Configurable subclasses: -

          - -

          Configuration (a subclass of Configurable) also understands these:

          -
            -
          • "auto_import": - See setAutoImports(Map) -
            String value is something like: -
            /lib/form.ftl as f, /lib/widget as w, "/lib/odd name.ftl" as odd - -

          • "auto_include": Sets the list of auto-includes. - See setAutoIncludes(List) -
            String value is something like: -
            /include/common.ftl, "/include/evil name.ftl" - -

          • "default_encoding": - See setDefaultEncoding(String). -
            As the default value is the system default, which can change - from one server to another, you should always set this! - -

          • "localized_lookup": - See setLocalizedLookup(boolean). -
            String value: "true", "false" (also the equivalents: "yes", "no", - "t", "f", "y", "n"). - Case insensitive. - -

          • "strict_syntax": - See setStrictSyntaxMode(boolean). Deprecated. -
            String value: "true", "false", yes, etc. - -

          • "whitespace_stripping": - See setWhitespaceStripping(boolean). -
            String value: "true", "false", yes, etc. - -

          • "cache_storage": - See setCacheStorage(freemarker.cache.CacheStorage). -
            String value: If the value contains dot, then it's interpreted as an object builder - expression. - If the value does not contain dot, - then a MruCacheStorage will be used with the - maximum strong and soft sizes specified with the setting value. Examples - of valid setting values: - - -
            Setting valuemax. strong sizemax. soft size -
            "strong:50, soft:500"50500 -
            "strong:100, soft"100Integer.MAX_VALUE -
            "strong:100"1000 -
            "soft:100"0100 -
            "strong"Integer.MAX_VALUE0 -
            "soft"0Integer.MAX_VALUE -
            - -

            The value is not case sensitive. The order of soft and strong - entries is not significant. - -

          • "template_update_delay": - See setTemplateUpdateDelay(int). -
            String value: Valid positive integer, the update delay measured in seconds. - -

          • "tag_syntax": - See setTagSyntax(int). -
            String value: Must be one of - "auto_detect", "angle_bracket", and "square_bracket". - -

          • "incompatible_improvements": - See setIncompatibleImprovements(Version). -
            String value: version number like 2.3.20. - -

          • "incompatible_enhancements": - See: setIncompatibleEnhancements(String). - This setting name is deprecated, use "incompatible_improvements" instead. - -

          • "template_loader": - See: setTemplateLoader(TemplateLoader). -
            String value: Interpreted as an object builder expression. -

          - -

          Regarding object builder expressions (used by the setting values where it was - indicated): -

            -
          • Before FreeMarker 2.3.21 it had to be a fully qualified class name, and nothing else.

          • -
          • Since 2.3.21, the generic syntax is: - className(constrArg1, constrArg2, ... constrArgN, - propName1=propValue1, propName2=propValue2, ... - propNameN=propValueN), - where - className is the fully qualified class name of the instance to create (except if we have - builder class or INSTANCE field around, but see that later), - constrArg-s are the values of constructor arguments, - and propName=propValue-s set JavaBean properties (like x=1 means - setX(1)) on the created instance. You can have any number of constructor arguments and property - setters, including 0. Constructor arguments must precede any property setters. -

          • -
          • - Example: com.example.MyObjectWrapper(1, 2, exposeFields=true, cacheSize=5000) is nearly - equivalent with this Java code: - obj = new com.example.MyObjectWrapper(1, 2); obj.setExposeFields(true); obj.setCacheSize(5000); -
          • -
          • -

            If you have no constructor arguments and property setters, and the className class has - a public static INSTANCE field, the value of that filed will be the value of the expression, and - the constructor won't be called. -

          • -
          • -

            If there exists a class named classNameBuilder, then that class will be instantiated - instead with the given constructor arguments, and the JavaBean properties of that builder instance will be - set. After that, the public build() method of the instance will be called, whose return value - will be the value of the whole expression. (The builder class and the build() method is simply - found by name, there's no special interface to implement.) Note that if you use the backward compatible - syntax, where these's no parenthesis after the class name, then it will not look for builder class. -

          • -
          • -

            Currently, the values of arguments and properties can only be one of these: -

              -
            • A numerical literal, like 123 or -1.5. Like in FTL, there are no numerical types, - the value will be automatically converted to the type of the target.
            • -
            • A boolean literal: true or false -
            • The null literal: null -
            • A string literal with FTL syntax, except that it can't contain ${...}-s and - #{...}-s. Examples: "Line 1\nLine 2" or r"C:\temp". -
            • An object builder expression. That is, object builder expressions can be nested into each other. -
            -
          • -
          • -

            The top-level object builder expressions may omit (). In that case, for backward compatibility, - the INSTANCE field and the builder class is not searched, so the instance will be always - created with its parameterless constructor. (This behavior will possibly change in 2.4.) The () - can't be omitted for nested expressions. -

          • -
          • -

            The classes and methods that the expression meant to access must be all public. -

          • -
          -
          -
          Overrides:
          -
          setSetting in class Configurable
          -
          Parameters:
          -
          name - the name of the setting.
          -
          value - the string that describes the new value of the setting.
          -
          Throws:
          -
          Configurable.UnknownSettingException - if the name is wrong.
          -
          TemplateException - if the new value of the setting can't be set for any other reasons.
          -
          -
        • -
        - - - -
          -
        • -

          getCorrectedNameForUnknownSetting

          -
          protected String getCorrectedNameForUnknownSetting(String name)
          -
          -
          Overrides:
          -
          getCorrectedNameForUnknownSetting in class Configurable
          -
          Parameters:
          -
          name - The wrong name
          -
          Returns:
          -
          The corrected name, or null if there's no known correction
          -
          -
        • -
        - - - -
          -
        • -

          addAutoImport

          -
          public void addAutoImport(String namespaceVarName,
          -                          String templateName)
          -
          Adds an invisible #import templateName as namespaceVarName at the beginning of all - templates. The order of the imports will be the same as the order in which they were added with this method.
          -
        • -
        - - - -
          -
        • -

          removeAutoImport

          -
          public void removeAutoImport(String namespaceVarName)
          -
          Removes an auto-import; see addAutoImport(String, String). Does nothing if the auto-import doesn't - exist.
          -
        • -
        - - - -
          -
        • -

          setAutoImports

          -
          public void setAutoImports(Map map)
          -
          Removes all auto-imports, then calls addAutoImport(String, String) for each Map-entry (the entry - key is the namespaceVarName). The order of the auto-imports will be the same as Map.keySet() - returns the keys, thus, it's not the best idea to use a HashMap (although the order of imports doesn't - mater for properly designed libraries).
          -
        • -
        - - - - - - - -
          -
        • -

          addAutoInclude

          -
          public void addAutoInclude(String templateName)
          -
          Adds an invisible #include templateName as namespaceVarName at the beginning of all - templates. The order of the inclusions will be the same as the order in which they were added with this method.
          -
        • -
        - - - -
          -
        • -

          setAutoIncludes

          -
          public void setAutoIncludes(List templateNames)
          -
          Removes all auto-includes, then calls addAutoInclude(String) for each List items.
          -
        • -
        - - - -
          -
        • -

          removeAutoInclude

          -
          public void removeAutoInclude(String templateName)
          -
          Removes a template from the auto-include list; see addAutoInclude(String). Does nothing if the template - is not there.
          -
        • -
        - - - -
          -
        • -

          getVersionNumber

          -
          public static String getVersionNumber()
          -
          Deprecated. Use getVersion() instead.
          -
          Returns FreeMarker version number string.
          -
        • -
        - - - -
          -
        • -

          getVersion

          -
          public static Version getVersion()
          -
          Returns the FreeMarker version information, most importantly the major.minor.micro version numbers. - - On FreeMarker version numbering rules: -
            -
          • For final/stable releases the version number is like major.minor.micro, like 2.3.19. (Historically, - when micro was 0 the version strings was like major.minor instead of the proper major.minor.0, but that's - not like that anymore.) -
          • When only the micro version is increased, compatibility with previous versions with the same - major.minor is kept. Thus freemarker.jar can be replaced in an existing application without - breaking it.
          • -
          • For non-final/unstable versions (that almost nobody uses), the format is: -
              -
            • Starting from 2.3.20: major.minor.micro-extraInfo, like - 2.3.20-nightly_20130506T123456Z, 2.4.0-RC01. The major.minor.micro - always indicates the target we move towards, so 2.3.20-nightly or 2.3.20-M01 is - after 2.3.19 and will eventually become to 2.3.20. "PRE", "M" and "RC" (uppercase!) means - "preview", "milestone" and "release candidate" respectively, and is always followed by a 2 digit - 0-padded counter, like M03 is the 3rd milestone release of a given major.minor.micro.
            • -
            • Before 2.3.20: The extraInfo wasn't preceded by a "-". - Instead of "nightly" there was "mod", where the major.minor.micro part has indicated where - are we coming from, so 2.3.19mod (read as: 2.3.19 modified) was after 2.3.19 but before 2.3.20. - Also, "pre" and "rc" was lowercase, and was followd by a number without 0-padding.
            • -
            -
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getSupportedBuiltInNames

          -
          public Set getSupportedBuiltInNames()
          -
          Returns the names of the supported "built-ins". These are the (expr?builtin_name-like things). As of this - writing, this information doesn't depend on the configuration options, so it could be a static method, but - to be future-proof, it's an instance method.
          -
          -
          Returns:
          -
          Set of String-s.
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          getSupportedBuiltInDirectiveNames

          -
          public Set getSupportedBuiltInDirectiveNames()
          -
          Returns the names of the directives that are predefined by FreeMarker. These are the things that you call like - <#directiveName ...>.
          -
          -
          Returns:
          -
          Set of String-s.
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/DefaultObjectWrapper.html b/fmpp/docs/freemarker/api/freemarker/template/DefaultObjectWrapper.html deleted file mode 100644 index c948234..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/DefaultObjectWrapper.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - -DefaultObjectWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class DefaultObjectWrapper

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      ObjectWrapper, WriteProtectable
      -
      -
      -
      Direct Known Subclasses:
      -
      SimpleObjectWrapper
      -
      -
      -
      -
      public class DefaultObjectWrapper
      -extends BeansWrapper
      -
      The default implementation of the ObjectWrapper interface. Note that instances of this class generally should - be made by DefaultObjectWrapperBuilder and its overloads, not with its constructor. - -

      This class is only thread-safe after you have finished calling its setter methods, and then safely published - it (see JSR 133 and related literature). When used as part of Configuration, of course it's enough if that - was safely published and then left unmodified.

      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/DefaultObjectWrapperBuilder.html b/fmpp/docs/freemarker/api/freemarker/template/DefaultObjectWrapperBuilder.html deleted file mode 100644 index 42e2367..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/DefaultObjectWrapperBuilder.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - -DefaultObjectWrapperBuilder (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class DefaultObjectWrapperBuilder

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Cloneable
      -
      -
      -
      -
      public class DefaultObjectWrapperBuilder
      -extends BeansWrapperConfiguration
      -
      Gets/creates a DefaultObjectWrapper singleton instance that's already configured as specified in the - properties of this object; this is recommended over using the DefaultObjectWrapper constructors. The returned - instance can't be further configured (it's write protected). - -

      See BeansWrapperBuilder for more info, as that works identically.

      -
      -
      Since:
      -
      2.3.21
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          DefaultObjectWrapperBuilder

          -
          public DefaultObjectWrapperBuilder(Version incompatibleImprovements)
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/LocalizedString.html b/fmpp/docs/freemarker/api/freemarker/template/LocalizedString.html deleted file mode 100644 index 9c2fbfe..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/LocalizedString.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - -LocalizedString (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class LocalizedString

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateModel, TemplateScalarModel
      -
      -
      -
      Direct Known Subclasses:
      -
      ResourceBundleLocalizedString
      -
      -
      -
      -
      public abstract class LocalizedString
      -extends Object
      -implements TemplateScalarModel
      -
      An abstract base class for scalars that vary by locale. - Here is a silly usage example. - - TemplateScalarModel localizedYes = new LocalizedString() { - public String getLocalizedString(java.util.Locale locale) { - String lang = locale.getLanguage(); - if "fr".equals(lang) - return "oui"; - else if "de".equals(lang) - return "sĂ­"; - else - return "yes"; - } - }; -
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/ObjectWrapper.html b/fmpp/docs/freemarker/api/freemarker/template/ObjectWrapper.html deleted file mode 100644 index d6e0513..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/ObjectWrapper.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - -ObjectWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface ObjectWrapper

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          BEANS_WRAPPER

          -
          static final ObjectWrapper BEANS_WRAPPER
          -
          Deprecated. Use BeansWrapperBuilder.build() instead; this instance isn't read-only - and thus can't be trusted.
          -
          An ObjectWrapper that exposes the object methods and JavaBeans properties as hash elements, and has - custom handling for Java Map-s, ResourceBundle-s, etc. It doesn't treat - Node-s and Jython objects specially, however.
          -
        • -
        - - - -
          -
        • -

          DEFAULT_WRAPPER

          -
          static final ObjectWrapper DEFAULT_WRAPPER
          -
          Deprecated. Use BeansWrapperBuilder.build() instead; this instance isn't - read-only and thus can't be trusted.
          -
          The default object wrapper implementation, focusing on backward compatibility and out-of-the box extra features. - Extends BeansWrapper with the special handling of Node-s (for XML processing) and - Jython objects. However, for backward compatibility, it also somewhat downgrades BeansWrapper by using - SimpleHash for Map-s, SimpleSequence for List-s and collections/arrays. - Furthermore it uses SimpleScalar, SimpleNumber to wrap String-s and Number-s, - although this is not considered to be harmful.
          -
        • -
        - - - -
          -
        • -

          SIMPLE_WRAPPER

          -
          static final ObjectWrapper SIMPLE_WRAPPER
          -
          Deprecated. No replacement as it was seldom if ever used by anyone; this instance isn't - read-only and thus can't be trusted.
          -
          Object wrapper that uses SimpleXXX wrappers only. - It behaves like the DEFAULT_WRAPPER, but for objects - that it does not know how to wrap as a SimpleXXX it - throws an exception. It makes no use of reflection-based - exposure of anything, which may makes it a good candidate for security-restricted applications.
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/ResourceBundleLocalizedString.html b/fmpp/docs/freemarker/api/freemarker/template/ResourceBundleLocalizedString.html deleted file mode 100644 index fbcb162..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/ResourceBundleLocalizedString.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - -ResourceBundleLocalizedString (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class ResourceBundleLocalizedString

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          ResourceBundleLocalizedString

          -
          public ResourceBundleLocalizedString(String resourceBundleLookupKey,
          -                                     String resourceKey)
          -
          -
          Parameters:
          -
          resourceBundleLookupKey - The lookup key for the resource bundle
          -
          resourceKey - the specific resource (assumed to be a string) to fish out of the resource bundle
          -
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/SimpleCollection.html b/fmpp/docs/freemarker/api/freemarker/template/SimpleCollection.html deleted file mode 100644 index b49519f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/SimpleCollection.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - -SimpleCollection (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class SimpleCollection

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateCollectionModel, TemplateModel, Serializable
      -
      -
      -
      -
      public class SimpleCollection
      -extends WrappingTemplateModel
      -implements TemplateCollectionModel, Serializable
      -
      A simple implementation of TemplateCollectionModel. - It's able to wrap java.util.Iterator-s and java.util.Collection-s. - If you wrap an Iterator, the variable can be <#list>-ed only once! - -

      Consider using SimpleSequence instead of this class if you want to wrap Iterators. - SimpleSequence will read all elements of the Iterator, and store them in a List - (this may cause too high resource consumption in some applications), so you can list the variable - for unlimited times. Also, if you want to wrap Collections, and then list the resulting - variable for many times, SimpleSequence may gives better performance, as the - wrapping of non-TemplateModel objects happens only once. - -

      This class is thread-safe. The returned TemplateModelIterator-s - are not thread-safe.

      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          iterator

          -
          public TemplateModelIterator iterator()
          -
          Retrieves a template model iterator that is used to iterate over the elements in this collection. - -

          When you wrap an Iterator and you get TemplateModelIterator for multiple times, - only on of the returned TemplateModelIterator instances can be really used. When you have called a - method of a TemplateModelIterator instance, all other instance will throw a - TemplateModelException when you try to call their methods, since the wrapped Iterator - can't return the first element.

          -
          -
          Specified by:
          -
          iterator in interface TemplateCollectionModel
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/SimpleDate.html b/fmpp/docs/freemarker/api/freemarker/template/SimpleDate.html deleted file mode 100644 index 00bb78f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/SimpleDate.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - -SimpleDate (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class SimpleDate

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateDateModel, TemplateModel
      -
      -
      -
      -
      public class SimpleDate
      -extends Object
      -implements TemplateDateModel
      -
      A simple implementation of the TemplateDateModel - interface. Note that this class is immutable. -

      This class is thread-safe.

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          SimpleDate

          -
          public SimpleDate(Date date)
          -
          Creates a new date model wrapping the specified date object and - having DATE type.
          -
        • -
        - - - -
          -
        • -

          SimpleDate

          -
          public SimpleDate(Time time)
          -
          Creates a new date model wrapping the specified time object and - having TIME type.
          -
        • -
        - - - -
          -
        • -

          SimpleDate

          -
          public SimpleDate(Timestamp datetime)
          -
          Creates a new date model wrapping the specified time object and - having DATETIME type.
          -
        • -
        - - - -
          -
        • -

          SimpleDate

          -
          public SimpleDate(Date date,
          -                  int type)
          -
          Creates a new date model wrapping the specified date object and - having the specified type.
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/SimpleHash.html b/fmpp/docs/freemarker/api/freemarker/template/SimpleHash.html deleted file mode 100644 index ab56202..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/SimpleHash.html +++ /dev/null @@ -1,689 +0,0 @@ - - - - - - -SimpleHash (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class SimpleHash

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          copyMap

          -
          protected Map copyMap(Map map)
          -
        • -
        - - - -
          -
        • -

          put

          -
          public void put(String key,
          -                Object obj)
          -
          Adds a key-value entry to the map.
          -
          -
          Parameters:
          -
          key - the name by which the object is - identified in the template.
          -
          obj - the object to store.
          -
          -
        • -
        - - - -
          -
        • -

          put

          -
          public void put(String key,
          -                boolean b)
          -
          Puts a boolean in the map
          -
          -
          Parameters:
          -
          key - the name by which the resulting TemplateModel - is identified in the template.
          -
          b - the boolean to store.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          containsKey

          -
          public boolean containsKey(String key)
          -
          Tells if the map contains a key or not, regardless if the associated value is null or not.
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          remove

          -
          public void remove(String key)
          -
          Removes the given key from the underlying map.
          -
          -
          Parameters:
          -
          key - the key to be removed
          -
          -
        • -
        - - - -
          -
        • -

          putAll

          -
          public void putAll(Map m)
          -
          Adds all the key/value entries in the map
          -
          -
          Parameters:
          -
          m - the map with the entries to add, the keys are assumed to be strings.
          -
          -
        • -
        - - - -
          -
        • -

          toMap

          -
          public Map toMap()
          -          throws TemplateModelException
          -
          Note that this method creates and returns a deep-copy of the underlying hash used - internally. This could be a gotcha for some people - at some point who want to alter something in the data model, - but we should maintain our immutability semantics (at least using default SimpleXXX wrappers) - for the data model. It will recursively unwrap the stuff in the underlying container.
          -
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Convenience method for returning the String value of the - underlying map.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          -
        • -
        - - - -
          -
        • -

          size

          -
          public int size()
          -
          -
          Specified by:
          -
          size in interface TemplateHashModelEx
          -
          Returns:
          -
          the number of key/value mappings in the hash.
          -
          -
        • -
        - - - - - - - - - - - - - - - -
          -
        • -

          synchronizedWrapper

          -
          public SimpleHash synchronizedWrapper()
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/SimpleList.html b/fmpp/docs/freemarker/api/freemarker/template/SimpleList.html deleted file mode 100644 index 2de41c2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/SimpleList.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - -SimpleList (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class SimpleList

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          SimpleList

          -
          public SimpleList()
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          SimpleList

          -
          public SimpleList(List list)
          -
          Deprecated. 
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/SimpleNumber.html b/fmpp/docs/freemarker/api/freemarker/template/SimpleNumber.html deleted file mode 100644 index 57abeb9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/SimpleNumber.html +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - -SimpleNumber (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class SimpleNumber

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          SimpleNumber

          -
          public SimpleNumber(Number value)
          -
        • -
        - - - -
          -
        • -

          SimpleNumber

          -
          public SimpleNumber(byte val)
          -
        • -
        - - - -
          -
        • -

          SimpleNumber

          -
          public SimpleNumber(short val)
          -
        • -
        - - - -
          -
        • -

          SimpleNumber

          -
          public SimpleNumber(int val)
          -
        • -
        - - - -
          -
        • -

          SimpleNumber

          -
          public SimpleNumber(long val)
          -
        • -
        - - - -
          -
        • -

          SimpleNumber

          -
          public SimpleNumber(float val)
          -
        • -
        - - - -
          -
        • -

          SimpleNumber

          -
          public SimpleNumber(double val)
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/SimpleObjectWrapper.html b/fmpp/docs/freemarker/api/freemarker/template/SimpleObjectWrapper.html deleted file mode 100644 index 89785e4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/SimpleObjectWrapper.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - -SimpleObjectWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class SimpleObjectWrapper

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/SimpleScalar.html b/fmpp/docs/freemarker/api/freemarker/template/SimpleScalar.html deleted file mode 100644 index bbeecf2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/SimpleScalar.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - -SimpleScalar (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class SimpleScalar

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          SimpleScalar

          -
          public SimpleScalar(String value)
          -
          Constructs a SimpleScalar containing a string value.
          -
          -
          Parameters:
          -
          value - the string value.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getAsString

          -
          public String getAsString()
          -
          Description copied from interface: TemplateScalarModel
          -
          Returns the string representation of this model. Don't return null, as that will cause exception. - (In classic-compatible mode the engine will convert null into empty string, though.)
          -
          -
          Specified by:
          -
          getAsString in interface TemplateScalarModel
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/SimpleSequence.html b/fmpp/docs/freemarker/api/freemarker/template/SimpleSequence.html deleted file mode 100644 index 2580098..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/SimpleSequence.html +++ /dev/null @@ -1,649 +0,0 @@ - - - - - - -SimpleSequence (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class SimpleSequence

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateModel, TemplateSequenceModel, Serializable
      -
      -
      -
      Direct Known Subclasses:
      -
      SimpleList
      -
      -
      -
      -
      public class SimpleSequence
      -extends WrappingTemplateModel
      -implements TemplateSequenceModel, Serializable
      -

      A convenient implementation of a list. This - object implements TemplateSequenceModel, using an underlying - java.util.List implementation.

      - -

      A SimpleSequence can act as a cache for a - TemplateCollectionModel, e.g. one that gets data from a - database. When passed a TemplateCollectionModel as an - argument to its constructor, the SimpleSequence immediately - copies all the elements and discards the TemplateCollectionModel.

      - -

      This class is thread-safe if you don't call the add method after you - have made the object available for multiple threads, and you have published it - safely. - -

      Note:
      - As of 2.0, this class is unsynchronized by default. - To obtain a synchronized wrapper, call the synchronizedWrapper() method.

      -
      -
      See Also:
      -
      SimpleHash, -SimpleScalar, -Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/Template.WrongEncodingException.html b/fmpp/docs/freemarker/api/freemarker/template/Template.WrongEncodingException.html deleted file mode 100644 index dd2fdc2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/Template.WrongEncodingException.html +++ /dev/null @@ -1,2656 +0,0 @@ - - - - - - -Template.WrongEncodingException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class Template.WrongEncodingException

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/Template.html b/fmpp/docs/freemarker/api/freemarker/template/Template.html deleted file mode 100644 index a076777..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/Template.html +++ /dev/null @@ -1,1111 +0,0 @@ - - - - - - -Template (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class Template

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class Template
      -extends Configurable
      -

      Stores an already parsed template, ready to be processed (rendered) for unlimited times, possibly from - multiple threads. - -

      Typically, you will use Configuration.getTemplate(String) to create/get Template objects, so - you don't construct them directly. But you can also construct a template from a Reader or a String - that contains the template source code. But then it's - important to know that while the resulting Template is efficient for later processing, creating a new - Template itself is relatively expensive. So try to re-use Template objects if possible. - Configuration.getTemplate(String) does that (caching Template-s) for you, but the constructor of - course doesn't, so it's up to you to solve then. - -

      Objects of this class meant to be handled as immutable and thus thread-safe. However, it has some setter methods - for changing FreeMarker settings. Those must not be used while the template is being processed, or if the - template object is already accessible from multiple threads.

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          Template

          -
          public Template(String name,
          -                Reader reader,
          -                Configuration cfg)
          -         throws IOException
          -
          Constructs a template from a character stream. Note that this is a relatively expensive operation; where - higher performance matters, you should re-use (cache) Template instances instead of re-creating them from - the same source again and again.
          -
          -
          Parameters:
          -
          name - the path of the template file relatively to the (virtual) directory that you use to store - the templates. Shouldn't start with '/'. Should use '/', not '\'. - Check getName() to see how the name will be used. The name should be independent of the - actual storage mechanism and physical location as far as possible. Even when the templates are stored - straightforwardly in real files (they often aren't; see TemplateLoader), the name shouldn't be an - absolute file path. Like if the template is stored in "/www/templates/forum/main.ftl", and you - are using "/www/templates/" as the template root directory via - Configuration.setDirectoryForTemplateLoading(java.io.File), then the template name will be - "forum/main.ftl".
          -
          reader - the character stream to read from. It will always be closed (Reader.close()).
          -
          cfg - the Configuration object that this Template is associated with. - If this is null, the "default" Configuration object is used, - which is highly discouraged, because it can easily lead to - erroneous, unpredictable behavior. - (See more here...)
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - - - - - -
          -
        • -

          Template

          -
          public Template(String name,
          -                Reader reader,
          -                Configuration cfg,
          -                String encoding)
          -         throws IOException
          -
          Deprecated. Use Template(String, Reader, Configuration) instead.
          -
          Same as Template(String, Reader, Configuration), but also specifies the template's encoding.
          -
          -
          Parameters:
          -
          encoding - This is the encoding that we are supposed to be using. But it's not really necessary because we - have a Reader which is already decoded, but it's kept as meta-info. It also has an impact when - #include-ing/#import-ing another template from this template, as its default encoding will - be this. But this behavior of said directives is considered to be harmful, and will be probably phased - out. Until that, it's better to leave this on null, so that the encoding will come from the - Configuration. Note that if this is non-null and there's an #ftl header with - encoding, they must match, or else a Template.WrongEncodingException is thrown.
          -
          Throws:
          -
          IOException
          -
          -
        • -
        - - - - -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getPlainTextTemplate

          -
          public static Template getPlainTextTemplate(String name,
          -                                            String content,
          -                                            Configuration config)
          -
          Returns a trivial template, one that is just a single block of - plain text, no dynamic content. (Used by the cache module to create - unparsed templates.)
          -
          -
          Parameters:
          -
          name - the path of the template file relative to the directory what you use to store - the templates. See getName() for more details.
          -
          content - the block of text that this template represents
          -
          config - the configuration to which this template belongs
          -
          -
        • -
        - - - -
          -
        • -

          process

          -
          public void process(Object dataModel,
          -                    Writer out)
          -             throws TemplateException,
          -                    IOException
          -
          Executes template, using the data-model provided, writing the generated output - to the supplied Writer. - -

          For finer control over the runtime environment setup, such as per-HTTP-request configuring of FreeMarker - settings, you may need to use createProcessingEnvironment(Object, Writer) instead.

          -
          -
          Parameters:
          -
          dataModel - the holder of the variables visible from the template (name-value pairs); usually a - Map<String, Object> or a JavaBean (where the JavaBean properties will be the variables). - Can be any object that the ObjectWrapper in use turns into a TemplateHashModel. - You can also use an object that already implements TemplateHashModel; in that case it won't be - wrapped. If it's null, an empty data model is used.
          -
          out - The Writer where the output of the template will go. Note that unless you have used - Configurable.setAutoFlush(boolean) to disable this, Writer.flush() will be called at the - when the template processing was finished. Writer.close() is not called.
          -
          Throws:
          -
          TemplateException - if an exception occurs during template processing
          -
          IOException - if an I/O exception occurs during writing to the writer.
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          createProcessingEnvironment

          -
          public Environment createProcessingEnvironment(Object dataModel,
          -                                               Writer out,
          -                                               ObjectWrapper wrapper)
          -                                        throws TemplateException,
          -                                               IOException
          -
          Creates a Environment object, using this template, the data-model provided as - parameter. You have to call Environment.process() on the return value to set off the actual rendering. - -

          Use this method if you want to do some special initialization on the Environment before template - processing, or if you want to read the Environment after template processing. Otherwise using - process(Object, Writer) is simpler. - -

          Example: - -

          - Environment env = myTemplate.createProcessingEnvironment(root, out, null);
          - env.process();
          - -

          The above is equivalent with this: - -

          - myTemplate.process(root, out);
          - -

          But with createProcessingEnvironment, you can manipulate the environment - before and after the processing: - -

          - Environment env = myTemplate.createProcessingEnvironment(root, out);
          - 
          - env.setLocale(myUsersPreferredLocale);
          - env.setTimeZone(myUsersPreferredTimezone);
          - 
          - env.process();  // output is rendered here
          - 
          - TemplateModel x = env.getVariable("x");  // read back a variable set by the template
          -
          -
          Parameters:
          -
          dataModel - the holder of the variables visible from all templates; see process(Object, Writer) for - more details.
          -
          wrapper - The ObjectWrapper to use to wrap objects into TemplateModel - instances. Normally you left it null, in which case Configurable.getObjectWrapper() will be - used.
          -
          out - The Writer where the output of the template will go; see process(Object, Writer) for - more details.
          -
          Returns:
          -
          the Environment object created for processing. Call Environment.process() to process the - template.
          -
          Throws:
          -
          TemplateException - if an exception occurs while setting up the Environment object.
          -
          IOException - if an exception occurs doing any auto-imports
          -
          -
        • -
        - - - - - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Returns a string representing the raw template - text in canonical form.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          -
        • -
        - - - -
          -
        • -

          getName

          -
          public String getName()
          -
          The usually path-like (or URL-like) identifier of the template, or possibly null for non-stored - templates. It usually looks like a relative UN*X path; it should use /, not \, and shouldn't - start with / (but there are no hard guarantees). It's not a real path in a file-system, it's just - a name that a TemplateLoader used to load the backing resource. Or, it can also be a name that was never - used to load the template (directly created with Template(String, Reader, Configuration)). - Even if the templates are stored straightforwardly in files, this is relative to the base directory of the - TemplateLoader. So it really could be anything, except that it has importance in these situations: - -
            -
          • Relative paths to other templates in this template will be resolved relatively to the directory part of - this. Like if the template name is "foo/this.ftl", then <#include "other.ftl"> gets - the template with name "foo/other.ftl". -

          • It's shown in error messages. So it should be something based on which the user can find the template. -

          • Some tools, like an IDE plugin, uses this to identify (and find) templates. -

          - -

          Some frameworks use URL-like template names like "someSchema://foo/bar.ftl". FreeMarker understands - this notation, so an absolute path like "/baaz.ftl" in that template will be resolved too - "someSchema://baaz.ftl".

          -
        • -
        - - - -
          -
        • -

          getConfiguration

          -
          public Configuration getConfiguration()
          -
          Returns the Configuration object associated with this template.
          -
        • -
        - - - -
          -
        • -

          setEncoding

          -
          public void setEncoding(String encoding)
          -
          Sets the character encoding to use for - included files. Usually you don't set this value manually, - instead it's assigned to the template upon loading.
          -
        • -
        - - - -
          -
        • -

          getEncoding

          -
          public String getEncoding()
          -
          Returns the character encoding used for reading included files.
          -
        • -
        - - - - - - - -
          -
        • -

          dump

          -
          public void dump(PrintStream ps)
          -
          Dump the raw template in canonical form.
          -
        • -
        - - - - - - - -
          -
        • -

          addMacro

          -
          public void addMacro(freemarker.core.Macro macro)
          -
          Called by code internally to maintain - a table of macros
          -
        • -
        - - - -
          -
        • -

          addImport

          -
          public void addImport(freemarker.core.LibraryLoad ll)
          -
          Called by code internally to maintain - a list of imports
          -
        • -
        - - - -
          -
        • -

          getSource

          -
          public String getSource(int beginColumn,
          -                        int beginLine,
          -                        int endColumn,
          -                        int endLine)
          -
          Returns the template source at the location specified by the coordinates given, or null if unavailable.
          -
          -
          Parameters:
          -
          beginColumn - the first column of the requested source, 1-based
          -
          beginLine - the first line of the requested source, 1-based
          -
          endColumn - the last column of the requested source, 1-based
          -
          endLine - the last line of the requested source, 1-based
          -
          See Also:
          -
          TemplateObject.getSource()
          -
          -
        • -
        - - - -
          -
        • -

          getRootTreeNode

          -
          public freemarker.core.TemplateElement getRootTreeNode()
          -
          -
          Returns:
          -
          the root TemplateElement object.
          -
          -
        • -
        - - - -
          -
        • -

          getMacros

          -
          public Map getMacros()
          -
        • -
        - - - -
          -
        • -

          getImports

          -
          public List getImports()
          -
        • -
        - - - -
          -
        • -

          addPrefixNSMapping

          -
          public void addPrefixNSMapping(String prefix,
          -                               String nsURI)
          -
          This is used internally.
          -
        • -
        - - - -
          -
        • -

          getDefaultNS

          -
          public String getDefaultNS()
          -
        • -
        - - - -
          -
        • -

          getNamespaceForPrefix

          -
          public String getNamespaceForPrefix(String prefix)
          -
          -
          Returns:
          -
          the NamespaceUri mapped to this prefix in this template. (Or null if there is none.)
          -
          -
        • -
        - - - -
          -
        • -

          getPrefixForNamespace

          -
          public String getPrefixForNamespace(String nsURI)
          -
          -
          Returns:
          -
          the prefix mapped to this nsURI in this template. (Or null if there is none.)
          -
          -
        • -
        - - - -
          -
        • -

          getPrefixedName

          -
          public String getPrefixedName(String localName,
          -                              String nsURI)
          -
          -
          Returns:
          -
          the prefixed name, based on the ns_prefixes defined - in this template's header for the local name and node namespace - passed in as parameters.
          -
          -
        • -
        - - - -
          -
        • -

          containingElements

          -
          public TreePath containingElements(int column,
          -                                   int line)
          -
          Deprecated. This method will return TemplateElement starting from 2.4, as that doesn't require Swing; - don't use it.
          -
          -
          Parameters:
          -
          column - the column
          -
          line - the line
          -
          Returns:
          -
          an array of the elements containing the given column and line numbers.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateBooleanModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateBooleanModel.html deleted file mode 100644 index 3cee4a6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateBooleanModel.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - -TemplateBooleanModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateBooleanModel

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateCollectionModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateCollectionModel.html deleted file mode 100644 index 5bdf93b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateCollectionModel.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - -TemplateCollectionModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateCollectionModel

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateDateModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateDateModel.html deleted file mode 100644 index 6b3454d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateDateModel.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - -TemplateDateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateDateModel

    -
    -
    -
    -
      -
    • -
      -
      All Superinterfaces:
      -
      TemplateModel
      -
      -
      -
      All Known Implementing Classes:
      -
      DateModel, SimpleDate
      -
      -
      -
      -
      public interface TemplateDateModel
      -extends TemplateModel
      -
      "date", "time" and "date-time" template language data types: corresponds to Date. Contrary to Java, - FreeMarker distinguishes date (no time part), time and date-time values.
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Summary

        - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Fields 
        Modifier and TypeField and Description
        static intDATE -
        The date model represents a date value (no time part).
        -
        static intDATETIME -
        The date model represents a date-time value (also known as timestamp).
        -
        static intTIME -
        The date model represents a time value (no date part).
        -
        static ListTYPE_NAMES 
        static intUNKNOWN -
        It is not known whether the date represents a date, a time, or a date-time value.
        -
        - -
      • -
      - - -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          UNKNOWN

          -
          static final int UNKNOWN
          -
          It is not known whether the date represents a date, a time, or a date-time value. - This often leads to exceptions in templates due to ambiguities it causes, so avoid it if possible.
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          TIME

          -
          static final int TIME
          -
          The date model represents a time value (no date part).
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          DATE

          -
          static final int DATE
          -
          The date model represents a date value (no time part).
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          DATETIME

          -
          static final int DATETIME
          -
          The date model represents a date-time value (also known as timestamp).
          -
          -
          See Also:
          -
          Constant Field Values
          -
          -
        • -
        - - - -
          -
        • -

          TYPE_NAMES

          -
          static final List TYPE_NAMES
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateDirectiveBody.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateDirectiveBody.html deleted file mode 100644 index 015f3ad..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateDirectiveBody.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - -TemplateDirectiveBody (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateDirectiveBody

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          render

          -
          void render(Writer out)
          -     throws TemplateException,
          -            IOException
          -
          Renders the body of the directive body to the specified writer. The - writer is not flushed after the rendering. If you pass the environment's - writer, there is no need to flush it. If you supply your own writer, you - are responsible to flush/close it when you're done with using it (which - might be after multiple renderings).
          -
          -
          Parameters:
          -
          out - the writer to write the output to.
          -
          Throws:
          -
          TemplateException
          -
          IOException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateDirectiveModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateDirectiveModel.html deleted file mode 100644 index d10e8a3..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateDirectiveModel.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - -TemplateDirectiveModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateDirectiveModel

    -
    -
    -
    -
      -
    • -
      -
      All Superinterfaces:
      -
      TemplateModel
      -
      -
      -
      All Known Implementing Classes:
      -
      IncludePage
      -
      -
      -
      -
      public interface TemplateDirectiveModel
      -extends TemplateModel
      -
      "directive" template language data type: used as user-defined directives - (much like macros) in templates. They can do arbitrary actions, write arbitrary - text to the template output, and trigger rendering of their nested content for - any number of times. - -

      They are used in templates like <@myDirective foo=1 bar="wombat">...</@myDirective> (or as - <@myDirective foo=1 bar="wombat" /> - the nested content is optional).

      -
      -
      Since:
      -
      2.3.11
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          execute

          -
          void execute(Environment env,
          -             Map params,
          -             TemplateModel[] loopVars,
          -             TemplateDirectiveBody body)
          -      throws TemplateException,
          -             IOException
          -
          Executes this user-defined directive; called by FreeMarker when the user-defined - directive is called in the template.
          -
          -
          Parameters:
          -
          env - the current processing environment. Note that you can access - the output Writer by Environment.getOut().
          -
          params - the parameters (if any) passed to the directive as a - map of key/value pairs where the keys are String-s and the - values are TemplateModel instances. This is never - null. If you need to convert the template models to POJOs, - you can use the utility methods in the DeepUnwrap class.
          -
          loopVars - an array that corresponds to the "loop variables", in - the order as they appear in the directive call. ("Loop variables" are out-parameters - that are available to the nested body of the directive; see in the Manual.) - You set the loop variables by writing this array. The length of the array gives the - number of loop-variables that the caller has specified. - Never null, but can be a zero-length array.
          -
          body - an object that can be used to render the nested content (body) of - the directive call. If the directive call has no nested content (i.e., it's like - <@myDirective /> or <@myDirective></@myDirective>), then this will be - null.
          -
          Throws:
          -
          TemplateException - If any problem occurs that's not an IOException during writing the template - output.
          -
          IOException - When writing the template output fails.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateException.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateException.html deleted file mode 100644 index 82e2601..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateException.html +++ /dev/null @@ -1,803 +0,0 @@ - - - - - - -TemplateException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class TemplateException

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          TemplateException

          -
          public TemplateException(Environment env)
          -
          Constructs a TemplateException with no specified detail message - or underlying cause.
          -
        • -
        - - - -
          -
        • -

          TemplateException

          -
          public TemplateException(String description,
          -                         Environment env)
          -
          Constructs a TemplateException with the given detail message, - but no underlying cause exception.
          -
          -
          Parameters:
          -
          description - the description of the error that occurred
          -
          -
        • -
        - - - - - - - -
          -
        • -

          TemplateException

          -
          public TemplateException(Throwable cause,
          -                         Environment env)
          -
          Constructs a TemplateException with the given underlying Exception, - but no detail message.
          -
          -
          Parameters:
          -
          cause - the underlying Exception that caused this - exception to be raised
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - - - - - -
          -
        • -

          TemplateException

          -
          public TemplateException(String description,
          -                         Throwable cause,
          -                         Environment env)
          -
          Constructs a TemplateException with both a description of the error - that occurred and the underlying Exception that caused this exception - to be raised.
          -
          -
          Parameters:
          -
          description - the description of the error that occurred
          -
          cause - the underlying Exception that caused this exception to be raised
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          TemplateException

          -
          protected TemplateException(Throwable cause,
          -                            Environment env,
          -                            freemarker.core.Expression blamedExpr,
          -                            freemarker.core._ErrorDescriptionBuilder descriptionBuilder)
          -
          Don't use this; this is to be used internally by FreeMarker. No backward compatibility guarantees.
          -
          -
          Parameters:
          -
          blamedExpr - Maybe null. The FTL stack in the Environment only specifies the error location - with "template element" granularity, and this can be used to point to the expression inside the - template element.
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getCauseException

          -
          public Exception getCauseException()
          -
          Deprecated. Java 1.4 has introduced Throwable.getCause() - use that instead, especially as this can't return - runtime exceptions and errors as is.
          -
        • -
        - - - -
          -
        • -

          getFTLInstructionStack

          -
          public String getFTLInstructionStack()
          -
          Returns the snapshot of the FTL stack trace at the time this exception was created.
          -
        • -
        - - - -
          -
        • -

          getEnvironment

          -
          public Environment getEnvironment()
          -
          -
          Returns:
          -
          the execution environment in which the exception occurred. - null if the exception was deserialized.
          -
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          printStackTrace

          -
          public void printStackTrace(PrintWriter out,
          -                            boolean heading,
          -                            boolean ftlStackTrace,
          -                            boolean javaStackTrace)
          -
          -
          Parameters:
          -
          heading - should the heading at the top be printed
          -
          ftlStackTrace - should the FTL stack trace be printed
          -
          javaStackTrace - should the Java stack trace be printed
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          printStackTrace

          -
          public void printStackTrace(PrintStream out,
          -                            boolean heading,
          -                            boolean ftlStackTrace,
          -                            boolean javaStackTrace)
          -
          -
          Parameters:
          -
          heading - should the heading at the top be printed
          -
          ftlStackTrace - should the FTL stack trace be printed
          -
          javaStackTrace - should the Java stack trace be printed
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          printStandardStackTrace

          -
          public void printStandardStackTrace(PrintStream ps)
          -
          Prints the stack trace as if wasn't overridden by TemplateException.
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          printStandardStackTrace

          -
          public void printStandardStackTrace(PrintWriter pw)
          -
          Prints the stack trace as if wasn't overridden by TemplateException.
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getMessageWithoutStackTop

          -
          public String getMessageWithoutStackTop()
          -
          Similar to getMessage(), but it doesn't contain the position of the failing instruction at then end - of the text. It might contains the position of the failing expression though as part of the expression - quotation, as that's the part of the description.
          -
        • -
        - - - -
          -
        • -

          getLineNumber

          -
          public Integer getLineNumber()
          -
          1-based line number of the failing section, or null if the information is not available.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getTemplateName

          -
          public String getTemplateName()
          -
          Returns the name of the template where the error has occurred, or null if the information isn't - available. This will be the full template name, regardless of how the template was invoked.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getColumnNumber

          -
          public Integer getColumnNumber()
          -
          1-based column number of the failing section, or null if the information is not available.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getEndLineNumber

          -
          public Integer getEndLineNumber()
          -
          1-based line number of the last line that contains the failing section, or null if the information is not - available.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getEndColumnNumber

          -
          public Integer getEndColumnNumber()
          -
          1-based column number of the last character of the failing template section, or null if the information - is not available. Note that unlike with Java string API-s, this column number is inclusive.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - -
          -
        • -

          getBlamedExpressionString

          -
          public String getBlamedExpressionString()
          -
          If there was a blamed expression attached to this exception, it returns its canonical form, otherwise it returns - null. This expression should always be inside the failing FTL instruction. - -

          The typical application of this is getting the undefined expression from InvalidReferenceException-s.

          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateExceptionHandler.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateExceptionHandler.html deleted file mode 100644 index dcc20f1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateExceptionHandler.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - -TemplateExceptionHandler (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateExceptionHandler

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          handleTemplateException

          -
          void handleTemplateException(TemplateException te,
          -                             Environment env,
          -                             Writer out)
          -                      throws TemplateException
          -
          Method called after a TemplateException was raised inside a template. The error is logged before this is - called, so there's no need to log it here. The exception should be re-thrown unless you want to - suppress the exception. - -

          Note that you can check with Environment.isInAttemptBlock() if you are inside a #attempt - block, which then will handle handle this exception and roll back the output generated inside it. - -

          Note that StopException-s (raised by #stop) won't be captured.

          -
          -
          Parameters:
          -
          te - The exception that occurred; don't forget to re-throw it unless you want to suppress it
          -
          env - The runtime environment of the template
          -
          out - This is where the output of the template is written
          -
          Throws:
          -
          TemplateException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateHashModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateHashModel.html deleted file mode 100644 index d7b9936..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateHashModel.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - -TemplateHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateHashModel

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateHashModelEx.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateHashModelEx.html deleted file mode 100644 index 3e71b95..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateHashModelEx.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - -TemplateHashModelEx (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateHashModelEx

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateMethodModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateMethodModel.html deleted file mode 100644 index ccc3b4d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateMethodModel.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - -TemplateMethodModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateMethodModel

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          exec

          -
          Object exec(List arguments)
          -     throws TemplateModelException
          -
          Deprecated. 
          -
          Executes the method call. All arguments passed to the method call are - coerced to strings before being passed, if the FreeMarker rules allow - the coercion. If some of the passed arguments can not be coerced to a - string, an exception will be raised in the engine and the method will - not be called. If your method would like to act on actual data model - objects instead of on their string representations, implement the - TemplateMethodModelEx instead.
          -
          -
          Parameters:
          -
          arguments - a List of String objects - containing the values of the arguments passed to the method.
          -
          Returns:
          -
          the return value of the method, or null. If the returned value - does not implement TemplateModel, it will be automatically - wrapped using the environment - object wrapper.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateMethodModelEx.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateMethodModelEx.html deleted file mode 100644 index 17dd46b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateMethodModelEx.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - -TemplateMethodModelEx (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateMethodModelEx

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          exec

          -
          Object exec(List arguments)
          -     throws TemplateModelException
          -
          Executes the method call.
          -
          -
          Specified by:
          -
          exec in interface TemplateMethodModel
          -
          Parameters:
          -
          arguments - a List of TemplateModel-s, - containing the arguments passed to the method. If the implementation absolutely wants - to operate on POJOs, it can use the static utility methods in the DeepUnwrap - class to easily obtain them. However, unwrapping is not always possible (or not perfectly), and isn't always - efficient, so it's recommended to use the original TemplateModel value as much as possible.
          -
          Returns:
          -
          the return value of the method, or null. If the returned value - does not implement TemplateModel, it will be automatically - wrapped using the environment's - object wrapper.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateModel.html deleted file mode 100644 index 33535a9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateModel.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - -TemplateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateModel

    -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Field Summary

        - - - - - - - - - - -
        Fields 
        Modifier and TypeField and Description
        static TemplateModelNOTHING -
        A general-purpose object to represent nothing.
        -
        -
      • -
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          NOTHING

          -
          static final TemplateModel NOTHING
          -
          A general-purpose object to represent nothing. It acts as - an empty string, false, empty sequence, empty hash, and - null-returning method model.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateModelAdapter.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateModelAdapter.html deleted file mode 100644 index ec59bd2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateModelAdapter.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - -TemplateModelAdapter (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateModelAdapter

    -
    -
    -
    -
      -
    • -
      -
      All Known Implementing Classes:
      -
      HashAdapter
      -
      -
      -
      -
      public interface TemplateModelAdapter
      -
      Implemented by classes that serve as adapters for template model objects in - some other object model. Actually a functional inverse of - AdapterTemplateModel. You will rarely implement this interface - directly. It is usually implemented by unwrapping adapter classes of various - object wrapper implementations.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getTemplateModel

          -
          TemplateModel getTemplateModel()
          -
          -
          Returns:
          -
          the template model this object is wrapping.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateModelException.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateModelException.html deleted file mode 100644 index 96eb81a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateModelException.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - -TemplateModelException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class TemplateModelException

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          TemplateModelException

          -
          public TemplateModelException()
          -
          Constructs a TemplateModelException with no - specified detail message.
          -
        • -
        - - - -
          -
        • -

          TemplateModelException

          -
          public TemplateModelException(String description)
          -
          Constructs a TemplateModelException with the - specified detail message.
          -
          -
          Parameters:
          -
          description - the detail message.
          -
          -
        • -
        - - - - - - - -
          -
        • -

          TemplateModelException

          -
          public TemplateModelException(Throwable cause)
          -
          Constructs a TemplateModelException with the given underlying - Exception, but no detail message.
          -
          -
          Parameters:
          -
          cause - the underlying Exception that caused this - exception to be raised
          -
          -
        • -
        - - - - - - - -
          -
        • -

          TemplateModelException

          -
          public TemplateModelException(String description,
          -                              Throwable cause)
          -
          Constructs a TemplateModelException with both a description of the error - that occurred and the underlying Exception that caused this exception - to be raised.
          -
          -
          Parameters:
          -
          description - the description of the error that occurred
          -
          cause - the underlying Exception that caused this - exception to be raised
          -
          -
        • -
        - - - -
          -
        • -

          TemplateModelException

          -
          protected TemplateModelException(Throwable cause,
          -                                 Environment env,
          -                                 String description,
          -                                 boolean preventAmbiguity)
          -
          Don't use this; this is to be used internally by FreeMarker.
          -
          -
          Parameters:
          -
          preventAmbiguity - its value is ignored; it's only to prevent constructor selection ambiguities for - backward-compatibility
          -
          -
        • -
        - - - -
          -
        • -

          TemplateModelException

          -
          protected TemplateModelException(Throwable cause,
          -                                 Environment env,
          -                                 freemarker.core._ErrorDescriptionBuilder descriptionBuilder,
          -                                 boolean preventAmbiguity)
          -
          Don't use this; this is to be used internally by FreeMarker.
          -
          -
          Parameters:
          -
          preventAmbiguity - its value is ignored; it's only to prevent constructor selection ambiguities for - backward-compatibility
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateModelIterator.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateModelIterator.html deleted file mode 100644 index f9c57c7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateModelIterator.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - -TemplateModelIterator (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateModelIterator

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateModelListSequence.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateModelListSequence.html deleted file mode 100644 index 3ee8575..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateModelListSequence.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - -TemplateModelListSequence (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class TemplateModelListSequence

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          TemplateModelListSequence

          -
          public TemplateModelListSequence(List list)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          get

          -
          public TemplateModel get(int index)
          -
          Description copied from interface: TemplateSequenceModel
          -
          Retrieves the i-th template model in this sequence.
          -
          -
          Specified by:
          -
          get in interface TemplateSequenceModel
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          -
        • -
        - - - -
          -
        • -

          size

          -
          public int size()
          -
          -
          Specified by:
          -
          size in interface TemplateSequenceModel
          -
          Returns:
          -
          the number of items in the list.
          -
          -
        • -
        - - - -
          -
        • -

          getWrappedObject

          -
          public Object getWrappedObject()
          -
          Returns the original List of TemplateModel-s, so it's not a fully unwrapped value.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateNodeModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateNodeModel.html deleted file mode 100644 index dec12b6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateNodeModel.html +++ /dev/null @@ -1,362 +0,0 @@ - - - - - - -TemplateNodeModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateNodeModel

    -
    -
    -
    -
      -
    • -
      -
      All Superinterfaces:
      -
      TemplateModel
      -
      -
      -
      All Known Implementing Classes:
      -
      NodeListModel, NodeModel
      -
      -
      -
      -
      public interface TemplateNodeModel
      -extends TemplateModel
      -
      "node" template language data type: an object that is a node in a tree. - A tree of nodes can be recursively visited using the <#visit...> and <#recurse...> - directives. This API is largely based on the W3C Document Object Model - (DOM) API. However, it's meant to be generally useful for describing - any tree of objects that you wish to navigate using a recursive visitor - design pattern (or simply through being able to get the parent - and child nodes). - -

      See the XML - Processing Guide for a concrete application.

      -
      -
      Since:
      -
      FreeMarker 2.3
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - - - - - - - - - -
          -
        • -

          getNodeName

          -
          String getNodeName()
          -            throws TemplateModelException
          -
          -
          Returns:
          -
          a String that is used to determine the processing - routine to use. In the XML implementation, if the node - is an element, it returns the element's tag name. If it - is an attribute, it returns the attribute's name. It - returns "@text" for text nodes, "@pi" for processing instructions, - and so on.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          getNodeType

          -
          String getNodeType()
          -            throws TemplateModelException
          -
          -
          Returns:
          -
          a String describing the type of node this is. - In the W3C DOM, this should be "element", "text", "attribute", etc. - A TemplateNodeModel implementation that models other kinds of - trees could return whatever it appropriate for that application. It - can be null, if you don't want to use node-types.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - -
          -
        • -

          getNodeNamespace

          -
          String getNodeNamespace()
          -                 throws TemplateModelException
          -
          -
          Returns:
          -
          the XML namespace URI with which this node is - associated. If this TemplateNodeModel implementation is - not XML-related, it will almost certainly be null. Even - for XML nodes, this will often be null.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateNumberModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateNumberModel.html deleted file mode 100644 index 7320fbb..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateNumberModel.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - -TemplateNumberModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateNumberModel

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateScalarModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateScalarModel.html deleted file mode 100644 index 97ed3a9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateScalarModel.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - -TemplateScalarModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateScalarModel

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          EMPTY_STRING

          -
          static final TemplateModel EMPTY_STRING
          -
          A constant value to use as the empty string.
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getAsString

          -
          String getAsString()
          -            throws TemplateModelException
          -
          Returns the string representation of this model. Don't return null, as that will cause exception. - (In classic-compatible mode the engine will convert null into empty string, though.)
          -
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateSequenceModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateSequenceModel.html deleted file mode 100644 index b798651..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateSequenceModel.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - -TemplateSequenceModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateSequenceModel

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          get

          -
          TemplateModel get(int index)
          -           throws TemplateModelException
          -
          Retrieves the i-th template model in this sequence.
          -
          -
          Returns:
          -
          the item at the specified index, or null if - the index is out of bounds. Note that a null value is - interpreted by FreeMarker as "variable does not exist", and accessing - a missing variables is usually considered as an error in the FreeMarker - Template Language, so the usage of a bad index will not remain hidden.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        - - - - -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TemplateTransformModel.html b/fmpp/docs/freemarker/api/freemarker/template/TemplateTransformModel.html deleted file mode 100644 index 7c2bcf1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TemplateTransformModel.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - -TemplateTransformModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TemplateTransformModel

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getWriter

          -
          Writer getWriter(Writer out,
          -                 Map args)
          -          throws TemplateModelException,
          -                 IOException
          -
          Returns a writer that will be used by the engine to feed the - transformation input to the transform. Each call to this method - must return a new instance of the writer so that the transformation - is thread-safe.
          -
          -
          Parameters:
          -
          out - the character stream to which to write the transformed output
          -
          args - the arguments (if any) passed to the transformation as a - map of key/value pairs where the keys are strings and the arguments are - TemplateModel instances. This is never null. If you need to convert the - template models to POJOs, you can use the utility methods in the - DeepUnwrap class.
          -
          Returns:
          -
          a writer to which the engine will feed the transformation - input, or null if the transform does not support nested content (body). - The returned writer can implement the TransformControl - interface if it needs advanced control over the evaluation of the - transformation body.
          -
          Throws:
          -
          TemplateModelException
          -
          IOException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/TransformControl.html b/fmpp/docs/freemarker/api/freemarker/template/TransformControl.html deleted file mode 100644 index 86eb7a3..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/TransformControl.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - -TransformControl (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Interface TransformControl

    -
    -
    -
    -
      -
    • -
      -
      -
      public interface TransformControl
      -
      An interface that can be implemented by writers returned from - TemplateTransformModel.getWriter(java.io.Writer, java.util.Map). The - methods on this - interfaces are callbacks that will be called by the template engine and that - give the writer a chance to better control the evaluation of the transform - body. The writer can instruct the engine to skip or to repeat body - evaluation, and gets notified about exceptions that are thrown during the - body evaluation.
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/Version.html b/fmpp/docs/freemarker/api/freemarker/template/Version.html deleted file mode 100644 index 831d1da..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/Version.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - - - -Version (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class Version

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      -
      public final class Version
      -extends Object
      -implements Serializable
      -
      Represents a version number plus the further qualifiers and build into. This is - mostly used for representing a FreeMarker version number, but must also be able - to parse the version strings of 3rd party libraries.
      -
      -
      Since:
      -
      2.3.20
      -
      See Also:
      -
      Configuration.getVersion(), -Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - - - - - - - - - -
          -
        • -

          Version

          -
          public Version(int major,
          -               int minor,
          -               int micro)
          -
        • -
        - - - -
          -
        • -

          Version

          -
          public Version(int major,
          -               int minor,
          -               int micro,
          -               String extraInfo,
          -               Boolean gaeCompatible,
          -               Date buildDate)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          intValueFor

          -
          public static int intValueFor(int major,
          -                              int minor,
          -                              int micro)
          -
        • -
        - - - -
          -
        • -

          toString

          -
          public String toString()
          -
          Contains the major.minor.micor numbers and the extraInfo part, not the other information.
          -
          -
          Overrides:
          -
          toString in class Object
          -
          -
        • -
        - - - -
          -
        • -

          getMajor

          -
          public int getMajor()
          -
          The 1st version number, like 1 in "1.2.3".
          -
        • -
        - - - -
          -
        • -

          getMinor

          -
          public int getMinor()
          -
          The 2nd version number, like 2 in "1.2.3".
          -
        • -
        - - - -
          -
        • -

          getMicro

          -
          public int getMicro()
          -
          The 3rd version number, like 3 in "1.2.3".
          -
        • -
        - - - -
          -
        • -

          getExtraInfo

          -
          public String getExtraInfo()
          -
          The arbitrary string after the micro version number without leading dot, dash or underscore, - like "RC03" in "2.4.0-RC03". - This is usually a qualifier (RC, SNAPHOST, nightly, beta, etc) and sometimes build info (like - date).
          -
        • -
        - - - -
          -
        • -

          isGAECompliant

          -
          public Boolean isGAECompliant()
          -
          -
          Returns:
          -
          The Google App Engine compliance, or null.
          -
          -
        • -
        - - - -
          -
        • -

          getBuildDate

          -
          public Date getBuildDate()
          -
          -
          Returns:
          -
          The build date if known, or null.
          -
          -
        • -
        - - - -
          -
        • -

          intValue

          -
          public int intValue()
          -
          -
          Returns:
          -
          major * 1000000 + minor * 1000 + micro.
          -
          -
        • -
        - - - -
          -
        • -

          hashCode

          -
          public int hashCode()
          -
          -
          Overrides:
          -
          hashCode in class Object
          -
          -
        • -
        - - - -
          -
        • -

          equals

          -
          public boolean equals(Object obj)
          -
          -
          Overrides:
          -
          equals in class Object
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/WrappingTemplateModel.html b/fmpp/docs/freemarker/api/freemarker/template/WrappingTemplateModel.html deleted file mode 100644 index 8f09578..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/WrappingTemplateModel.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - -WrappingTemplateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template
    -

    Class WrappingTemplateModel

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          WrappingTemplateModel

          -
          protected WrappingTemplateModel()
          -
          Deprecated. Use WrappingTemplateModel(ObjectWrapper) instead; this method uses the deprecated.
          -
          Protected constructor that creates a new wrapping template model using - the default object wrapper.
          -
        • -
        - - - -
          -
        • -

          WrappingTemplateModel

          -
          protected WrappingTemplateModel(ObjectWrapper objectWrapper)
          -
          Protected constructor that creates a new wrapping template model using the specified object wrapper.
          -
          -
          Parameters:
          -
          objectWrapper - the wrapper to use. Passing null to it - is allowed but deprecated. If null is passed, the deprecated default object wrapper - is used.
          -
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/AdapterTemplateModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/AdapterTemplateModel.html deleted file mode 100644 index a7d5d21..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/AdapterTemplateModel.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.AdapterTemplateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.AdapterTemplateModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/Configuration.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/Configuration.html deleted file mode 100644 index a804134..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/Configuration.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - -Uses of Class freemarker.template.Configuration (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.Configuration

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/DefaultObjectWrapper.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/DefaultObjectWrapper.html deleted file mode 100644 index 5ef83d7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/DefaultObjectWrapper.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - -Uses of Class freemarker.template.DefaultObjectWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.DefaultObjectWrapper

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/DefaultObjectWrapperBuilder.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/DefaultObjectWrapperBuilder.html deleted file mode 100644 index ae00f03..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/DefaultObjectWrapperBuilder.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.DefaultObjectWrapperBuilder (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.DefaultObjectWrapperBuilder

    -
    -
    No usage of freemarker.template.DefaultObjectWrapperBuilder
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/LocalizedString.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/LocalizedString.html deleted file mode 100644 index 54e5609..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/LocalizedString.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - -Uses of Class freemarker.template.LocalizedString (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.LocalizedString

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/ObjectWrapper.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/ObjectWrapper.html deleted file mode 100644 index 46d8155..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/ObjectWrapper.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.ObjectWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.ObjectWrapper

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/ResourceBundleLocalizedString.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/ResourceBundleLocalizedString.html deleted file mode 100644 index 29b0a3d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/ResourceBundleLocalizedString.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.ResourceBundleLocalizedString (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.ResourceBundleLocalizedString

    -
    -
    No usage of freemarker.template.ResourceBundleLocalizedString
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleCollection.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleCollection.html deleted file mode 100644 index f3da43e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleCollection.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.SimpleCollection (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.SimpleCollection

    -
    -
    No usage of freemarker.template.SimpleCollection
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleDate.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleDate.html deleted file mode 100644 index fa92a78..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleDate.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.SimpleDate (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.SimpleDate

    -
    -
    No usage of freemarker.template.SimpleDate
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleHash.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleHash.html deleted file mode 100644 index 71a1ff0..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleHash.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - -Uses of Class freemarker.template.SimpleHash (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.SimpleHash

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleList.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleList.html deleted file mode 100644 index dc4413f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleList.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.SimpleList (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.SimpleList

    -
    -
    No usage of freemarker.template.SimpleList
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleNumber.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleNumber.html deleted file mode 100644 index cd2186c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleNumber.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.SimpleNumber (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.SimpleNumber

    -
    -
    No usage of freemarker.template.SimpleNumber
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleObjectWrapper.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleObjectWrapper.html deleted file mode 100644 index 816e79f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleObjectWrapper.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.SimpleObjectWrapper (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.SimpleObjectWrapper

    -
    -
    No usage of freemarker.template.SimpleObjectWrapper
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleScalar.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleScalar.html deleted file mode 100644 index f6b4637..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleScalar.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.SimpleScalar (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.SimpleScalar

    -
    -
    No usage of freemarker.template.SimpleScalar
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleSequence.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleSequence.html deleted file mode 100644 index f1e2c3f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/SimpleSequence.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - -Uses of Class freemarker.template.SimpleSequence (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.SimpleSequence

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/Template.WrongEncodingException.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/Template.WrongEncodingException.html deleted file mode 100644 index ee2be60..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/Template.WrongEncodingException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.Template.WrongEncodingException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.Template.WrongEncodingException

    -
    -
    No usage of freemarker.template.Template.WrongEncodingException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/Template.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/Template.html deleted file mode 100644 index 08c9b1e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/Template.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - -Uses of Class freemarker.template.Template (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.Template

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateBooleanModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateBooleanModel.html deleted file mode 100644 index 15fb955..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateBooleanModel.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateBooleanModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateBooleanModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateCollectionModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateCollectionModel.html deleted file mode 100644 index 405303d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateCollectionModel.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateCollectionModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateCollectionModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDateModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDateModel.html deleted file mode 100644 index bc50c94..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDateModel.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateDateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateDateModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDirectiveBody.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDirectiveBody.html deleted file mode 100644 index 4dfc203..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDirectiveBody.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateDirectiveBody (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateDirectiveBody

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDirectiveModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDirectiveModel.html deleted file mode 100644 index a2feb98..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateDirectiveModel.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateDirectiveModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateDirectiveModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateException.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateException.html deleted file mode 100644 index 21959e2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateException.html +++ /dev/null @@ -1,671 +0,0 @@ - - - - - - -Uses of Class freemarker.template.TemplateException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.TemplateException

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateExceptionHandler.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateExceptionHandler.html deleted file mode 100644 index ca4eaf8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateExceptionHandler.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateExceptionHandler (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateExceptionHandler

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateHashModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateHashModel.html deleted file mode 100644 index 185085e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateHashModel.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateHashModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateHashModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateHashModelEx.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateHashModelEx.html deleted file mode 100644 index ed39435..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateHashModelEx.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateHashModelEx (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateHashModelEx

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateMethodModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateMethodModel.html deleted file mode 100644 index ba7b684..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateMethodModel.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateMethodModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateMethodModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateMethodModelEx.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateMethodModelEx.html deleted file mode 100644 index fa71bdb..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateMethodModelEx.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateMethodModelEx (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateMethodModelEx

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModel.html deleted file mode 100644 index 22ef208..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModel.html +++ /dev/null @@ -1,1492 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelAdapter.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelAdapter.html deleted file mode 100644 index efdef32..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelAdapter.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateModelAdapter (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateModelAdapter

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelException.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelException.html deleted file mode 100644 index 5136a15..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelException.html +++ /dev/null @@ -1,1145 +0,0 @@ - - - - - - -Uses of Class freemarker.template.TemplateModelException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.TemplateModelException

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelIterator.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelIterator.html deleted file mode 100644 index 9e768ba..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelIterator.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateModelIterator (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateModelIterator

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelListSequence.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelListSequence.html deleted file mode 100644 index 4940647..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateModelListSequence.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.TemplateModelListSequence (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.TemplateModelListSequence

    -
    -
    No usage of freemarker.template.TemplateModelListSequence
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateNodeModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateNodeModel.html deleted file mode 100644 index f145901..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateNodeModel.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateNodeModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateNodeModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateNumberModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateNumberModel.html deleted file mode 100644 index c700918..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateNumberModel.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateNumberModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateNumberModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateScalarModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateScalarModel.html deleted file mode 100644 index 16da35a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateScalarModel.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateScalarModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateScalarModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateSequenceModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateSequenceModel.html deleted file mode 100644 index 18709e6..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateSequenceModel.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateSequenceModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateSequenceModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateTransformModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateTransformModel.html deleted file mode 100644 index 8d34aa7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TemplateTransformModel.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TemplateTransformModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TemplateTransformModel

    -
    -
    -
      -
    • - - - - - - - - - - - - -
      Packages that use TemplateTransformModel 
      PackageDescription
      freemarker.template.utility -
      Various classes used by core FreeMarker code but might be useful outside of it too.
      -
      -
    • -
    • -
        -
      • - - -

        Uses of TemplateTransformModel in freemarker.template.utility

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Classes in freemarker.template.utility that implement TemplateTransformModel 
        Modifier and TypeClass and Description
        class CaptureOutput -
        Deprecated.  -
        Use block-assignments instead, like <assign x>...</assign>.
        -
        -
        class HtmlEscape -
        Performs an HTML escape of a given template fragment.
        -
        class JythonRuntime -
        A crude first pass at an embeddable Jython interpreter
        -
        class NormalizeNewlines -
        Transformer that supports FreeMarker legacy behavior: all newlines appearing - within the transformed area will be transformed into the platform's default - newline.
        -
        class StandardCompress -
        A filter that compresses each sequence of consecutive whitespace - to a single line break (if the sequence contains a line break) or a - single space.
        -
        class XmlEscape -
        Performs an XML escaping of a given template fragment.
        -
        -
      • -
      -
    • -
    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/TransformControl.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/TransformControl.html deleted file mode 100644 index e8271e5..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/TransformControl.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.TransformControl (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.TransformControl

    -
    -
    No usage of freemarker.template.TransformControl
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/Version.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/Version.html deleted file mode 100644 index e362ff9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/Version.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - -Uses of Class freemarker.template.Version (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.Version

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/class-use/WrappingTemplateModel.html b/fmpp/docs/freemarker/api/freemarker/template/class-use/WrappingTemplateModel.html deleted file mode 100644 index 9ee6565..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/class-use/WrappingTemplateModel.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - -Uses of Class freemarker.template.WrappingTemplateModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.WrappingTemplateModel

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/package-frame.html b/fmpp/docs/freemarker/api/freemarker/template/package-frame.html deleted file mode 100644 index 943917a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/package-frame.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - -freemarker.template (FreeMarker 2.3.21 API) - - - - - -

    freemarker.template

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/package-summary.html b/fmpp/docs/freemarker/api/freemarker/template/package-summary.html deleted file mode 100644 index 20958cf..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/package-summary.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - -freemarker.template (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.template

    -
    -
    The fundamental, most commonly used API-s of FreeMarker; -start with Configuration (also see -Getting Stared in the Manual.)
    -
    -

    See: Description

    -
    -
    - - - - -

    Package freemarker.template Description

    -

    The fundamental, most commonly used API-s of FreeMarker; -start with Configuration (also see -Getting Stared in the Manual.)

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/package-tree.html b/fmpp/docs/freemarker/api/freemarker/template/package-tree.html deleted file mode 100644 index d28ca73..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/package-tree.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - -freemarker.template Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.template

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/package-use.html b/fmpp/docs/freemarker/api/freemarker/template/package-use.html deleted file mode 100644 index b69896d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/package-use.html +++ /dev/null @@ -1,1148 +0,0 @@ - - - - - - -Uses of Package freemarker.template (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.template

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/CaptureOutput.html b/fmpp/docs/freemarker/api/freemarker/template/utility/CaptureOutput.html deleted file mode 100644 index 1c9cb18..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/CaptureOutput.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - -CaptureOutput (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class CaptureOutput

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateModel, TemplateTransformModel
      -
      -
      -
      Deprecated.  -
      Use block-assignments instead, like <assign x>...</assign>.
      -
      -
      -
      public class CaptureOutput
      -extends Object
      -implements TemplateTransformModel
      -
      A transform that captures the output of a block of FTL code and stores that in a variable. - -

      As this transform is initially present in the shared variable set, you can always - access it from the templates:

      - -
      - <@capture_output var="captured">
      -   ...
      - </@capture_output>
      - 
      - -

      And later in the template you can use the captured output:

      - - ${captured} - -

      This transform requires one of three parameters: var, local, or global. - Each of them specifies the name of the variable that stores the captured output, but the first creates a - variable in a name-space (as <#assign>), the second creates a macro-local variable (as <#local>), - and the last creates a global variable (as <#global>). -

      -

      In the case of an assignment within a namespace, there is an optional parameter - namespace that indicates in which namespace to do the assignment. - if this is omitted, the current namespace is used, and this will be, by far, the most - common usage pattern.

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          CaptureOutput

          -
          public CaptureOutput()
          -
          Deprecated. 
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getWriter

          -
          public Writer getWriter(Writer out,
          -                        Map args)
          -                 throws TemplateModelException
          -
          Deprecated. 
          -
          Description copied from interface: TemplateTransformModel
          -
          Returns a writer that will be used by the engine to feed the - transformation input to the transform. Each call to this method - must return a new instance of the writer so that the transformation - is thread-safe.
          -
          -
          Specified by:
          -
          getWriter in interface TemplateTransformModel
          -
          Parameters:
          -
          out - the character stream to which to write the transformed output
          -
          args - the arguments (if any) passed to the transformation as a - map of key/value pairs where the keys are strings and the arguments are - TemplateModel instances. This is never null. If you need to convert the - template models to POJOs, you can use the utility methods in the - DeepUnwrap class.
          -
          Returns:
          -
          a writer to which the engine will feed the transformation - input, or null if the transform does not support nested content (body). - The returned writer can implement the TransformControl - interface if it needs advanced control over the evaluation of the - transformation body.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/ClassUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/ClassUtil.html deleted file mode 100644 index a515040..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/ClassUtil.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - -ClassUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class ClassUtil

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class ClassUtil
      -extends Object
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - - - - - - - - - -
          -
        • -

          getShortClassName

          -
          public static String getShortClassName(Class pClass,
          -                                       boolean shortenFreeMarkerClasses)
          -
          Returns a class name without "java.lang." and "java.util." prefix, also shows array types in a format like - int[]; useful for printing class names in error messages.
          -
          -
          Parameters:
          -
          pClass - can be null, in which case the method returns null.
          -
          shortenFreeMarkerClasses - if true, it will also shorten FreeMarker class names. The exact rules - aren't specified and might change over time, but right now, freemarker.ext.beans.NumberModel for - example becomes to f.e.b.NumberModel.
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - - - - - -
          -
        • -

          getShortClassNameOfObject

          -
          public static String getShortClassNameOfObject(Object obj,
          -                                               boolean shortenFreeMarkerClasses)
          -
          getShortClassName(Class, boolean) called with object.getClass(), but returns the fictional - class name Null for a null value.
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          getFTLTypeDescription

          -
          public static String getFTLTypeDescription(TemplateModel tm)
          -
          Returns the type description of a value with FTL terms (not plain class name), as it should be used in - type-related error messages and for debugging purposes. The exact format is not specified and might change over - time, but currently it's something like "string (wrapper: f.t.SimpleScalar)" or - "sequence+hash+string (ArrayList wrapped into f.e.b.CollectionModel)".
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          primitiveClassToBoxingClass

          -
          public static Class primitiveClassToBoxingClass(Class primitiveClass)
          -
          Gets the wrapper class for a primitive class, like Integer for int, also returns Void - for void.
          -
          -
          Parameters:
          -
          primitiveClass - A Class like int.type, boolean.type, etc. If it's not a primitive - class, or it's null, then the parameter value is returned as is. Note that performance-wise the - method assumes that it's a primitive class.
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        - - - - - - - -
          -
        • -

          isNumerical

          -
          public static boolean isNumerical(Class type)
          -
          Tells if a type is numerical; works both for primitive types and classes.
          -
          -
          Parameters:
          -
          type - can't be null
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/CollectionUtils.html b/fmpp/docs/freemarker/api/freemarker/template/utility/CollectionUtils.html deleted file mode 100644 index ef5d9f9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/CollectionUtils.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - -CollectionUtils (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class CollectionUtils

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class CollectionUtils
      -extends Object
      -
      -
      Since:
      -
      2.3.21
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          EMPTY_OBJECT_ARRAY

          -
          public static final Object[] EMPTY_OBJECT_ARRAY
          -
        • -
        - - - -
          -
        • -

          EMPTY_CLASS_ARRAY

          -
          public static final Class[] EMPTY_CLASS_ARRAY
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/Collections12.html b/fmpp/docs/freemarker/api/freemarker/template/utility/Collections12.html deleted file mode 100644 index dbb8cba..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/Collections12.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - -Collections12 (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class Collections12

    -
    -
    - -
    -
      -
    • -
      -
      Deprecated.  -
      Not needed anymore, as FreeMarker now requires higher than Java 1.3
      -
      -
      -
      public class Collections12
      -extends Object
      -
      Implementation of missing JDK 1.3 collection features for JDK 1.2
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Field Detail

        - - - -
          -
        • -

          EMPTY_MAP

          -
          public static final Map EMPTY_MAP
          -
          Deprecated. 
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          singletonMap

          -
          public static Map singletonMap(Object key,
          -                               Object value)
          -
          Deprecated. 
          -
        • -
        - - - -
          -
        • -

          singletonList

          -
          public static List singletonList(Object o)
          -
          Deprecated. 
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/Constants.html b/fmpp/docs/freemarker/api/freemarker/template/utility/Constants.html deleted file mode 100644 index 48c32c9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/Constants.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - -Constants (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class Constants

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class Constants
      -extends Object
      -
      Frequently used constant TemplateModel values. - -

      These constants should be stored in the TemplateModel - sub-interfaces, but for bacward compatibility they are stored here instead. - Starting from FreeMarker 2.4 they should be copyed (not moved!) into the - TemplateModel sub-interfaces, and this class should be marked as - deprecated.

      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/DOMNodeModel.html b/fmpp/docs/freemarker/api/freemarker/template/utility/DOMNodeModel.html deleted file mode 100644 index c5ff79c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/DOMNodeModel.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - -DOMNodeModel (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class DOMNodeModel

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.CalendarFieldsToDateConverter.html b/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.CalendarFieldsToDateConverter.html deleted file mode 100644 index bd31960..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.CalendarFieldsToDateConverter.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - -DateUtil.CalendarFieldsToDateConverter (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Interface DateUtil.CalendarFieldsToDateConverter

    -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Summary

        - - - - - - - - - - -
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        Datecalculate(int era, - int year, - int month, - int day, - int hours, - int minutes, - int secs, - int millisecs, - boolean addOneDay, - TimeZone tz) -
        Calculates the Date from the specified calendar fields.
        -
        -
      • -
      -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          calculate

          -
          Date calculate(int era,
          -               int year,
          -               int month,
          -               int day,
          -               int hours,
          -               int minutes,
          -               int secs,
          -               int millisecs,
          -               boolean addOneDay,
          -               TimeZone tz)
          -
          Calculates the Date from the specified calendar fields.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.DateParseException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.DateParseException.html deleted file mode 100644 index 6de4e95..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.DateParseException.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - -DateUtil.DateParseException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class DateUtil.DateParseException

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          DateParseException

          -
          public DateParseException(String message)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.DateToISO8601CalendarFactory.html b/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.DateToISO8601CalendarFactory.html deleted file mode 100644 index 181763e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.DateToISO8601CalendarFactory.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - -DateUtil.DateToISO8601CalendarFactory (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Interface DateUtil.DateToISO8601CalendarFactory

    -
    -
    -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          get

          -
          GregorianCalendar get(TimeZone tz,
          -                      Date date)
          -
          Returns a GregorianCalendar with the desired time zone and - time and US locale. The returned calendar is used as read-only. - It must be guaranteed that within a thread the instance returned last time - is not in use anymore when this method is called again.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.TrivialCalendarFieldsToDateConverter.html b/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.TrivialCalendarFieldsToDateConverter.html deleted file mode 100644 index e1ac792..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.TrivialCalendarFieldsToDateConverter.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - -DateUtil.TrivialCalendarFieldsToDateConverter (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class DateUtil.TrivialCalendarFieldsToDateConverter

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • freemarker.template.utility.DateUtil.TrivialCalendarFieldsToDateConverter
      • -
      -
    • -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.TrivialDateToISO8601CalendarFactory.html b/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.TrivialDateToISO8601CalendarFactory.html deleted file mode 100644 index 75d38aa..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.TrivialDateToISO8601CalendarFactory.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - -DateUtil.TrivialDateToISO8601CalendarFactory (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class DateUtil.TrivialDateToISO8601CalendarFactory

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • freemarker.template.utility.DateUtil.TrivialDateToISO8601CalendarFactory
      • -
      -
    • -
    -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.html deleted file mode 100644 index 5664339..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/DateUtil.html +++ /dev/null @@ -1,720 +0,0 @@ - - - - - - -DateUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class DateUtil

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class DateUtil
      -extends Object
      -
      Date and time related utilities.
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/DeepUnwrap.html b/fmpp/docs/freemarker/api/freemarker/template/utility/DeepUnwrap.html deleted file mode 100644 index 6dedb58..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/DeepUnwrap.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - -DeepUnwrap (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class DeepUnwrap

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class DeepUnwrap
      -extends Object
      -
      Utility methods for unwrapping TemplateModel-s.
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/Execute.html b/fmpp/docs/freemarker/api/freemarker/template/utility/Execute.html deleted file mode 100644 index 8a96df9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/Execute.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - -Execute (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class Execute

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateMethodModel, TemplateModel
      -
      -
      -
      -
      public class Execute
      -extends Object
      -implements TemplateMethodModel
      -

      Gives FreeMarker the the ability to execute external commands. Will fork - a process, and inline anything that process sends to stdout in the template. - Based on a patch submitted by Peter Molettiere.

      - -

      BE CAREFUL! this tag, depending on use, may allow you - to set something up so that users of your web - application could run arbitrary code on your server. - This can only happen if you allow unchecked GET/POST - submissions to be used as the command string in the - exec tag.

      - -

      Usage:
      - From java:

      -
      - SimpleHash root = new SimpleHash();
      -
      - root.put( "exec", new freemarker.template.utility.Execute() );
      -
      - ...
      - 
      - -

      From your FreeMarker template:

      -
      -
      - The following is executed:
      - ${exec( "/usr/bin/ls" )}
      -
      - ...
      - 
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          Execute

          -
          public Execute()
          -
        • -
        -
      • -
      - - -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/HtmlEscape.html b/fmpp/docs/freemarker/api/freemarker/template/utility/HtmlEscape.html deleted file mode 100644 index 6c5e73d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/HtmlEscape.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - -HtmlEscape (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class HtmlEscape

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateModel, TemplateTransformModel
      -
      -
      -
      -
      public class HtmlEscape
      -extends Object
      -implements TemplateTransformModel
      -
      Performs an HTML escape of a given template fragment. Specifically, - < > " and & are all turned into entities. - -

      Usage:
      - From java:

      -
      - SimpleHash root = new SimpleHash();
      -
      - root.put( "htmlEscape", new freemarker.template.utility.HtmlEscape() );
      -
      - ...
      - 
      - -

      From your FreeMarker template:

      -
      -
      - The following is HTML-escaped:
      - <transform htmlEscape>
      -   <p>This paragraph has all HTML special characters escaped.</p>
      - </transform>
      -
      - ...
      - 
      -
      -
      See Also:
      -
      XmlEscape
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          HtmlEscape

          -
          public HtmlEscape()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getWriter

          -
          public Writer getWriter(Writer out,
          -                        Map args)
          -
          Description copied from interface: TemplateTransformModel
          -
          Returns a writer that will be used by the engine to feed the - transformation input to the transform. Each call to this method - must return a new instance of the writer so that the transformation - is thread-safe.
          -
          -
          Specified by:
          -
          getWriter in interface TemplateTransformModel
          -
          Parameters:
          -
          out - the character stream to which to write the transformed output
          -
          args - the arguments (if any) passed to the transformation as a - map of key/value pairs where the keys are strings and the arguments are - TemplateModel instances. This is never null. If you need to convert the - template models to POJOs, you can use the utility methods in the - DeepUnwrap class.
          -
          Returns:
          -
          a writer to which the engine will feed the transformation - input, or null if the transform does not support nested content (body). - The returned writer can implement the TransformControl - interface if it needs advanced control over the evaluation of the - transformation body.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/JythonRuntime.html b/fmpp/docs/freemarker/api/freemarker/template/utility/JythonRuntime.html deleted file mode 100644 index 044b5be..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/JythonRuntime.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - -JythonRuntime (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class JythonRuntime

    -
    -
    -
      -
    • java.lang.Object
    • -
    • -
        -
      • org.python.util.PythonInterpreter
      • -
      • -
          -
        • freemarker.template.utility.JythonRuntime
        • -
        -
      • -
      -
    • -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Field Summary

        -
          -
        • - - -

          Fields inherited from class org.python.util.PythonInterpreter

          -cflags, systemState
        • -
        - -
      • -
      - -
        -
      • - - -

        Constructor Summary

        - - - - - - - - -
        Constructors 
        Constructor and Description
        JythonRuntime() 
        -
      • -
      - - -
    • -
    -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          JythonRuntime

          -
          public JythonRuntime()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getWriter

          -
          public Writer getWriter(Writer out,
          -                        Map args)
          -
          Description copied from interface: TemplateTransformModel
          -
          Returns a writer that will be used by the engine to feed the - transformation input to the transform. Each call to this method - must return a new instance of the writer so that the transformation - is thread-safe.
          -
          -
          Specified by:
          -
          getWriter in interface TemplateTransformModel
          -
          Parameters:
          -
          out - the character stream to which to write the transformed output
          -
          args - the arguments (if any) passed to the transformation as a - map of key/value pairs where the keys are strings and the arguments are - TemplateModel instances. This is never null. If you need to convert the - template models to POJOs, you can use the utility methods in the - DeepUnwrap class.
          -
          Returns:
          -
          a writer to which the engine will feed the transformation - input, or null if the transform does not support nested content (body). - The returned writer can implement the TransformControl - interface if it needs advanced control over the evaluation of the - transformation body.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/NormalizeNewlines.html b/fmpp/docs/freemarker/api/freemarker/template/utility/NormalizeNewlines.html deleted file mode 100644 index fc7cb95..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/NormalizeNewlines.html +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - -NormalizeNewlines (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class NormalizeNewlines

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateModel, TemplateTransformModel
      -
      -
      -
      -
      public class NormalizeNewlines
      -extends Object
      -implements TemplateTransformModel
      -

      Transformer that supports FreeMarker legacy behavior: all newlines appearing - within the transformed area will be transformed into the platform's default - newline. Unlike the old behavior, however, newlines generated by the data - model are also converted. Legacy behavior was to leave newlines in the - data model unaltered.

      - -

      Usage:
      - From java:

      -
      - SimpleHash root = new SimpleHash();
      -
      - root.put( "normalizeNewlines", new freemarker.template.utility.NormalizeNewlines() );
      -
      - ...
      - 
      - -

      From your FreeMarker template:

      -
      - <transform normalizeNewlines>
      -   <html>
      -   <head>
      -   ...
      -   <p>This template has all newlines normalized to the current platform's
      -   default.</p>
      -   ...
      -   </body>
      -   </html>
      - </transform>
      - 
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NormalizeNewlines

          -
          public NormalizeNewlines()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getWriter

          -
          public Writer getWriter(Writer out,
          -                        Map args)
          -
          Description copied from interface: TemplateTransformModel
          -
          Returns a writer that will be used by the engine to feed the - transformation input to the transform. Each call to this method - must return a new instance of the writer so that the transformation - is thread-safe.
          -
          -
          Specified by:
          -
          getWriter in interface TemplateTransformModel
          -
          Parameters:
          -
          out - the character stream to which to write the transformed output
          -
          args - the arguments (if any) passed to the transformation as a - map of key/value pairs where the keys are strings and the arguments are - TemplateModel instances. This is never null. If you need to convert the - template models to POJOs, you can use the utility methods in the - DeepUnwrap class.
          -
          Returns:
          -
          a writer to which the engine will feed the transformation - input, or null if the transform does not support nested content (body). - The returned writer can implement the TransformControl - interface if it needs advanced control over the evaluation of the - transformation body.
          -
          -
        • -
        - - - -
          -
        • -

          transform

          -
          public void transform(Reader in,
          -                      Writer out)
          -               throws IOException
          -
          Performs newline normalization on FreeMarker output.
          -
          -
          Parameters:
          -
          in - the input to be transformed
          -
          out - the destination of the transformation
          -
          Throws:
          -
          IOException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/NullArgumentException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/NullArgumentException.html deleted file mode 100644 index 6fca163..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/NullArgumentException.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - -NullArgumentException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class NullArgumentException

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          NullArgumentException

          -
          public NullArgumentException(String argumentName)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          check

          -
          public static void check(String argumentName,
          -                         Object argumentValue)
          -
          Convenience method to protect against a null argument.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/NullWriter.html b/fmpp/docs/freemarker/api/freemarker/template/utility/NullWriter.html deleted file mode 100644 index 8cd0614..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/NullWriter.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - -NullWriter (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class NullWriter

    -
    -
    - -
    - -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/NumberUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/NumberUtil.html deleted file mode 100644 index c02fb7c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/NumberUtil.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - -NumberUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class NumberUtil

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class NumberUtil
      -extends Object
      -
      Number- and math-related utilities.
      -
      -
      Since:
      -
      2.3.20
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          isInfinite

          -
          public static boolean isInfinite(Number num)
          -
        • -
        - - - -
          -
        • -

          isNaN

          -
          public static boolean isNaN(Number num)
          -
        • -
        - - - - - - - -
          -
        • -

          isIntegerBigDecimal

          -
          public static boolean isIntegerBigDecimal(BigDecimal bd)
          -
          Tells if a BigDecimal stores a whole number. For example, it returns true for 1.0000, - but false for 1.0001.
          -
          -
          Since:
          -
          2.3.21
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/ObjectConstructor.html b/fmpp/docs/freemarker/api/freemarker/template/utility/ObjectConstructor.html deleted file mode 100644 index da1c05b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/ObjectConstructor.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - -ObjectConstructor (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class ObjectConstructor

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateMethodModel, TemplateMethodModelEx, TemplateModel
      -
      -
      -
      -
      public class ObjectConstructor
      -extends Object
      -implements TemplateMethodModelEx
      -
      An object that you can make available in a template - to instantiate arbitrary beans-wrapped objects in a template. - Beware of this class's security implications. It allows - the instantiation of arbitrary objects and invoking - methods on them. Usage is something like: -
      -
      myDataModel.put("objectConstructor", new ObjectConstructor()); -
      -
      And then from your FTL code: -
      -
      <#assign aList = objectConstructor("java.util.ArrayList", 100)>
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/OptimizerUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/OptimizerUtil.html deleted file mode 100644 index 77c5f4a..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/OptimizerUtil.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - -OptimizerUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class OptimizerUtil

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class OptimizerUtil
      -extends Object
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          optimizeListStorage

          -
          public static List optimizeListStorage(List list)
          -
        • -
        - - - -
          -
        • -

          optimizeNumberRepresentation

          -
          public static Number optimizeNumberRepresentation(Number number)
          -
          This is needed to reverse the extreme conversions in arithmetic - operations so that numbers can be meaningfully used with models that - don't know what to do with a BigDecimal. Of course, this will make - impossible for these models (i.e. Jython) to receive a BigDecimal even if - it was originally placed as such in the data model. However, since - arithmetic operations aggressively erase the information regarding the - original number type, we have no other choice to ensure expected operation - in majority of cases.
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/SecurityUtilities.html b/fmpp/docs/freemarker/api/freemarker/template/utility/SecurityUtilities.html deleted file mode 100644 index 6cc8cda..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/SecurityUtilities.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - -SecurityUtilities (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class SecurityUtilities

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class SecurityUtilities
      -extends Object
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getSystemProperty

          -
          public static String getSystemProperty(String key)
          -
        • -
        - - - -
          -
        • -

          getSystemProperty

          -
          public static String getSystemProperty(String key,
          -                                       String defValue)
          -
        • -
        - - - -
          -
        • -

          getSystemProperty

          -
          public static Integer getSystemProperty(String key,
          -                                        int defValue)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/StandardCompress.html b/fmpp/docs/freemarker/api/freemarker/template/utility/StandardCompress.html deleted file mode 100644 index ae663c0..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/StandardCompress.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - -StandardCompress (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class StandardCompress

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateModel, TemplateTransformModel
      -
      -
      -
      -
      public class StandardCompress
      -extends Object
      -implements TemplateTransformModel
      -

      A filter that compresses each sequence of consecutive whitespace - to a single line break (if the sequence contains a line break) or a - single space. In addition, leading and trailing whitespace is - completely removed.

      - -

      Specify the transform parameter single_line = true - to always compress to a single space instead of a line break.

      - -

      The default buffer size can be overridden by specifying a - buffer_size transform parameter (in bytes).

      - -

      Note: The compress tag is implemented using this filter

      - -

      Usage:
      - From java:

      -
      - SimpleHash root = new SimpleHash();
      -
      - root.put( "standardCompress", new freemarker.template.utility.StandardCompress() );
      -
      - ...
      - 
      - -

      From your FreeMarker template:

      -
      - <transform standardCompress>
      -   <p>This    paragraph will have
      -       extraneous
      -
      - whitespace removed.</p>
      - </transform>
      - 
      - -

      Output:

      -
      - <p>This paragraph will have
      - extraneous
      - whitespace removed.</p>
      - 
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - - - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          StandardCompress

          -
          public StandardCompress()
          -
        • -
        - - - -
          -
        • -

          StandardCompress

          -
          public StandardCompress(int defaultBufferSize)
          -
          -
          Parameters:
          -
          defaultBufferSize - the default amount of characters to buffer
          -
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getWriter

          -
          public Writer getWriter(Writer out,
          -                        Map args)
          -                 throws TemplateModelException
          -
          Description copied from interface: TemplateTransformModel
          -
          Returns a writer that will be used by the engine to feed the - transformation input to the transform. Each call to this method - must return a new instance of the writer so that the transformation - is thread-safe.
          -
          -
          Specified by:
          -
          getWriter in interface TemplateTransformModel
          -
          Parameters:
          -
          out - the character stream to which to write the transformed output
          -
          args - the arguments (if any) passed to the transformation as a - map of key/value pairs where the keys are strings and the arguments are - TemplateModel instances. This is never null. If you need to convert the - template models to POJOs, you can use the utility methods in the - DeepUnwrap class.
          -
          Returns:
          -
          a writer to which the engine will feed the transformation - input, or null if the transform does not support nested content (body). - The returned writer can implement the TransformControl - interface if it needs advanced control over the evaluation of the - transformation body.
          -
          Throws:
          -
          TemplateModelException
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/StringUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/StringUtil.html deleted file mode 100644 index a1aab91..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/StringUtil.html +++ /dev/null @@ -1,1174 +0,0 @@ - - - - - - -StringUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class StringUtil

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class StringUtil
      -extends Object
      -
      Some text related utilities.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          StringUtil

          -
          public StringUtil()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          HTMLEnc

          -
          public static String HTMLEnc(String s)
          -
          Deprecated. Use XHTMLEnc(String) instead, because it escapes apostrophe-quote too.
          -
          HTML encoding (does not convert line breaks and apostrophe-quote). - Replaces all '>' '<' '&' and '"' with entity reference, but not "'" (apostrophe-quote). - The last is not escaped as back then when this was written some user agents didn't understood - "&apos;" nor "&#39;".
          -
        • -
        - - - -
          -
        • -

          XMLEnc

          -
          public static String XMLEnc(String s)
          -
          XML Encoding. - Replaces all '>' '<' '&', "'" and '"' with entity reference
          -
        • -
        - - - -
          -
        • -

          XHTMLEnc

          -
          public static String XHTMLEnc(String s)
          -
          XHTML Encoding. - Replaces all '>' '<' '&', "'" and '"' with entity reference - suitable for XHTML decoding in common user agents (including legacy - user agents, which do not decode "&apos;" to "'", so "&#39;" is used - instead [see http://www.w3.org/TR/xhtml1/#C_16])
          -
        • -
        - - - -
          -
        • -

          XMLEncNA

          -
          public static String XMLEncNA(String s)
          -
          XML encoding without replacing apostrophes.
          -
          -
          See Also:
          -
          XMLEnc(String)
          -
          -
        • -
        - - - -
          -
        • -

          XMLEncQAttr

          -
          public static String XMLEncQAttr(String s)
          -
          XML encoding for attributes values quoted with " (not with '!). - Also can be used for HTML attributes that are quoted with ".
          -
          -
          See Also:
          -
          XMLEnc(String)
          -
          -
        • -
        - - - -
          -
        • -

          XMLEncNQG

          -
          public static String XMLEncNQG(String s)
          -
          XML encoding without replacing apostrophes and quotation marks and - greater-thans (except in ]]>).
          -
          -
          See Also:
          -
          XMLEnc(String)
          -
          -
        • -
        - - - -
          -
        • -

          RTFEnc

          -
          public static String RTFEnc(String s)
          -
          Rich Text Format encoding (does not replace line breaks). - Escapes all '\' '{' '}' and '"'
          -
        • -
        - - - - - - - - - - - -
          -
        • -

          FTLStringLiteralEnc

          -
          public static String FTLStringLiteralEnc(String s)
          -
        • -
        - - - -
          -
        • -

          FTLStringLiteralDec

          -
          public static String FTLStringLiteralDec(String s)
          -                                  throws ParseException
          -
          FTL string literal decoding. - - \\, \", \', \n, \t, \r, \b and \f will be replaced according to - Java rules. In additional, it knows \g, \l, \a and \{ which are - replaced with <, >, & and { respectively. - \x works as hexadecimal character code escape. The character - codes are interpreted according to UCS basic plane (Unicode). - "f\x006Fo", "f\x06Fo" and "f\x6Fo" will be "foo". - "f\x006F123" will be "foo123" as the maximum number of digits is 4. - - All other \X (where X is any character not mentioned above or End-of-string) - will cause a ParseException.
          -
          -
          Parameters:
          -
          s - String literal without the surrounding quotation marks
          -
          Returns:
          -
          String with all escape sequences resolved
          -
          Throws:
          -
          ParseException - if there string contains illegal escapes
          -
          -
        • -
        - - - -
          -
        • -

          deduceLocale

          -
          public static Locale deduceLocale(String input)
          -
        • -
        - - - -
          -
        • -

          capitalize

          -
          public static String capitalize(String s)
          -
        • -
        - - - -
          -
        • -

          getYesNo

          -
          public static boolean getYesNo(String s)
          -
        • -
        - - - -
          -
        • -

          split

          -
          public static String[] split(String s,
          -                             char c)
          -
          Splits a string at the specified character.
          -
        • -
        - - - -
          -
        • -

          split

          -
          public static String[] split(String s,
          -                             String sep,
          -                             boolean caseInsensitive)
          -
          Splits a string at the specified string.
          -
        • -
        - - - - - - - -
          -
        • -

          replace

          -
          public static String replace(String text,
          -                             String oldsub,
          -                             String newsub,
          -                             boolean caseInsensitive,
          -                             boolean firstOnly)
          -
          Replaces all occurrences of a sub-string in a string.
          -
          -
          Parameters:
          -
          text - The string where it will replace oldsub with - newsub.
          -
          Returns:
          -
          String The string after the replacements.
          -
          -
        • -
        - - - -
          -
        • -

          chomp

          -
          public static String chomp(String s)
          -
          Removes the line-break from the end of the string.
          -
        • -
        - - - -
          -
        • -

          emptyToNull

          -
          public static String emptyToNull(String s)
          -
          Converts a 0-length string to null, leaves the string as is otherwise.
          -
          -
          Parameters:
          -
          s - maybe null.
          -
          -
        • -
        - - - -
          -
        • -

          jQuote

          -
          public static String jQuote(Object obj)
          -
          Converts the parameter with toString (if it's not null) and passes it to - jQuote(String).
          -
        • -
        - - - -
          -
        • -

          jQuote

          -
          public static String jQuote(String s)
          -
          Quotes string as Java Language string literal. - Returns string "null" if s - is null.
          -
        • -
        - - - -
          -
        • -

          jQuoteNoXSS

          -
          public static String jQuoteNoXSS(Object obj)
          -
          Converts the parameter with toString (if not - null)and passes it to jQuoteNoXSS(String).
          -
        • -
        - - - -
          -
        • -

          jQuoteNoXSS

          -
          public static String jQuoteNoXSS(String s)
          -
          Same as jQuoteNoXSS(String) but also escapes '<' - as \u003C. This is used for log messages to prevent XSS - on poorly written Web-based log viewers.
          -
        • -
        - - - -
          -
        • -

          javaStringEnc

          -
          public static String javaStringEnc(String s)
          -
          Escapes the String with the escaping rules of Java language - string literals, so it's safe to insert the value into a string literal. - The resulting string will not be quoted. - -

          All characters under UCS code point 0x20 will be escaped. - Where they have no dedicated escape sequence in Java, they will - be replaced with hexadecimal escape (\uXXXX).

          -
          -
          See Also:
          -
          jQuote(String)
          -
          -
        • -
        - - - -
          -
        • -

          javaScriptStringEnc

          -
          public static String javaScriptStringEnc(String s)
          -
          Escapes a String to be safely insertable into a JavaScript string literal; for more see - jsStringEnc(s, false).
          -
        • -
        - - - - - - - -
          -
        • -

          jsStringEnc

          -
          public static String jsStringEnc(String s,
          -                                 boolean json)
          -
          Escapes a String to be safely insertable into a JavaScript or a JSON string literal. - The resulting string will not be quoted; the caller must ensure that they are there in the final - output. Note that for JSON, the quotation marks must be ", not ', because JSON doesn't escape - '. - -

          The escaping rules guarantee that if the inside - of the literal is from one or more touching sections of strings escaped with this, no character sequence will - occur that closes the string literal or has special meaning in HTML/XML that can terminate the script section. - (If, however, the escaped section is preceded by or followed by strings from other sources, this can't be - guaranteed in some rare cases. Like x = "</${a?js_string}" might closes the "script" - element if a is is "script>".) - - The escaped characters are: - - - - - - - - - - - -
          Input - Output -
          " - \" -
          ' if not in JSON-mode - \' -
          \ - \\ -
          / if the method can't know that it won't be directly after < - \/ -
          > if the method can't know that it won't be directly after ]] or -- - JavaScript: \>; JSON: \u003E -
          < if the method can't know that it won't be directly followed by ! or ? - \u003C -
          - u0000-u001f (UNICODE control characters - disallowed by JSON)
          - u007f-u009f (UNICODE control characters - disallowed by JSON) -
          \n, \r and such, or if there's no such dedicated escape: - JavaScript: \xXX, JSON: \uXXXX -
          - u2028 (Line separator - source code line-break in ECMAScript)
          - u2029 (Paragraph separator - source code line-break in ECMAScript)
          -
          \uXXXX -

          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        - - - -
          -
        • -

          parseNameValuePairList

          -
          public static Map parseNameValuePairList(String s,
          -                                         String defaultValue)
          -                                  throws ParseException
          -
          Parses a name-value pair list, where the pairs are separated with comma, - and the name and value is separated with colon. - The keys and values can contain only letters, digits and _. They - can't be quoted. White-space around the keys and values are ignored. The - value can be omitted if defaultValue is not null. When a - value is omitted, then the colon after the key must be omitted as well. - The same key can't be used for multiple times.
          -
          -
          Parameters:
          -
          s - the string to parse. - For example: "strong:100, soft:900".
          -
          defaultValue - the value used when the value is omitted in a - key-value pair.
          -
          Returns:
          -
          the map that contains the name-value pairs.
          -
          Throws:
          -
          ParseException - if the string is not a valid name-value - pair list.
          -
          -
        • -
        - - - -
          -
        • -

          isXMLID

          -
          public static boolean isXMLID(String name)
          -
          -
          Returns:
          -
          whether the name is a valid XML tagname. - (This routine might only be 99% accurate. Should maybe REVISIT)
          -
          -
        • -
        - - - -
          -
        • -

          matchesName

          -
          public static boolean matchesName(String qname,
          -                                  String nodeName,
          -                                  String nsURI,
          -                                  Environment env)
          -
          -
          Returns:
          -
          whether the qname matches the combination of nodeName, nsURI, and environment prefix settings.
          -
          -
        • -
        - - - -
          -
        • -

          leftPad

          -
          public static String leftPad(String s,
          -                             int minLength)
          -
          Pads the string at the left with spaces until it reaches the desired - length. If the string is longer than this length, then it returns the - unchanged string.
          -
          -
          Parameters:
          -
          s - the string that will be padded.
          -
          minLength - the length to reach.
          -
          -
        • -
        - - - -
          -
        • -

          leftPad

          -
          public static String leftPad(String s,
          -                             int minLength,
          -                             char filling)
          -
          Pads the string at the left with the specified character until it reaches - the desired length. If the string is longer than this length, then it - returns the unchanged string.
          -
          -
          Parameters:
          -
          s - the string that will be padded.
          -
          minLength - the length to reach.
          -
          filling - the filling pattern.
          -
          -
        • -
        - - - -
          -
        • -

          leftPad

          -
          public static String leftPad(String s,
          -                             int minLength,
          -                             String filling)
          -
          Pads the string at the left with a filling pattern until it reaches the - desired length. If the string is longer than this length, then it returns - the unchanged string. For example: leftPad('ABC', 9, '1234') - returns "123412ABC".
          -
          -
          Parameters:
          -
          s - the string that will be padded.
          -
          minLength - the length to reach.
          -
          filling - the filling pattern. Must be at least 1 characters long. - Can't be null.
          -
          -
        • -
        - - - -
          -
        • -

          rightPad

          -
          public static String rightPad(String s,
          -                              int minLength)
          -
          Pads the string at the right with spaces until it reaches the desired - length. If the string is longer than this length, then it returns the - unchanged string.
          -
          -
          Parameters:
          -
          s - the string that will be padded.
          -
          minLength - the length to reach.
          -
          -
        • -
        - - - -
          -
        • -

          rightPad

          -
          public static String rightPad(String s,
          -                              int minLength,
          -                              char filling)
          -
          Pads the string at the right with the specified character until it - reaches the desired length. If the string is longer than this length, - then it returns the unchanged string.
          -
          -
          Parameters:
          -
          s - the string that will be padded.
          -
          minLength - the length to reach.
          -
          filling - the filling pattern.
          -
          -
        • -
        - - - -
          -
        • -

          rightPad

          -
          public static String rightPad(String s,
          -                              int minLength,
          -                              String filling)
          -
          Pads the string at the right with a filling pattern until it reaches the - desired length. If the string is longer than this length, then it returns - the unchanged string. For example: rightPad('ABC', 9, '1234') - returns "ABC412341". Note that the filling pattern is - started as if you overlay "123412341" with the left-aligned - "ABC", so it starts with "4".
          -
          -
          Parameters:
          -
          s - the string that will be padded.
          -
          minLength - the length to reach.
          -
          filling - the filling pattern. Must be at least 1 characters long. - Can't be null.
          -
          -
        • -
        - - - -
          -
        • -

          versionStringToInt

          -
          public static int versionStringToInt(String version)
          -
          Converts a version number string to an integer for easy comparison. - The version number must start with numbers separated with - dots. There can be any number of such dot-separated numbers, but only - the first three will be considered. After the numbers arbitrary text can - follow, and will be ignored. - - The string will be trimmed before interpretation.
          -
          -
          Returns:
          -
          major * 1000000 + minor * 1000 + micro
          -
          -
        • -
        - - - -
          -
        • -

          tryToString

          -
          public static String tryToString(Object object)
          -
          Tries to run toString(), but if that fails, returns a "[toString failed: " + e + "]" instead. - Also, it returns null for null parameter.
          -
          -
          Since:
          -
          2.3.20
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/ToCanonical.html b/fmpp/docs/freemarker/api/freemarker/template/utility/ToCanonical.html deleted file mode 100644 index 5a8969c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/ToCanonical.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - -ToCanonical (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class ToCanonical

    -
    -
    - -
    -
      -
    • -
      -
      -
      public class ToCanonical
      -extends Object
      -
      Read in a template and convert it to a canonical format.
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          ToCanonical

          -
          public ToCanonical()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          main

          -
          public static void main(String[] args)
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/UndeclaredThrowableException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/UndeclaredThrowableException.html deleted file mode 100644 index 17e3513..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/UndeclaredThrowableException.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - -UndeclaredThrowableException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class UndeclaredThrowableException

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      -
      public class UndeclaredThrowableException
      -extends RuntimeException
      -
      The equivalent of JDK 1.3 UndeclaredThrowableException.
      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/UnrecognizedTimeZoneException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/UnrecognizedTimeZoneException.html deleted file mode 100644 index 5072c1d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/UnrecognizedTimeZoneException.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - -UnrecognizedTimeZoneException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class UnrecognizedTimeZoneException

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      Serializable
      -
      -
      -
      -
      public class UnrecognizedTimeZoneException
      -extends Exception
      -
      Indicates that the time zone name is not recognized.
      -
      -
      See Also:
      -
      Serialized Form
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          UnrecognizedTimeZoneException

          -
          public UnrecognizedTimeZoneException(String timeZoneName)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getTimeZoneName

          -
          public String getTimeZoneName()
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/UnsupportedNumberClassException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/UnsupportedNumberClassException.html deleted file mode 100644 index 9dfbeb4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/UnsupportedNumberClassException.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - -UnsupportedNumberClassException (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class UnsupportedNumberClassException

    -
    -
    - -
    - -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          UnsupportedNumberClassException

          -
          public UnsupportedNumberClassException(Class pClass)
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getUnsupportedClass

          -
          public Class getUnsupportedClass()
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/WriteProtectable.html b/fmpp/docs/freemarker/api/freemarker/template/utility/WriteProtectable.html deleted file mode 100644 index 4fa5843..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/WriteProtectable.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - -WriteProtectable (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Interface WriteProtectable

    -
    -
    -
    -
      -
    • -
      -
      All Known Implementing Classes:
      -
      BeansWrapper, DefaultObjectWrapper, RhinoWrapper, SimpleObjectWrapper
      -
      -
      -
      -
      public interface WriteProtectable
      -
      Implemented by objects that can be made permanently read-only. This usually meant to freeze the - configuration JavaBean properties, so that the object can be safely shared among independently developed components.
      -
      -
      Since:
      -
      2.3.21
      -
      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          writeProtect

          -
          void writeProtect()
          -
          Makes this object permanently read-only.
          -
        • -
        - - - -
          -
        • -

          isWriteProtected

          -
          boolean isWriteProtected()
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/XmlEscape.html b/fmpp/docs/freemarker/api/freemarker/template/utility/XmlEscape.html deleted file mode 100644 index 62b35cc..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/XmlEscape.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - -XmlEscape (FreeMarker 2.3.21 API) - - - - - - - - - - - - -
    -
    freemarker.template.utility
    -

    Class XmlEscape

    -
    -
    - -
    -
      -
    • -
      -
      All Implemented Interfaces:
      -
      TemplateModel, TemplateTransformModel
      -
      -
      -
      -
      public class XmlEscape
      -extends Object
      -implements TemplateTransformModel
      -
      Performs an XML escaping of a given template fragment. Specifically, - < > " ' and & are all turned into entity references. - -

      An instance of this transform is initially visible as shared - variable called xml_escape.

      -
    • -
    -
    -
    - -
    -
    -
      -
    • - -
        -
      • - - -

        Constructor Detail

        - - - -
          -
        • -

          XmlEscape

          -
          public XmlEscape()
          -
        • -
        -
      • -
      - -
        -
      • - - -

        Method Detail

        - - - -
          -
        • -

          getWriter

          -
          public Writer getWriter(Writer out,
          -                        Map args)
          -
          Description copied from interface: TemplateTransformModel
          -
          Returns a writer that will be used by the engine to feed the - transformation input to the transform. Each call to this method - must return a new instance of the writer so that the transformation - is thread-safe.
          -
          -
          Specified by:
          -
          getWriter in interface TemplateTransformModel
          -
          Parameters:
          -
          out - the character stream to which to write the transformed output
          -
          args - the arguments (if any) passed to the transformation as a - map of key/value pairs where the keys are strings and the arguments are - TemplateModel instances. This is never null. If you need to convert the - template models to POJOs, you can use the utility methods in the - DeepUnwrap class.
          -
          Returns:
          -
          a writer to which the engine will feed the transformation - input, or null if the transform does not support nested content (body). - The returned writer can implement the TransformControl - interface if it needs advanced control over the evaluation of the - transformation body.
          -
          -
        • -
        -
      • -
      -
    • -
    -
    -
    - - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/CaptureOutput.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/CaptureOutput.html deleted file mode 100644 index c3a40d4..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/CaptureOutput.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.CaptureOutput (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.CaptureOutput

    -
    -
    No usage of freemarker.template.utility.CaptureOutput
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ClassUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ClassUtil.html deleted file mode 100644 index 2e1cf9e..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ClassUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.ClassUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.ClassUtil

    -
    -
    No usage of freemarker.template.utility.ClassUtil
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/CollectionUtils.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/CollectionUtils.html deleted file mode 100644 index bbb8b91..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/CollectionUtils.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.CollectionUtils (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.CollectionUtils

    -
    -
    No usage of freemarker.template.utility.CollectionUtils
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Collections12.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Collections12.html deleted file mode 100644 index 6ea000f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Collections12.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.Collections12 (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.Collections12

    -
    -
    No usage of freemarker.template.utility.Collections12
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Constants.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Constants.html deleted file mode 100644 index 525e357..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Constants.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.Constants (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.Constants

    -
    -
    No usage of freemarker.template.utility.Constants
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DOMNodeModel.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DOMNodeModel.html deleted file mode 100644 index 4e90d71..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DOMNodeModel.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.DOMNodeModel (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.DOMNodeModel

    -
    -
    No usage of freemarker.template.utility.DOMNodeModel
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.CalendarFieldsToDateConverter.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.CalendarFieldsToDateConverter.html deleted file mode 100644 index a538316..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.CalendarFieldsToDateConverter.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.utility.DateUtil.CalendarFieldsToDateConverter (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.utility.DateUtil.CalendarFieldsToDateConverter

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.DateParseException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.DateParseException.html deleted file mode 100644 index e6e55b9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.DateParseException.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.DateUtil.DateParseException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.DateUtil.DateParseException

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.DateToISO8601CalendarFactory.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.DateToISO8601CalendarFactory.html deleted file mode 100644 index 16caea0..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.DateToISO8601CalendarFactory.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.utility.DateUtil.DateToISO8601CalendarFactory (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.utility.DateUtil.DateToISO8601CalendarFactory

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.TrivialCalendarFieldsToDateConverter.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.TrivialCalendarFieldsToDateConverter.html deleted file mode 100644 index 0425d29..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.TrivialCalendarFieldsToDateConverter.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.DateUtil.TrivialCalendarFieldsToDateConverter (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.DateUtil.TrivialCalendarFieldsToDateConverter

    -
    -
    No usage of freemarker.template.utility.DateUtil.TrivialCalendarFieldsToDateConverter
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.TrivialDateToISO8601CalendarFactory.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.TrivialDateToISO8601CalendarFactory.html deleted file mode 100644 index 8950c34..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.TrivialDateToISO8601CalendarFactory.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.DateUtil.TrivialDateToISO8601CalendarFactory (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.DateUtil.TrivialDateToISO8601CalendarFactory

    -
    -
    No usage of freemarker.template.utility.DateUtil.TrivialDateToISO8601CalendarFactory
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.html deleted file mode 100644 index 795cad7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DateUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.DateUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.DateUtil

    -
    -
    No usage of freemarker.template.utility.DateUtil
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DeepUnwrap.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DeepUnwrap.html deleted file mode 100644 index 6a94ba9..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/DeepUnwrap.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.DeepUnwrap (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.DeepUnwrap

    -
    -
    No usage of freemarker.template.utility.DeepUnwrap
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Execute.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Execute.html deleted file mode 100644 index b4011e1..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/Execute.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.Execute (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.Execute

    -
    -
    No usage of freemarker.template.utility.Execute
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/HtmlEscape.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/HtmlEscape.html deleted file mode 100644 index 01816c8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/HtmlEscape.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.HtmlEscape (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.HtmlEscape

    -
    -
    No usage of freemarker.template.utility.HtmlEscape
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/JythonRuntime.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/JythonRuntime.html deleted file mode 100644 index dd09d5d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/JythonRuntime.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.JythonRuntime (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.JythonRuntime

    -
    -
    No usage of freemarker.template.utility.JythonRuntime
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NormalizeNewlines.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NormalizeNewlines.html deleted file mode 100644 index f30b2b2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NormalizeNewlines.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.NormalizeNewlines (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.NormalizeNewlines

    -
    -
    No usage of freemarker.template.utility.NormalizeNewlines
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NullArgumentException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NullArgumentException.html deleted file mode 100644 index 5851136..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NullArgumentException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.NullArgumentException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.NullArgumentException

    -
    -
    No usage of freemarker.template.utility.NullArgumentException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NullWriter.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NullWriter.html deleted file mode 100644 index 749bad7..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NullWriter.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.NullWriter (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.NullWriter

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NumberUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NumberUtil.html deleted file mode 100644 index a1b30c8..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/NumberUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.NumberUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.NumberUtil

    -
    -
    No usage of freemarker.template.utility.NumberUtil
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ObjectConstructor.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ObjectConstructor.html deleted file mode 100644 index 8f8b498..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ObjectConstructor.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.ObjectConstructor (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.ObjectConstructor

    -
    -
    No usage of freemarker.template.utility.ObjectConstructor
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/OptimizerUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/OptimizerUtil.html deleted file mode 100644 index 499f416..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/OptimizerUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.OptimizerUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.OptimizerUtil

    -
    -
    No usage of freemarker.template.utility.OptimizerUtil
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/SecurityUtilities.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/SecurityUtilities.html deleted file mode 100644 index 4d6182d..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/SecurityUtilities.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.SecurityUtilities (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.SecurityUtilities

    -
    -
    No usage of freemarker.template.utility.SecurityUtilities
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/StandardCompress.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/StandardCompress.html deleted file mode 100644 index 8902f15..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/StandardCompress.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.StandardCompress (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.StandardCompress

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/StringUtil.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/StringUtil.html deleted file mode 100644 index ce6c7a5..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/StringUtil.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.StringUtil (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.StringUtil

    -
    -
    No usage of freemarker.template.utility.StringUtil
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ToCanonical.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ToCanonical.html deleted file mode 100644 index a3af9c3..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/ToCanonical.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.ToCanonical (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.ToCanonical

    -
    -
    No usage of freemarker.template.utility.ToCanonical
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UndeclaredThrowableException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UndeclaredThrowableException.html deleted file mode 100644 index 20548c2..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UndeclaredThrowableException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.UndeclaredThrowableException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.UndeclaredThrowableException

    -
    -
    No usage of freemarker.template.utility.UndeclaredThrowableException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UnrecognizedTimeZoneException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UnrecognizedTimeZoneException.html deleted file mode 100644 index 20d0fcf..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UnrecognizedTimeZoneException.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.UnrecognizedTimeZoneException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.UnrecognizedTimeZoneException

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UnsupportedNumberClassException.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UnsupportedNumberClassException.html deleted file mode 100644 index 4181e12..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/UnsupportedNumberClassException.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.UnsupportedNumberClassException (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.UnsupportedNumberClassException

    -
    -
    No usage of freemarker.template.utility.UnsupportedNumberClassException
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/WriteProtectable.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/WriteProtectable.html deleted file mode 100644 index 458179c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/WriteProtectable.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -Uses of Interface freemarker.template.utility.WriteProtectable (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Interface
    freemarker.template.utility.WriteProtectable

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/XmlEscape.html b/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/XmlEscape.html deleted file mode 100644 index a74bc59..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/class-use/XmlEscape.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Uses of Class freemarker.template.utility.XmlEscape (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Class
    freemarker.template.utility.XmlEscape

    -
    -
    No usage of freemarker.template.utility.XmlEscape
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/package-frame.html b/fmpp/docs/freemarker/api/freemarker/template/utility/package-frame.html deleted file mode 100644 index ae6840c..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/package-frame.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -freemarker.template.utility (FreeMarker 2.3.21 API) - - - - - -

    freemarker.template.utility

    - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/package-summary.html b/fmpp/docs/freemarker/api/freemarker/template/utility/package-summary.html deleted file mode 100644 index b5b623b..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/package-summary.html +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - -freemarker.template.utility (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Package freemarker.template.utility

    -
    -
    Various classes used by core FreeMarker code but might be useful outside of it too.
    -
    -

    See: Description

    -
    -
    - - - - -

    Package freemarker.template.utility Description

    -

    Various classes used by core FreeMarker code but might be useful outside of it too.

    -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/package-tree.html b/fmpp/docs/freemarker/api/freemarker/template/utility/package-tree.html deleted file mode 100644 index 451d898..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/package-tree.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - -freemarker.template.utility Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Hierarchy For Package freemarker.template.utility

    -Package Hierarchies: - -
    -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/freemarker/template/utility/package-use.html b/fmpp/docs/freemarker/api/freemarker/template/utility/package-use.html deleted file mode 100644 index 579c87f..0000000 --- a/fmpp/docs/freemarker/api/freemarker/template/utility/package-use.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - -Uses of Package freemarker.template.utility (FreeMarker 2.3.21 API) - - - - - - - - - - - -
    -

    Uses of Package
    freemarker.template.utility

    -
    -
    - -
    - - - - - - diff --git a/fmpp/docs/freemarker/api/help-doc.html b/fmpp/docs/freemarker/api/help-doc.html deleted file mode 100644 index 7c6a7ba..0000000 --- a/fmpp/docs/freemarker/api/help-doc.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - -API Help (FreeMarker 2.3.21 API) - - - - - - - - -
    - - - - - - - -
    - - -
    -

    How This API Document Is Organized

    -
    This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
    -
    -
    -
      -
    • -

      Overview

      -

      The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

      -
    • -
    • -

      Package

      -

      Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

      -
        -
      • Interfaces (italic)
      • -
      • Classes
      • -
      • Enums
      • -
      • Exceptions
      • -
      • Errors
      • -
      • Annotation Types
      • -
      -
    • -
    • -

      Class/Interface

      -

      Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

      -
        -
      • Class inheritance diagram
      • -
      • Direct Subclasses
      • -
      • All Known Subinterfaces
      • -
      • All Known Implementing Classes
      • -
      • Class/interface declaration
      • -
      • Class/interface description
      • -
      -
        -
      • Nested Class Summary
      • -
      • Field Summary
      • -
      • Constructor Summary
      • -
      • Method Summary
      • -
      -
        -
      • Field Detail
      • -
      • Constructor Detail
      • -
      • Method Detail
      • -
      -

      Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

      -
    • -
    • -

      Annotation Type

      -

      Each annotation type has its own separate page with the following sections:

      -
        -
      • Annotation Type declaration
      • -
      • Annotation Type description
      • -
      • Required Element Summary
      • -
      • Optional Element Summary
      • -
      • Element Detail
      • -
      -
    • -
    • -

      Enum

      -

      Each enum has its own separate page with the following sections:

      -
        -
      • Enum declaration
      • -
      • Enum description
      • -
      • Enum Constant Summary
      • -
      • Enum Constant Detail
      • -
      -
    • -
    • -

      Use

      -

      Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

      -
    • -
    • -

      Tree (Class Hierarchy)

      -

      There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

      -
        -
      • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
      • -
      • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
      • -
      -
    • -
    • -

      Deprecated API

      -

      The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

      -
    • -
    • -

      Index

      -

      The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

      -
    • -
    • -

      Prev/Next

      -

      These links take you to the next or previous class, interface, package, or related page.

      -
    • -
    • -

      Frames/No Frames

      -

      These links show and hide the HTML frames. All pages are available with or without frames.

      -
    • -
    • -

      All Classes

      -

      The All Classes link shows all classes and interfaces except non-static nested types.

      -
    • -
    • -

      Serialized Form

      -

      Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

      -
    • -
    • -

      Constant Field Values

      -

      The Constant Field Values page lists the static final fields and their values.

      -
    • -
    -This help file applies to API documentation generated using the standard doclet.
    - -
    - - - - - - - -
    - - - - diff --git a/fmpp/docs/freemarker/api/index-all.html b/fmpp/docs/freemarker/api/index-all.html deleted file mode 100644 index d85c5cd..0000000 --- a/fmpp/docs/freemarker/api/index-all.html +++ /dev/null @@ -1,5574 +0,0 @@ - - - - - - -Index (FreeMarker 2.3.21 API) - - - - - - - - -
    - - - - - - - -
    - - -
    A B C D E F G H I J K L M N O P R S T U V W X Z _  - - -

    A

    -
    -
    ACCURACY_HOURS - Static variable in class freemarker.template.utility.DateUtil
    -
    -
    Show hours (24h); always 2 digits, like 00, 05, etc.
    -
    -
    ACCURACY_MILLISECONDS - Static variable in class freemarker.template.utility.DateUtil
    -
    -
    Show hours, minutes and seconds and up to 3 fraction second digits, without trailing 0-s in the fraction part.
    -
    -
    ACCURACY_MILLISECONDS_FORCED - Static variable in class freemarker.template.utility.DateUtil
    -
    -
    Show hours, minutes and seconds and exactly 3 fraction second digits (even if it's 000)
    -
    -
    ACCURACY_MINUTES - Static variable in class freemarker.template.utility.DateUtil
    -
    -
    Show hours and minutes (even if minutes is 00).
    -
    -
    ACCURACY_SECONDS - Static variable in class freemarker.template.utility.DateUtil
    -
    -
    Show hours, minutes and seconds (even if seconds is 00).
    -
    -
    AdapterTemplateModel - Interface in freemarker.template
    -
    -
    A TemplateModel that can be unwrapped and then it considers a provided desired (hint) class.
    -
    -
    add(Number, Number) - Method in class freemarker.core.ArithmeticEngine
    -
     
    -
    add(Number, Number) - Method in class freemarker.core.ArithmeticEngine.BigDecimalEngine
    -
     
    -
    add(Number, Number) - Method in class freemarker.core.ArithmeticEngine.ConservativeEngine
    -
     
    -
    add(Object) - Method in class freemarker.template.SimpleSequence
    -
    -
    Adds an arbitrary object to the end of this SimpleSequence.
    -
    -
    add(boolean) - Method in class freemarker.template.SimpleSequence
    -
    -
    Adds a boolean to the end of this SimpleSequence, by - coercing the boolean into TemplateBooleanModel.TRUE or - TemplateBooleanModel.FALSE.
    -
    -
    add_escapes(String) - Method in exception freemarker.core.ParseException
    -
    -
    Used to convert raw characters to their escaped version - when these raw version cannot be used as part of an ASCII - string literal.
    -
    -
    addAutoImport(String, String) - Method in class freemarker.template.Configuration
    -
    -
    Adds an invisible #import templateName as namespaceVarName at the beginning of all - templates.
    -
    -
    addAutoInclude(String) - Method in class freemarker.template.Configuration
    -
    -
    Adds an invisible #include templateName as namespaceVarName at the beginning of all - templates.
    -
    -
    addBreakpoint(Breakpoint) - Method in interface freemarker.debug.Debugger
    -
    -
    Adds a breakpoint
    -
    -
    addConfiguredJython(JythonAntTask) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    addConfiguredPrepareEnvironment(JythonAntTask) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    addConfiguredPrepareModel(JythonAntTask) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    addDebuggerListener(DebuggerListener) - Method in interface freemarker.debug.Debugger
    -
    -
    Adds a listener for debugger events.
    -
    -
    addImport(LibraryLoad) - Method in class freemarker.template.Template
    -
    -
    Called by code internally to maintain - a list of imports
    -
    -
    addMacro(Macro) - Method in class freemarker.template.Template
    -
    -
    Called by code internally to maintain - a table of macros
    -
    -
    addPrefixNSMapping(String, String) - Method in class freemarker.template.Template
    -
    -
    This is used internally.
    -
    -
    addText(String) - Method in class freemarker.ext.ant.JythonAntTask
    -
     
    -
    afterBody() - Method in interface freemarker.template.TransformControl
    -
    -
    Called after the body has been evaluated.
    -
    -
    AllHttpScopesHashModel - Class in freemarker.ext.servlet
    -
    -
    An extension of SimpleHash that looks up keys in the hash, then in the - request, session, and servlet context scopes.
    -
    -
    AllHttpScopesHashModel(ObjectWrapper, ServletContext, HttpServletRequest) - Constructor for class freemarker.ext.servlet.AllHttpScopesHashModel
    -
    -
    Creates a new instance of AllHttpScopesHashModel for handling a single - HTTP servlet request.
    -
    -
    ALLOWS_NOTHING_RESOLVER - Static variable in interface freemarker.core.TemplateClassResolver
    -
    -
    Doesn't allow resolving any classes.
    -
    -
    ANGLE_BRACKET_TAG_SYNTAX - Static variable in class freemarker.template.Configuration
    -
     
    -
    applyEqualsOperator(TemplateModel, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Compares two TemplateModel-s according the rules of the FTL "==" operator.
    -
    -
    applyEqualsOperatorLenient(TemplateModel, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Compares two TemplateModel-s according the rules of the FTL "==" operator, except that if the two types - are incompatible, they are treated as non-equal instead of throwing an exception.
    -
    -
    applyGreaterThanOperator(TemplateModel, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Compares two TemplateModel-s according the rules of the FTL ">" operator.
    -
    -
    applyLessThanOperator(TemplateModel, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Compares two TemplateModel-s according the rules of the FTL "<" operator.
    -
    -
    applyLessThanOrEqualsOperator(TemplateModel, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Compares two TemplateModel-s according the rules of the FTL "<" operator.
    -
    -
    applyWithGreaterThanOrEqualsOperator(TemplateModel, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Compares two TemplateModel-s according the rules of the FTL ">=" operator.
    -
    -
    ARITHMETIC_ENGINE_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    ArithmeticEngine - Class in freemarker.core
    -
    -
    Class to perform arithmetic operations.
    -
    -
    ArithmeticEngine() - Constructor for class freemarker.core.ArithmeticEngine
    -
     
    -
    ArithmeticEngine.BigDecimalEngine - Class in freemarker.core
    -
    -
    This is the default arithmetic engine in FreeMarker.
    -
    -
    ArithmeticEngine.ConservativeEngine - Class in freemarker.core
    -
    -
    An arithmetic engine that conservatively widens the operation arguments - to extent that they can hold the result of the operation.
    -
    -
    ArrayModel - Class in freemarker.ext.beans
    -
    -
    A class that will wrap an arbitrary array into TemplateCollectionModel - and TemplateSequenceModel interfaces.
    -
    -
    ArrayModel(Object, BeansWrapper) - Constructor for class freemarker.ext.beans.ArrayModel
    -
    -
    Creates a new model that wraps the specified array object.
    -
    -
    attributeAdded(ServletContextAttributeEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    attributeAdded(HttpSessionBindingEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    attributeRemoved(ServletContextAttributeEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    attributeRemoved(HttpSessionBindingEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    attributeReplaced(ServletContextAttributeEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    attributeReplaced(HttpSessionBindingEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    AUTO_DETECT_TAG_SYNTAX - Static variable in class freemarker.template.Configuration
    -
     
    -
    AUTO_FLUSH_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    AUTO_IMPORT_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    AUTO_INCLUDE_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    - - - -

    B

    -
    -
    baseDir - Variable in class freemarker.cache.FileTemplateLoader
    -
     
    -
    BeanModel - Class in freemarker.ext.beans
    -
    -
    A class that will wrap an arbitrary object into TemplateHashModel - interface allowing calls to arbitrary property getters and invocation of - accessible methods on the object from a template using the - object.foo to access properties and object.bar(arg1, arg2) to - invoke methods on it.
    -
    -
    BeanModel(Object, BeansWrapper) - Constructor for class freemarker.ext.beans.BeanModel
    -
    -
    Creates a new model that wraps the specified object.
    -
    -
    BEANS_WRAPPER - Static variable in interface freemarker.template.ObjectWrapper
    -
    -
    Deprecated. -
    Use BeansWrapperBuilder.build() instead; this instance isn't read-only - and thus can't be trusted.
    -
    -
    -
    BeansModelCache - Class in freemarker.ext.beans
    -
     
    -
    BeansWrapper - Class in freemarker.ext.beans
    -
    -
    ObjectWrapper that is able to expose the Java API of arbitrary Java objects.
    -
    -
    BeansWrapper() - Constructor for class freemarker.ext.beans.BeansWrapper
    -
    -
    Deprecated. - -
    -
    -
    BeansWrapper(Version) - Constructor for class freemarker.ext.beans.BeansWrapper
    -
    -
    Use BeansWrapperBuilder instead of the public constructors if possible.
    -
    -
    BeansWrapper(BeansWrapperConfiguration, boolean) - Constructor for class freemarker.ext.beans.BeansWrapper
    -
    -
    Initializes the instance based on the the BeansWrapperConfiguration specified.
    -
    -
    BeansWrapper.MethodAppearanceDecision - Class in freemarker.ext.beans
    -
    - -
    -
    BeansWrapper.MethodAppearanceDecisionInput - Class in freemarker.ext.beans
    -
    - -
    -
    BeansWrapperBuilder - Class in freemarker.ext.beans
    -
    -
    Gets/creates a BeansWrapper singleton instance that's already configured as specified in the properties of - this object; this is recommended over using the BeansWrapper constructors.
    -
    -
    BeansWrapperBuilder(Version) - Constructor for class freemarker.ext.beans.BeansWrapperBuilder
    -
    - -
    -
    BeansWrapperConfiguration - Class in freemarker.ext.beans
    -
    -
    Holds BeansWrapper configuration settings and defines their defaults.
    -
    -
    BeansWrapperConfiguration(Version) - Constructor for class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    BIGDECIMAL_ENGINE - Static variable in class freemarker.core.ArithmeticEngine
    -
    -
    Arithmetic engine that converts all numbers to BigDecimal and - then operates on them.
    -
    -
    BigDecimalEngine() - Constructor for class freemarker.core.ArithmeticEngine.BigDecimalEngine
    -
     
    -
    BOOLEAN_FORMAT_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    BooleanModel - Class in freemarker.ext.beans
    -
    -
    A class that will wrap instances of Boolean into a - TemplateBooleanModel.
    -
    -
    BooleanModel(Boolean, BeansWrapper) - Constructor for class freemarker.ext.beans.BooleanModel
    -
     
    -
    boxingClassToPrimitiveClass(Class) - Static method in class freemarker.template.utility.ClassUtil
    -
    - -
    -
    Breakpoint - Class in freemarker.debug
    -
    -
    Represents a breakpoint location consisting of a template name and a line number.
    -
    -
    Breakpoint(String, int) - Constructor for class freemarker.debug.Breakpoint
    -
    -
    Creates a new breakpoint.
    -
    -
    BugException - Exception in freemarker.core
    -
    -
    An unexpected state was reached that is certainly caused by a bug in FreeMarker.
    -
    -
    BugException() - Constructor for exception freemarker.core.BugException
    -
     
    -
    BugException(String) - Constructor for exception freemarker.core.BugException
    -
     
    -
    BugException(Throwable) - Constructor for exception freemarker.core.BugException
    -
     
    -
    BugException(String, Throwable) - Constructor for exception freemarker.core.BugException
    -
     
    -
    BugException(int) - Constructor for exception freemarker.core.BugException
    -
     
    -
    build() - Method in class freemarker.ext.beans.BeansWrapperBuilder
    -
    -
    Returns a BeansWrapper instance that matches the settings of this builder.
    -
    -
    build() - Method in class freemarker.template.DefaultObjectWrapperBuilder
    -
    -
    Returns a DefaultObjectWrapper instance that matches the settings of this builder.
    -
    -
    - - - -

    C

    -
    -
    CACHE_STORAGE_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    CacheStorage - Interface in freemarker.cache
    -
    -
    Cache storage abstracts away the storage aspects of a cache - associating - an object with a key, retrieval and removal via the key.
    -
    -
    CacheStorageWithGetSize - Interface in freemarker.cache
    -
    -
    A cache storage that has a getSize() method for returning the current number of cache entries.
    -
    -
    calculate(int, int, int, int, int, int, int, int, boolean, TimeZone) - Method in interface freemarker.template.utility.DateUtil.CalendarFieldsToDateConverter
    -
    -
    Calculates the Date from the specified calendar fields.
    -
    -
    calculate(int, int, int, int, int, int, int, int, boolean, TimeZone) - Method in class freemarker.template.utility.DateUtil.TrivialCalendarFieldsToDateConverter
    -
     
    -
    canonicalizePrefix(String) - Static method in class freemarker.cache.URLTemplateLoader
    -
    -
    Can be used by subclasses to canonicalize URL path prefixes.
    -
    -
    capitalize(String) - Static method in class freemarker.template.utility.StringUtil
    -
     
    -
    CaptureOutput - Class in freemarker.template.utility
    -
    -
    Deprecated. -
    Use block-assignments instead, like <assign x>...</assign>.
    -
    -
    -
    CaptureOutput() - Constructor for class freemarker.template.utility.CaptureOutput
    -
    -
    Deprecated.
    -
    check(String, Object) - Static method in exception freemarker.template.utility.NullArgumentException
    -
    -
    Convenience method to protect against a null argument.
    -
    -
    checkModifiable() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    If this object is already read-only according to WriteProtectable, throws IllegalStateException, - otherwise does nothing.
    -
    -
    chomp(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Removes the line-break from the end of the string.
    -
    -
    CLASSIC_COMPATIBLE_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    classIntrospectorFactory - Variable in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    ClassTemplateLoader - Class in freemarker.cache
    -
    -
    A TemplateLoader that uses streams reachable through - Class.getResourceAsStream(String) as its source of templates.
    -
    -
    ClassTemplateLoader() - Constructor for class freemarker.cache.ClassTemplateLoader
    -
    -
    Deprecated. -
    confusing constructor, and seldom useful; - use ClassTemplateLoader.ClassTemplateLoader(Class, String) instead.
    -
    -
    -
    ClassTemplateLoader(Class) - Constructor for class freemarker.cache.ClassTemplateLoader
    -
    -
    Deprecated. -
    it's confusing that the base path is ""; - use ClassTemplateLoader.ClassTemplateLoader(Class, String) instead.
    -
    -
    -
    ClassTemplateLoader(Class, String) - Constructor for class freemarker.cache.ClassTemplateLoader
    -
    -
    Creates a template loader that will use the Class.getResource(String) method - of the specified class to load the resources, and the specified base path (absolute or relative).
    -
    -
    ClassUtil - Class in freemarker.template.utility
    -
     
    -
    clear() - Method in interface freemarker.cache.CacheStorage
    -
     
    -
    clear() - Method in class freemarker.cache.MruCacheStorage
    -
     
    -
    clear() - Method in class freemarker.cache.NullCacheStorage
    -
     
    -
    clear() - Method in class freemarker.cache.SoftCacheStorage
    -
     
    -
    clear() - Method in class freemarker.cache.StrongCacheStorage
    -
     
    -
    clear() - Method in class freemarker.cache.TemplateCache
    -
    -
    Removes all entries from the cache, forcing reloading of templates - on subsequent TemplateCache.getTemplate(String, Locale, String, boolean) - calls.
    -
    -
    clear() - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Removes all mappings from this map.
    -
    -
    clearCache() - Method in class freemarker.ext.util.ModelCache
    -
     
    -
    clearClassIntrospecitonCache() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Removes all class introspection data from the cache.
    -
    -
    clearEncodingMap() - Method in class freemarker.template.Configuration
    -
    -
    Clears language-to-encoding map.
    -
    -
    clearSharedVariables() - Method in class freemarker.template.Configuration
    -
    -
    Removes all shared sharedVariables, except the predefined ones (compress, html_escape, etc.).
    -
    -
    clearTemplateCache() - Method in class freemarker.template.Configuration
    -
    -
    Removes all entries from the template cache, thus forcing reloading of templates - on subsequent getTemplate calls.
    -
    -
    clone() - Method in class freemarker.core.Configurable
    -
     
    -
    clone(boolean) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    clone() - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns a shallow copy of this IdentityHashMap instance: the keys and - values themselves are not cloned.
    -
    -
    clone() - Method in class freemarker.template.Configuration
    -
     
    -
    close() - Method in class freemarker.template.utility.NullWriter
    -
     
    -
    closeTemplateSource(Object) - Method in class freemarker.cache.FileTemplateLoader
    -
     
    -
    closeTemplateSource(Object) - Method in class freemarker.cache.MultiTemplateLoader
    -
     
    -
    closeTemplateSource(Object) - Method in class freemarker.cache.StringTemplateLoader
    -
     
    -
    closeTemplateSource(Object) - Method in interface freemarker.cache.TemplateLoader
    -
    -
    Closes the template source.
    -
    -
    closeTemplateSource(Object) - Method in class freemarker.cache.URLTemplateLoader
    -
     
    -
    closeTemplateSource(Object) - Method in class freemarker.cache.WebappTemplateLoader
    -
     
    -
    coerceBigDecimal(BigDecimal, Class) - Static method in class freemarker.ext.beans.BeansWrapper
    -
     
    -
    coerceBigDecimals(AccessibleObject, Object[]) - Static method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Converts any BigDecimals in the passed array to the type of - the corresponding formal argument of the method.
    -
    -
    coerceBigDecimals(Class[], Object[]) - Static method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Converts any BigDecimals in the passed array to the type of - the corresponding formal argument of the method.
    -
    -
    CollectionModel - Class in freemarker.ext.beans
    -
    -
    A special case of BeanModel that can wrap Java collections - and that implements the TemplateCollectionModel in order to be usable - in a <#list> block.
    -
    -
    CollectionModel(Collection, BeansWrapper) - Constructor for class freemarker.ext.beans.CollectionModel
    -
    -
    Creates a new model that wraps the specified collection object.
    -
    -
    Collections12 - Class in freemarker.template.utility
    -
    -
    Deprecated. -
    Not needed anymore, as FreeMarker now requires higher than Java 1.3
    -
    -
    -
    CollectionUtils - Class in freemarker.template.utility
    -
     
    -
    columnNumber - Variable in exception freemarker.core.ParseException
    -
     
    -
    CommandLine - Class in freemarker.core
    -
    -
    Deprecated. -
    Will be removed, as a main method in a server-side library is marked as a security issue by many tools.
    -
    -
    -
    CommandLine() - Constructor for class freemarker.core.CommandLine
    -
    -
    Deprecated.
    -
    compareNumbers(Number, Number) - Method in class freemarker.core.ArithmeticEngine.BigDecimalEngine
    -
     
    -
    compareNumbers(Number, Number) - Method in class freemarker.core.ArithmeticEngine
    -
     
    -
    compareNumbers(Number, Number) - Method in class freemarker.core.ArithmeticEngine.ConservativeEngine
    -
     
    -
    compareTo(Object) - Method in class freemarker.debug.Breakpoint
    -
     
    -
    ConcurrentCacheStorage - Interface in freemarker.cache
    -
    -
    An optional interface for cache storage that knows whether it can be - concurrently accessible without synchronization.
    -
    -
    Configurable - Class in freemarker.core
    -
    -
    This is a common superclass of Configuration, - Template, and Environment classes.
    -
    -
    Configurable() - Constructor for class freemarker.core.Configurable
    -
    -
    Deprecated. -
    This shouldn't even be public; don't use it.
    -
    -
    -
    Configurable(Version) - Constructor for class freemarker.core.Configurable
    -
    -
    Intended to be called from inside FreeMarker only.
    -
    -
    Configurable(Configurable) - Constructor for class freemarker.core.Configurable
    -
    -
    Creates a new instance.
    -
    -
    Configurable.SettingValueAssignmentException - Exception in freemarker.core
    -
    -
    The setting name was recognized, but its value couldn't be parsed or the setting couldn't be set for some - other reason.
    -
    -
    Configurable.UnknownSettingException - Exception in freemarker.core
    -
    -
    The setting name was not recognized.
    -
    -
    Configuration - Class in freemarker.template
    -
    -
    The main entry point into the FreeMarker API; encapsulates the configuration settings of FreeMarker, - also serves as a central template-loading and caching service.
    -
    -
    Configuration() - Constructor for class freemarker.template.Configuration
    -
    -
    Deprecated. - -
    -
    -
    Configuration(Version) - Constructor for class freemarker.template.Configuration
    -
    -
    Creates a new instance and sets which of the non-backward-compatible bugfixes/improvements should be enabled.
    -
    -
    CONSERVATIVE_ENGINE - Static variable in class freemarker.core.ArithmeticEngine
    -
    -
    Arithmetic engine that uses (more-or-less) the widening conversions of - Java language to determine the type of result of operation, instead of - converting everything to BigDecimal up front.
    -
    -
    ConservativeEngine() - Constructor for class freemarker.core.ArithmeticEngine.ConservativeEngine
    -
     
    -
    Constants - Class in freemarker.template.utility
    -
    -
    Frequently used constant TemplateModel values.
    -
    -
    Constants() - Constructor for class freemarker.template.utility.Constants
    -
     
    -
    containingElements(int, int) - Method in class freemarker.template.Template
    -
    -
    Deprecated. -
    This method will return TemplateElement starting from 2.4, as that doesn't require Swing; - don't use it.
    -
    -
    -
    containsKey(Object) - Method in class freemarker.ext.beans.HashAdapter
    -
     
    -
    containsKey(Object) - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns true if this map contains a mapping for the specified - key.
    -
    -
    containsKey(String) - Method in class freemarker.template.SimpleHash
    -
    -
    Tells if the map contains a key or not, regardless if the associated value is null or not.
    -
    -
    containsValue(Object) - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns true if this map maps one or more keys to the - specified value.
    -
    -
    contextDestroyed(ServletContextEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    contextInitialized(ServletContextEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    convertArray(Object) - Method in class freemarker.template.DefaultObjectWrapper
    -
    -
    Converts an array to a java.util.List
    -
    -
    convertValueToText(Object, boolean, boolean, boolean, int, boolean) - Method in class freemarker.core.FreeMarkerTree
    -
    -
    Deprecated.
    -
    copyMap(Map) - Method in class freemarker.template.SimpleHash
    -
     
    -
    create() - Method in class freemarker.core.CustomAttribute
    -
    -
    This method is invoked when CustomAttribute.get() is invoked without - CustomAttribute.set(Object) being invoked before it to define the value in the - current scope.
    -
    -
    create(Object) - Method in class freemarker.ext.beans.BeansModelCache
    -
     
    -
    create(Object) - Method in class freemarker.ext.util.ModelCache
    -
     
    -
    create(Object, ObjectWrapper) - Method in interface freemarker.ext.util.ModelFactory
    -
    -
    Create a wrapping model for the specified object that belongs to - the specified wrapper.
    -
    -
    createConfiguration() - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    This method is called from FreemarkerServlet.init() to create the - FreeMarker configuration object that this servlet will use - for template loading.
    -
    -
    createLegacyDefaultTemplateLoader() - Static method in class freemarker.cache.TemplateCache
    -
    -
    Creates the default TemplateLoader used in 2.3.0-compatible mode.
    -
    -
    createModel(ObjectWrapper, ServletContext, HttpServletRequest, HttpServletResponse) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    createObjectWrapper() - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    This method is called from FreemarkerServlet.init() to create the - FreeMarker object wrapper object that this servlet will use - for adapting request, session, and servlet context attributes into - template models..
    -
    -
    createProcessingEnvironment(Object, Writer, ObjectWrapper) - Method in class freemarker.template.Template
    -
    -
    Creates a Environment object, using this template, the data-model provided as - parameter.
    -
    -
    createProcessingEnvironment(Object, Writer) - Method in class freemarker.template.Template
    -
    - -
    -
    createRequestParametersHashModel(HttpServletRequest) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    createTemplateLoader(String) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Create the template loader.
    -
    -
    currentToken - Variable in exception freemarker.core.ParseException
    -
    -
    This is the last token that has been consumed successfully.
    -
    -
    CustomAttribute - Class in freemarker.core
    -
    -
    A class that allows one to associate custom data with a configuration, - a template, or environment.
    -
    -
    CustomAttribute(int) - Constructor for class freemarker.core.CustomAttribute
    -
    -
    Creates a new custom attribute with the specified scope
    -
    -
    - - - -

    D

    -
    -
    DATE - Static variable in interface freemarker.template.TemplateDateModel
    -
    -
    The date model represents a date value (no time part).
    -
    -
    DATE_FORMAT_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    DateModel - Class in freemarker.ext.beans
    -
    -
    Wraps arbitrary subclass of Date into a reflective model.
    -
    -
    DateModel(Date, BeansWrapper) - Constructor for class freemarker.ext.beans.DateModel
    -
    -
    Creates a new model that wraps the specified date object.
    -
    -
    DateParseException(String) - Constructor for exception freemarker.template.utility.DateUtil.DateParseException
    -
     
    -
    DATETIME - Static variable in interface freemarker.template.TemplateDateModel
    -
    -
    The date model represents a date-time value (also known as timestamp).
    -
    -
    DATETIME_FORMAT_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    dateToISO8601String(Date, boolean, boolean, boolean, int, TimeZone, DateUtil.DateToISO8601CalendarFactory) - Static method in class freemarker.template.utility.DateUtil
    -
    -
    Format a date, time or dateTime with one of the ISO 8601 extended - formats that is also compatible with the XML Schema format (as far as you - don't have dates in the BC era).
    -
    -
    dateToXSString(Date, boolean, boolean, boolean, int, TimeZone, DateUtil.DateToISO8601CalendarFactory) - Static method in class freemarker.template.utility.DateUtil
    -
    - -
    -
    DateUtil - Class in freemarker.template.utility
    -
    -
    Date and time related utilities.
    -
    -
    DateUtil.CalendarFieldsToDateConverter - Interface in freemarker.template.utility
    -
    -
    Used internally by DateUtil; don't use its implementations for anything else.
    -
    -
    DateUtil.DateParseException - Exception in freemarker.template.utility
    -
     
    -
    DateUtil.DateToISO8601CalendarFactory - Interface in freemarker.template.utility
    -
    -
    Used internally by DateUtil; don't use its implementations for - anything else.
    -
    -
    DateUtil.TrivialCalendarFieldsToDateConverter - Class in freemarker.template.utility
    -
    -
    Non-thread-safe implementation that hard-references a calendar internally.
    -
    -
    DateUtil.TrivialDateToISO8601CalendarFactory - Class in freemarker.template.utility
    -
    -
    Non-thread-safe factory that hard-references a calendar internally.
    -
    -
    debug - Variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    debug(String) - Method in class freemarker.log.Logger
    -
    -
    Logs a debugging message.
    -
    -
    debug(String, Throwable) - Method in class freemarker.log.Logger
    -
    -
    Logs a debugging message with accompanying throwable.
    -
    -
    DEBUG_HANDLER - Static variable in interface freemarker.template.TemplateExceptionHandler
    -
    -
    TemplateExceptionHandler useful when you developing non-HTML templates.
    -
    -
    DebuggedEnvironment - Interface in freemarker.debug
    -
    -
    Represents the debugger-side mirror of a debugged - Environment object in the remote VM.
    -
    -
    Debugger - Interface in freemarker.debug
    -
    -
    The main debugger interface.
    -
    -
    DebuggerClient - Class in freemarker.debug
    -
    -
    A utility class that allows you to connect to the FreeMarker debugger service - running on a specific host and port.
    -
    -
    DebuggerListener - Interface in freemarker.debug
    -
    -
    An interface for components that wish to receive debugging events.
    -
    -
    DebugModel - Interface in freemarker.debug
    -
    -
    Represents the debugger-side mirror of a TemplateModel object, a Template - object, or a Configuration object.
    -
    -
    deduceLocale(String, HttpServletRequest, HttpServletResponse) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Returns the locale used for the - Configuration.getTemplate(String, Locale) call.
    -
    -
    deduceLocale(String) - Static method in class freemarker.template.utility.StringUtil
    -
     
    -
    DeepUnwrap - Class in freemarker.template.utility
    -
    -
    Utility methods for unwrapping TemplateModel-s.
    -
    -
    DeepUnwrap() - Constructor for class freemarker.template.utility.DeepUnwrap
    -
     
    -
    DEFAULT_ENCODING_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    DEFAULT_INCOMPATIBLE_ENHANCEMENTS - Static variable in class freemarker.template.Configuration
    -
    - -
    -
    DEFAULT_INCOMPATIBLE_IMPROVEMENTS - Static variable in class freemarker.template.Configuration
    -
    -
    The default of Configuration.getIncompatibleImprovements(), currently new Version(2, 3, 0).
    -
    -
    DEFAULT_NAMESPACE_PREFIX - Static variable in class freemarker.template.Template
    -
     
    -
    DEFAULT_PORT - Static variable in interface freemarker.debug.Debugger
    -
     
    -
    DEFAULT_WRAPPER - Static variable in interface freemarker.template.ObjectWrapper
    -
    -
    Deprecated. -
    Use BeansWrapperBuilder.build() instead; this instance isn't - read-only and thus can't be trusted.
    -
    -
    -
    DefaultObjectWrapper - Class in freemarker.template
    -
    -
    The default implementation of the ObjectWrapper interface.
    -
    -
    DefaultObjectWrapper() - Constructor for class freemarker.template.DefaultObjectWrapper
    -
    - -
    -
    DefaultObjectWrapper(Version) - Constructor for class freemarker.template.DefaultObjectWrapper
    -
    -
    Use DefaultObjectWrapperBuilder instead if possible.
    -
    -
    DefaultObjectWrapper(BeansWrapperConfiguration, boolean) - Constructor for class freemarker.template.DefaultObjectWrapper
    -
    - -
    -
    DefaultObjectWrapperBuilder - Class in freemarker.template
    -
    -
    Gets/creates a DefaultObjectWrapper singleton instance that's already configured as specified in the - properties of this object; this is recommended over using the DefaultObjectWrapper constructors.
    -
    -
    DefaultObjectWrapperBuilder(Version) - Constructor for class freemarker.template.DefaultObjectWrapperBuilder
    -
     
    -
    divide(Number, Number) - Method in class freemarker.core.ArithmeticEngine.BigDecimalEngine
    -
     
    -
    divide(Number, Number) - Method in class freemarker.core.ArithmeticEngine.ConservativeEngine
    -
     
    -
    divide(Number, Number) - Method in class freemarker.core.ArithmeticEngine
    -
     
    -
    doAfterBody() - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    doAutoImportsAndIncludes(Environment) - Method in class freemarker.core.Configurable
    -
     
    -
    doAutoImportsAndIncludes(Environment) - Method in class freemarker.template.Configuration
    -
     
    -
    doEndTag() - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    doGet(HttpServletRequest, HttpServletResponse) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    doInitBody() - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    DOMNodeModel - Class in freemarker.template.utility
    -
    -
    A convenient wrapper class for wrapping a Node in the W3C DOM API.
    -
    -
    DOMNodeModel(Node) - Constructor for class freemarker.template.utility.DOMNodeModel
    -
     
    -
    doPost(HttpServletRequest, HttpServletResponse) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    doStartTag() - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    dump(PrintStream) - Method in class freemarker.template.Template
    -
    -
    Dump the raw template in canonical form.
    -
    -
    dump(Writer) - Method in class freemarker.template.Template
    -
    -
    Dump the raw template in canonical form.
    -
    -
    - - - -

    E

    -
    -
    EMPTY_CLASS_ARRAY - Static variable in class freemarker.template.utility.CollectionUtils
    -
     
    -
    EMPTY_COLLECTION - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    EMPTY_HASH - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    EMPTY_ITERATOR - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    EMPTY_MAP - Static variable in class freemarker.template.utility.Collections12
    -
    -
    Deprecated.
    -
    EMPTY_OBJECT_ARRAY - Static variable in class freemarker.template.utility.CollectionUtils
    -
     
    -
    EMPTY_SEQUENCE - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    EMPTY_STRING - Static variable in interface freemarker.template.TemplateScalarModel
    -
    -
    A constant value to use as the empty string.
    -
    -
    EMPTY_STRING - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    emptyToNull(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Converts a 0-length string to null, leaves the string as is otherwise.
    -
    -
    END_EVALUATION - Static variable in interface freemarker.template.TransformControl
    -
    -
    Constant returned from TransformControl.afterBody() that tells the - template engine to end the transform and close the writer.
    -
    -
    endColumnNumber - Variable in exception freemarker.core.ParseException
    -
     
    -
    endLineNumber - Variable in exception freemarker.core.ParseException
    -
     
    -
    entrySet() - Method in class freemarker.ext.beans.HashAdapter
    -
     
    -
    entrySet() - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns a collection view of the mappings contained in this map.
    -
    -
    EnumerationModel - Class in freemarker.ext.beans
    -
    -
    A class that adds TemplateModelIterator functionality to the - Enumeration interface implementers.
    -
    -
    EnumerationModel(Enumeration, BeansWrapper) - Constructor for class freemarker.ext.beans.EnumerationModel
    -
    -
    Creates a new model that wraps the specified enumeration object.
    -
    -
    Environment - Class in freemarker.core
    -
    -
    Object that represents the runtime environment during template processing.
    -
    -
    Environment(Template, TemplateHashModel, Writer) - Constructor for class freemarker.core.Environment
    -
     
    -
    Environment.Namespace - Class in freemarker.core
    -
     
    -
    environmentSuspended(EnvironmentSuspendedEvent) - Method in interface freemarker.debug.DebuggerListener
    -
    -
    Called whenever an environment gets suspended (ie hits a breakpoint).
    -
    -
    EnvironmentSuspendedEvent - Class in freemarker.debug
    -
    -
    Event describing a suspension of an environment (ie because it hit a - breakpoint).
    -
    -
    EnvironmentSuspendedEvent(Object, String, int, DebuggedEnvironment) - Constructor for class freemarker.debug.EnvironmentSuspendedEvent
    -
     
    -
    eol - Variable in exception freemarker.core.ParseException
    -
    -
    The end of line string for this machine.
    -
    -
    equals(Object) - Method in class freemarker.debug.Breakpoint
    -
     
    -
    equals(Object) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    equals(Object) - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    equals(Object) - Method in class freemarker.template.Version
    -
     
    -
    error(String) - Method in class freemarker.log.Logger
    -
    -
    Logs an error message.
    -
    -
    error(String, Throwable) - Method in class freemarker.log.Logger
    -
    -
    Logs an error message with accompanying throwable.
    -
    -
    EVALUATE_BODY - Static variable in interface freemarker.template.TransformControl
    -
    -
    Constant returned from TransformControl.onStart() that tells the - template engine to evaluate the body.
    -
    -
    EventForwarding - Class in freemarker.ext.jsp
    -
    -
    An instance of this class should be registered as a <listener> in - the web.xml descriptor in order to correctly dispatch events to - event listeners that are specified in TLD files.
    -
    -
    EventForwarding() - Constructor for class freemarker.ext.jsp.EventForwarding
    -
     
    -
    exec(List) - Method in class freemarker.ext.beans.MapModel
    -
    -
    The first argument is used as a key to call the map's get method.
    -
    -
    exec(List) - Method in class freemarker.ext.beans.OverloadedMethodsModel
    -
    -
    Invokes the method, passing it the arguments from the list.
    -
    -
    exec(List) - Method in class freemarker.ext.beans.ResourceBundleModel
    -
    -
    Takes first argument as a resource key, looks up a string in resource bundle - with this key, then applies a MessageFormat.format on the string with the - rest of the arguments.
    -
    -
    exec(List) - Method in class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    exec(List) - Method in class freemarker.ext.beans.SimpleMethodModel
    -
    -
    Invokes the method, passing it the arguments from the list.
    -
    -
    exec(List) - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    exec(List) - Method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Applies an XPath expression to the node list and returns the resulting node list.
    -
    -
    exec(List) - Method in class freemarker.ext.jython.JythonModel
    -
     
    -
    exec(List) - Method in class freemarker.ext.rhino.RhinoFunctionModel
    -
     
    -
    exec(List) - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    Evaluates an XPath expression on XML nodes in this model.
    -
    -
    exec(List) - Method in interface freemarker.template.TemplateMethodModel
    -
    -
    Deprecated.
    -
    Executes the method call.
    -
    -
    exec(List) - Method in interface freemarker.template.TemplateMethodModelEx
    -
    -
    Executes the method call.
    -
    -
    exec(List) - Method in class freemarker.template.utility.Execute
    -
    -
    Executes a method call.
    -
    -
    exec(List) - Method in class freemarker.template.utility.ObjectConstructor
    -
     
    -
    execute() - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    execute(Map) - Method in class freemarker.ext.ant.JythonAntTask
    -
     
    -
    execute(String, Map) - Method in class freemarker.ext.ant.UnlinkedJythonOperationsImpl
    -
     
    -
    execute(File, Map) - Method in class freemarker.ext.ant.UnlinkedJythonOperationsImpl
    -
     
    -
    execute(Environment, Map, TemplateModel[], TemplateDirectiveBody) - Method in class freemarker.ext.servlet.IncludePage
    -
     
    -
    execute(Environment, Map, TemplateModel[], TemplateDirectiveBody) - Method in interface freemarker.template.TemplateDirectiveModel
    -
    -
    Executes this user-defined directive; called by FreeMarker when the user-defined - directive is called in the template.
    -
    -
    Execute - Class in freemarker.template.utility
    -
    -
    Gives FreeMarker the the ability to execute external commands.
    -
    -
    Execute() - Constructor for class freemarker.template.utility.Execute
    -
     
    -
    executeQuery(Object, String) - Method in interface freemarker.ext.dom.XPathSupport
    -
     
    -
    expectedTokenSequences - Variable in exception freemarker.core.ParseException
    -
    -
    Each entry in this array is an array of integers.
    -
    -
    explainTypeError(Class[]) - Method in class freemarker.ext.beans.SimpleMethodModel
    -
    -
    Implementation of experimental interface; don't use it, no backward compatibility guarantee!
    -
    -
    explainTypeError(Class[]) - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    EXPOSE_ALL - Static variable in class freemarker.ext.beans.BeansWrapper
    -
    -
    At this level of exposure, all methods and properties of the - wrapped objects are exposed to the template.
    -
    -
    EXPOSE_NOTHING - Static variable in class freemarker.ext.beans.BeansWrapper
    -
    -
    At this level of exposure, no bean properties and methods are exposed.
    -
    -
    EXPOSE_PROPERTIES_ONLY - Static variable in class freemarker.ext.beans.BeansWrapper
    -
    -
    At this level of exposure, only property getters are exposed.
    -
    -
    EXPOSE_SAFE - Static variable in class freemarker.ext.beans.BeansWrapper
    -
    -
    At this level of exposure, all methods and properties of the wrapped - objects are exposed to the template except methods that are deemed - not safe.
    -
    -
    - - - -

    F

    -
    -
    FALSE - Static variable in interface freemarker.template.TemplateBooleanModel
    -
    -
    A singleton object to represent boolean false
    -
    -
    FALSE - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    FileTemplateLoader - Class in freemarker.cache
    -
    -
    A TemplateLoader that uses files in a specified directory as the - source of templates.
    -
    -
    FileTemplateLoader() - Constructor for class freemarker.cache.FileTemplateLoader
    -
    -
    Creates a new file template cache that will use the current directory - (the value of the system property user.dir as the base - directory for loading templates.
    -
    -
    FileTemplateLoader(File) - Constructor for class freemarker.cache.FileTemplateLoader
    -
    -
    Creates a new file template loader that will use the specified directory - as the base directory for loading templates.
    -
    -
    FileTemplateLoader(File, boolean) - Constructor for class freemarker.cache.FileTemplateLoader
    -
    -
    Creates a new file template loader that will use the specified directory - as the base directory for loading templates.
    -
    -
    findTemplateSource(String) - Method in class freemarker.cache.FileTemplateLoader
    -
     
    -
    findTemplateSource(String) - Method in class freemarker.cache.MultiTemplateLoader
    -
     
    -
    findTemplateSource(String) - Method in class freemarker.cache.StringTemplateLoader
    -
     
    -
    findTemplateSource(String) - Method in interface freemarker.cache.TemplateLoader
    -
    -
    Finds the object that acts as the source of the template with the - given name.
    -
    -
    findTemplateSource(String) - Method in class freemarker.cache.URLTemplateLoader
    -
     
    -
    findTemplateSource(String) - Method in class freemarker.cache.WebappTemplateLoader
    -
     
    -
    finetuneMethodAppearance(Class, Method, BeansWrapper.MethodAppearanceDecision) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Deprecated. -
    Use BeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner); - no need to extend this class anymore. - Soon this method will be final, so trying to override it will break your app. - Note that if the methodAppearanceFineTuner property is set to non-null, this method is not - called anymore.
    -
    -
    -
    flush() - Method in class freemarker.template.utility.NullWriter
    -
     
    -
    format(String, Object[]) - Method in class freemarker.ext.beans.ResourceBundleModel
    -
    -
    Provides direct access to caching format engine from code (instead of from script).
    -
    -
    forName(String) - Static method in class freemarker.template.utility.ClassUtil
    -
    -
    Similar to Class.forName(java.lang.String), but attempts to load - through the thread context class loader.
    -
    -
    freemarker.cache - package freemarker.cache
    -
    -
    Template loading and caching.
    -
    -
    freemarker.core - package freemarker.core
    -
    -
    The seldom used or advanced parts of the fundamental FreeMarker API, compared to freemarker.template.
    -
    -
    freemarker.debug - package freemarker.debug
    -
    -
    Debugging API; experimental status, might change! -This is to support debugging in IDE-s.
    -
    -
    freemarker.ext.ant - package freemarker.ext.ant
    -
    -
    -Ant task to transform XML files -with a template; a more powerful alternative is FMPP.
    -
    -
    freemarker.ext.beans - package freemarker.ext.beans
    -
    -
    The default object wrapper of FreeMarker uses -this to expose Java Beans and POJO-s to templates, but it can also be used in itself as a -better alternative ObjectWrapper.
    -
    -
    freemarker.ext.dom - package freemarker.ext.dom
    -
    -
    Exposes DOM XML nodes to templates as easily traversable trees; -see in the Manual.
    -
    -
    freemarker.ext.jdom - package freemarker.ext.jdom
    -
    -
    Deprecated, use W3C DOM (freemarker.ext.dom) instead; -Exposes JDOM XML nodes to templates.
    -
    -
    freemarker.ext.jsp - package freemarker.ext.jsp
    -
    -
    -Classes for two-way FreeMarker-JSP integration.
    -
    -
    freemarker.ext.jython - package freemarker.ext.jython
    -
    -
    Exposes Jython objects to templates.
    -
    -
    freemarker.ext.rhino - package freemarker.ext.rhino
    -
    -
    Exposes Rhino (ECMAScript) objects to templates.
    -
    -
    freemarker.ext.servlet - package freemarker.ext.servlet
    -
    -
    Servlet for legacy "Model 2" frameworks that allows using FreeMarker -templates instead of JSP as the MVC View -(see in the Manual).
    -
    -
    freemarker.ext.util - package freemarker.ext.util
    -
    -
    Various classes used by freemarker.ext but might be useful outside it too.
    -
    -
    freemarker.ext.xml - package freemarker.ext.xml
    -
    -
    Deprecated, use W3C DOM with freemarker.ext.dom instead; -Exposes XML from DOM, dom4j or JDOM nodes, uniformly.
    -
    -
    freemarker.log - package freemarker.log
    -
    -
    -Logging facility; dispatches FreeMarker log messages to the chosen logger library.
    -
    -
    freemarker.template - package freemarker.template
    -
    -
    The fundamental, most commonly used API-s of FreeMarker; -start with Configuration (also see -Getting Stared in the Manual.)
    -
    -
    freemarker.template.utility - package freemarker.template.utility
    -
    -
    Various classes used by core FreeMarker code but might be useful outside of it too.
    -
    -
    FreemarkerServlet - Class in freemarker.ext.servlet
    -
    -
    This is a general-purpose FreeMarker view servlet.
    -
    -
    FreemarkerServlet() - Constructor for class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    FreemarkerTag - Class in freemarker.ext.jsp
    -
    -
    Simple implementation of JSP tag to allow use of FreeMarker templates in - JSP.
    -
    -
    FreemarkerTag() - Constructor for class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    FreeMarkerTree - Class in freemarker.core
    -
    -
    Deprecated. -
    Will be removed, as Swing classes aren't accessible on Google App Engine.
    -
    -
    -
    FreeMarkerTree(Template) - Constructor for class freemarker.core.FreeMarkerTree
    -
    -
    Deprecated.
    -
    FreemarkerXmlTask - Class in freemarker.ext.ant
    -
    -
    Deprecated. -
    FMPP is a more complete solution.
    -
    -
    -
    FreemarkerXmlTask() - Constructor for class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    Constructor creates the SAXBuilder.
    -
    -
    FTLStringLiteralDec(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    FTL string literal decoding.
    -
    -
    FTLStringLiteralEnc(String) - Static method in class freemarker.template.utility.StringUtil
    -
     
    -
    - - - -

    G

    -
    -
    get(Object) - Method in interface freemarker.cache.CacheStorage
    -
     
    -
    get(Object) - Method in class freemarker.cache.MruCacheStorage
    -
     
    -
    get(Object) - Method in class freemarker.cache.NullCacheStorage
    -
     
    -
    get(Object) - Method in class freemarker.cache.SoftCacheStorage
    -
     
    -
    get(Object) - Method in class freemarker.cache.StrongCacheStorage
    -
     
    -
    get() - Method in class freemarker.core.CustomAttribute
    -
     
    -
    get(Template) - Method in class freemarker.core.CustomAttribute
    -
     
    -
    get(int) - Method in interface freemarker.debug.DebugModel
    -
     
    -
    get(int, int) - Method in interface freemarker.debug.DebugModel
    -
     
    -
    get(String) - Method in interface freemarker.debug.DebugModel
    -
     
    -
    get(String[]) - Method in interface freemarker.debug.DebugModel
    -
     
    -
    get(int) - Method in class freemarker.ext.beans.ArrayModel
    -
     
    -
    get(String) - Method in class freemarker.ext.beans.BeanModel
    -
    -
    Uses Beans introspection to locate a property or method with name - matching the key name.
    -
    -
    get(int) - Method in class freemarker.ext.beans.CollectionModel
    -
    -
    Retrieves the i-th object from the collection, wrapped as a TemplateModel.
    -
    -
    get(Object) - Method in class freemarker.ext.beans.HashAdapter
    -
     
    -
    get(int) - Method in class freemarker.ext.beans.OverloadedMethodsModel
    -
     
    -
    get(String) - Method in class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    get(int) - Method in class freemarker.ext.beans.SimpleMethodModel
    -
     
    -
    get(String) - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    get(int) - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    get(String) - Method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Provides node list traversal as well as special functions: filtering by name, - filtering by node type, shallow-copying, and duplicate removal.
    -
    -
    get(int) - Method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Retrieves the i-th element of the node list.
    -
    -
    get(String) - Method in class freemarker.ext.jsp.TaglibFactory
    -
    -
    Retrieves a JSP tag library identified by an URI.
    -
    -
    get(String) - Method in class freemarker.ext.jython.JythonModel
    -
    -
    Calls PyObject.__findattr__(java.lang.String), then if it - returns null calls PyObject.__finditem__(java.lang.String).
    -
    -
    get(int) - Method in class freemarker.ext.jython.JythonSequenceModel
    -
    -
    Returns PyObject.__finditem__(int).
    -
    -
    get(String) - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    get(int) - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    get(String) - Method in class freemarker.ext.servlet.AllHttpScopesHashModel
    -
     
    -
    get(String) - Method in class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    get(String) - Method in class freemarker.ext.servlet.HttpRequestParametersHashModel
    -
     
    -
    get(String) - Method in class freemarker.ext.servlet.HttpSessionHashModel
    -
     
    -
    get(String) - Method in class freemarker.ext.servlet.ServletContextHashModel
    -
     
    -
    get(Object) - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns the value to which this map maps the specified key.
    -
    -
    get(int) - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    Selects a single node from this model's nodelist by its list index and - returns a new NodeListModel containing that single node.
    -
    -
    get(String) - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    Returns a new NodeListModel containing the nodes that result from applying - an operator to this model's nodes.
    -
    -
    get(String) - Method in class freemarker.template.SimpleHash
    -
     
    -
    get(int) - Method in class freemarker.template.SimpleSequence
    -
     
    -
    get(String) - Method in interface freemarker.template.TemplateHashModel
    -
    -
    Gets a TemplateModel from the hash.
    -
    -
    get(int) - Method in class freemarker.template.TemplateModelListSequence
    -
     
    -
    get(int) - Method in interface freemarker.template.TemplateSequenceModel
    -
    -
    Retrieves the i-th template model in this sequence.
    -
    -
    get(TimeZone, Date) - Method in interface freemarker.template.utility.DateUtil.DateToISO8601CalendarFactory
    -
    -
    Returns a GregorianCalendar with the desired time zone and - time and US locale.
    -
    -
    get(TimeZone, Date) - Method in class freemarker.template.utility.DateUtil.TrivialDateToISO8601CalendarFactory
    -
     
    -
    get(String) - Method in class freemarker.template.utility.DOMNodeModel
    -
     
    -
    getActualTagSyntax() - Method in class freemarker.template.Template
    -
    -
    Returns the tag syntax the parser has chosen for this template.
    -
    -
    getAdaptedObject(Class) - Method in class freemarker.ext.beans.BeanModel
    -
    -
    Returns the same as BeanModel.getWrappedObject(); to ensure that, this method will be final starting from 2.4.
    -
    -
    getAdaptedObject(Class) - Method in class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    getAdaptedObject(Class) - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getAdaptedObject(Class) - Method in class freemarker.ext.jython.JythonModel
    -
     
    -
    getAdaptedObject(Class) - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    getAdaptedObject(Class) - Method in interface freemarker.template.AdapterTemplateModel
    -
    -
    Retrieves the underlying object, or some other object semantically - equivalent to its value narrowed by the class hint.
    -
    -
    getArithmeticEngine() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getAsBoolean() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    getAsBoolean() - Method in class freemarker.ext.beans.BooleanModel
    -
     
    -
    getAsBoolean() - Method in class freemarker.ext.beans.EnumerationModel
    -
    - -
    -
    getAsBoolean() - Method in class freemarker.ext.beans.IteratorModel
    -
    - -
    -
    getAsBoolean() - Method in class freemarker.ext.jython.JythonModel
    -
    -
    Returns the value of PyObject.__nonzero__().
    -
    -
    getAsBoolean() - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    getAsBoolean() - Method in interface freemarker.template.TemplateBooleanModel
    -
     
    -
    getAsDate() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    getAsDate() - Method in class freemarker.ext.beans.DateModel
    -
     
    -
    getAsDate() - Method in class freemarker.template.SimpleDate
    -
     
    -
    getAsDate() - Method in interface freemarker.template.TemplateDateModel
    -
    -
    Returns the date value.
    -
    -
    getAsNumber() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    getAsNumber() - Method in class freemarker.ext.beans.NumberModel
    -
     
    -
    getAsNumber() - Method in class freemarker.ext.jython.JythonNumberModel
    -
    -
    Returns either PyObject.__tojava__(java.lang.Class) with - Number.class as argument.
    -
    -
    getAsNumber() - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    getAsNumber() - Method in class freemarker.template.SimpleNumber
    -
     
    -
    getAsNumber() - Method in interface freemarker.template.TemplateNumberModel
    -
    -
    Returns the numeric value.
    -
    -
    getAsString() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    getAsString() - Method in class freemarker.ext.beans.StringModel
    -
    -
    Returns the result of calling Object.toString() on the wrapped - object.
    -
    -
    getAsString() - Method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    This method returns the string resulting from concatenation - of string representations of its nodes.
    -
    -
    getAsString() - Method in class freemarker.ext.jython.JythonModel
    -
    -
    Returns the value of Object.toString().
    -
    -
    getAsString() - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    getAsString() - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    Returns the string representation of the wrapped nodes.
    -
    -
    getAsString() - Method in class freemarker.template.LocalizedString
    -
     
    -
    getAsString() - Method in class freemarker.template.SimpleScalar
    -
     
    -
    getAsString() - Method in interface freemarker.template.TemplateScalarModel
    -
    -
    Returns the string representation of this model.
    -
    -
    getAutoFlush() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getBaseDirectory() - Method in class freemarker.cache.FileTemplateLoader
    -
    -
    Returns the base directory in which the templates are searched.
    -
    -
    getBlamedExpressionString() - Method in exception freemarker.template.TemplateException
    -
    -
    If there was a blamed expression attached to this exception, it returns its canonical form, otherwise it returns - null.
    -
    -
    getBooleanFormat() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getBreakpoints() - Method in interface freemarker.debug.Debugger
    -
    -
    Retrieves a list of all Breakpoint objects.
    -
    -
    getBreakpoints(String) - Method in interface freemarker.debug.Debugger
    -
    -
    Retrieves a list of all Breakpoint objects for the specified - template.
    -
    -
    getBuildDate() - Method in class freemarker.template.Version
    -
     
    -
    getBundle() - Method in class freemarker.ext.beans.ResourceBundleModel
    -
     
    -
    getCacheStorage() - Method in class freemarker.cache.TemplateCache
    -
     
    -
    getCacheStorage() - Method in class freemarker.template.Configuration
    -
    - -
    -
    getCaching() - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    getCauseException() - Method in exception freemarker.template.TemplateException
    -
    -
    Deprecated. -
    Java 1.4 has introduced Throwable.getCause() - use that instead, especially as this can't return - runtime exceptions and errors as is.
    -
    -
    -
    getChildNodes() - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getChildNodes() - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    getChildNodes() - Method in interface freemarker.template.TemplateNodeModel
    -
     
    -
    getClassicCompatibleAsInt() - Method in class freemarker.core.Configurable
    -
     
    -
    getCNumberFormat() - Method in class freemarker.core.Environment
    -
    -
    Returns the NumberFormat used for the c built-in.
    -
    -
    getCollection() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    getColumnNumber() - Method in exception freemarker.core.ParseException
    -
    -
    1-based column number of the failing section, or 0 is the information is not available.
    -
    -
    getColumnNumber() - Method in exception freemarker.template.TemplateException
    -
    -
    1-based column number of the failing section, or null if the information is not available.
    -
    -
    getConfiguration() - Method in class freemarker.core.Environment
    -
     
    -
    getConfiguration() - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Returns the Configuration object used by this servlet.
    -
    -
    getConfiguration() - Method in class freemarker.template.Template
    -
    -
    Returns the Configuration object associated with this template.
    -
    -
    getContainingClass() - Method in class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput
    -
     
    -
    getCorrectedNameForUnknownSetting(String) - Method in class freemarker.core.Configurable
    -
     
    -
    getCorrectedNameForUnknownSetting(String) - Method in class freemarker.template.Configuration
    -
     
    -
    getCurrentEnvironment() - Static method in class freemarker.core.Environment
    -
    -
    Retrieves the environment object associated with the current - thread.
    -
    -
    getCurrentNamespace() - Method in class freemarker.core.Environment
    -
    -
    Returns the main name-space.
    -
    -
    getCurrentVisitorNode() - Method in class freemarker.core.Environment
    -
     
    -
    getCustomAttribute(String) - Method in class freemarker.core.Configurable
    -
    -
    Retrieves a named custom attribute for this configurable.
    -
    -
    getCustomAttributeNames() - Method in class freemarker.core.Configurable
    -
    -
    Returns an array with names of all custom attributes defined directly - on this configurable.
    -
    -
    getDataModel() - Method in class freemarker.core.Environment
    -
     
    -
    getDateFormat() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getDateTimeFormat() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getDateType() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    getDateType() - Method in class freemarker.ext.beans.DateModel
    -
     
    -
    getDateType() - Method in class freemarker.template.SimpleDate
    -
     
    -
    getDateType() - Method in interface freemarker.template.TemplateDateModel
    -
    -
    Returns the type of the date.
    -
    -
    getDebugger(InetAddress, int, String) - Static method in class freemarker.debug.DebuggerClient
    -
    -
    Connects to the FreeMarker debugger service running on a specific host - and port.
    -
    -
    getDefaultConfiguration() - Static method in class freemarker.template.Configuration
    -
    -
    Deprecated. -
    The usage of the static singleton (the "default") - Configuration instance can easily cause erroneous, unpredictable - behavior. This is because multiple independent software components may use - FreeMarker internally inside the same application, so they will interfere - because of the common Configuration instance. Each such component - should use its own private Configuration object instead, that it - typically creates with new Configuration() when the component - is initialized.
    -
    -
    -
    getDefaultDateType() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Returns the default date type.
    -
    -
    getDefaultDateType() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    getDefaultEncoding() - Method in class freemarker.template.Configuration
    -
    -
    Gets the default encoding for converting bytes to characters when - reading template files in a locale for which no explicit encoding - was specified.
    -
    -
    getDefaultInstance() - Static method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Deprecated. -
    Use BeansWrapperBuilder instead. The instance returned here is not read-only, so it's - dangerous to use.
    -
    -
    -
    getDefaultNS() - Method in class freemarker.core.Environment
    -
     
    -
    getDefaultNS() - Method in class freemarker.template.Template
    -
     
    -
    getDefaultObjectWrapper(Version) - Static method in class freemarker.template.Configuration
    -
    -
    Returns the default object wrapper for a given "incompatible_improvements" version.
    -
    -
    getDefaultObjectWrapper() - Static method in class freemarker.template.WrappingTemplateModel
    -
    -
    Deprecated. -
    Don't depend on this object, as it can be replace by anybody in the same JVM.
    -
    -
    -
    getDelay() - Method in class freemarker.cache.TemplateCache
    -
    -
    Gets the delay in milliseconds between checking for newer versions of a - template source.
    -
    -
    getDocumentBuilderFactory() - Static method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getEditorMessage() - Method in exception freemarker.core.ParseException
    -
    -
    Returns the description of the error without error location or source quotations, or null if there's no - description available.
    -
    -
    getEncoding(Locale) - Method in class freemarker.template.Configuration
    -
    -
    Gets the preferred character encoding for the given locale, or the - default encoding if no encoding is set explicitly for the specified - locale.
    -
    -
    getEncoding() - Method in class freemarker.template.Template
    -
    -
    Returns the character encoding used for reading included files.
    -
    -
    getEndColumnNumber() - Method in exception freemarker.core.ParseException
    -
    -
    1-based column number of the last character of the failing section, or 0 if the information is not available.
    -
    -
    getEndColumnNumber() - Method in exception freemarker.template.TemplateException
    -
    -
    1-based column number of the last character of the failing template section, or null if the information - is not available.
    -
    -
    getEndLineNumber() - Method in exception freemarker.core.ParseException
    -
    -
    1-based line number of the last line that contains the failing section, or 0 if the information is not available.
    -
    -
    getEndLineNumber() - Method in exception freemarker.template.TemplateException
    -
    -
    1-based line number of the last line that contains the failing section, or null if the information is not - available.
    -
    -
    getEnumModels() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Returns a hash model that represents the so-called class enum models.
    -
    -
    getEnvironment() - Method in class freemarker.core.Configurable
    -
     
    -
    getEnvironment() - Method in class freemarker.debug.EnvironmentSuspendedEvent
    -
    -
    The environment that was suspended
    -
    -
    getEnvironment() - Method in exception freemarker.template.TemplateException
    -
     
    -
    getErrorHandler() - Static method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getExposeAsProperty() - Method in class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
    -
     
    -
    getExposeFields() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    getExposeMethodAs() - Method in class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
    -
     
    -
    getExposureLevel() - Method in class freemarker.ext.beans.BeansWrapper
    -
     
    -
    getExposureLevel() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    getExtraInfo() - Method in class freemarker.template.Version
    -
    -
    The arbitrary string after the micro version number without leading dot, dash or underscore, - like "RC03" in "2.4.0-RC03".
    -
    -
    getFTLInstructionStack() - Method in exception freemarker.template.TemplateException
    -
    -
    Returns the snapshot of the FTL stack trace at the time this exception was created.
    -
    -
    getFTLTypeDescription(TemplateModel) - Static method in class freemarker.template.utility.ClassUtil
    -
    -
    Returns the type description of a value with FTL terms (not plain class name), as it should be used in - type-related error messages and for debugging purposes.
    -
    -
    getFullTemplatePath(Environment, String, String) - Static method in class freemarker.cache.TemplateCache
    -
    -
    Resolves a path-like reference to a template (like the one used in #include or #import), assuming - a current directory.
    -
    -
    getGlobalNamespace() - Method in class freemarker.core.Environment
    -
    -
    Returns a fictitious name-space that contains the globally visible variables - that were created in the template, but not the variables of the data-model.
    -
    -
    getGlobalVariable(String) - Method in class freemarker.core.Environment
    -
    -
    Returns the globally visible variable of the given name (or null).
    -
    -
    getGlobalVariables() - Method in class freemarker.core.Environment
    -
    -
    Returns the read-only hash of globally visible variables.
    -
    -
    getId() - Method in interface freemarker.debug.DebuggedEnvironment
    -
    -
    Returns a unique identifier for this environment
    -
    -
    getImports() - Method in class freemarker.template.Template
    -
     
    -
    getIncompatibleEnhancements() - Method in class freemarker.template.Configuration
    -
    - -
    -
    getIncompatibleImprovements() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Returns the version given with BeansWrapper.BeansWrapper(Version), normalized to the lowest version where a change - has occurred.
    -
    -
    getIncompatibleImprovements() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    getIncompatibleImprovements() - Method in class freemarker.template.Configuration
    -
     
    -
    getInstance(Object, ModelFactory) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Deprecated. -
    override BeansWrapper.getModelFactory(Class) instead. Using this - method will now bypass wrapper caching (if it's enabled) and always - result in creation of a new wrapper. This method will be removed in 2.4
    -
    -
    -
    getInstance(Object) - Method in class freemarker.ext.util.ModelCache
    -
     
    -
    getKnownVariableNames() - Method in class freemarker.core.Environment
    -
    -
    Returns a set of variable names that are known at the time of call.
    -
    -
    getLastModified(Object) - Method in class freemarker.cache.FileTemplateLoader
    -
     
    -
    getLastModified(Object) - Method in class freemarker.cache.MultiTemplateLoader
    -
     
    -
    getLastModified(Object) - Method in class freemarker.cache.StringTemplateLoader
    -
     
    -
    getLastModified(Object) - Method in interface freemarker.cache.TemplateLoader
    -
    -
    Returns the time of last modification of the specified template source.
    -
    -
    getLastModified(Object) - Method in class freemarker.cache.URLTemplateLoader
    -
     
    -
    getLastModified(Object) - Method in class freemarker.cache.WebappTemplateLoader
    -
     
    -
    getLine() - Method in class freemarker.debug.Breakpoint
    -
    -
    Returns the line number of the breakpoint
    -
    -
    getLine() - Method in class freemarker.debug.EnvironmentSuspendedEvent
    -
    -
    The line number in the template where the execution of the environment - was suspended.
    -
    -
    getLineNumber() - Method in exception freemarker.core.ParseException
    -
    -
    1-based line number of the failing section, or 0 is the information is not available.
    -
    -
    getLineNumber() - Method in exception freemarker.template.TemplateException
    -
    -
    1-based line number of the failing section, or null if the information is not available.
    -
    -
    getLocale() - Method in class freemarker.core.Configurable
    -
    -
    Returns the assumed locale when searching for template files with no - explicit requested locale.
    -
    -
    getLocalizedLookup() - Method in class freemarker.cache.TemplateCache
    -
    -
    Returns if localized template lookup is enabled or not.
    -
    -
    getLocalizedLookup() - Method in class freemarker.template.Configuration
    -
    - -
    -
    getLocalizedString(Locale) - Method in class freemarker.template.LocalizedString
    -
     
    -
    getLocalizedString(Locale) - Method in class freemarker.template.ResourceBundleLocalizedString
    -
     
    -
    getLocalVariable(String) - Method in class freemarker.core.Environment
    -
    -
    Returns the loop or macro local variable corresponding to this - variable name.
    -
    -
    getLocationString() - Method in class freemarker.debug.Breakpoint
    -
    -
    Returns the template name and the line number separated with a colon
    -
    -
    getLogger(String) - Static method in class freemarker.log.Logger
    -
    -
    Returns a logger for the specified category.
    -
    -
    getMacros() - Method in class freemarker.template.Template
    -
     
    -
    getMainNamespace() - Method in class freemarker.core.Environment
    -
    -
    Returns the main name-space.
    -
    -
    getMajor() - Method in class freemarker.template.Version
    -
    -
    The 1st version number, like 1 in "1.2.3".
    -
    -
    getMessage() - Method in exception freemarker.core.ParseException
    -
    -
    Returns the error location plus the error description.
    -
    -
    getMessage() - Method in exception freemarker.template.TemplateException
    -
     
    -
    getMessageWithoutStackTop() - Method in exception freemarker.template.TemplateException
    -
    -
    Similar to TemplateException.getMessage(), but it doesn't contain the position of the failing instruction at then end - of the text.
    -
    -
    getMethod() - Method in class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput
    -
     
    -
    getMethodAppearanceFineTuner() - Method in class freemarker.ext.beans.BeansWrapper
    -
     
    -
    getMethodAppearanceFineTuner() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    getMethodShadowsProperty() - Method in class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
    -
     
    -
    getMicro() - Method in class freemarker.template.Version
    -
    -
    The 3rd version number, like 3 in "1.2.3".
    -
    -
    getMinor() - Method in class freemarker.template.Version
    -
    -
    The 2nd version number, like 2 in "1.2.3".
    -
    -
    getModelFactory(Class) - Method in class freemarker.ext.beans.BeansWrapper
    -
     
    -
    getModelFactory(Class) - Method in class freemarker.ext.rhino.RhinoWrapper
    -
     
    -
    getModelTypes() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    getName() - Method in class freemarker.debug.EnvironmentSuspendedEvent
    -
    -
    The name of the template where the execution of the environment - was suspended
    -
    -
    getName() - Method in class freemarker.template.Template
    -
    -
    The usually path-like (or URL-like) identifier of the template, or possibly null for non-stored - templates.
    -
    -
    getNamespace(String) - Method in class freemarker.core.Environment
    -
    -
    Returns the name-space for the name if exists, or null.
    -
    -
    getNamespaceForPrefix(String) - Method in class freemarker.core.Environment
    -
     
    -
    getNamespaceForPrefix(String) - Method in class freemarker.template.Template
    -
     
    -
    getNewBuiltinClassResolver() - Method in class freemarker.core.Configurable
    -
    -
    Retrieves the TemplateClassResolver used - to resolve classes when "SomeClassName"?new is called in a template.
    -
    -
    getNode() - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getNodeName() - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    getNodeName() - Method in interface freemarker.template.TemplateNodeModel
    -
     
    -
    getNodeNamespace() - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getNodeNamespace() - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    getNodeNamespace() - Method in interface freemarker.template.TemplateNodeModel
    -
     
    -
    getNodeType() - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getNodeType() - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    getNodeType() - Method in interface freemarker.template.TemplateNodeModel
    -
     
    -
    getNumberFormat() - Method in class freemarker.core.Configurable
    -
    -
    Returns the default number format used to convert numbers to strings.
    -
    -
    getObjectWrapper() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getObjectWrapper() - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    getObjectWrapper() - Method in class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    getObjectWrapper() - Method in class freemarker.template.WrappingTemplateModel
    -
    -
    Returns the object wrapper instance used by this wrapping template model.
    -
    -
    getOut() - Method in class freemarker.core.Environment
    -
     
    -
    getOuterIdentity() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    By default returns this.
    -
    -
    getOuterIdentity() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    getOutputEncoding() - Method in class freemarker.core.Configurable
    -
     
    -
    getParent() - Method in class freemarker.core.Configurable
    -
    -
    Returns the parent Configurable object of this object.
    -
    -
    getParent() - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    getParentNode() - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getParentNode() - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    getParentNode() - Method in interface freemarker.template.TemplateNodeModel
    -
     
    -
    getParsedIncompatibleEnhancements() - Method in class freemarker.template.Configuration
    -
    - -
    -
    getPlainTextTemplate(String, String, Configuration) - Static method in class freemarker.template.Template
    -
    -
    Returns a trivial template, one that is just a single block of - plain text, no dynamic content.
    -
    -
    getPrefixedName(String, String) - Method in class freemarker.template.Template
    -
     
    -
    getPrefixForNamespace(String) - Method in class freemarker.core.Environment
    -
     
    -
    getPrefixForNamespace(String) - Method in class freemarker.template.Template
    -
     
    -
    getPythonClassName(PyObject) - Method in class freemarker.ext.jython.JythonVersionAdapter
    -
    -
    Returns pyObject.__class__.__name__
    -
    -
    getReader(Object, String) - Method in class freemarker.cache.FileTemplateLoader
    -
     
    -
    getReader(Object, String) - Method in class freemarker.cache.MultiTemplateLoader
    -
     
    -
    getReader(Object, String) - Method in class freemarker.cache.StringTemplateLoader
    -
     
    -
    getReader(Object, String) - Method in interface freemarker.cache.TemplateLoader
    -
    -
    Returns the character stream of a template represented by the specified - template source.
    -
    -
    getReader(Object, String) - Method in class freemarker.cache.URLTemplateLoader
    -
     
    -
    getReader(Object, String) - Method in class freemarker.cache.WebappTemplateLoader
    -
     
    -
    getRequest() - Method in class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    getResponse() - Method in class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    getRootTreeNode() - Method in class freemarker.template.Template
    -
     
    -
    getServlet() - Method in class freemarker.ext.servlet.ServletContextHashModel
    -
    -
    Returns the underlying servlet.
    -
    -
    getSetting(String) - Method in class freemarker.core.Configurable
    -
    -
    Deprecated. -
    It's not possible in general to convert setting values to string, - and thus it's impossible to ensure that Configurable.setSetting(String, String) will work with - the returned value correctly.
    -
    -
    -
    getSettings() - Method in class freemarker.core.Configurable
    -
    -
    Deprecated. -
    This method was always defective, and certainly it always - will be. Don't use it. (Simply, it's hardly possible in general to - convert setting values to text in a way that ensures that - Configurable.setSettings(Properties) will work with them correctly.)
    -
    -
    -
    getSharedVariable(String) - Method in class freemarker.template.Configuration
    -
    -
    Gets a shared variable.
    -
    -
    getSharedVariableNames() - Method in class freemarker.template.Configuration
    -
    -
    Returns the set containing the names of all defined shared sharedVariables.
    -
    -
    getShortClassName(Class) - Static method in class freemarker.template.utility.ClassUtil
    -
    - -
    -
    getShortClassName(Class, boolean) - Static method in class freemarker.template.utility.ClassUtil
    -
    -
    Returns a class name without "java.lang." and "java.util." prefix, also shows array types in a format like - int[]; useful for printing class names in error messages.
    -
    -
    getShortClassNameOfObject(Object) - Static method in class freemarker.template.utility.ClassUtil
    -
    - -
    -
    getShortClassNameOfObject(Object, boolean) - Static method in class freemarker.template.utility.ClassUtil
    -
    -
    ClassUtil.getShortClassName(Class, boolean) called with object.getClass(), but returns the fictional - class name Null for a null value.
    -
    -
    getShowErrorTips() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getSignum(Number) - Static method in class freemarker.template.utility.NumberUtil
    -
     
    -
    getSize() - Method in interface freemarker.cache.CacheStorageWithGetSize
    -
    -
    Returns the current number of cache entries.
    -
    -
    getSize() - Method in class freemarker.cache.MruCacheStorage
    -
    -
    Returns a close approximation of the current number of cache entries.
    -
    -
    getSize() - Method in class freemarker.cache.NullCacheStorage
    -
    -
    Always returns 0.
    -
    -
    getSize() - Method in class freemarker.cache.SoftCacheStorage
    -
    -
    Returns a close approximation of the number of cache entries.
    -
    -
    getSize() - Method in class freemarker.cache.StrongCacheStorage
    -
    -
    Returns a close approximation of the number of cache entries.
    -
    -
    getSoftSize() - Method in class freemarker.cache.MruCacheStorage
    -
    -
    Returns a close approximation of the current number of soft cache entries.
    -
    -
    getSoftSizeLimit() - Method in class freemarker.cache.MruCacheStorage
    -
    -
    Returns the configured upper limit of the number of soft cache entries.
    -
    -
    getSource(int, int, int, int) - Method in class freemarker.template.Template
    -
    -
    Returns the template source at the location specified by the coordinates given, or null if unavailable.
    -
    -
    getSQLDateAndTimeTimeZone() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getStaticModels() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Returns a hash model that represents the so-called class static models.
    -
    -
    getStrictSyntaxMode() - Method in class freemarker.template.Configuration
    -
    - -
    -
    getStrongSize() - Method in class freemarker.cache.MruCacheStorage
    -
    -
    Returns the current number of strong cache entries.
    -
    -
    getStrongSizeLimit() - Method in class freemarker.cache.MruCacheStorage
    -
    -
    Returns the configured upper limit of the number of strong cache entries.
    -
    -
    getSupportedBuiltInDirectiveNames() - Method in class freemarker.template.Configuration
    -
    -
    Returns the names of the directives that are predefined by FreeMarker.
    -
    -
    getSupportedBuiltInNames() - Method in class freemarker.template.Configuration
    -
    -
    Returns the names of the supported "built-ins".
    -
    -
    getSupportsIndexedAccess() - Method in class freemarker.ext.beans.CollectionModel
    -
    -
    Tells if CollectionModel.get(int) will always fail for this object.
    -
    -
    getSuspendedEnvironments() - Method in interface freemarker.debug.Debugger
    -
    -
    Retrieves a collection of all DebuggedEnvironment objects that - are currently suspended.
    -
    -
    getSystemProperty(String) - Static method in class freemarker.template.utility.SecurityUtilities
    -
     
    -
    getSystemProperty(String, String) - Static method in class freemarker.template.utility.SecurityUtilities
    -
     
    -
    getSystemProperty(String, int) - Static method in class freemarker.template.utility.SecurityUtilities
    -
     
    -
    getTagSyntax() - Method in class freemarker.template.Configuration
    -
    - -
    -
    getTemplate(String, Locale, String, boolean) - Method in class freemarker.cache.TemplateCache
    -
    -
    Retrieves the template with the given name (and according the specified further parameters) from the - template cache, loading it into the cache first if it's missing/staled.
    -
    -
    getTemplate() - Method in class freemarker.core.Environment
    -
    -
    Retrieves the currently processed template.
    -
    -
    getTemplate() - Method in class freemarker.core.Environment.Namespace
    -
     
    -
    getTemplate(String) - Method in class freemarker.template.Configuration
    -
    -
    Retrieves the template with the given name from the template cache, loading it into the cache first if it's - missing/staled.
    -
    -
    getTemplate(String, Locale) - Method in class freemarker.template.Configuration
    -
    - -
    -
    getTemplate(String, String) - Method in class freemarker.template.Configuration
    -
    - -
    -
    getTemplate(String, Locale, String) - Method in class freemarker.template.Configuration
    -
    - -
    -
    getTemplate(String, Locale, String, boolean) - Method in class freemarker.template.Configuration
    -
    - -
    -
    getTemplate(String, Locale, String, boolean, boolean) - Method in class freemarker.template.Configuration
    -
    -
    Retrieves the template with the given name (and according the specified further parameters) from the template - cache, loading it into the cache first if it's missing/staled.
    -
    -
    getTemplateExceptionHandler() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getTemplateForImporting(String) - Method in class freemarker.core.Environment
    -
    -
    Gets a template for importing; used with - Environment.importLib(Template importedTemplate, String namespace).
    -
    -
    getTemplateForInclusion(String, String, boolean) - Method in class freemarker.core.Environment
    -
    - -
    -
    getTemplateForInclusion(String, String, boolean, boolean) - Method in class freemarker.core.Environment
    -
    -
    Gets a template for inclusion; used with Environment.include(Template includedTemplate).
    -
    -
    getTemplateLoader() - Method in class freemarker.cache.TemplateCache
    -
     
    -
    getTemplateLoader() - Method in class freemarker.template.Configuration
    -
    - -
    -
    getTemplateModel() - Method in class freemarker.ext.beans.HashAdapter
    -
     
    -
    getTemplateModel() - Method in interface freemarker.template.TemplateModelAdapter
    -
     
    -
    getTemplateName() - Method in exception freemarker.core.ParseException
    -
    -
    Returns the name (template-root relative path) of the template whose parsing was failed.
    -
    -
    getTemplateName() - Method in class freemarker.debug.Breakpoint
    -
    -
    Returns the template name of the breakpoint
    -
    -
    getTemplateName() - Method in exception freemarker.template.TemplateException
    -
    -
    Returns the name of the template where the error has occurred, or null if the information isn't - available.
    -
    -
    getTemplatePath() - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    getTimeFormat() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getTimeZone() - Method in class freemarker.core.Configurable
    -
    - -
    -
    getTimeZone(String) - Static method in class freemarker.template.utility.DateUtil
    -
    -
    Returns the time zone object for the name (or ID).
    -
    -
    getTimeZoneName() - Method in exception freemarker.template.utility.UnrecognizedTimeZoneException
    -
     
    -
    getUndeclaredThrowable() - Method in exception freemarker.template.utility.UndeclaredThrowableException
    -
     
    -
    getUnsupportedClass() - Method in exception freemarker.template.utility.UnsupportedNumberClassException
    -
     
    -
    getURL(String) - Method in class freemarker.cache.ClassTemplateLoader
    -
     
    -
    getURL(String) - Method in class freemarker.cache.URLTemplateLoader
    -
    -
    Given a template name (plus potential locale decorations) retrieves - an URL that points the template source.
    -
    -
    getURLConnectionUsesCaches() - Method in class freemarker.cache.URLTemplateLoader
    -
    - -
    -
    getURLConnectionUsesCaches() - Method in class freemarker.cache.WebappTemplateLoader
    -
    - -
    -
    getURLEscapingCharset() - Method in class freemarker.core.Configurable
    -
     
    -
    getUseCache() - Method in class freemarker.ext.beans.BeansWrapper
    -
     
    -
    getUseCache() - Method in class freemarker.ext.util.ModelCache
    -
     
    -
    getUseModelCache() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    getVariable(String) - Method in class freemarker.core.Environment
    -
    -
    Returns the variable that is visible in this context.
    -
    -
    getVersion() - Static method in class freemarker.template.Configuration
    -
    -
    Returns the FreeMarker version information, most importantly the major.minor.micro version numbers.
    -
    -
    getVersionNumber() - Static method in class freemarker.template.Configuration
    -
    -
    Deprecated. - -
    -
    -
    getWhitespaceStripping() - Method in class freemarker.template.Configuration
    -
    -
    Gets whether the FTL parser will try to remove - superfluous white-space around certain FTL tags.
    -
    -
    getWrappedObject() - Method in class freemarker.ext.beans.BeanModel
    -
     
    -
    getWrappedObject() - Method in class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    getWrappedObject() - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    getWrappedObject() - Method in class freemarker.ext.jython.JythonModel
    -
     
    -
    getWrappedObject() - Method in interface freemarker.ext.util.WrapperTemplateModel
    -
    -
    Retrieves the original object wrapped by this model.
    -
    -
    getWrappedObject() - Method in class freemarker.template.TemplateModelListSequence
    -
    -
    Returns the original List of TemplateModel-s, so it's not a fully unwrapped value.
    -
    -
    getWriter(Writer, Map) - Method in interface freemarker.template.TemplateTransformModel
    -
    -
    Returns a writer that will be used by the engine to feed the - transformation input to the transform.
    -
    -
    getWriter(Writer, Map) - Method in class freemarker.template.utility.CaptureOutput
    -
    -
    Deprecated.
    -
    getWriter(Writer, Map) - Method in class freemarker.template.utility.HtmlEscape
    -
     
    -
    getWriter(Writer, Map) - Method in class freemarker.template.utility.JythonRuntime
    -
     
    -
    getWriter(Writer, Map) - Method in class freemarker.template.utility.NormalizeNewlines
    -
     
    -
    getWriter(Writer, Map) - Method in class freemarker.template.utility.StandardCompress
    -
     
    -
    getWriter(Writer, Map) - Method in class freemarker.template.utility.XmlEscape
    -
     
    -
    getXPathSupportClass() - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Get the currently used freemarker.ext.dom.XPathSupport used as the XPath engine.
    -
    -
    getYesNo(String) - Static method in class freemarker.template.utility.StringUtil
    -
     
    -
    - - - -

    H

    -
    -
    handleTemplateException(TemplateException, Environment, Writer) - Method in interface freemarker.template.TemplateExceptionHandler
    -
    -
    Method called after a TemplateException was raised inside a template.
    -
    -
    handleUnknownType(Object) - Method in class freemarker.template.DefaultObjectWrapper
    -
    -
    Called if an unknown type is passed in.
    -
    -
    handleUnknownType(Object) - Method in class freemarker.template.SimpleObjectWrapper
    -
    -
    Called if a type other than the simple ones we know about is passed in.
    -
    -
    HashAdapter - Class in freemarker.ext.beans
    -
     
    -
    hashCode() - Method in class freemarker.debug.Breakpoint
    -
     
    -
    hashCode() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    hashCode() - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    hashCode() - Method in class freemarker.template.Version
    -
     
    -
    hasNext() - Method in class freemarker.ext.beans.EnumerationModel
    -
    -
    Calls underlying Enumeration.nextElement().
    -
    -
    hasNext() - Method in class freemarker.ext.beans.IteratorModel
    -
    -
    Calls underlying Iterator.hasNext().
    -
    -
    hasNext() - Method in interface freemarker.template.TemplateModelIterator
    -
     
    -
    hasPlainGetMethod() - Method in class freemarker.ext.beans.BeanModel
    -
    -
    Whether the model has a plain get(String) or get(Object) method
    -
    -
    HTML_DEBUG_HANDLER - Static variable in interface freemarker.template.TemplateExceptionHandler
    -
    -
    TemplateExceptionHandler useful when you developing HTML templates.
    -
    -
    HTMLEnc(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Deprecated. -
    Use StringUtil.XHTMLEnc(String) instead, because it escapes apostrophe-quote too.
    -
    -
    -
    HtmlEscape - Class in freemarker.template.utility
    -
    -
    Performs an HTML escape of a given template fragment.
    -
    -
    HtmlEscape() - Constructor for class freemarker.template.utility.HtmlEscape
    -
     
    -
    HttpRequestHashModel - Class in freemarker.ext.servlet
    -
    -
    TemplateHashModel wrapper for a HttpServletRequest attributes.
    -
    -
    HttpRequestHashModel(HttpServletRequest, ObjectWrapper) - Constructor for class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    HttpRequestHashModel(HttpServletRequest, HttpServletResponse, ObjectWrapper) - Constructor for class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    HttpRequestParametersHashModel - Class in freemarker.ext.servlet
    -
    -
    TemplateHashModel wrapper for a HttpServletRequest parameters.
    -
    -
    HttpRequestParametersHashModel(HttpServletRequest) - Constructor for class freemarker.ext.servlet.HttpRequestParametersHashModel
    -
     
    -
    HttpSessionHashModel - Class in freemarker.ext.servlet
    -
    -
    TemplateHashModel wrapper for a HttpSession attributes.
    -
    -
    HttpSessionHashModel(HttpSession, ObjectWrapper) - Constructor for class freemarker.ext.servlet.HttpSessionHashModel
    -
    -
    Use this constructor when the session already exists.
    -
    -
    HttpSessionHashModel(FreemarkerServlet, HttpServletRequest, HttpServletResponse, ObjectWrapper) - Constructor for class freemarker.ext.servlet.HttpSessionHashModel
    -
    -
    Use this constructor when the session isn't already created.
    -
    -
    - - - -

    I

    -
    -
    IdentityHashMap - Class in freemarker.ext.util
    -
    -
    A variant of HashMap that uses - System.identityHashCode(Object) for hashing, and reference comparison - instead of Object.equals(Object).
    -
    -
    IdentityHashMap(int, float) - Constructor for class freemarker.ext.util.IdentityHashMap
    -
    -
    Constructs a new, empty map with the specified initial - capacity and the specified load factor.
    -
    -
    IdentityHashMap(int) - Constructor for class freemarker.ext.util.IdentityHashMap
    -
    -
    Constructs a new, empty map with the specified initial capacity - and default load factor, which is 0.75.
    -
    -
    IdentityHashMap() - Constructor for class freemarker.ext.util.IdentityHashMap
    -
    -
    Constructs a new, empty map with a default capacity and load - factor, which is 0.75.
    -
    -
    IdentityHashMap(Map) - Constructor for class freemarker.ext.util.IdentityHashMap
    -
    -
    Constructs a new map with the same mappings as the given map.
    -
    -
    IGNORE_HANDLER - Static variable in interface freemarker.template.TemplateExceptionHandler
    -
    -
    TemplateExceptionHandler that simply skips the failing instructions, letting the template continue - executing.
    -
    -
    importLib(String, String) - Method in class freemarker.core.Environment
    -
    -
    Emulates import directive, except that name must be tempate - root relative.
    -
    -
    importLib(Template, String) - Method in class freemarker.core.Environment
    -
    -
    Emulates import directive.
    -
    -
    include(String, String, boolean) - Method in class freemarker.core.Environment
    -
    -
    Emulates include directive, except that name must be tempate - root relative.
    -
    -
    include(Template) - Method in class freemarker.core.Environment
    -
    -
    Processes a Template in the context of this Environment, including its - output in the Environment's Writer.
    -
    -
    IncludePage - Class in freemarker.ext.servlet
    -
    -
    A model that when invoked with a 'path' parameter will perform a servlet - include.
    -
    -
    IncludePage(HttpServletRequest, HttpServletResponse) - Constructor for class freemarker.ext.servlet.IncludePage
    -
     
    -
    INCOMPATIBLE_ENHANCEMENTS - Static variable in class freemarker.template.Configuration
    -
    -
    Deprecated. - -
    -
    -
    INCOMPATIBLE_IMPROVEMENTS - Static variable in class freemarker.template.Configuration
    -
     
    -
    info(String) - Method in class freemarker.log.Logger
    -
    -
    Logs an informational message.
    -
    -
    info(String, Throwable) - Method in class freemarker.log.Logger
    -
    -
    Logs an informational message with accompanying throwable.
    -
    -
    init() - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    initializeServletContext(HttpServletRequest, HttpServletResponse) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Called when servlet detects in a request processing that - application-global (that is, ServletContext-specific) attributes are not yet - set.
    -
    -
    initializeSession(HttpServletRequest, HttpServletResponse) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Called when servlet detects in a request processing that session-global - (that is, HttpSession-specific) attributes are not yet set.
    -
    -
    insertDefaults(Map) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    INSTANCE - Static variable in class freemarker.ext.jython.JythonWrapper
    -
     
    -
    INSTANCE - Static variable in class freemarker.template.utility.NullWriter
    -
     
    -
    INSTANCE - Static variable in class freemarker.template.utility.StandardCompress
    -
     
    -
    intValue() - Method in class freemarker.template.Version
    -
     
    -
    intValueFor(int, int, int) - Static method in class freemarker.template.Version
    -
     
    -
    InvalidPropertyException - Exception in freemarker.ext.beans
    -
    -
    An exception thrown when there is an attempt to access - an invalid bean property when we are in a "strict bean" mode
    -
    -
    InvalidPropertyException(String) - Constructor for exception freemarker.ext.beans.InvalidPropertyException
    -
     
    -
    InvalidReferenceException - Exception in freemarker.core
    -
    -
    A subclass of TemplateException that says that an FTL expression has evaluated to null or it refers - to something that doesn't exist.
    -
    -
    InvalidReferenceException(Environment) - Constructor for exception freemarker.core.InvalidReferenceException
    -
    -
    Creates and invalid reference exception that contains no information about what was missing or null.
    -
    -
    InvalidReferenceException(String, Environment) - Constructor for exception freemarker.core.InvalidReferenceException
    -
    -
    Creates and invalid reference exception that contains no programmatically extractable information about the - blamed expression.
    -
    -
    invalidSettingValueException(String, String) - Method in class freemarker.core.Configurable
    -
     
    -
    invokeGenericGet(Map, Class, String) - Method in class freemarker.ext.beans.BeanModel
    -
     
    -
    invokeGenericGet(Map, Class, String) - Method in class freemarker.ext.beans.MapModel
    -
    -
    Overridden to invoke the generic get method by casting to Map instead of - through reflection - should yield better performance.
    -
    -
    invokeGenericGet(Map, Class, String) - Method in class freemarker.ext.beans.ResourceBundleModel
    -
    -
    Overridden to invoke the getObject method of the resource bundle.
    -
    -
    isCacheable(Object) - Method in class freemarker.ext.beans.BeansModelCache
    -
     
    -
    isCacheable(Object) - Method in class freemarker.ext.util.ModelCache
    -
     
    -
    isClassicCompatible() - Method in class freemarker.core.Configurable
    -
    -
    Returns whether the engine runs in the "Classic Compatibile" mode.
    -
    -
    isClassIntrospectionCacheRestricted() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Tells if this instance acts like if its class introspection cache is sharable with other BeansWrapper-s.
    -
    -
    isConcurrent() - Method in interface freemarker.cache.ConcurrentCacheStorage
    -
    -
    Returns true if this instance of cache storage is concurrently - accessible from multiple threads without synchronization.
    -
    -
    isConcurrent() - Method in class freemarker.cache.NullCacheStorage
    -
     
    -
    isConcurrent() - Method in class freemarker.cache.SoftCacheStorage
    -
     
    -
    isConcurrent() - Method in class freemarker.cache.StrongCacheStorage
    -
    -
    Returns true if the underlying Map is a ConcurrentMap.
    -
    -
    isDebugEnabled() - Method in class freemarker.log.Logger
    -
    -
    Returns true if this logger will log debug messages.
    -
    -
    isEmpty() - Method in class freemarker.ext.beans.ArrayModel
    -
     
    -
    isEmpty() - Method in class freemarker.ext.beans.BeanModel
    -
    -
    Tells whether the model is empty.
    -
    -
    isEmpty() - Method in class freemarker.ext.beans.HashAdapter
    -
     
    -
    isEmpty() - Method in class freemarker.ext.beans.MapModel
    -
     
    -
    isEmpty() - Method in class freemarker.ext.beans.ResourceBundleModel
    -
    -
    Returns true if this bundle contains no objects.
    -
    -
    isEmpty() - Method in class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    isEmpty() - Method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Returns true if this model contains no nodes.
    -
    -
    isEmpty() - Method in class freemarker.ext.jsp.TaglibFactory
    -
    -
    Returns false.
    -
    -
    isEmpty() - Method in class freemarker.ext.jython.JythonModel
    -
    -
    Returns PyObject.__len__() == 0.
    -
    -
    isEmpty() - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    isEmpty() - Method in class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    isEmpty() - Method in class freemarker.ext.servlet.HttpRequestParametersHashModel
    -
     
    -
    isEmpty() - Method in class freemarker.ext.servlet.HttpSessionHashModel
    -
     
    -
    isEmpty() - Method in class freemarker.ext.servlet.ServletContextHashModel
    -
     
    -
    isEmpty() - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns true if this map contains no key-value mappings.
    -
    -
    isEmpty() - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    Returns true if this NodeListModel contains no nodes.
    -
    -
    isEmpty() - Method in class freemarker.template.SimpleHash
    -
     
    -
    isEmpty() - Method in interface freemarker.template.TemplateHashModel
    -
     
    -
    isEmpty() - Method in class freemarker.template.utility.DOMNodeModel
    -
     
    -
    isErrorEnabled() - Method in class freemarker.log.Logger
    -
    -
    Returns true if this logger will log error messages.
    -
    -
    isExposeFields() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Returns whether exposure of public instance fields of classes is - enabled.
    -
    -
    isFatalEnabled() - Method in class freemarker.log.Logger
    -
    -
    Returns true if this logger will log fatal error messages.
    -
    -
    isGAECompliant() - Method in class freemarker.template.Version
    -
     
    -
    isInAttemptBlock() - Method in class freemarker.core.Environment
    -
    -
    Tells if we are inside an #attempt block (but before #recover).
    -
    -
    isInfinite(Number) - Static method in class freemarker.template.utility.NumberUtil
    -
     
    -
    isInfoEnabled() - Method in class freemarker.log.Logger
    -
    -
    Returns true if this logger will log informational messages.
    -
    -
    isIntegerBigDecimal(BigDecimal) - Static method in class freemarker.template.utility.NumberUtil
    -
    -
    Tells if a BigDecimal stores a whole number.
    -
    -
    isNaN(Number) - Static method in class freemarker.template.utility.NumberUtil
    -
     
    -
    isNumerical(Class) - Static method in class freemarker.template.utility.ClassUtil
    -
    -
    Tells if a type is numerical; works both for primitive types and classes.
    -
    -
    isPyInstance(Object) - Method in class freemarker.ext.jython.JythonVersionAdapter
    -
    -
    Returns - obj instanceof Py[Java]Instance.
    -
    -
    isSimpleMapWrapper() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Tells whether Maps are exposed as simple maps, without access to their - method.
    -
    -
    isSimpleMapWrapper() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    isStrict() - Method in class freemarker.ext.beans.BeansWrapper
    -
     
    -
    isStrict() - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
     
    -
    isWarnEnabled() - Method in class freemarker.log.Logger
    -
    -
    Returns true if this logger will log warning messages.
    -
    -
    isWriteProtected() - Method in class freemarker.ext.beans.BeansWrapper
    -
     
    -
    isWriteProtected() - Method in interface freemarker.template.utility.WriteProtectable
    -
     
    -
    isXMLID(String) - Static method in class freemarker.template.utility.StringUtil
    -
     
    -
    iterator() - Method in class freemarker.ext.beans.ArrayModel
    -
     
    -
    iterator() - Method in class freemarker.ext.beans.CollectionModel
    -
     
    -
    iterator() - Method in class freemarker.ext.beans.EnumerationModel
    -
    -
    This allows the enumeration to be used in a <#list> block.
    -
    -
    iterator() - Method in class freemarker.ext.beans.IteratorModel
    -
    -
    This allows the iterator to be used in a <#list> block.
    -
    -
    iterator() - Method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    iterator() - Method in class freemarker.ext.jython.JythonSequenceModel
    -
     
    -
    iterator() - Method in class freemarker.template.SimpleCollection
    -
    -
    Retrieves a template model iterator that is used to iterate over the elements in this collection.
    -
    -
    iterator() - Method in interface freemarker.template.TemplateCollectionModel
    -
    -
    Retrieves a template model iterator that is used to iterate over - the elements in this collection.
    -
    -
    IteratorModel - Class in freemarker.ext.beans
    -
    -
    A class that adds TemplateModelIterator functionality to the - Iterator interface implementers.
    -
    -
    IteratorModel(Iterator, BeansWrapper) - Constructor for class freemarker.ext.beans.IteratorModel
    -
    -
    Creates a new model that wraps the specified iterator object.
    -
    -
    - - - -

    J

    -
    -
    javaScriptStringEnc(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Escapes a String to be safely insertable into a JavaScript string literal; for more see - jsStringEnc(s, false).
    -
    -
    javaStringEnc(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Escapes the String with the escaping rules of Java language - string literals, so it's safe to insert the value into a string literal.
    -
    -
    jQuote(Object) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Converts the parameter with toString (if it's not null) and passes it to - StringUtil.jQuote(String).
    -
    -
    jQuote(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Quotes string as Java Language string literal.
    -
    -
    jQuoteNoXSS(Object) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Converts the parameter with toString (if not - null)and passes it to StringUtil.jQuoteNoXSS(String).
    -
    -
    jQuoteNoXSS(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Same as StringUtil.jQuoteNoXSS(String) but also escapes '<' - as \u003C.
    -
    -
    jsonStringEnc(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Escapes a String to be safely insertable into a JSON string literal; for more see - jsStringEnc(s, true).
    -
    -
    jsStringEnc(String, boolean) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Escapes a String to be safely insertable into a JavaScript or a JSON string literal.
    -
    -
    JythonAntTask - Class in freemarker.ext.ant
    -
    -
    Used internally, public for technical reasons only.
    -
    -
    JythonAntTask() - Constructor for class freemarker.ext.ant.JythonAntTask
    -
     
    -
    JythonHashModel - Class in freemarker.ext.jython
    -
    -
    Model for Jython dictionaries (PyDictionary - and PyStringMap).
    -
    -
    JythonHashModel(PyObject, JythonWrapper) - Constructor for class freemarker.ext.jython.JythonHashModel
    -
     
    -
    JythonModel - Class in freemarker.ext.jython
    -
    -
    Generic model for arbitrary Jython objects.
    -
    -
    JythonModel(PyObject, JythonWrapper) - Constructor for class freemarker.ext.jython.JythonModel
    -
     
    -
    JythonNumberModel - Class in freemarker.ext.jython
    -
    -
    Model for Jython numeric objects (PyInteger, PyLong, - PyFloat).
    -
    -
    JythonNumberModel(PyObject, JythonWrapper) - Constructor for class freemarker.ext.jython.JythonNumberModel
    -
     
    -
    JythonRuntime - Class in freemarker.template.utility
    -
    -
    A crude first pass at an embeddable Jython interpreter
    -
    -
    JythonRuntime() - Constructor for class freemarker.template.utility.JythonRuntime
    -
     
    -
    JythonSequenceModel - Class in freemarker.ext.jython
    -
    -
    Model for Jython sequence objects (PySequence descendants).
    -
    -
    JythonSequenceModel(PyObject, JythonWrapper) - Constructor for class freemarker.ext.jython.JythonSequenceModel
    -
     
    -
    JythonVersionAdapter - Class in freemarker.ext.jython
    -
    -
    Functions that has a different implementation depending on the Jython version - used.
    -
    -
    JythonVersionAdapter() - Constructor for class freemarker.ext.jython.JythonVersionAdapter
    -
     
    -
    JythonWrapper - Class in freemarker.ext.jython
    -
    -
    An object wrapper that wraps Jython objects into FreeMarker template models - and vice versa.
    -
    -
    JythonWrapper() - Constructor for class freemarker.ext.jython.JythonWrapper
    -
     
    -
    - - - -

    K

    -
    -
    KEY_APPLICATION - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    KEY_APPLICATION_PRIVATE - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    KEY_INCLUDE - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    KEY_JSP_TAGLIBS - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    KEY_REQUEST - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    KEY_REQUEST_PARAMETERS - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    KEY_REQUEST_PRIVATE - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    KEY_SESSION - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    keys() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    keys() - Method in class freemarker.ext.beans.BeanModel
    -
     
    -
    keys() - Method in class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    keys() - Method in class freemarker.ext.jython.JythonHashModel
    -
    -
    Returns either object.__findattr__("keys").__call__() - or object.__findattr__("keySet").__call__().
    -
    -
    keys() - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    keys() - Method in class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    keys() - Method in class freemarker.ext.servlet.HttpRequestParametersHashModel
    -
     
    -
    keys() - Method in class freemarker.template.SimpleHash
    -
     
    -
    keys() - Method in interface freemarker.template.TemplateHashModelEx
    -
     
    -
    keySet() - Method in class freemarker.ext.beans.BeanModel
    -
    -
    Helper method to support TemplateHashModelEx.
    -
    -
    keySet() - Method in class freemarker.ext.beans.MapModel
    -
     
    -
    keySet() - Method in class freemarker.ext.beans.ResourceBundleModel
    -
     
    -
    keySet() - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns a set view of the keys contained in this map.
    -
    -
    - - - -

    L

    -
    -
    leftPad(String, int) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Pads the string at the left with spaces until it reaches the desired - length.
    -
    -
    leftPad(String, int, char) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Pads the string at the left with the specified character until it reaches - the desired length.
    -
    -
    leftPad(String, int, String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Pads the string at the left with a filling pattern until it reaches the - desired length.
    -
    -
    LIBRARY_AUTO - Static variable in class freemarker.log.Logger
    -
    -
    Constant used with Logger.selectLoggerLibrary(int) that indicates the - engine should automatically lookup and use any available logger library.
    -
    -
    LIBRARY_AVALON - Static variable in class freemarker.log.Logger
    -
    -
    Constant used with Logger.selectLoggerLibrary(int) that indicates the - engine should use the Apache Jakarta Avalon LogKit logger package.
    -
    -
    LIBRARY_COMMONS - Static variable in class freemarker.log.Logger
    -
    -
    Constant used with Logger.selectLoggerLibrary(int) that indicates the - engine should use the Apache commons-logging logger adapter package.
    -
    -
    LIBRARY_JAVA - Static variable in class freemarker.log.Logger
    -
    -
    Constant used with Logger.selectLoggerLibrary(int) that indicates the - engine should use the java.util.logging logger package.
    -
    -
    LIBRARY_LOG4J - Static variable in class freemarker.log.Logger
    -
    -
    Constant used with Logger.selectLoggerLibrary(int) that indicates the - engine should use the Apache Jakarta Log4J logger package.
    -
    -
    LIBRARY_NONE - Static variable in class freemarker.log.Logger
    -
    -
    Constant used with Logger.selectLoggerLibrary(int) that indicates the - engine should use no logger package (i.e.
    -
    -
    LIBRARY_SLF4J - Static variable in class freemarker.log.Logger
    -
    -
    Constant used with Logger.selectLoggerLibrary(int) that indicates the - engine should use the SLF4J logger adapter package.
    -
    -
    lineNumber - Variable in exception freemarker.core.ParseException
    -
     
    -
    list - Variable in class freemarker.template.SimpleSequence
    -
     
    -
    loadBuiltInEncodingMap() - Method in class freemarker.template.Configuration
    -
    -
    Loads a preset language-to-encoding map, similarly as if you have called - Configuration.clearEncodingMap() and then did multiple Configuration.setEncoding(Locale, String) calls.
    -
    -
    LOCALE_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    LOCALIZED_LOOKUP_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    LocalizedString - Class in freemarker.template
    -
    -
    An abstract base class for scalars that vary by locale.
    -
    -
    LocalizedString() - Constructor for class freemarker.template.LocalizedString
    -
     
    -
    Logger - Class in freemarker.log
    -
    -
    The FreeMarker logging facility.
    -
    -
    Logger() - Constructor for class freemarker.log.Logger
    -
     
    -
    - - - -

    M

    -
    -
    main(String[]) - Static method in class freemarker.core.CommandLine
    -
    -
    Deprecated.
    -
    main(String[]) - Static method in class freemarker.ext.dom.Transform
    -
    -
    A convenient main() method for command-line invocation.
    -
    -
    main(String[]) - Static method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Loads a template from a file passed as the first argument, loads an XML - document from the standard input, passes it to the template as variable - document and writes the result of template processing to - standard output.
    -
    -
    main(String[]) - Static method in class freemarker.template.utility.ToCanonical
    -
     
    -
    MapModel - Class in freemarker.ext.beans
    -
    -
    A special case of BeanModel that adds implementation - for TemplateMethodModelEx on map objects that is a shortcut for the - Map.get() method.
    -
    -
    MapModel(Map, BeansWrapper) - Constructor for class freemarker.ext.beans.MapModel
    -
    -
    Creates a new model that wraps the specified map object.
    -
    -
    matchesName(String, String, String, Environment) - Static method in class freemarker.template.utility.StringUtil
    -
     
    -
    maxScale - Variable in class freemarker.core.ArithmeticEngine
    -
     
    -
    mergeAdjacentText(Node) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Merges adjacent text/cdata nodes, so that there are no - adjacent text/cdata nodes.
    -
    -
    MethodAppearanceDecision() - Constructor for class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
    -
     
    -
    MethodAppearanceDecisionInput() - Constructor for class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput
    -
     
    -
    MethodAppearanceFineTuner - Interface in freemarker.ext.beans
    -
    -
    Used for customizing how the methods are visible from templates, via - BeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner).
    -
    -
    minScale - Variable in class freemarker.core.ArithmeticEngine
    -
     
    -
    MINUS_ONE - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    ModelCache - Class in freemarker.ext.util
    -
    -
    Internally used by various wrapper implementations to implement model - caching.
    -
    -
    ModelCache() - Constructor for class freemarker.ext.util.ModelCache
    -
     
    -
    ModelFactory - Interface in freemarker.ext.util
    -
    -
    Interface used to create various wrapper models in the ModelCache.
    -
    -
    modulus(Number, Number) - Method in class freemarker.core.ArithmeticEngine.BigDecimalEngine
    -
     
    -
    modulus(Number, Number) - Method in class freemarker.core.ArithmeticEngine.ConservativeEngine
    -
     
    -
    modulus(Number, Number) - Method in class freemarker.core.ArithmeticEngine
    -
     
    -
    MruCacheStorage - Class in freemarker.cache
    -
    -
    A cache storage that implements a two-level Most Recently Used cache.
    -
    -
    MruCacheStorage(int, int) - Constructor for class freemarker.cache.MruCacheStorage
    -
    -
    Creates a new MRU cache storage with specified maximum cache sizes.
    -
    -
    multiply(Number, Number) - Method in class freemarker.core.ArithmeticEngine.BigDecimalEngine
    -
     
    -
    multiply(Number, Number) - Method in class freemarker.core.ArithmeticEngine.ConservativeEngine
    -
     
    -
    multiply(Number, Number) - Method in class freemarker.core.ArithmeticEngine
    -
     
    -
    MultiTemplateLoader - Class in freemarker.cache
    -
    -
    A TemplateLoader that uses a set of other loaders to load the templates.
    -
    -
    MultiTemplateLoader(TemplateLoader[]) - Constructor for class freemarker.cache.MultiTemplateLoader
    -
    -
    Creates a new multi template Loader that will use the specified loaders.
    -
    -
    - - - -

    N

    -
    -
    NEW_BUILTIN_CLASS_RESOLVER_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    newInstance(Class, List) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Creates a new instance of the specified class using the method call logic of this object wrapper for calling the - constructor.
    -
    -
    next() - Method in class freemarker.ext.beans.EnumerationModel
    -
    -
    Calls underlying Enumeration.nextElement() and wraps the result.
    -
    -
    next() - Method in class freemarker.ext.beans.IteratorModel
    -
    -
    Calls underlying Iterator.next() and wraps the result.
    -
    -
    next() - Method in interface freemarker.template.TemplateModelIterator
    -
    -
    Returns the next model.
    -
    -
    NO_NS_PREFIX - Static variable in class freemarker.template.Template
    -
     
    -
    NodeListModel - Class in freemarker.ext.jdom
    -
    -
    Deprecated. -
    Use NodeModel instead.
    -
    -
    -
    NodeListModel(Document) - Constructor for class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Creates a node list that holds a single Document node.
    -
    -
    NodeListModel(Element) - Constructor for class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Creates a node list that holds a single Element node.
    -
    -
    NodeListModel(List) - Constructor for class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Creates a node list that holds a list of nodes.
    -
    -
    NodeListModel(List, boolean) - Constructor for class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Creates a node list that holds a list of nodes.
    -
    -
    NodeListModel - Class in freemarker.ext.xml
    -
    -
    Deprecated. -
    Use NodeModel instead.
    -
    -
    -
    NodeListModel(Object) - Constructor for class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    Creates a new NodeListModel, wrapping the passed nodes.
    -
    -
    NodeModel - Class in freemarker.ext.dom
    -
    -
    A base class for wrapping a W3C DOM Node as a FreeMarker template model.
    -
    -
    NodeModel(Node) - Constructor for class freemarker.ext.dom.NodeModel
    -
     
    -
    NonBooleanException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateBooleanModel value was expected, but the value had a different type.
    -
    -
    NonBooleanException(Environment) - Constructor for exception freemarker.core.NonBooleanException
    -
     
    -
    NonBooleanException(String, Environment) - Constructor for exception freemarker.core.NonBooleanException
    -
     
    -
    NonDateException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateDateModel value was expected, but the value had a different type.
    -
    -
    NonDateException(Environment) - Constructor for exception freemarker.core.NonDateException
    -
     
    -
    NonDateException(String, Environment) - Constructor for exception freemarker.core.NonDateException
    -
     
    -
    NonExtendedHashException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateHashModelEx value was expected, but the value had a different type.
    -
    -
    NonExtendedHashException(Environment) - Constructor for exception freemarker.core.NonExtendedHashException
    -
     
    -
    NonExtendedHashException(String, Environment) - Constructor for exception freemarker.core.NonExtendedHashException
    -
     
    -
    NonHashException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateHashModel value was expected, but the value had a different type.
    -
    -
    NonHashException(Environment) - Constructor for exception freemarker.core.NonHashException
    -
     
    -
    NonHashException(String, Environment) - Constructor for exception freemarker.core.NonHashException
    -
     
    -
    NonMethodException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateMethodModel value was expected, but the value had a different type.
    -
    -
    NonMethodException(Environment) - Constructor for exception freemarker.core.NonMethodException
    -
     
    -
    NonMethodException(String, Environment) - Constructor for exception freemarker.core.NonMethodException
    -
     
    -
    NonNodeException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateNodeModel value was expected, but the value had a different type.
    -
    -
    NonNodeException(Environment) - Constructor for exception freemarker.core.NonNodeException
    -
     
    -
    NonNodeException(String, Environment) - Constructor for exception freemarker.core.NonNodeException
    -
     
    -
    NonNumericalException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateNumberModel value was expected, but the value had a different type.
    -
    -
    NonNumericalException(Environment) - Constructor for exception freemarker.core.NonNumericalException
    -
     
    -
    NonNumericalException(String, Environment) - Constructor for exception freemarker.core.NonNumericalException
    -
     
    -
    NonSequenceException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateSequenceModel value was expected, but the value had a different type.
    -
    -
    NonSequenceException(Environment) - Constructor for exception freemarker.core.NonSequenceException
    -
     
    -
    NonSequenceException(String, Environment) - Constructor for exception freemarker.core.NonSequenceException
    -
     
    -
    NonSequenceOrCollectionException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateSequenceModel or TemplateCollectionModel value was expected, but the value - had a different type.
    -
    -
    NonSequenceOrCollectionException(Environment) - Constructor for exception freemarker.core.NonSequenceOrCollectionException
    -
     
    -
    NonSequenceOrCollectionException(String, Environment) - Constructor for exception freemarker.core.NonSequenceOrCollectionException
    -
     
    -
    NonStringException - Exception in freemarker.core
    -
    -
    Indicates that a TemplateScalarModel value was expected (or maybe something that can be automatically coerced - to that), but the value had a different type.
    -
    -
    NonStringException(Environment) - Constructor for exception freemarker.core.NonStringException
    -
     
    -
    NonStringException(String, Environment) - Constructor for exception freemarker.core.NonStringException
    -
     
    -
    normalizeIncompatibleImprovementsVersion(Version) - Static method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Returns the lowest version number that is equivalent with the parameter version.
    -
    -
    NormalizeNewlines - Class in freemarker.template.utility
    -
    -
    Transformer that supports FreeMarker legacy behavior: all newlines appearing - within the transformed area will be transformed into the platform's default - newline.
    -
    -
    NormalizeNewlines() - Constructor for class freemarker.template.utility.NormalizeNewlines
    -
     
    -
    NOTHING - Static variable in interface freemarker.template.TemplateModel
    -
    -
    A general-purpose object to represent nothing.
    -
    -
    NullArgumentException - Exception in freemarker.template.utility
    -
    -
    Indicates that an argument that must be non-null was null.
    -
    -
    NullArgumentException(String) - Constructor for exception freemarker.template.utility.NullArgumentException
    -
     
    -
    NullCacheStorage - Class in freemarker.cache
    -
    -
    A cache storage that doesn't store anything.
    -
    -
    NullCacheStorage() - Constructor for class freemarker.cache.NullCacheStorage
    -
     
    -
    NullWriter - Class in freemarker.template.utility
    -
    -
    A Writer that simply drops what it gets.
    -
    -
    NUMBER_FORMAT_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    NumberModel - Class in freemarker.ext.beans
    -
    -
    Wraps arbitrary subclass of Number into a reflective model.
    -
    -
    NumberModel(Number, BeansWrapper) - Constructor for class freemarker.ext.beans.NumberModel
    -
    -
    Creates a new model that wraps the specified number object.
    -
    -
    NumberUtil - Class in freemarker.template.utility
    -
    -
    Number- and math-related utilities.
    -
    -
    - - - -

    O

    -
    -
    object - Variable in class freemarker.ext.beans.BeanModel
    -
     
    -
    object - Variable in class freemarker.ext.jython.JythonModel
    -
     
    -
    OBJECT_WRAPPER_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    ObjectConstructor - Class in freemarker.template.utility
    -
    -
    An object that you can make available in a template - to instantiate arbitrary beans-wrapped objects in a template.
    -
    -
    ObjectConstructor() - Constructor for class freemarker.template.utility.ObjectConstructor
    -
     
    -
    ObjectWrapper - Interface in freemarker.template
    -
    -
    Maps Java objects to the type-system of FreeMarker Template Language (see the TemplateModel - interfaces).
    -
    -
    ONE - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    onError(Throwable) - Method in interface freemarker.template.TransformControl
    -
    -
    Called if any exception occurs during the transform between the - TemplateTransformModel.getWriter(java.io.Writer, java.util.Map) call - and the Writer.close() call.
    -
    -
    onStart() - Method in interface freemarker.template.TransformControl
    -
    -
    Called before the body is evaluated for the first time.
    -
    -
    optimizeListStorage(List) - Static method in class freemarker.template.utility.OptimizerUtil
    -
     
    -
    optimizeNumberRepresentation(Number) - Static method in class freemarker.template.utility.OptimizerUtil
    -
    -
    This is needed to reverse the extreme conversions in arithmetic - operations so that numbers can be meaningfully used with models that - don't know what to do with a BigDecimal.
    -
    -
    OptimizerUtil - Class in freemarker.template.utility
    -
     
    -
    OptInTemplateClassResolver - Class in freemarker.core
    -
    -
    A TemplateClassResolver that resolves only the classes whose name - was specified in the constructor.
    -
    -
    OptInTemplateClassResolver(Set, List) - Constructor for class freemarker.core.OptInTemplateClassResolver
    -
    -
    Creates a new instance.
    -
    -
    OUTPUT_ENCODING_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    outputInstructionStack(PrintWriter) - Method in class freemarker.core.Environment
    -
    -
    Prints the current FTL stack trace.
    -
    -
    OverloadedMethodsModel - Class in freemarker.ext.beans
    -
    -
    Wraps a set of same-name overloaded methods behind TemplateMethodModel interface, - like if it was a single method, chooses among them behind the scenes on call-time based on the argument values.
    -
    -
    - - - -

    P

    -
    -
    parse(InputSource, boolean, boolean) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Create a NodeModel from a SAX input source.
    -
    -
    parse(InputSource) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Create a NodeModel from an XML input source.
    -
    -
    parse(File, boolean, boolean) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Create a NodeModel from an XML file.
    -
    -
    parse(File) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Create a NodeModel from an XML file.
    -
    -
    parseAsImportList(String) - Method in class freemarker.core.Configurable
    -
     
    -
    parseAsList(String) - Method in class freemarker.core.Configurable
    -
     
    -
    parseAsSegmentedList(String) - Method in class freemarker.core.Configurable
    -
     
    -
    PARSED_DEFAULT_INCOMPATIBLE_ENHANCEMENTS - Static variable in class freemarker.template.Configuration
    -
    - -
    -
    ParseException - Exception in freemarker.core
    -
    -
    Parsing-time exception in a template (as opposed to a runtime exception, a TemplateException).
    -
    -
    ParseException(Token, int[][], String[]) - Constructor for exception freemarker.core.ParseException
    -
    -
    This constructor is used by the method "generateParseException" - in the generated parser.
    -
    -
    ParseException() - Constructor for exception freemarker.core.ParseException
    -
    -
    Deprecated. -
    Use a constructor to which you pass description, template, and positions.
    -
    -
    -
    ParseException(String, int, int) - Constructor for exception freemarker.core.ParseException
    -
    -
    Deprecated. -
    Use a constructor to which you can also pass the template, and the end positions.
    -
    -
    -
    ParseException(String, Template, int, int, int, int) - Constructor for exception freemarker.core.ParseException
    -
     
    -
    ParseException(String, Template, int, int, int, int, Throwable) - Constructor for exception freemarker.core.ParseException
    -
     
    -
    ParseException(String, Template, int, int) - Constructor for exception freemarker.core.ParseException
    -
    -
    Deprecated. -
    Use ParseException.ParseException(String, Template, int, int, int, int) instead, as IDE-s need the end - position of the error too.
    -
    -
    -
    ParseException(String, Template, int, int, Throwable) - Constructor for exception freemarker.core.ParseException
    -
    -
    Deprecated. -
    Use ParseException.ParseException(String, Template, int, int, int, int, Throwable) instead, as IDE-s need - the end position of the error too.
    -
    -
    -
    ParseException(String, Template, Token) - Constructor for exception freemarker.core.ParseException
    -
     
    -
    ParseException(String, Template, Token, Throwable) - Constructor for exception freemarker.core.ParseException
    -
     
    -
    ParseException(String, TemplateObject) - Constructor for exception freemarker.core.ParseException
    -
     
    -
    ParseException(String, TemplateObject, Throwable) - Constructor for exception freemarker.core.ParseException
    -
     
    -
    parseISO8601Date(String, TimeZone, DateUtil.CalendarFieldsToDateConverter) - Static method in class freemarker.template.utility.DateUtil
    -
    - -
    -
    parseISO8601DateTime(String, TimeZone, DateUtil.CalendarFieldsToDateConverter) - Static method in class freemarker.template.utility.DateUtil
    -
    - -
    -
    parseISO8601Time(String, TimeZone, DateUtil.CalendarFieldsToDateConverter) - Static method in class freemarker.template.utility.DateUtil
    -
    - -
    -
    parseNameValuePairList(String, String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Parses a name-value pair list, where the pairs are separated with comma, - and the name and value is separated with colon.
    -
    -
    parseXSDate(String, TimeZone, DateUtil.CalendarFieldsToDateConverter) - Static method in class freemarker.template.utility.DateUtil
    -
    -
    Parses an W3C XML Schema date string (not time or date-time).
    -
    -
    parseXSDateTime(String, TimeZone, DateUtil.CalendarFieldsToDateConverter) - Static method in class freemarker.template.utility.DateUtil
    -
    -
    Parses an W3C XML Schema date-time string (not date or time).
    -
    -
    parseXSTime(String, TimeZone, DateUtil.CalendarFieldsToDateConverter) - Static method in class freemarker.template.utility.DateUtil
    -
    -
    Parses an W3C XML Schema time string (not date or date-time).
    -
    -
    parseXSTimeZone(String) - Static method in class freemarker.template.utility.DateUtil
    -
    -
    Parses the time zone part from a W3C XML Schema date/time/dateTime.
    -
    -
    permissiveUnwrap(TemplateModel) - Static method in class freemarker.template.utility.DeepUnwrap
    -
    -
    Same as DeepUnwrap.unwrap(TemplateModel), but it doesn't throw exception - if it doesn't know how to unwrap the model, but rather returns it as-is.
    -
    -
    postTemplateProcess(HttpServletRequest, HttpServletResponse, Template, TemplateModel) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Called after the execution returns from template.process().
    -
    -
    premissiveUnwrap(TemplateModel) - Static method in class freemarker.template.utility.DeepUnwrap
    -
    -
    Deprecated. -
    the name of this method is mistyped. Use - DeepUnwrap.permissiveUnwrap(TemplateModel) instead.
    -
    -
    -
    preprocessRequest(HttpServletRequest, HttpServletResponse) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Called as the first step in request processing, before the templating mechanism - is put to work.
    -
    -
    preTemplateProcess(HttpServletRequest, HttpServletResponse, Template, TemplateModel) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Called before the execution is passed to template.process().
    -
    -
    primitiveClassToBoxingClass(Class) - Static method in class freemarker.template.utility.ClassUtil
    -
    -
    Gets the wrapper class for a primitive class, like Integer for int, also returns Void - for void.
    -
    -
    printStackTrace(PrintWriter) - Method in exception freemarker.core.StopException
    -
     
    -
    printStackTrace(PrintStream) - Method in exception freemarker.core.StopException
    -
     
    -
    printStackTrace(PrintStream) - Method in exception freemarker.template.TemplateException
    -
    -
    Overrides Throwable.printStackTrace(PrintStream) so that it will include the FTL stack trace.
    -
    -
    printStackTrace(PrintWriter) - Method in exception freemarker.template.TemplateException
    -
    -
    Overrides Throwable.printStackTrace(PrintWriter) so that it will include the FTL stack trace.
    -
    -
    printStackTrace(PrintWriter, boolean, boolean, boolean) - Method in exception freemarker.template.TemplateException
    -
     
    -
    printStackTrace(PrintStream, boolean, boolean, boolean) - Method in exception freemarker.template.TemplateException
    -
     
    -
    printStackTrace() - Method in exception freemarker.template.utility.UndeclaredThrowableException
    -
     
    -
    printStackTrace(PrintStream) - Method in exception freemarker.template.utility.UndeclaredThrowableException
    -
     
    -
    printStackTrace(PrintWriter) - Method in exception freemarker.template.utility.UndeclaredThrowableException
    -
     
    -
    printStandardStackTrace(PrintStream) - Method in exception freemarker.template.TemplateException
    -
    -
    Prints the stack trace as if wasn't overridden by TemplateException.
    -
    -
    printStandardStackTrace(PrintWriter) - Method in exception freemarker.template.TemplateException
    -
    -
    Prints the stack trace as if wasn't overridden by TemplateException.
    -
    -
    process() - Method in class freemarker.core.Environment
    -
    -
    Processes the template to which this environment belongs to.
    -
    -
    process(BeansWrapper.MethodAppearanceDecisionInput, BeansWrapper.MethodAppearanceDecision) - Method in interface freemarker.ext.beans.MethodAppearanceFineTuner
    -
    -
    Experimental method; subject to change! - Implement this to tweak certain aspects of how methods appear in the - data-model.
    -
    -
    process(Object, Writer) - Method in class freemarker.template.Template
    -
    -
    Executes template, using the data-model provided, writing the generated output - to the supplied Writer.
    -
    -
    process(Object, Writer, ObjectWrapper, TemplateNodeModel) - Method in class freemarker.template.Template
    -
    -
    Like Template.process(Object, Writer), but also sets a (XML-)node to be recursively processed by the template.
    -
    -
    process(Object, Writer, ObjectWrapper) - Method in class freemarker.template.Template
    -
    - -
    -
    put(Object, Object) - Method in interface freemarker.cache.CacheStorage
    -
     
    -
    put(Object, Object) - Method in class freemarker.cache.MruCacheStorage
    -
     
    -
    put(Object, Object) - Method in class freemarker.cache.NullCacheStorage
    -
     
    -
    put(Object, Object) - Method in class freemarker.cache.SoftCacheStorage
    -
     
    -
    put(Object, Object) - Method in class freemarker.cache.StrongCacheStorage
    -
     
    -
    put(Object, Object) - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Associates the specified value with the specified key in this map.
    -
    -
    put(String, Object) - Method in class freemarker.template.SimpleHash
    -
    -
    Adds a key-value entry to the map.
    -
    -
    put(String, boolean) - Method in class freemarker.template.SimpleHash
    -
    -
    Puts a boolean in the map
    -
    -
    putAll(Map) - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Copies all of the mappings from the specified map to this one.
    -
    -
    putAll(Map) - Method in class freemarker.template.SimpleHash
    -
    -
    Adds all the key/value entries in the map
    -
    -
    putTemplate(String, String) - Method in class freemarker.cache.StringTemplateLoader
    -
    -
    Puts a template into the loader.
    -
    -
    putTemplate(String, String, long) - Method in class freemarker.cache.StringTemplateLoader
    -
    -
    Puts a template into the loader.
    -
    -
    putUnlistedModel(String, TemplateModel) - Method in class freemarker.ext.servlet.AllHttpScopesHashModel
    -
    -
    Stores a model in the hash so that it doesn't show up in keys() - and values() methods.
    -
    -
    pyInstanceToJava(Object) - Method in class freemarker.ext.jython.JythonVersionAdapter
    -
    -
    Returns - ((PyInstance) py[Java]Instance).__tojava__(java.lang.Object.class).
    -
    -
    - - - -

    R

    -
    -
    registerNamespace(String, String) - Method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    Registers an XML namespace with this node list.
    -
    -
    registerNamespace(String, String) - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    Registers a namespace prefix-URI pair for subsequent use in NodeListModel.get(String) as well as for use in XPath expressions.
    -
    -
    release() - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    remove(Object) - Method in interface freemarker.cache.CacheStorage
    -
     
    -
    remove(Object) - Method in class freemarker.cache.MruCacheStorage
    -
     
    -
    remove(Object) - Method in class freemarker.cache.NullCacheStorage
    -
     
    -
    remove(Object) - Method in class freemarker.cache.SoftCacheStorage
    -
     
    -
    remove(Object) - Method in class freemarker.cache.StrongCacheStorage
    -
     
    -
    remove(Object) - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Removes the mapping for this key from this map if present.
    -
    -
    remove(String) - Method in class freemarker.template.SimpleHash
    -
    -
    Removes the given key from the underlying map.
    -
    -
    removeAutoImport(String) - Method in class freemarker.template.Configuration
    -
    -
    Removes an auto-import; see Configuration.addAutoImport(String, String).
    -
    -
    removeAutoInclude(String) - Method in class freemarker.template.Configuration
    -
    -
    Removes a template from the auto-include list; see Configuration.addAutoInclude(String).
    -
    -
    removeBreakpoint(Breakpoint) - Method in interface freemarker.debug.Debugger
    -
    -
    Removes a single breakpoint
    -
    -
    removeBreakpoints(String) - Method in interface freemarker.debug.Debugger
    -
    -
    Removes all breakpoints for a specific template
    -
    -
    removeBreakpoints() - Method in interface freemarker.debug.Debugger
    -
    -
    Removes all breakpoints
    -
    -
    removeComments(Node) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Recursively removes all comment nodes - from the subtree.
    -
    -
    removeCustomAttribute(String) - Method in class freemarker.core.Configurable
    -
    -
    Removes a named custom attribute for this configurable.
    -
    -
    removeDebuggerListener(Object) - Method in interface freemarker.debug.Debugger
    -
    -
    Removes a previously added debugger listener.
    -
    -
    removeFromClassIntrospectionCache(Class) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Removes the introspection data for a class from the cache.
    -
    -
    removePIs(Node) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Recursively removes all processing instruction nodes - from the subtree.
    -
    -
    removeTemplate(String, Locale, String, boolean) - Method in class freemarker.cache.TemplateCache
    -
    -
    Removes an entry from the cache, hence forcing the re-loading of it when - it's next time requested.
    -
    -
    removeTemplateFromCache(String) - Method in class freemarker.template.Configuration
    -
    -
    Equivalent to removeTemplateFromCache(name, thisCfg.getLocale(), thisCfg.getEncoding(thisCfg.getLocale()), true).
    -
    -
    removeTemplateFromCache(String, Locale) - Method in class freemarker.template.Configuration
    -
    -
    Equivalent to removeTemplateFromCache(name, locale, thisCfg.getEncoding(locale), true).
    -
    -
    removeTemplateFromCache(String, String) - Method in class freemarker.template.Configuration
    -
    -
    Equivalent to removeTemplateFromCache(name, thisCfg.getLocale(), encoding, true).
    -
    -
    removeTemplateFromCache(String, Locale, String) - Method in class freemarker.template.Configuration
    -
    -
    Equivalent to removeTemplateFromCache(name, locale, encoding, true).
    -
    -
    removeTemplateFromCache(String, Locale, String, boolean) - Method in class freemarker.template.Configuration
    -
    -
    Removes a template from the template cache, hence forcing the re-loading - of it when it's next time requested.
    -
    -
    render(Writer) - Method in interface freemarker.template.TemplateDirectiveBody
    -
    -
    Renders the body of the directive body to the specified writer.
    -
    -
    REPEAT_EVALUATION - Static variable in interface freemarker.template.TransformControl
    -
    -
    Constant returned from TransformControl.afterBody() that tells the - template engine to repeat transform body evaluation and feed - it again to the transform.
    -
    -
    replace(String, String, String) - Static method in class freemarker.template.utility.StringUtil
    -
    - -
    -
    replace(String, String, String, boolean, boolean) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Replaces all occurrences of a sub-string in a string.
    -
    -
    requestUrlToTemplatePath(HttpServletRequest) - Method in class freemarker.ext.servlet.FreemarkerServlet
    -
    -
    Maps the request URL to a template path that is passed to - Configuration.getTemplate(String, Locale).
    -
    -
    resetState() - Method in class freemarker.cache.MultiTemplateLoader
    -
     
    -
    resetState() - Method in interface freemarker.cache.StatefulTemplateLoader
    -
    -
    Invoked by Configuration.clearTemplateCache() to instruct this - template loader to throw away its current state and start afresh.
    -
    -
    resolve(String, Environment, Template) - Method in class freemarker.core.OptInTemplateClassResolver
    -
     
    -
    resolve(String, Environment, Template) - Method in interface freemarker.core.TemplateClassResolver
    -
    -
    Gets a Class based on the class name.
    -
    -
    ResourceBundleLocalizedString - Class in freemarker.template
    -
    -
    A concrete implementation of LocalizedString that gets - a localized string from a ResourceBundle
    -
    -
    ResourceBundleLocalizedString(String, String) - Constructor for class freemarker.template.ResourceBundleLocalizedString
    -
     
    -
    ResourceBundleModel - Class in freemarker.ext.beans
    -
    -
    A hash model that wraps a resource bundle.
    -
    -
    ResourceBundleModel(ResourceBundle, BeansWrapper) - Constructor for class freemarker.ext.beans.ResourceBundleModel
    -
     
    -
    resume() - Method in interface freemarker.debug.DebuggedEnvironment
    -
    -
    Resumes the processing of the environment in the remote VM after it was - stopped on a breakpoint.
    -
    -
    RETHROW_HANDLER - Static variable in interface freemarker.template.TemplateExceptionHandler
    -
    -
    TemplateExceptionHandler that simply re-throws the exception; this should be used in most production - systems.
    -
    -
    RhinoFunctionModel - Class in freemarker.ext.rhino
    -
     
    -
    RhinoFunctionModel(Function, Scriptable, BeansWrapper) - Constructor for class freemarker.ext.rhino.RhinoFunctionModel
    -
     
    -
    RhinoScriptableModel - Class in freemarker.ext.rhino
    -
     
    -
    RhinoScriptableModel(Scriptable, BeansWrapper) - Constructor for class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    RhinoWrapper - Class in freemarker.ext.rhino
    -
     
    -
    RhinoWrapper() - Constructor for class freemarker.ext.rhino.RhinoWrapper
    -
     
    -
    rightPad(String, int) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Pads the string at the right with spaces until it reaches the desired - length.
    -
    -
    rightPad(String, int, char) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Pads the string at the right with the specified character until it - reaches the desired length.
    -
    -
    rightPad(String, int, String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Pads the string at the right with a filling pattern until it reaches the - desired length.
    -
    -
    roundingPolicy - Variable in class freemarker.core.ArithmeticEngine
    -
     
    -
    RTFEnc(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Rich Text Format encoding (does not replace line breaks).
    -
    -
    - - - -

    S

    -
    -
    safeGetTemplateName(Template) - Method in class freemarker.core.OptInTemplateClassResolver
    -
    -
    Extract the template name from the template object which will be matched - against the trusted template names and pattern.
    -
    -
    SAFER_RESOLVER - Static variable in interface freemarker.core.TemplateClassResolver
    -
    -
    Same as TemplateClassResolver.UNRESTRICTED_RESOLVER, except that it doesn't allow - resolving ObjectConstructor and Execute and freemarker.template.utility.JythonRuntime.
    -
    -
    SCOPE_CONFIGURATION - Static variable in class freemarker.core.CustomAttribute
    -
    -
    Constant used in the constructor specifying that this attribute is - scoped by the configuration.
    -
    -
    SCOPE_ENVIRONMENT - Static variable in class freemarker.core.CustomAttribute
    -
    -
    Constant used in the constructor specifying that this attribute is - scoped by the environment.
    -
    -
    SCOPE_TEMPLATE - Static variable in class freemarker.core.CustomAttribute
    -
    -
    Constant used in the constructor specifying that this attribute is - scoped by the template.
    -
    -
    SecurityUtilities - Class in freemarker.template.utility
    -
     
    -
    selectLoggerLibrary(int) - Static method in class freemarker.log.Logger
    -
    -
    Selects the logger library to use.
    -
    -
    serialVersionUID - Static variable in class freemarker.ext.servlet.FreemarkerServlet
    -
     
    -
    serialVersionUID - Static variable in class freemarker.ext.util.IdentityHashMap
    -
     
    -
    ServletContextHashModel - Class in freemarker.ext.servlet
    -
    -
    TemplateHashModel wrapper for a ServletContext attributes.
    -
    -
    ServletContextHashModel(GenericServlet, ObjectWrapper) - Constructor for class freemarker.ext.servlet.ServletContextHashModel
    -
     
    -
    ServletContextHashModel(ServletContext, ObjectWrapper) - Constructor for class freemarker.ext.servlet.ServletContextHashModel
    -
    - -
    -
    sessionCreated(HttpSessionEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    sessionDestroyed(HttpSessionEvent) - Method in class freemarker.ext.jsp.EventForwarding
    -
     
    -
    set(Object) - Method in class freemarker.core.CustomAttribute
    -
    -
    Sets the value of the attribute in the context of the current environment.
    -
    -
    set(Object, Template) - Method in class freemarker.core.CustomAttribute
    -
    -
    Sets the value of a template-scope attribute in the context of the given - template.
    -
    -
    setAllSharedVariables(TemplateHashModelEx) - Method in class freemarker.template.Configuration
    -
    -
    Adds all object in the hash as shared variable to the configuration; it's like doing several - Configuration.setSharedVariable(String, Object) calls, one for each hash entry.
    -
    -
    setArithmeticEngine(ArithmeticEngine) - Method in class freemarker.core.Configurable
    -
    -
    Sets the arithmetic engine used to perform arithmetic operations.
    -
    -
    setAttributesShadowItems(boolean) - Method in class freemarker.ext.jython.JythonWrapper
    -
    -
    Sets whether attributes shadow items in wrapped objects.
    -
    -
    setAutoFlush(boolean) - Method in class freemarker.core.Configurable
    -
    -
    Sets whether the output Writer is automatically flushed at - the end of Template.process(Object, Writer) (and its - overloads).
    -
    -
    setAutoImports(Map) - Method in class freemarker.template.Configuration
    -
    -
    Removes all auto-imports, then calls Configuration.addAutoImport(String, String) for each Map-entry (the entry - key is the namespaceVarName).
    -
    -
    setAutoIncludes(List) - Method in class freemarker.template.Configuration
    -
    -
    Removes all auto-includes, then calls Configuration.addAutoInclude(String) for each List items.
    -
    -
    setBasedir(File) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    Set the base directory.
    -
    -
    setBodyContent(BodyContent) - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    setBooleanFormat(String) - Method in class freemarker.core.Configurable
    -
    -
    The string value for the boolean true and false values, intended for human audience (not for a - computer language), separated with comma.
    -
    -
    setCacheStorage(CacheStorage) - Method in class freemarker.template.Configuration
    -
    -
    Sets the CacheStorage used for caching Template-s; - the earlier content of the template cache will be dropt.
    -
    -
    setCaching(boolean) - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    setCategoryPrefix(String) - Static method in class freemarker.log.Logger
    -
    -
    Sets a category prefix.
    -
    -
    setClassForTemplateLoading(Class, String) - Method in class freemarker.template.Configuration
    -
    -
    Sets a class relative to which we do the Class.getResource() call to load templates.
    -
    -
    setClassicCompatible(boolean) - Method in class freemarker.core.Configurable
    -
    -
    Toggles the "Classic Compatible" mode.
    -
    -
    setClassicCompatibleAsInt(int) - Method in class freemarker.core.Configurable
    -
    -
    Same as Configurable.setClassicCompatible(boolean), but allows some extra values.
    -
    -
    setConfiguration(Configuration) - Method in class freemarker.cache.TemplateCache
    -
    - -
    -
    setCurrentVisitorNode(TemplateNodeModel) - Method in class freemarker.core.Environment
    -
    -
    sets TemplateNodeModel as the current visitor node.
    -
    -
    setCustomAttribute(String, Object) - Method in class freemarker.core.Configurable
    -
    -
    Sets a named custom attribute for this configurable.
    -
    -
    setDateFormat(String) - Method in class freemarker.core.Configurable
    -
    -
    Sets the format used to convert Date-s to string-s that are date (no time part) values, - also the format that someString?date will use to parse strings.
    -
    -
    setDateFormat(String) - Method in class freemarker.core.Environment
    -
     
    -
    setDateTimeFormat(String) - Method in class freemarker.core.Configurable
    -
    -
    Sets the format used to convert Date-s to string-s that are date-time (timestamp) values, - also the format that someString?datetime will use to parse strings.
    -
    -
    setDateTimeFormat(String) - Method in class freemarker.core.Environment
    -
     
    -
    setDefaultConfiguration(Configuration) - Static method in class freemarker.template.Configuration
    -
    -
    Deprecated. -
    Using the "default" Configuration instance can - easily lead to erroneous, unpredictable behaviour. - See more here....
    -
    -
    -
    setDefaultDateType(int) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Sets the default date type to use for date models that result from - a plain java.util.Date instead of java.sql.Date or - java.sql.Time or java.sql.Timestamp.
    -
    -
    setDefaultDateType(int) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
    - -
    -
    setDefaultEncoding(String) - Method in class freemarker.template.Configuration
    -
    -
    Sets the charset used for decoding byte sequences to character sequences when - reading template files in a locale for which no explicit encoding - was specified via Configuration.setEncoding(Locale, String).
    -
    -
    setDefaultObjectWrapper(ObjectWrapper) - Static method in class freemarker.template.WrappingTemplateModel
    -
    -
    Deprecated. -
    This method has VM-wide effect, which makes it unsuitable for application where multiple components - might use FreeMarker internally.
    -
    -
    -
    setDelay(long) - Method in class freemarker.cache.TemplateCache
    -
    -
    Sets the delay in milliseconds between checking for newer versions of a - template sources.
    -
    -
    setDestdir(File) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    Set the destination directory into which the generated - files should be copied to
    -
    -
    setDirectoryForTemplateLoading(File) - Method in class freemarker.template.Configuration
    -
    -
    Sets the file system directory from which to load templates.
    -
    -
    setDocumentBuilderFactory(DocumentBuilderFactory) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Sets the DOM Parser implementation to be used when building NodeModel - objects from XML files.
    -
    -
    setEncoding(String) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    Set encoding for generated files.
    -
    -
    setEncoding(Locale, String) - Method in class freemarker.template.Configuration
    -
    -
    Sets the character set encoding to use for templates of - a given locale.
    -
    -
    setEncoding(String) - Method in class freemarker.template.Template
    -
    -
    Sets the character encoding to use for - included files.
    -
    -
    setErrorHandler(ErrorHandler) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    sets the error handler to use when parsing the document.
    -
    -
    setExposeAsProperty(PropertyDescriptor) - Method in class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
    -
     
    -
    setExposeFields(boolean) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Controls whether public instance fields of classes are exposed to - templates.
    -
    -
    setExposeFields(boolean) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
    - -
    -
    setExposeMethodAs(String) - Method in class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
    -
     
    -
    setExposureLevel(int) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Sets the method exposure level.
    -
    -
    setExposureLevel(int) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
    - -
    -
    setExtension(String) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    Set the output file extension.
    -
    -
    setFile(File) - Method in class freemarker.ext.ant.JythonAntTask
    -
     
    -
    setGlobalVariable(String, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Sets a variable that is visible globally.
    -
    -
    setIncompatibleEnhancements(String) - Method in class freemarker.template.Configuration
    -
    - -
    -
    setIncompatibleImprovements(Version) - Method in class freemarker.template.Configuration
    -
    -
    Use Configuration.Configuration(Version) instead if possible; see the meaning of the parameter there.
    -
    -
    setIncremental(String) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    Turn on/off incremental processing.
    -
    -
    setLocale(Locale) - Method in class freemarker.core.Configurable
    -
    -
    Sets the default locale used for number and date formatting (among others), also the locale used for searching - localized template variations when no locale was explicitly requested.
    -
    -
    setLocale(Locale) - Method in class freemarker.core.Environment
    -
     
    -
    setLocalizedLookup(boolean) - Method in class freemarker.cache.TemplateCache
    -
    -
    Setis if localized template lookup is enabled or not.
    -
    -
    setLocalizedLookup(boolean) - Method in class freemarker.template.Configuration
    -
    -
    Enables/disables localized template lookup.
    -
    -
    setLocalVariable(String, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Sets a local variable (one effective only during a macro invocation).
    -
    -
    setMaxScale(int) - Method in class freemarker.core.ArithmeticEngine
    -
    -
    Sets the maximal scale to use when multiplying BigDecimal numbers.
    -
    -
    setMethodAppearanceFineTuner(MethodAppearanceFineTuner) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Used to tweak certain aspects of how methods appear in the data-model; - see MethodAppearanceFineTuner for more.
    -
    -
    setMethodAppearanceFineTuner(MethodAppearanceFineTuner) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
    -
    See BeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner); additionally, - note that currently setting this to non-null will disable class introspection cache sharing, unless - the value implements SingletonCustomizer.
    -
    -
    setMethodShadowsProperty(boolean) - Method in class freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
    -
     
    -
    setMethodsShadowItems(boolean) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Sets whether methods shadow items in beans.
    -
    -
    setMinScale(int) - Method in class freemarker.core.ArithmeticEngine
    -
    -
    Sets the minimal scale to use when dividing BigDecimal numbers.
    -
    -
    setModels(String) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    setName(String) - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    setNewBuiltinClassResolver(TemplateClassResolver) - Method in class freemarker.core.Configurable
    -
    -
    Sets the TemplateClassResolver that is used when the - new built-in is called in a template.
    -
    -
    setNullModel(TemplateModel) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Sets the null model.
    -
    -
    setNumberFormat(String) - Method in class freemarker.core.Configurable
    -
    -
    Sets the number format used to convert numbers to strings.
    -
    -
    setNumberFormat(String) - Method in class freemarker.core.Environment
    -
     
    -
    setObjectWrapper(ObjectWrapper) - Method in class freemarker.core.Configurable
    -
    -
    Sets the object wrapper used to wrap objects to TemplateModel-s.
    -
    -
    setObjectWrapper(ObjectWrapper) - Method in class freemarker.template.Configuration
    -
     
    -
    setObjectWrapper(ObjectWrapper) - Method in class freemarker.template.WrappingTemplateModel
    -
     
    -
    setOut(Writer) - Method in class freemarker.core.Environment
    -
     
    -
    setOuterIdentity(ObjectWrapper) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    When wrapping an object, the BeansWrapper commonly needs to wrap - "sub-objects", for example each element in a wrapped collection.
    -
    -
    setOuterIdentity(ObjectWrapper) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
    -
    See BeansWrapper.setOuterIdentity(ObjectWrapper), except here the default is null that means - the ObjectWrapper that you will set up with this BeansWrapperBuilder object.
    -
    -
    setOutputEncoding(String) - Method in class freemarker.core.Configurable
    -
    -
    Informs FreeMarker about the charset used for the output.
    -
    -
    setOutputEncoding(String) - Method in class freemarker.core.Environment
    -
     
    -
    setPageContext(PageContext) - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    setParent(Tag) - Method in class freemarker.ext.jsp.FreemarkerTag
    -
     
    -
    setProjectfile(String) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    Set the path to the project XML file
    -
    -
    setRoundingPolicy(int) - Method in class freemarker.core.ArithmeticEngine
    -
     
    -
    setServletContextForTemplateLoading(Object, String) - Method in class freemarker.template.Configuration
    -
    -
    Sets the servlet context from which to load templates.
    -
    -
    setSetting(String, String) - Method in class freemarker.core.Configurable
    -
    -
    Sets a FreeMarker setting by a name and string value.
    -
    -
    setSetting(String, String) - Method in class freemarker.template.Configuration
    -
     
    -
    setSettings(Properties) - Method in class freemarker.core.Configurable
    -
    -
    Set the settings stored in a Properties object.
    -
    -
    setSettings(InputStream) - Method in class freemarker.core.Configurable
    -
    -
    Reads a setting list (key and element pairs) from the input stream.
    -
    -
    setSharedVariable(String, TemplateModel) - Method in class freemarker.template.Configuration
    -
    -
    Adds a shared variable to the configuration.
    -
    -
    setSharedVariable(String, Object) - Method in class freemarker.template.Configuration
    -
    -
    Adds shared variable to the configuration; It uses Configurable.getObjectWrapper() to wrap the - value, so it's important that the object wrapper is set before this.
    -
    -
    setSharedVaribles(Map) - Method in class freemarker.template.Configuration
    -
    -
    Replaces all shared variables (removes all previously added ones).
    -
    -
    setShowErrorTips(boolean) - Method in class freemarker.core.Configurable
    -
    -
    Sets if tips should be shown in error messages of errors arising during template processing.
    -
    -
    setSimpleMapWrapper(boolean) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    When set to true, the keys in Map-s won't mix with the method names when looking at them - from templates.
    -
    -
    setSimpleMapWrapper(boolean) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
    - -
    -
    setSQLDateAndTimeTimeZone(TimeZone) - Method in class freemarker.core.Configurable
    -
    -
    Sets the time zone used when dealing with java.sql.Date and - java.sql.Time values.
    -
    -
    setSQLDateAndTimeTimeZone(TimeZone) - Method in class freemarker.core.Environment
    -
     
    -
    setStrict(boolean) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Specifies if an attempt to read a bean property that doesn't exist in the - wrapped object should throw an InvalidPropertyException.
    -
    -
    setStrict(boolean) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
    - -
    -
    setStrictBeanModels(boolean) - Method in class freemarker.core.Configurable
    -
     
    -
    setStrictSyntaxMode(boolean) - Method in class freemarker.template.Configuration
    -
    -
    Deprecated. -
    Only true (the default) value will be supported sometimes in the future.
    -
    -
    -
    setTagSyntax(int) - Method in class freemarker.template.Configuration
    -
    -
    Determines the syntax of the template files (angle bracket VS square bracket) - that has no #ftl in it.
    -
    -
    setTemplate(Template) - Method in class freemarker.core.FreeMarkerTree
    -
    -
    Deprecated.
    -
    setTemplate(String) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    setTemplateDir(File) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    setTemplateEncoding(String) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    setTemplateExceptionHandler(TemplateExceptionHandler) - Method in class freemarker.core.Configurable
    -
    -
    Sets the exception handler used to handle exceptions occurring inside templates.
    -
    -
    setTemplateExceptionHandler(TemplateExceptionHandler) - Method in class freemarker.core.Environment
    -
     
    -
    setTemplateLoader(TemplateLoader) - Method in class freemarker.template.Configuration
    -
    -
    Sets a TemplateLoader that is used to look up and load templates; - as a side effect the template cache will be emptied.
    -
    -
    setTemplateName(String) - Method in exception freemarker.core.ParseException
    -
    -
    Should be used internally only; sets the name of the template that contains the error.
    -
    -
    setTemplateUpdateDelay(int) - Method in class freemarker.template.Configuration
    -
    -
    Sets the time in seconds that must elapse before checking whether there is a newer version of a template file - than the cached one.
    -
    -
    setTimeFormat(String) - Method in class freemarker.core.Configurable
    -
    -
    Sets the format used to convert Date-s to string-s that are time (no date part) values, - also the format that someString?time will use to parse strings.
    -
    -
    setTimeFormat(String) - Method in class freemarker.core.Environment
    -
     
    -
    setTimeZone(TimeZone) - Method in class freemarker.core.Configurable
    -
    -
    Sets the time zone to use when formatting date/time values.
    -
    -
    setTimeZone(TimeZone) - Method in class freemarker.core.Environment
    -
     
    -
    settingValueAssignmentException(String, String, Throwable) - Method in class freemarker.core.Configurable
    -
     
    -
    setURLConnectionUsesCaches(Boolean) - Method in class freemarker.cache.URLTemplateLoader
    -
    -
    Sets if URLConnection.setUseCaches(boolean) will be called, and with what value.
    -
    -
    setURLConnectionUsesCaches(Boolean) - Method in class freemarker.cache.WebappTemplateLoader
    -
    - -
    -
    setURLEscapingCharset(String) - Method in class freemarker.core.Configurable
    -
    -
    Sets the URL escaping charset.
    -
    -
    setURLEscapingCharset(String) - Method in class freemarker.core.Environment
    -
     
    -
    setUseCache(boolean) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Sets whether this wrapper caches the TemplateModel-s created for the Java objects that has wrapped with - this object wrapper.
    -
    -
    setUseCache(boolean) - Method in class freemarker.ext.jython.JythonWrapper
    -
    -
    Sets whether this wrapper caches model instances.
    -
    -
    setUseCache(boolean) - Method in class freemarker.ext.util.ModelCache
    -
    -
    Sets whether this wrapper caches model instances.
    -
    -
    setUseModelCache(boolean) - Method in class freemarker.ext.beans.BeansWrapperConfiguration
    -
    -
    See BeansWrapper.setUseCache(boolean) (it means the same).
    -
    -
    setValidation(boolean) - Method in class freemarker.ext.ant.FreemarkerXmlTask
    -
    -
    Deprecated.
    -
    Sets whether to validate the XML input.
    -
    -
    setVariable(String, TemplateModel) - Method in class freemarker.core.Environment
    -
    -
    Sets a variable in the current namespace.
    -
    -
    setWhitespaceStripping(boolean) - Method in class freemarker.template.Configuration
    -
    -
    Sets whether the FTL parser will try to remove - superfluous white-space around certain FTL tags.
    -
    -
    setXPathSupportClass(Class) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Set an alternative implementation of freemarker.ext.dom.XPathSupport to use - as the XPath engine.
    -
    -
    SHOW_ERROR_TIPS_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    SIMPLE_WRAPPER - Static variable in interface freemarker.template.ObjectWrapper
    -
    -
    Deprecated. -
    No replacement as it was seldom if ever used by anyone; this instance isn't - read-only and thus can't be trusted.
    -
    -
    -
    SimpleCollection - Class in freemarker.template
    -
    -
    A simple implementation of TemplateCollectionModel.
    -
    -
    SimpleCollection(Iterator) - Constructor for class freemarker.template.SimpleCollection
    -
    - -
    -
    SimpleCollection(Collection) - Constructor for class freemarker.template.SimpleCollection
    -
    - -
    -
    SimpleCollection(Iterator, ObjectWrapper) - Constructor for class freemarker.template.SimpleCollection
    -
     
    -
    SimpleCollection(Collection, ObjectWrapper) - Constructor for class freemarker.template.SimpleCollection
    -
     
    -
    SimpleDate - Class in freemarker.template
    -
    -
    A simple implementation of the TemplateDateModel - interface.
    -
    -
    SimpleDate(Date) - Constructor for class freemarker.template.SimpleDate
    -
    -
    Creates a new date model wrapping the specified date object and - having DATE type.
    -
    -
    SimpleDate(Time) - Constructor for class freemarker.template.SimpleDate
    -
    -
    Creates a new date model wrapping the specified time object and - having TIME type.
    -
    -
    SimpleDate(Timestamp) - Constructor for class freemarker.template.SimpleDate
    -
    -
    Creates a new date model wrapping the specified time object and - having DATETIME type.
    -
    -
    SimpleDate(Date, int) - Constructor for class freemarker.template.SimpleDate
    -
    -
    Creates a new date model wrapping the specified date object and - having the specified type.
    -
    -
    SimpleHash - Class in freemarker.template
    -
    -
    A simple implementation of the TemplateHashModelEx - interface, using an underlying Map or SortedMap.
    -
    -
    SimpleHash() - Constructor for class freemarker.template.SimpleHash
    -
    - -
    -
    SimpleHash(Map) - Constructor for class freemarker.template.SimpleHash
    -
    - -
    -
    SimpleHash(ObjectWrapper) - Constructor for class freemarker.template.SimpleHash
    -
    -
    Creates an empty simple hash using the specified object wrapper.
    -
    -
    SimpleHash(Map, ObjectWrapper) - Constructor for class freemarker.template.SimpleHash
    -
    -
    Creates a new simple hash with the copy of the underlying map and - either the default wrapper set in - WrappingTemplateModel.setDefaultObjectWrapper(ObjectWrapper), or - the JavaBeans wrapper.
    -
    -
    SimpleList - Class in freemarker.template
    -
    -
    Deprecated. -
    Use SimpleSequence instead.
    -
    -
    -
    SimpleList() - Constructor for class freemarker.template.SimpleList
    -
    -
    Deprecated.
    -
    SimpleList(List) - Constructor for class freemarker.template.SimpleList
    -
    -
    Deprecated.
    -
    SimpleMapModel - Class in freemarker.ext.beans
    -
    -
    Model used by BeansWrapper when simpleMapWrapper - mode is enabled.
    -
    -
    SimpleMapModel(Map, BeansWrapper) - Constructor for class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    SimpleMethodModel - Class in freemarker.ext.beans
    -
    -
    A class that will wrap a reflected method call into a - TemplateMethodModel interface.
    -
    -
    SimpleNumber - Class in freemarker.template
    -
    -
    A simple implementation of the TemplateNumberModel - interface.
    -
    -
    SimpleNumber(Number) - Constructor for class freemarker.template.SimpleNumber
    -
     
    -
    SimpleNumber(byte) - Constructor for class freemarker.template.SimpleNumber
    -
     
    -
    SimpleNumber(short) - Constructor for class freemarker.template.SimpleNumber
    -
     
    -
    SimpleNumber(int) - Constructor for class freemarker.template.SimpleNumber
    -
     
    -
    SimpleNumber(long) - Constructor for class freemarker.template.SimpleNumber
    -
     
    -
    SimpleNumber(float) - Constructor for class freemarker.template.SimpleNumber
    -
     
    -
    SimpleNumber(double) - Constructor for class freemarker.template.SimpleNumber
    -
     
    -
    SimpleObjectWrapper - Class in freemarker.template
    -
    -
    A restricted object wrapper that will not expose arbitrary object, just those that directly correspond to the - TemplateModel sub-interfaces (String, Map and such).
    -
    -
    SimpleObjectWrapper() - Constructor for class freemarker.template.SimpleObjectWrapper
    -
    - -
    -
    SimpleObjectWrapper(Version) - Constructor for class freemarker.template.SimpleObjectWrapper
    -
     
    -
    SimpleScalar - Class in freemarker.template
    -
    -
    A simple implementation of the TemplateScalarModel - interface, using a String.
    -
    -
    SimpleScalar(String) - Constructor for class freemarker.template.SimpleScalar
    -
    -
    Constructs a SimpleScalar containing a string value.
    -
    -
    SimpleSequence - Class in freemarker.template
    -
    -
    A convenient implementation of a list.
    -
    -
    SimpleSequence() - Constructor for class freemarker.template.SimpleSequence
    -
    - -
    -
    SimpleSequence(int) - Constructor for class freemarker.template.SimpleSequence
    -
    - -
    -
    SimpleSequence(Collection) - Constructor for class freemarker.template.SimpleSequence
    -
    - -
    -
    SimpleSequence(TemplateCollectionModel) - Constructor for class freemarker.template.SimpleSequence
    -
    -
    Constructs a simple sequence from the passed collection model using the - default object wrapper set in - WrappingTemplateModel.setDefaultObjectWrapper(ObjectWrapper).
    -
    -
    SimpleSequence(ObjectWrapper) - Constructor for class freemarker.template.SimpleSequence
    -
    -
    Constructs an empty simple sequence using the specified object wrapper.
    -
    -
    SimpleSequence(int, ObjectWrapper) - Constructor for class freemarker.template.SimpleSequence
    -
    -
    Constructs an empty simple sequence with preallocated capacity.
    -
    -
    SimpleSequence(Collection, ObjectWrapper) - Constructor for class freemarker.template.SimpleSequence
    -
    -
    Constructs a simple sequence that will contain the elements - from the specified Collection and will use the specified object - wrapper.
    -
    -
    simplify(Node) - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Removes comments and processing instruction, and then unites adjacent text nodes.
    -
    -
    SingletonCustomizer - Interface in freemarker.ext.beans
    -
    -
    Marker interface useful when used together with MethodAppearanceFineTuner and such customizer objects, to - indicate that it doesn't contain reference to the ObjectWrapper (so beware with non-static inner - classes) and can be and should be used in call introspection cache keys.
    -
    -
    singletonList(Object) - Static method in class freemarker.template.utility.Collections12
    -
    -
    Deprecated.
    -
    singletonMap(Object, Object) - Static method in class freemarker.template.utility.Collections12
    -
    -
    Deprecated.
    -
    size() - Method in interface freemarker.debug.DebugModel
    -
     
    -
    size() - Method in class freemarker.ext.beans.ArrayModel
    -
     
    -
    size() - Method in class freemarker.ext.beans.BeanModel
    -
     
    -
    size() - Method in class freemarker.ext.beans.CollectionModel
    -
     
    -
    size() - Method in class freemarker.ext.beans.MapModel
    -
     
    -
    size() - Method in class freemarker.ext.beans.OverloadedMethodsModel
    -
     
    -
    size() - Method in class freemarker.ext.beans.ResourceBundleModel
    -
     
    -
    size() - Method in class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    size() - Method in class freemarker.ext.beans.SimpleMethodModel
    -
     
    -
    size() - Method in class freemarker.ext.dom.NodeModel
    -
     
    -
    size() - Method in class freemarker.ext.jdom.NodeListModel
    -
    -
    Deprecated.
    -
    size() - Method in class freemarker.ext.jython.JythonHashModel
    -
    -
    Returns PyObject.__len__().
    -
    -
    size() - Method in class freemarker.ext.jython.JythonSequenceModel
    -
    -
    Returns PyObject.__len__().
    -
    -
    size() - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    size() - Method in class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    size() - Method in class freemarker.ext.servlet.HttpRequestParametersHashModel
    -
     
    -
    size() - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns the number of key-value mappings in this map.
    -
    -
    size() - Method in class freemarker.ext.xml.NodeListModel
    -
    -
    Deprecated.
    -
    Returns the number of nodes in this model's nodelist.
    -
    -
    size() - Method in class freemarker.template.SimpleHash
    -
     
    -
    size() - Method in class freemarker.template.SimpleSequence
    -
     
    -
    size() - Method in interface freemarker.template.TemplateHashModelEx
    -
     
    -
    size() - Method in class freemarker.template.TemplateModelListSequence
    -
     
    -
    size() - Method in interface freemarker.template.TemplateSequenceModel
    -
     
    -
    SKIP_BODY - Static variable in interface freemarker.template.TransformControl
    -
    -
    Constant returned from TransformControl.onStart() that tells the - template engine to skip evaluation of the body.
    -
    -
    SoftCacheStorage - Class in freemarker.cache
    -
    -
    Soft cache storage is a cache storage that uses SoftReference - objects to hold the objects it was passed, therefore allows the garbage - collector to purge the cache when it determines that it wants to free up - memory.
    -
    -
    SoftCacheStorage() - Constructor for class freemarker.cache.SoftCacheStorage
    -
     
    -
    SoftCacheStorage(Map) - Constructor for class freemarker.cache.SoftCacheStorage
    -
     
    -
    specialConstructor - Variable in exception freemarker.core.ParseException
    -
    -
    Deprecated. -
    Will be remove without replacement in 2.4.
    -
    -
    -
    specifiedEncoding - Variable in exception freemarker.template.Template.WrongEncodingException
    -
     
    -
    split(String, char) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Splits a string at the specified character.
    -
    -
    split(String, String, boolean) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Splits a string at the specified string.
    -
    -
    SQL_DATE_AND_TIME_TIME_ZONE_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    SQUARE_BRACKET_TAG_SYNTAX - Static variable in class freemarker.template.Configuration
    -
     
    -
    StandardCompress - Class in freemarker.template.utility
    -
    -
    A filter that compresses each sequence of consecutive whitespace - to a single line break (if the sequence contains a line break) or a - single space.
    -
    -
    StandardCompress() - Constructor for class freemarker.template.utility.StandardCompress
    -
     
    -
    StandardCompress(int) - Constructor for class freemarker.template.utility.StandardCompress
    -
     
    -
    StatefulTemplateLoader - Interface in freemarker.cache
    -
    -
    Interface that can be implemented by template loaders that maintain some - sort of internal state (i.e.
    -
    -
    stop() - Method in interface freemarker.debug.DebuggedEnvironment
    -
    -
    Stops the processing of the environment after it was stopped on - a breakpoint.
    -
    -
    StopException - Exception in freemarker.core
    -
    -
    This exception is thrown when a #stop directive is encountered.
    -
    -
    STRICT_BEAN_MODELS - Static variable in class freemarker.core.Configurable
    -
     
    -
    STRICT_SYNTAX_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    StringModel - Class in freemarker.ext.beans
    -
    -
    Subclass of BeanModel that exposes the return value of the Object.toString() method through the TemplateScalarModel - interface.
    -
    -
    StringModel(Object, BeansWrapper) - Constructor for class freemarker.ext.beans.StringModel
    -
    -
    Creates a new model that wraps the specified object with BeanModel + scalar - functionality.
    -
    -
    StringTemplateLoader - Class in freemarker.cache
    -
    -
    A TemplateLoader that uses a Map with Strings as its source of - templates.
    -
    -
    StringTemplateLoader() - Constructor for class freemarker.cache.StringTemplateLoader
    -
     
    -
    StringUtil - Class in freemarker.template.utility
    -
    -
    Some text related utilities.
    -
    -
    StringUtil() - Constructor for class freemarker.template.utility.StringUtil
    -
     
    -
    StrongCacheStorage - Class in freemarker.cache
    -
    -
    Strong cache storage is a cache storage that simply wraps a Map.
    -
    -
    StrongCacheStorage() - Constructor for class freemarker.cache.StrongCacheStorage
    -
     
    -
    subtract(Number, Number) - Method in class freemarker.core.ArithmeticEngine.BigDecimalEngine
    -
     
    -
    subtract(Number, Number) - Method in class freemarker.core.ArithmeticEngine.ConservativeEngine
    -
     
    -
    subtract(Number, Number) - Method in class freemarker.core.ArithmeticEngine
    -
     
    -
    synchronizedWrapper() - Method in class freemarker.template.SimpleHash
    -
     
    -
    synchronizedWrapper() - Method in class freemarker.template.SimpleSequence
    -
     
    -
    - - - -

    T

    -
    -
    TAG_SYNTAX_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    TaglibFactory - Class in freemarker.ext.jsp
    -
    -
    A hash model associated with a servlet context that can load JSP tag - libraries associated with that servlet context.
    -
    -
    TaglibFactory(ServletContext) - Constructor for class freemarker.ext.jsp.TaglibFactory
    -
    -
    Creates a new JSP taglib factory that will be used to load JSP taglibs - for the web application represented by the passed servlet context.
    -
    -
    Template - Class in freemarker.template
    -
    -
    Stores an already parsed template, ready to be processed (rendered) for unlimited times, possibly from - multiple threads.
    -
    -
    Template(String, Reader, Configuration) - Constructor for class freemarker.template.Template
    -
    -
    Constructs a template from a character stream.
    -
    -
    Template(String, String, Configuration) - Constructor for class freemarker.template.Template
    -
    - -
    -
    Template(String, Reader, Configuration, String) - Constructor for class freemarker.template.Template
    -
    - -
    -
    Template(String, Reader) - Constructor for class freemarker.template.Template
    -
    -
    Deprecated. -
    This constructor uses the "default" Configuration - instance, which can easily lead to erroneous, unpredictable behavior. - See more here....
    -
    -
    -
    Template.WrongEncodingException - Exception in freemarker.template
    -
     
    -
    TEMPLATE_EXCEPTION_HANDLER_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    TEMPLATE_LOADER_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    TEMPLATE_UPDATE_DELAY_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    TemplateBooleanModel - Interface in freemarker.template
    -
    -
    "boolean" template language data type; same as in Java; either true or false.
    -
    -
    TemplateCache - Class in freemarker.cache
    -
    -
    Performs caching and on-demand loading of the templates.
    -
    -
    TemplateCache() - Constructor for class freemarker.cache.TemplateCache
    -
    -
    Deprecated. -
    Use TemplateCache.TemplateCache(TemplateLoader) instead. The default loader is useless in most - applications, also it can mean a security risk.
    -
    -
    -
    TemplateCache(TemplateLoader) - Constructor for class freemarker.cache.TemplateCache
    -
    - -
    -
    TemplateCache(TemplateLoader, CacheStorage) - Constructor for class freemarker.cache.TemplateCache
    -
    - -
    -
    TemplateCache(TemplateLoader, Configuration) - Constructor for class freemarker.cache.TemplateCache
    -
    -
    Creates an instance with the default CacheStorage.
    -
    -
    TemplateCache(TemplateLoader, CacheStorage, Configuration) - Constructor for class freemarker.cache.TemplateCache
    -
     
    -
    TemplateClassResolver - Interface in freemarker.core
    -
    -
    Used by built-ins and other template language features that get a class - based on a string.
    -
    -
    TemplateCollectionModel - Interface in freemarker.template
    -
    -
    "collection" template language data type: a collection of values that can be enumerated, repeatedly (not just once).
    -
    -
    TemplateDateModel - Interface in freemarker.template
    -
    -
    "date", "time" and "date-time" template language data types: corresponds to Date.
    -
    -
    TemplateDirectiveBody - Interface in freemarker.template
    -
    -
    Represents the nested content of a directive (TemplateDirectiveModel) invocation.
    -
    -
    TemplateDirectiveModel - Interface in freemarker.template
    -
    -
    "directive" template language data type: used as user-defined directives - (much like macros) in templates.
    -
    -
    TemplateException - Exception in freemarker.template
    -
    -
    Runtime exception in a template (as opposed to a parsing-time exception: ParseException).
    -
    -
    TemplateException(Environment) - Constructor for exception freemarker.template.TemplateException
    -
    -
    Constructs a TemplateException with no specified detail message - or underlying cause.
    -
    -
    TemplateException(String, Environment) - Constructor for exception freemarker.template.TemplateException
    -
    -
    Constructs a TemplateException with the given detail message, - but no underlying cause exception.
    -
    -
    TemplateException(Exception, Environment) - Constructor for exception freemarker.template.TemplateException
    -
    -
    The same as TemplateException.TemplateException(Throwable, Environment); it's exists only for binary - backward-compatibility.
    -
    -
    TemplateException(Throwable, Environment) - Constructor for exception freemarker.template.TemplateException
    -
    -
    Constructs a TemplateException with the given underlying Exception, - but no detail message.
    -
    -
    TemplateException(String, Exception, Environment) - Constructor for exception freemarker.template.TemplateException
    -
    -
    The same as TemplateException.TemplateException(String, Throwable, Environment); it's exists only for binary - backward-compatibility.
    -
    -
    TemplateException(String, Throwable, Environment) - Constructor for exception freemarker.template.TemplateException
    -
    -
    Constructs a TemplateException with both a description of the error - that occurred and the underlying Exception that caused this exception - to be raised.
    -
    -
    TemplateException(Throwable, Environment, Expression, _ErrorDescriptionBuilder) - Constructor for exception freemarker.template.TemplateException
    -
    -
    Don't use this; this is to be used internally by FreeMarker.
    -
    -
    TemplateExceptionHandler - Interface in freemarker.template
    -
    -
    Used for the template_exception_handler configuration setting; - see Configurable.setTemplateExceptionHandler(TemplateExceptionHandler) for more.
    -
    -
    TemplateHashModel - Interface in freemarker.template
    -
    -
    "hash" template language data type: an object that contains other objects accessible through string keys - (sub-variable names).
    -
    -
    TemplateHashModelEx - Interface in freemarker.template
    -
    -
    "extended hash" template language data type; extends TemplateHashModel by allowing - iterating through its keys and values.
    -
    -
    TemplateLoader - Interface in freemarker.cache
    -
    -
    FreeMarker loads template "files" through objects that implement this interface, - thus the templates need not be real files, and can come from any kind of data source - (like classpath, servlet context, database, etc).
    -
    -
    TemplateMethodModel - Interface in freemarker.template
    -
    -
    Deprecated. -
    Use TemplateMethodModelEx instead. This interface is from the old times when the only kind of - value you could pass in was string.
    -
    -
    -
    TemplateMethodModelEx - Interface in freemarker.template
    -
    -
    "extended method" template language data type: Objects that act like functions.
    -
    -
    TemplateModel - Interface in freemarker.template
    -
    -
    The common super-interface of the interfaces that stand for the FreeMarker Template Language data types.
    -
    -
    TemplateModelAdapter - Interface in freemarker.template
    -
    -
    Implemented by classes that serve as adapters for template model objects in - some other object model.
    -
    -
    TemplateModelException - Exception in freemarker.template
    -
    -
    TemplateModel methods throw this exception if the requested data can't be retrieved.
    -
    -
    TemplateModelException() - Constructor for exception freemarker.template.TemplateModelException
    -
    -
    Constructs a TemplateModelException with no - specified detail message.
    -
    -
    TemplateModelException(String) - Constructor for exception freemarker.template.TemplateModelException
    -
    -
    Constructs a TemplateModelException with the - specified detail message.
    -
    -
    TemplateModelException(Exception) - Constructor for exception freemarker.template.TemplateModelException
    -
    -
    The same as TemplateModelException.TemplateModelException(Throwable); it's exists only for binary - backward-compatibility.
    -
    -
    TemplateModelException(Throwable) - Constructor for exception freemarker.template.TemplateModelException
    -
    -
    Constructs a TemplateModelException with the given underlying - Exception, but no detail message.
    -
    -
    TemplateModelException(String, Exception) - Constructor for exception freemarker.template.TemplateModelException
    -
    -
    The same as TemplateModelException.TemplateModelException(String, Throwable); it's exists only for binary - backward-compatibility.
    -
    -
    TemplateModelException(String, Throwable) - Constructor for exception freemarker.template.TemplateModelException
    -
    -
    Constructs a TemplateModelException with both a description of the error - that occurred and the underlying Exception that caused this exception - to be raised.
    -
    -
    TemplateModelException(Throwable, Environment, String, boolean) - Constructor for exception freemarker.template.TemplateModelException
    -
    -
    Don't use this; this is to be used internally by FreeMarker.
    -
    -
    TemplateModelException(Throwable, Environment, _ErrorDescriptionBuilder, boolean) - Constructor for exception freemarker.template.TemplateModelException
    -
    -
    Don't use this; this is to be used internally by FreeMarker.
    -
    -
    TemplateModelIterator - Interface in freemarker.template
    -
    -
    Used to iterate over a set of template models once; usually returned from - TemplateCollectionModel.iterator().
    -
    -
    TemplateModelListSequence - Class in freemarker.template
    -
    -
    A sequence that wraps a List of TemplateModel-s.
    -
    -
    TemplateModelListSequence(List) - Constructor for class freemarker.template.TemplateModelListSequence
    -
     
    -
    TemplateNodeModel - Interface in freemarker.template
    -
    -
    "node" template language data type: an object that is a node in a tree.
    -
    -
    TemplateNumberModel - Interface in freemarker.template
    -
    -
    "number" template language data type; an object that stores a number.
    -
    -
    TemplateScalarModel - Interface in freemarker.template
    -
    -
    "string" template language data-type; like in Java, an unmodifiable UNICODE character sequence.
    -
    -
    TemplateSequenceModel - Interface in freemarker.template
    -
    -
    "sequence" template language data type; an object that contains other objects accessible through - an integer 0-based index.
    -
    -
    TemplateTransformModel - Interface in freemarker.template
    -
    -
    "transform" template language data type: user-defined directives - (much like macros) specialized on filtering output; you should rather use the newer TemplateDirectiveModel - instead.
    -
    -
    TIME - Static variable in interface freemarker.template.TemplateDateModel
    -
    -
    The date model represents a time value (no date part).
    -
    -
    TIME_FORMAT_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    TIME_ZONE_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    ToCanonical - Class in freemarker.template.utility
    -
    -
    Read in a template and convert it to a canonical format.
    -
    -
    ToCanonical() - Constructor for class freemarker.template.utility.ToCanonical
    -
     
    -
    tokenImage - Variable in exception freemarker.core.ParseException
    -
    -
    This is a reference to the "tokenImage" array of the generated - parser within which the parse error occurred.
    -
    -
    toList() - Method in class freemarker.template.SimpleSequence
    -
    -
    Note that this method creates and returns a deep-copy of the underlying list used - internally.
    -
    -
    toMap() - Method in class freemarker.template.SimpleHash
    -
    -
    Note that this method creates and returns a deep-copy of the underlying hash used - internally.
    -
    -
    toNumber(String) - Method in class freemarker.core.ArithmeticEngine.BigDecimalEngine
    -
     
    -
    toNumber(String) - Method in class freemarker.core.ArithmeticEngine.ConservativeEngine
    -
     
    -
    toNumber(String) - Method in class freemarker.core.ArithmeticEngine
    -
    -
    Should be able to parse all FTL numerical literals, Java Double toString results, and XML Schema numbers.
    -
    -
    toString() - Method in class freemarker.cache.ClassTemplateLoader
    -
    -
    Show class name and some details that are useful in template-not-found errors.
    -
    -
    toString() - Method in class freemarker.cache.FileTemplateLoader
    -
    -
    Show class name and some details that are useful in template-not-found errors.
    -
    -
    toString() - Method in class freemarker.cache.MultiTemplateLoader
    -
    -
    Show class name and some details that are useful in template-not-found errors.
    -
    -
    toString() - Method in class freemarker.cache.StringTemplateLoader
    -
    -
    Show class name and some details that are useful in template-not-found errors.
    -
    -
    toString() - Method in class freemarker.cache.WebappTemplateLoader
    -
    -
    Show class name and some details that are useful in template-not-found errors.
    -
    -
    toString() - Method in class freemarker.ext.beans.BeanModel
    -
     
    -
    toString() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Returns the exact class name and the identity hash, also the values of the most often used BeansWrapper - configuration properties, also if which (if any) shared class introspection cache it uses.
    -
    -
    toString() - Method in class freemarker.ext.beans.SimpleMethodModel
    -
     
    -
    toString() - Method in class freemarker.template.SimpleDate
    -
     
    -
    toString() - Method in class freemarker.template.SimpleHash
    -
    -
    Convenience method for returning the String value of the - underlying map.
    -
    -
    toString() - Method in class freemarker.template.SimpleNumber
    -
     
    -
    toString() - Method in class freemarker.template.SimpleScalar
    -
     
    -
    toString() - Method in class freemarker.template.SimpleSequence
    -
     
    -
    toString() - Method in class freemarker.template.Template
    -
    -
    Returns a string representing the raw template - text in canonical form.
    -
    -
    toString() - Method in class freemarker.template.Version
    -
    -
    Contains the major.minor.micor numbers and the extraInfo part, not the other information.
    -
    -
    transcode(String) - Method in class freemarker.ext.servlet.HttpRequestParametersHashModel
    -
     
    -
    Transform - Class in freemarker.ext.dom
    -
    -
    A class that contains a main() method for command-line invocation - of a FreeMarker XML transformation.
    -
    -
    transform(Reader, Writer) - Method in class freemarker.template.utility.NormalizeNewlines
    -
    -
    Performs newline normalization on FreeMarker output.
    -
    -
    TransformControl - Interface in freemarker.template
    -
    -
    An interface that can be implemented by writers returned from - TemplateTransformModel.getWriter(java.io.Writer, java.util.Map).
    -
    -
    TrivialCalendarFieldsToDateConverter() - Constructor for class freemarker.template.utility.DateUtil.TrivialCalendarFieldsToDateConverter
    -
     
    -
    TrivialDateToISO8601CalendarFactory() - Constructor for class freemarker.template.utility.DateUtil.TrivialDateToISO8601CalendarFactory
    -
     
    -
    TRUE - Static variable in interface freemarker.template.TemplateBooleanModel
    -
    -
    A singleton object to represent boolean true
    -
    -
    TRUE - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    tryToString(Object) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Tries to run toString(), but if that fails, returns a "[toString failed: " + e + "]" instead.
    -
    -
    TYPE_BOOLEAN - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_COLLECTION - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_CONFIGURATION - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_DATE - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_ENVIRONMENT - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_HASH - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_HASH_EX - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_METHOD - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_METHOD_EX - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_NAMES - Static variable in interface freemarker.template.TemplateDateModel
    -
     
    -
    TYPE_NUMBER - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_SCALAR - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_SEQUENCE - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_TEMPLATE - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    TYPE_TRANSFORM - Static variable in interface freemarker.debug.DebugModel
    -
     
    -
    - - - -

    U

    -
    -
    UndeclaredThrowableException - Exception in freemarker.template.utility
    -
    -
    The equivalent of JDK 1.3 UndeclaredThrowableException.
    -
    -
    UndeclaredThrowableException(Throwable) - Constructor for exception freemarker.template.utility.UndeclaredThrowableException
    -
     
    -
    UnexpectedTypeException - Exception in freemarker.core
    -
    -
    The type of a value differs from what was expected.
    -
    -
    UnexpectedTypeException(Environment, String) - Constructor for exception freemarker.core.UnexpectedTypeException
    -
     
    -
    UNKNOWN - Static variable in interface freemarker.template.TemplateDateModel
    -
    -
    It is not known whether the date represents a date, a time, or a date-time value.
    -
    -
    unknownSettingException(String) - Method in class freemarker.core.Configurable
    -
     
    -
    UnlinkedJythonOperationsImpl - Class in freemarker.ext.ant
    -
    -
    Used internally, public for technical reasons only.
    -
    -
    UnlinkedJythonOperationsImpl() - Constructor for class freemarker.ext.ant.UnlinkedJythonOperationsImpl
    -
     
    -
    UnrecognizedTimeZoneException - Exception in freemarker.template.utility
    -
    -
    Indicates that the time zone name is not recognized.
    -
    -
    UnrecognizedTimeZoneException(String) - Constructor for exception freemarker.template.utility.UnrecognizedTimeZoneException
    -
     
    -
    UNRESTRICTED_RESOLVER - Static variable in interface freemarker.core.TemplateClassResolver
    -
    - -
    -
    UnsupportedNumberClassException - Exception in freemarker.template.utility
    -
    -
    Thrown when FreeMarker runs into a Number subclass that it doesn't yet support.
    -
    -
    UnsupportedNumberClassException(Class) - Constructor for exception freemarker.template.utility.UnsupportedNumberClassException
    -
     
    -
    unwrap(TemplateModel) - Method in class freemarker.ext.beans.BeanModel
    -
     
    -
    unwrap(TemplateModel) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Attempts to unwrap a model into underlying object.
    -
    -
    unwrap(TemplateModel, Class) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Attempts to unwrap a model into an object of the desired class.
    -
    -
    unwrap(TemplateModel) - Method in class freemarker.ext.jython.JythonWrapper
    -
    -
    Coerces a template model into a PyObject.
    -
    -
    unwrap(TemplateModel) - Static method in class freemarker.template.utility.DeepUnwrap
    -
    -
    Unwraps TemplateModel-s recursively.
    -
    -
    URL_ESCAPING_CHARSET_KEY - Static variable in class freemarker.core.Configurable
    -
     
    -
    URLEnc(String, String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    URL encoding (like%20this) for query parameter values, path segments, fragments; this encodes all - characters that are reserved anywhere.
    -
    -
    URLPathEnc(String, String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Like StringUtil.URLEnc(String, String) but doesn't escape the slash character (/).
    -
    -
    URLTemplateLoader - Class in freemarker.cache
    -
    -
    This is an abstract template loader that can load templates whose - location can be described by an URL.
    -
    -
    URLTemplateLoader() - Constructor for class freemarker.cache.URLTemplateLoader
    -
     
    -
    useDefaultXPathSupport() - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Tells the system to use (restore) the default (initial) XPath system used by - this FreeMarker version on this system.
    -
    -
    useJaxenXPathSupport() - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Convenience method.
    -
    -
    useSunInternalXPathSupport() - Static method in class freemarker.ext.dom.NodeModel
    -
     
    -
    useXalanXPathSupport() - Static method in class freemarker.ext.dom.NodeModel
    -
    -
    Convenience method.
    -
    -
    UTC - Static variable in class freemarker.template.utility.DateUtil
    -
     
    -
    - - - -

    V

    -
    -
    values() - Method in class freemarker.ext.beans.BeanModel
    -
     
    -
    values() - Method in class freemarker.ext.beans.SimpleMapModel
    -
     
    -
    values() - Method in class freemarker.ext.jython.JythonHashModel
    -
    -
    Returns object.__findattr__("values").__call__().
    -
    -
    values() - Method in class freemarker.ext.rhino.RhinoScriptableModel
    -
     
    -
    values() - Method in class freemarker.ext.servlet.HttpRequestHashModel
    -
     
    -
    values() - Method in class freemarker.ext.servlet.HttpRequestParametersHashModel
    -
     
    -
    values() - Method in class freemarker.ext.util.IdentityHashMap
    -
    -
    Returns a collection view of the values contained in this map.
    -
    -
    values() - Method in class freemarker.template.SimpleHash
    -
     
    -
    values() - Method in interface freemarker.template.TemplateHashModelEx
    -
     
    -
    Version - Class in freemarker.template
    -
    -
    Represents a version number plus the further qualifiers and build into.
    -
    -
    Version(String) - Constructor for class freemarker.template.Version
    -
     
    -
    Version(String, Boolean, Date) - Constructor for class freemarker.template.Version
    -
     
    -
    Version(int, int, int) - Constructor for class freemarker.template.Version
    -
     
    -
    Version(int, int, int, String, Boolean, Date) - Constructor for class freemarker.template.Version
    -
     
    -
    VERSION_2_3_0 - Static variable in class freemarker.template.Configuration
    -
    -
    FreeMarker version 2.3.0 (an incompatible improvements break-point)
    -
    -
    VERSION_2_3_19 - Static variable in class freemarker.template.Configuration
    -
    -
    FreeMarker version 2.3.19 (an incompatible improvements break-point)
    -
    -
    VERSION_2_3_20 - Static variable in class freemarker.template.Configuration
    -
    -
    FreeMarker version 2.3.20 (an incompatible improvements break-point)
    -
    -
    VERSION_2_3_21 - Static variable in class freemarker.template.Configuration
    -
    -
    FreeMarker version 2.3.21 (an incompatible improvements break-point)
    -
    -
    versionStringToInt(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    Converts a version number string to an integer for easy comparison.
    -
    -
    visit(TemplateElement, TemplateDirectiveModel, Map, List) - Method in class freemarker.core.Environment
    -
     
    -
    - - - -

    W

    -
    -
    warn(String) - Method in class freemarker.log.Logger
    -
    -
    Logs a warning message.
    -
    -
    warn(String, Throwable) - Method in class freemarker.log.Logger
    -
    -
    Logs a warning message with accompanying throwable.
    -
    -
    WebappTemplateLoader - Class in freemarker.cache
    -
    -
    A TemplateLoader that uses streams reachable through - ServletContext.getResource(String) as its source of templates.
    -
    -
    WebappTemplateLoader(ServletContext) - Constructor for class freemarker.cache.WebappTemplateLoader
    -
    -
    Creates a resource template cache that will use the specified servlet - context to load the resources.
    -
    -
    WebappTemplateLoader(ServletContext, String) - Constructor for class freemarker.cache.WebappTemplateLoader
    -
    -
    Creates a template loader that will use the specified servlet - context to load the resources.
    -
    -
    WHITESPACE_STRIPPING_KEY - Static variable in class freemarker.template.Configuration
    -
     
    -
    wrap(Object) - Method in class freemarker.ext.beans.BeanModel
    -
     
    -
    wrap(Object) - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Wraps the object with a template model that is most specific for the object's - class.
    -
    -
    wrap(Node) - Static method in class freemarker.ext.dom.NodeModel
    -
     
    -
    wrap(Object) - Method in class freemarker.ext.jython.JythonWrapper
    -
    -
    Wraps the passed Jython object into a FreeMarker template model.
    -
    -
    wrap(Object) - Method in class freemarker.ext.rhino.RhinoWrapper
    -
     
    -
    wrap(Object) - Method in class freemarker.template.DefaultObjectWrapper
    -
     
    -
    wrap(Object) - Method in interface freemarker.template.ObjectWrapper
    -
    -
    Makes a TemplateModel out of a non-TemplateModel object, usually by "wrapping" it into a - TemplateModel implementation that delegates to the original object.
    -
    -
    wrap(Object) - Method in class freemarker.template.WrappingTemplateModel
    -
    -
    Wraps the passed object into a template model using this object's object - wrapper.
    -
    -
    wrapDomNode(Object) - Method in class freemarker.template.DefaultObjectWrapper
    -
     
    -
    wrapper - Variable in class freemarker.ext.beans.BeanModel
    -
     
    -
    wrapper - Variable in class freemarker.ext.jython.JythonModel
    -
     
    -
    WrapperTemplateModel - Interface in freemarker.ext.util
    -
    -
    A generic interface for template models that wrap some underlying - object, and wish to provide access to that wrapped object.
    -
    -
    WrappingTemplateModel - Class in freemarker.template
    -
    -
    Convenience base-class for containers that wrap arbitrary Java objects into - TemplateModel instances.
    -
    -
    WrappingTemplateModel() - Constructor for class freemarker.template.WrappingTemplateModel
    -
    -
    Deprecated. -
    Use WrappingTemplateModel.WrappingTemplateModel(ObjectWrapper) instead; this method uses the deprecated.
    -
    -
    -
    WrappingTemplateModel(ObjectWrapper) - Constructor for class freemarker.template.WrappingTemplateModel
    -
    -
    Protected constructor that creates a new wrapping template model using the specified object wrapper.
    -
    -
    write(char[], int, int) - Method in class freemarker.template.utility.NullWriter
    -
     
    -
    write(int) - Method in class freemarker.template.utility.NullWriter
    -
     
    -
    write(char[]) - Method in class freemarker.template.utility.NullWriter
    -
     
    -
    write(String) - Method in class freemarker.template.utility.NullWriter
    -
     
    -
    write(String, int, int) - Method in class freemarker.template.utility.NullWriter
    -
     
    -
    writeProtect() - Method in class freemarker.ext.beans.BeansWrapper
    -
    -
    Makes the configuration properties (settings) of this BeansWrapper object read-only.
    -
    -
    writeProtect() - Method in interface freemarker.template.utility.WriteProtectable
    -
    -
    Makes this object permanently read-only.
    -
    -
    WriteProtectable - Interface in freemarker.template.utility
    -
    -
    Implemented by objects that can be made permanently read-only.
    -
    -
    WrongEncodingException(String) - Constructor for exception freemarker.template.Template.WrongEncodingException
    -
     
    -
    - - - -

    X

    -
    -
    XHTMLEnc(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    XHTML Encoding.
    -
    -
    XMLEnc(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    XML Encoding.
    -
    -
    XMLEncNA(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    XML encoding without replacing apostrophes.
    -
    -
    XMLEncNQG(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    XML encoding without replacing apostrophes and quotation marks and - greater-thans (except in ]]>).
    -
    -
    XMLEncQAttr(String) - Static method in class freemarker.template.utility.StringUtil
    -
    -
    XML encoding for attributes values quoted with " (not with '!).
    -
    -
    XmlEscape - Class in freemarker.template.utility
    -
    -
    Performs an XML escaping of a given template fragment.
    -
    -
    XmlEscape() - Constructor for class freemarker.template.utility.XmlEscape
    -
     
    -
    XPathSupport - Interface in freemarker.ext.dom
    -
     
    -
    - - - -

    Z

    -
    -
    ZERO - Static variable in class freemarker.template.utility.Constants
    -
     
    -
    - - - -

    _

    -
    -
    __getitem__(String) - Method in class freemarker.core.Environment
    -
    -
    A hook that Jython uses.
    -
    -
    __setitem__(String, Object) - Method in class freemarker.core.Environment
    -
    -
    A hook that Jython uses.
    -
    -
    -A B C D E F G H I J K L M N O P R S T U V W X Z _ 
    - -
    - - - - - - - -
    - - - - diff --git a/fmpp/docs/freemarker/api/index.html b/fmpp/docs/freemarker/api/index.html deleted file mode 100644 index b210f45..0000000 --- a/fmpp/docs/freemarker/api/index.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -FreeMarker 2.3.21 API - - - - - - - - - -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<h2>Frame Alert</h2> -<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> - - - diff --git a/fmpp/docs/freemarker/api/overview-frame.html b/fmpp/docs/freemarker/api/overview-frame.html deleted file mode 100644 index d60dc87..0000000 --- a/fmpp/docs/freemarker/api/overview-frame.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - -Overview List (FreeMarker 2.3.21 API) - - - - - - - -

     

    - - diff --git a/fmpp/docs/freemarker/api/overview-summary.html b/fmpp/docs/freemarker/api/overview-summary.html deleted file mode 100644 index f2c1f7a..0000000 --- a/fmpp/docs/freemarker/api/overview-summary.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - -Overview (FreeMarker 2.3.21 API) - - - - - - - - -
    - - - - - - - -
    - - -
    -

    FreeMarker 2.3.21

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Packages 
    PackageDescription
    freemarker.cache -
    Template loading and caching.
    -
    freemarker.core -
    The seldom used or advanced parts of the fundamental FreeMarker API, compared to freemarker.template.
    -
    freemarker.debug -
    Debugging API; experimental status, might change! -This is to support debugging in IDE-s.
    -
    freemarker.ext.ant -
    -Ant task to transform XML files -with a template; a more powerful alternative is FMPP.
    -
    freemarker.ext.beans -
    The default object wrapper of FreeMarker uses -this to expose Java Beans and POJO-s to templates, but it can also be used in itself as a -better alternative ObjectWrapper.
    -
    freemarker.ext.dom -
    Exposes DOM XML nodes to templates as easily traversable trees; -see in the Manual.
    -
    freemarker.ext.jdom -
    Deprecated, use W3C DOM (freemarker.ext.dom) instead; -Exposes JDOM XML nodes to templates.
    -
    freemarker.ext.jsp -
    -Classes for two-way FreeMarker-JSP integration.
    -
    freemarker.ext.jython -
    Exposes Jython objects to templates.
    -
    freemarker.ext.rhino -
    Exposes Rhino (ECMAScript) objects to templates.
    -
    freemarker.ext.servlet -
    Servlet for legacy "Model 2" frameworks that allows using FreeMarker -templates instead of JSP as the MVC View -(see in the Manual).
    -
    freemarker.ext.util -
    Various classes used by freemarker.ext but might be useful outside it too.
    -
    freemarker.ext.xml -
    Deprecated, use W3C DOM with freemarker.ext.dom instead; -Exposes XML from DOM, dom4j or JDOM nodes, uniformly.
    -
    freemarker.log -
    -Logging facility; dispatches FreeMarker log messages to the chosen logger library.
    -
    freemarker.template -
    The fundamental, most commonly used API-s of FreeMarker; -start with Configuration (also see -Getting Stared in the Manual.)
    -
    freemarker.template.utility -
    Various classes used by core FreeMarker code but might be useful outside of it too.
    -
    -
    - -
    - - - - - - - -
    - - - - diff --git a/fmpp/docs/freemarker/api/overview-tree.html b/fmpp/docs/freemarker/api/overview-tree.html deleted file mode 100644 index 4827632..0000000 --- a/fmpp/docs/freemarker/api/overview-tree.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - - - -Class Hierarchy (FreeMarker 2.3.21 API) - - - - - - - - -
    - - - - - - - -
    - - - -
    -

    Class Hierarchy

    - -

    Interface Hierarchy

    - -
    - -
    - - - - - - - -
    - - - - diff --git a/fmpp/docs/freemarker/api/package-list b/fmpp/docs/freemarker/api/package-list deleted file mode 100644 index 878055f..0000000 --- a/fmpp/docs/freemarker/api/package-list +++ /dev/null @@ -1,16 +0,0 @@ -freemarker.cache -freemarker.core -freemarker.debug -freemarker.ext.ant -freemarker.ext.beans -freemarker.ext.dom -freemarker.ext.jdom -freemarker.ext.jsp -freemarker.ext.jython -freemarker.ext.rhino -freemarker.ext.servlet -freemarker.ext.util -freemarker.ext.xml -freemarker.log -freemarker.template -freemarker.template.utility diff --git a/fmpp/docs/freemarker/api/script.js b/fmpp/docs/freemarker/api/script.js deleted file mode 100644 index c3a1cae..0000000 --- a/fmpp/docs/freemarker/api/script.js +++ /dev/null @@ -1,30 +0,0 @@ -function show(type) -{ - count = 0; - for (var key in methods) { - var row = document.getElementById(key); - if ((methods[key] & type) != 0) { - row.style.display = ''; - row.className = (count++ % 2) ? rowColor : altColor; - } - else - row.style.display = 'none'; - } - updateTabs(type); -} - -function updateTabs(type) -{ - for (var value in tabs) { - var sNode = document.getElementById(tabs[value][0]); - var spanNode = sNode.firstChild; - if (value == type) { - sNode.className = activeTableTab; - spanNode.innerHTML = tabs[value][1]; - } - else { - sNode.className = tableTab; - spanNode.innerHTML = "" + tabs[value][1] + ""; - } - } -} diff --git a/fmpp/docs/freemarker/api/serialized-form.html b/fmpp/docs/freemarker/api/serialized-form.html deleted file mode 100644 index efb2f84..0000000 --- a/fmpp/docs/freemarker/api/serialized-form.html +++ /dev/null @@ -1,928 +0,0 @@ - - - - - - -Serialized Form (FreeMarker 2.3.21 API) - - - - - - - - -
    - - - - - - - -
    - - -
    -

    Serialized Form

    -
    -
    - -
    - -
    - - - - - - - -
    - - - - diff --git a/fmpp/docs/freemarker/api/stylesheet.css b/fmpp/docs/freemarker/api/stylesheet.css deleted file mode 100644 index ad00323..0000000 --- a/fmpp/docs/freemarker/api/stylesheet.css +++ /dev/null @@ -1,574 +0,0 @@ -/* Javadoc style sheet - JDK 8 usability fix regexp substitutions applied */ -/* -Overall document style -*/ - -@import url('resources/fonts/dejavu.css'); - -body { - background-color:#ffffff; - color:#353833; - font-family:Arial, Helvetica, sans-serif; - font-size:14px; - margin:0; -} -a:link, a:visited { - text-decoration:none; - color:#4A6782; -} -a:hover, a:focus { - text-decoration:none; - color:#bb7a2a; -} -a:active { - text-decoration:none; - color:#4A6782; -} -a[name] { - color:#353833; -} -a[name]:hover { - text-decoration:none; - color:#353833; -} -pre { - font-family:'Courier New', monospace; - font-size:14px; -} -h1 { - font-size:20px; -} -h2 { - font-size:18px; -} -h3 { - font-size:16px; - font-style:italic; -} -h4 { - font-size:13px; -} -h5 { - font-size:12px; -} -h6 { - font-size:11px; -} -ul { - list-style-type:disc; -} -code, tt { - font-family:'Courier New', monospace; - font-size:14px; - padding-top:4px; - margin-top:8px; - line-height:1.4em; -} -dt code { - font-family:'Courier New', monospace; - font-size:14px; - padding-top:4px; -} -table tr td dt code { - font-family:'Courier New', monospace; - font-size:14px; - vertical-align:top; - padding-top:4px; -} -sup { - font-size:8px; -} -/* -Document title and Copyright styles -*/ -.clear { - clear:both; - height:0px; - overflow:hidden; -} -.aboutLanguage { - float:right; - padding:0px 21px; - font-size:11px; - z-index:200; - margin-top:-9px; -} -.legalCopy { - margin-left:.5em; -} -.bar a, .bar a:link, .bar a:visited, .bar a:active { - color:#FFFFFF; - text-decoration:none; -} -.bar a:hover, .bar a:focus { - color:#bb7a2a; -} -.tab { - background-color:#0066FF; - color:#ffffff; - padding:8px; - width:5em; - font-weight:bold; -} -/* -Navigation bar styles -*/ -.bar { - background-color:#4D7A97; - color:#FFFFFF; - padding:.8em .5em .4em .8em; - height:auto;/*height:1.8em;*/ - font-size:11px; - margin:0; -} -.topNav { - background-color:#4D7A97; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - height:2.8em; - padding-top:10px; - overflow:hidden; - font-size:12px; -} -.bottomNav { - margin-top:10px; - background-color:#4D7A97; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - height:2.8em; - padding-top:10px; - overflow:hidden; - font-size:12px; -} -.subNav { - background-color:#dee3e9; - float:left; - width:100%; - overflow:hidden; - font-size:12px; -} -.subNav div { - clear:left; - float:left; - padding:0 0 5px 6px; - text-transform:uppercase; -} -ul.navList, ul.subNavList { - float:left; - margin:0 25px 0 0; - padding:0; -} -ul.navList li{ - list-style:none; - float:left; - padding: 5px 6px; - text-transform:uppercase; -} -ul.subNavList li{ - list-style:none; - float:left; -} -.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { - color:#FFFFFF; - text-decoration:none; - text-transform:uppercase; -} -.topNav a:hover, .bottomNav a:hover { - text-decoration:none; - color:#bb7a2a; - text-transform:uppercase; -} -.navBarCell1Rev { - background-color:#F8981D; - color:#253441; - margin: auto 5px; -} -.skipNav { - position:absolute; - top:auto; - left:-9999px; - overflow:hidden; -} -/* -Page header and footer styles -*/ -.header, .footer { - clear:both; - margin:0 20px; - padding:5px 0 0 0; -} -.indexHeader { - margin:10px; - position:relative; -} -.indexHeader span{ - margin-right:15px; -} -.indexHeader h1 { - font-size:13px; -} -.title { - color:#2c4557; - margin:10px 0; -} -.subTitle { - margin:5px 0 0 0; -} -.header ul { - margin:0 0 15px 0; - padding:0; -} -.footer ul { - margin:20px 0 5px 0; -} -.header ul li, .footer ul li { - list-style:none; - font-size:13px; -} -/* -Heading styles -*/ -div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { - background-color:#dee3e9; - border:1px solid #d0d9e0; - margin:0 0 6px -8px; - padding:7px 5px; -} -ul.blockList ul.blockList ul.blockList li.blockList h3 { - background-color:#dee3e9; - border:1px solid #d0d9e0; - margin:0 0 6px -8px; - padding:7px 5px; -} -ul.blockList ul.blockList li.blockList h3 { - padding:0; - margin:15px 0; -} -ul.blockList li.blockList h2 { - padding:0px 0 20px 0; -} -/* -Page layout container styles -*/ -.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { - clear:both; - padding:10px 20px; - position:relative; -} -.indexContainer { - margin:10px; - position:relative; - font-size:12px; -} -.indexContainer h2 { - font-size:13px; - padding:0 0 3px 0; -} -.indexContainer ul { - margin:0; - padding:0; -} -.indexContainer ul li { - list-style:none; - padding-top:2px; -} -.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { - font-size:12px; - font-weight:bold; - margin:10px 0 0 0; - color:#4E4E4E; -} -.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { - margin: 5px 0 10px 20px; - font-size:14px; - -} -.serializedFormContainer dl.nameValue dt { - margin-left:1px; - font-size:1.1em; - display:inline; - font-weight:bold; -} -.serializedFormContainer dl.nameValue dd { - margin:0 0 0 1px; - font-size:1.1em; - display:inline; -} -/* -List styles -*/ -ul.horizontal li { - display:inline; - font-size:0.9em; -} -ul.inheritance { - margin:0; - padding:0; -} -ul.inheritance li { - display:inline; - list-style:none; -} -ul.inheritance li ul.inheritance { - margin-left:15px; - padding-left:15px; - padding-top:1px; -} -ul.blockList, ul.blockListLast { - margin:10px 0 10px 0; - padding:0; -} -ul.blockList li.blockList, ul.blockListLast li.blockList { - list-style:none; - margin-bottom:15px; - line-height:1.4; -} -ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { - padding:0px 20px 5px 10px; - border:1px solid #ededed; - background-color:#f8f8f8; -} -ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { - padding:0 0 5px 8px; - background-color:#ffffff; - border:none; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { - margin-left:0; - padding-left:0; - padding-bottom:15px; - border:none; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { - list-style:none; - border-bottom:none; - padding-bottom:0; -} -table tr td dl, table tr td dl dt, table tr td dl dd { - margin-top:0; - margin-bottom:1px; -} -/* -Table styles -*/ -.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { - width:100%; - border-left:1px solid #EEE; - border-right:1px solid #EEE; - border-bottom:1px solid #EEE; -} -.overviewSummary, .memberSummary { - padding:0px; -} -.overviewSummary caption, .memberSummary caption, .typeSummary caption, -.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { - position:relative; - text-align:left; - background-repeat:no-repeat; - color:#253441; - font-weight:bold; - clear:none; - overflow:hidden; - padding:0px; - padding-top:10px; - padding-left:1px; - margin:0px; - white-space:pre; -} -.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, -.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, -.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, -.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, -.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, -.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, -.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, -.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { - color:#FFFFFF; -} -.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, -.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - padding-bottom:7px; - display:inline-block; - float:left; - background-color:#F8981D; - border: none; - height:16px; -} -.memberSummary caption span.activeTableTab span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - margin-right:3px; - display:inline-block; - float:left; - background-color:#F8981D; - height:16px; -} -.memberSummary caption span.tableTab span { - white-space:nowrap; - padding-top:5px; - padding-left:12px; - padding-right:12px; - margin-right:3px; - display:inline-block; - float:left; - background-color:#4D7A97; - height:16px; -} -.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { - padding-top:0px; - padding-left:0px; - padding-right:0px; - background-image:none; - float:none; - display:inline; -} -.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, -.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { - display:none; - width:5px; - position:relative; - float:left; - background-color:#F8981D; -} -.memberSummary .activeTableTab .tabEnd { - display:none; - width:5px; - margin-right:3px; - position:relative; - float:left; - background-color:#F8981D; -} -.memberSummary .tableTab .tabEnd { - display:none; - width:5px; - margin-right:3px; - position:relative; - background-color:#4D7A97; - float:left; - -} -.overviewSummary td, .memberSummary td, .typeSummary td, -.useSummary td, .constantsSummary td, .deprecatedSummary td { - text-align:left; - padding:0px 0px 12px 10px; - width:100%; -} -th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, -td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ - vertical-align:top; - padding-right:0px; - padding-top:8px; - padding-bottom:3px; -} -th.colFirst, th.colLast, th.colOne, .constantsSummary th { - background:#dee3e9; - text-align:left; - padding:8px 3px 3px 7px; -} -td.colFirst, th.colFirst { - white-space:nowrap; - font-size:13px; -} -td.colLast, th.colLast { - font-size:13px; -} -td.colOne, th.colOne { - font-size:13px; -} -.overviewSummary td.colFirst, .overviewSummary th.colFirst, -.overviewSummary td.colOne, .overviewSummary th.colOne, -.memberSummary td.colFirst, .memberSummary th.colFirst, -.memberSummary td.colOne, .memberSummary th.colOne, -.typeSummary td.colFirst{ - width:25%; - vertical-align:top; -} -td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { - font-weight:bold; -} -.tableSubHeadingColor { - background-color:#EEEEFF; -} -.altColor { - background-color:#FFFFFF; -} -.rowColor { - background-color:#EEEEEF; -} -/* -Content styles -*/ -.description pre { - margin-top:0; -} -.deprecatedContent { - margin:0; - padding:10px 0; -} -.docSummary { - padding:0; -} - -ul.blockList ul.blockList ul.blockList li.blockList h3 { - font-style:normal; -} - -div.block { - font-size:14px; - font-family:Arial, sans-serif; -} - -td.colLast div { - padding-top:0px; -} - - -td.colLast a { - padding-bottom:3px; -} -/* -Formatting effect styles -*/ -.sourceLineNo { - color:green; - padding:0 30px 0 0; -} -h1.hidden { - visibility:hidden; - overflow:hidden; - font-size:10px; -} -.block { - display:block; - margin:3px 10px 2px 0px; - color:#474747; -} -.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, -.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, -.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { - font-weight:bold; -} -.deprecationComment, .emphasizedPhrase, .interfaceName { - font-style:italic; -} - -div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, -div.block div.block span.interfaceName { - font-style:normal; -} - -div.contentContainer ul.blockList li.blockList h2{ - padding-bottom:0px; -} diff --git a/fmpp/docs/freemarker/app.html b/fmpp/docs/freemarker/app.html deleted file mode 100644 index a304b76..0000000 --- a/fmpp/docs/freemarker/app.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - FreeMarker Manual - Appendixes - - - - - - - - -
    - - - - - -

    -Part V   Appendixes

    - -
    -

    - - Part Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/app_eccn.html b/fmpp/docs/freemarker/app_eccn.html deleted file mode 100644 index ac1cd7c..0000000 --- a/fmpp/docs/freemarker/app_eccn.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - FreeMarker Manual - Export Control - - - - - - - - -
    - - - - - -

    -Export Control

    - - -

    The FreeMarker source code doesn't include cryptography. - Furthermore it's binary (downloadable) forms don't include any - cryptography software. Hence, FreeMarker has no Export Control - Classification Number (ECCN). Where an ECCN should be filled, the - label "not subject to EAR" could be used.

    FreeMarker itself doesn't add any exporting limitations.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/app_faq.html b/fmpp/docs/freemarker/app_faq.html deleted file mode 100644 index 0250174..0000000 --- a/fmpp/docs/freemarker/app_faq.html +++ /dev/null @@ -1,1899 +0,0 @@ - - - - - - - - FreeMarker Manual - FAQ - - - - - - - - -
    - - - - - -

    -Appendix A   FAQ

    - - -

    Translations: Chinese in the Chinese - translation of the Manual (PDF), Serbo-Croatian - (based on FreeMarker 2.3.19)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    1.   - - - - JSP versus FreeMarker? - - -
    -
    2.   - - - - Why is FreeMarker so picky about null-s - and missing variables, and what to do with it? -
    -
    3.   - - - - The documentation writes about feature - X, but it seems that FreeMarker doesn't - know that, or it behaves in a different way as documented, or a - bug that was supposedly fixed is still present. -
    -
    4.   - - - - Why does FreeMarker print the numbers with strange - formatting (as 1,000,000 or 1 000 000 instead of 1000000)? -
    -
    5.   - - - - Why does FreeMarker print bad decimal and/or grouping - separator symbol (as 3.14 instead of 3,14)? -
    -
    6.   - - - - Why does FreeMarker give an error when I try to print a - boolean like ${aBoolean}, and how to fix - it? -
    -
    7.   - - - - The < and > of - FreeMarker tags confuses my editor or the XML parser. What to - do? -
    -
    8.   - - - - What are the legal variable names? - - -
    -
    9.   - - - - How can I use variable (macro) names that contain space, - dash or other special characters? -
    -
    10.   - - - - Why do I get "java.lang.IllegalArgumentException: argument - type mismatch" when I try to use X JSP - custom tag? -
    -
    11.   - - - - How to include other resources in a way as - jsp:include does it? -
    -
    12.   - - - - How can I get the parameters to my - plain-Java-method/TemplateMethodModelEx/TemplateTransformModel/TemplateDirectiveModel - implementation as plain - java.lang.*/java.util.* - objects? -
    -
    13.   - - - - Why I can't use non-string key in the - myMap[myKey] expression? And what to do - now? - - -
    -
    14.   - - - - When I list the contents of a map (a hash) with - ?keys/?values, I get the - java.util.Map methods mixed with the real map - entries. Of course, I only want to get the map entries. -
    -
    15.   - - - - How can I modify sequences (lists) and hashes (maps) in - FreeMarker templates? - - - - - - - - -
    -
    16.   - - - - What about null and the FreeMarker - template language? -
    -
    17.   - - - - How can I use the output of a directive (macro) in - expressions (as a parameter to another directive)? -
    -
    18.   - - - - Why do I have ``?''-s in the output instead of character - X? -
    -
    19.   - - - - How to retrieve values calculated in templates after - template execution done? -
    -
    20.   - - - - - - Can I allow users to upload templates and what are the - security implications? -
    -
    21.   - - - - How to implement a function or macro in Java Language - instead of in the template language? -
    -
    22.   - - - - Why is FreeMarker logging suppressed for my - application? -
    -
    23.   - - - - In my Servlet - based application, how do I show a nice error page instead of a - stack trace when error occurs during template processing? -
    -
    24.   - - - - I'm using a visual HTML editor that mangles template tags. - Will you change the template language syntax to accommodate my - editor? -
    -
    25.   - - - - How fast is FreeMarker? Is it true that 2.x is slower than - 1.x (FreeMarker classic)? -
    -
    26.   - - - - How can my Java classes ask a template for information about - its structure (e.g. a list of all the variables)? -
    -
    27.   - - - - Will you ever provide backward compatibility? -
    -
    28.   - - - - If we distribute FreeMarker with our product, do we have to - release the source code for our product? -
    -
    - - -
    - - 1.  - JSP versus FreeMarker? - - - -
    - - -
    - -

    Note: JSP 1.x was really bad as an MVC template engine - because it was not made for that, so I don't deal with that here. - We compare FreeMarker with the JSP 2.0 + JSTL combo.

    - -

    FreeMarker Pros:

    - -
    -
      -
    • -

      FreeMarker is not tied to Servlets, networking or the - Web; it is just a class library to generate text output by - merging a template with Java objects (the data-model). You can - execute templates anywhere and anytime; no HTTP request - forwarding or similar tricks needed, no Servlet environment - needed at all. Because of this you can easily integrate it - into any system.

      -
    • - -
    • -

      No servlet specific scopes and other highly technical - things in templates. It was made for MVC from the beginning, - it focuses only on the presentation.

      -
    • - -
    • -

      You can load the templates from anywhere; from the class - path, from a data-base, etc.

      -
    • - -
    • -

      Locale-sensitive number and date formatting by default. - Since we mostly output for a human audience all you need to do - is just write ${x} rather than - <fmt:formatNumber value="${x}" />. - You can easily switch this behavior and output non-localized - numbers by default.

      -
    • - -
    • -

      Much easier to define ad-hoc macros and - functions.

      -
    • - -
    • -

      No sweeping errors under the carpet. Missing variables - will cause an error by default, and not silently default to - arbitrary values. Also, null-s are not - treated silently as 0/false/empty string. See more about this - here...

      -
    • - -
    • -

      ``Object wrapping''. This lets you show the objects to - templates in a customized, presentation oriented way (e.g. - see here how a - W3C DOM nodes can be seen by templates using this - technology.)

      -
    • - -
    • -

      Macros and functions are just variables (compare it to - how JSP custom tags work), so they can be easily passed around - as parameter values, put into the data-model, ...etc, just - like any other value.

      -
    • - -
    • -

      Easier to read, more terse syntax. For example: - <#if x>...</#if> instead of - <c:if - test="${x}">...</c:if>

      -
    • - -
    • -

      Virtually unnoticeable delay when visiting a page for - the first time (or after it was changed), because no expensive - compilation happens.

      -
    • -
    - - -

    FreeMarker Cons:

    - -
    -
      -
    • -

      Not a ``standard''. There are fewer tools and IDE - integrations, fewer developers knows it and there's much less - industry support in general. (However, JSP tag libraries can - work in FreeMarker templates with the proper setup, unless - they are using .tag files.)

      -
    • - -
    • -

      Since macros and function are just variables, incorrect - directive and parameter names and missing required parameters - can be detected only on runtime.

      -
    • - -
    • -

      Its syntax doesn't follow the HTML/XML rules apart from - some visual similarity, which is confusing for new users. - (It's the price of the terseness...)

      -
    • - -
    • -

      Doesn't work with JSF. (It could work technically, but - nobody has implemented that yet.)

      -
    • -
    - - -

    You may read this if you are considering replacing JSP with - FreeMarker: Programmer's Guide/Miscellaneous/Using FreeMarker with servlets/Using FreeMarker for ``Model 2''

    -
    - - - - -
    - - 2.  - Why is FreeMarker so picky about null-s - and missing variables, and what to do with it? - -
    - - -
    - -

    To recapitulate what's this entry is about: FreeMarker by - default treats an attempt to access a non-existent variable or a - null value (this two - is the same for FreeMarker) as error, which aborts the - template execution.

    - -

    First of all, you should understand the reason of being - picky. Most scripting languages and template languages are rather - forgiving with missing variables (and with - null-s), and they usually treat them as empty - string and/or 0 and/or logical false. This behavior has several - problems:

    - -
    -
      -
    • -

      It potentially hides accidental mistakes, like a typo in - a variable name, or when the template author refers to a - variable that the programmer doesn't put into the data-model - for that template, or for which the programmer uses a - different name. Humans are prone to do such mistakes, while - computers are not, so missing this opportunity that the - template engine can show these errors is a bad business. Even - if you very carefully check the output of the templates during - development, it is easy to look over mistakes like - <#if hasWarnigs>print warnings - here...</#if>, which would then - silently never print the warnings, since you have mistyped the - variable name. Also think about maintenance, when you later - modify your application; probably you will not re-check - templates (many applications has hundreds of them) that - carefully each time, for all possible scenarios. Unit tests - typically doesn't cover web page content very good either (if - you have them at all...); they mostly only checks certain - manually set patterns in the web page, so they will often - gloss though changes that are actually bugs. But if the page - fails with exception, that's something human testers will - notice and unit sets will notice, and in production the - maintainers will notice (assuming somebody check error - logs).

      -
    • - -
    • -

      Makes dangerous assumptions. The script language or - template engine knows nothing about the application domain, so - when it decides the value of something that it doesn't know to - be 0/false, it is a quite irresponsible and arbitrary thing. - Just because it's not know what's your current balance at your - bank, can we just say it's $0? Just because it is not known if - a patient has penicillin allergy, we can just say he/she - doesn't have it? Just consider the implications of such - mistakes. Showing an error page is often better than showing - incorrect information that formally looks good.

      -
    • -
    - - -

    Being not picky is mostly sweeping under the carpet in this - case (not facing with the problems), which of course most people - feels more convenient, but still, we believe that in most cases - being strict will save your time and increase your software - quality on the long run.

    - -

    On the other hand, we recognize that there are cases where - you don't want FreeMarker to be that picky with good reason, and - there is solution for them:

    - -
    -
      -
    • -

      It's often normal that your data-model contains - null-s or have optional variables. In such - cases use these - operators. If you use them too often, try to rethink - your data-model, because depending on them too much won't just - make the templates too verbose, but increases the probability - of hiding errors and printing arbitrary incorrect output (for - the reasons described earlier).

      -
    • - -
    • -

      In some application you may rather want to show an - incomplete/damaged page than an error page. In this case you - can use another - error handler than the default one. A custom error - handler can skip the problematic part instead of aborting the - whole page rendering. Note, however, that although the error - handlers don't give arbitrary default values to variables, for - pages that show critical information it's maybe still better - to show an error page.

      -
    • - -
    • -

      If the pages contain parts that aren't critically - important (like side bars), another feature you may interested - in is the - attempt/recover - directives.

      -
    • -
    - -
    - - - - -
    - - 3.  - The documentation writes about feature - X, but it seems that FreeMarker doesn't - know that, or it behaves in a different way as documented, or a - bug that was supposedly fixed is still present. - -
    - - -
    - -

    Are you sure that you are using the documentation written - for the same version of FreeMarker that you actually use? - Especially, note that our online documentation is for the latest - usable FreeMarker release. You may use an older release.

    - -

    Are you sure that the Java class loader finds the same - freemarker.jar that you expect to use? Maybe - there is an older version of freemarker.jar - around, which has higher priority. To check this, try to print the - version number in a template with ${.version}. - If it dies with ``Unknown built-in variable: version'' error - message, then you use a release before 2.3-final or 2.2.8, but you - can still try to get the version number in the Java code of your - application with - Configuration.getVersionNumber(). If this - method is not present either, then you are using an early - 2.3-preview, or a version before 2.2.6.

    - -

    If you suspect that the problem is that you have multiple - freemarker.jar-s, the typical culprit is that - some module has a Maven dependency with group ID - freemarker, as opposed to - org.freemarker, while you have declared a - dependency on org.freemarker. In this case you - will have to exclude the freemarker - dependency.

    - -

    If you think that the documentation or FreeMarker is wrong, - please report it using the bug tracker, or the mailing list. Thank - you!

    -
    - - - - -
    - - 4.  - Why does FreeMarker print the numbers with strange - formatting (as 1,000,000 or 1 000 000 instead of 1000000)? - -
    - - -
    - -

    FreeMarker uses the locale-sensitive number formatting - capability of the Java platform. The default number format for - your locale may uses grouping or other unwanted formatting. To - prevent this, you have to override the number format suggested by - the Java platform with the number_format FreeMarker setting. For - example:

    - -
    -
    -cfg.setNumberFormat("0.######");  // now it will print 1000000
    -// where cfg is a freemarker.template.Configuration object  
    - - -

    Note however than humans often find it hard to read big - numbers without grouping separator. So in general it is - recommended to keep them, and in cases where the numbers are for - ''computer audience'' (which is confused on the grouping - separators), use the c built-in. For - example:

    - -
    -
    -<a href="/shop/productdetails?id=${product.id?c}">Details...</a>  
    - -
    - - - - -
    - - 5.  - Why does FreeMarker print bad decimal and/or grouping - separator symbol (as 3.14 instead of 3,14)? - -
    - - -
    - -

    Different countries use different decimal/grouping separator - symbols. If you see incorrect symbols, then probably your locale - is not set properly. Set the default locale of the JVM or override - the default locale with the locale FreeMarker setting. For - example:

    - -
    -
    -cfg.setLocale(java.util.Locale.ITALY);
    -// where cfg is a freemarker.template.Configuration object  
    - - -

    However, sometimes you want to output a number not for human - audience, but for ``computer audience'' (like you want to print a - size in CSS), in which case you must use dot as decimal separator, - regardless of the locale (language) of the page. For that use the - c - built-in, for example:

    - -
    -
    -font-size: ${fontSize?c}pt;  
    - -
    - - - - -
    - - 6.  - Why does FreeMarker give an error when I try to print a - boolean like ${aBoolean}, and how to fix - it? - -
    - - -
    - -

    Unlike numbers, booleans has no commonly accepted format, - not even a common format within the same page. Like when you show - on a HTML page if a product is washable, you will hardly want to - show for the visitor "Washable: true", but rather "Washable: yes". - So we force the template author (by ${washable} - causing error) to find out with his human knowledge how the - boolean value should be shown at the given place. The common way - of formatting a boolean is like ${washable?string("yes", - "no")}, ${caching?string("Enabled", - "Disabled")}, ${heating?string("on", - "off")}, etc.

    - -

    However, there are two cases where this gets - impractical:

    - -
    -
      -
    • -

      When printing boolean to generate computer language - output, and hence you want - true/false, use - ${someBoolean?c}. - (This requires at least FreeMarker 2.3.20. Before that, the - common practice was writing - ${someBoolean?string}, - however that's dangerous because its output depends on the - boolean format settings, whose default is - "true"/"false".)

      -
    • - -
    • -

      When you have format most of the booleans on the same - way. In this case you can set the - boolean_format setting - (Configuration.setBooleanFormat) to reflect - that, and then since FreeMarker 2.3.20 you can just write - ${someBoolean}.

      -
    • -
    - -
    - - - - -
    - - 7.  - The < and > of - FreeMarker tags confuses my editor or the XML parser. What to - do? - -
    - - -
    - -

    Starting from FreeMarker 2.3.4 you can use - [ and ] instead of - < and >. For more - details read - this...

    -
    - - - - -
    - - 8.  - What are the legal variable names? - - - -
    - - -
    - -

    FreeMarker has no limitations regarding the characters used - in variable names, nor regarding the length of the variable names, - but for your convenience try to chose variable names that can be - used with the simple variable reference expressions (see it here). If you have - to choose a more extreme variable name, that's not a bid problem - either: see - here.

    -
    - - - - -
    - - 9.  - How can I use variable (macro) names that contain space, - dash or other special characters? - -
    - - -
    - -

    If you have a variable with strange name, such as - foo-bar, FreeMarker will misinterpret what do - you want when you write thing as ${foo-bar}. In - this concrete case, it will believe that you want subtract the - value of bar from foo. This - FAQ entry explains how to handle situations like this.

    - -

    First of all it should be clean that these are just - syntactical problems. FreeMarker has no limitations regarding the - characters used in variable names, nor regarding the length of the - variable names, but sometimes you need to use syntactical - tricks.

    - -

    If you want to read the variable: Use the square bracket - syntax. An example of square bracket syntax is - baaz["foo"], which is equivalent with - baaz.foo. As the subvariable name with the - square bracket syntax is a string literal (in fact, arbitrary - expression), it let you write baaz["foo-bar"]. - Now you may say that it can be used for hash subvariables only. - Yes, but top-level variables are accessible through special hash - variable .vars. For example, - foo is equivalent with - .vars["foo"]. So you can also write - .vars["foo-bar"]. Naturally, this trick works - with macro invocations too: - <@.vars["foo-bar"]/>

    - -

    If you want to create or modify the variable: All directives - that let you create or modify a variable (such as - assign, local, - global, macro, - function, etc.) allows the quotation of the - destination variable name. For example, <#assign foo = - 1> is the same as <#assign "foo" = - 1>. So you can write things like <#assign - "foo-bar" = 1> and <#macro - "foo-bar">.

    -
    - - - - -
    - - 10.  - Why do I get "java.lang.IllegalArgumentException: argument - type mismatch" when I try to use X JSP - custom tag? - -
    - - -
    - -

    On JSP pages you quote all parameter (attribute) values, it - does not mater if the type of the parameter is string or boolean - or number. But since custom tags are accessible in FTL templates - as plain user-defined FTL directives, you have to use the FTL - syntax rules inside the custom tags, not the JSP rules. Thus, - according to FTL rules, you must not quote boolean and numerical - parameter values, or they are interpreted as string values, and - this will cause a type mismatch error when FreeMarker tries to - pass the value to the custom tag that expects non-string - value.

    - -

    For example, the flush parameter to - Struts Tiles insert tag is boolean. In JSP the - correct syntax was:

    - -
    -
    -<tiles:insert page="/layout.jsp" flush="true"/>
    -...  
    - - -

    but in FTL you should write:

    - -
    -
    -<@tiles.insert page="/layout.ftl" flush=true/>
    -...  
    - - -

    Also, for similar reasons, this is wrong:

    - -
    -
    -<tiles:insert page="/layout.jsp" flush="${needFlushing}"/>
    -...  
    - - -

    and you should write:

    - -
    -
    -<tiles:insert page="/layout.jsp" flush=needFlushing/>
    -...  
    - - -

    (Not flush=${needFlushing}!)

    -
    - - - - -
    - - 11.  - How to include other resources in a way as - jsp:include does it? - -
    - - -
    - -

    Not with <#include ...>, as that - just includes another FreeMarker template without involving the - Servlet container.

    - -

    Since the inclusion method you look for is Servlet-related, - and pure FreeMarker is unaware of Servlets or even HTTP, it's the - Web Application Framework that decides if you can do this and if - so how. For example, in Struts 2 you can do this like this:

    - -
    -
    -<@s.include value="/WEB-INF/just-an-example.jspf" />  
    - - -

    If the FreeMarker support of the Web Application Framework - is based on - freemarker.ext.servlet.FreemarkerServlet, then - you can also do this (since FreeMarker 2.3.15):

    - -
    -
    -<@include_page path="/WEB-INF/just-an-example.jspf" />  
    - - -

    but if the Web Application Framework provides its own - solution, then you may prefer that, after all it may does - something special.

    - -

    For more information about include_page - read - this...

    -
    - - - - -
    - - 12.  - How can I get the parameters to my - plain-Java-method/TemplateMethodModelEx/TemplateTransformModel/TemplateDirectiveModel - implementation as plain - java.lang.*/java.util.* - objects? - -
    - - -
    - -

    Unfortunately, there is no simple general-purpose solution - for this problem. The problem is that FreeMarker object wrapping - is very flexible, which is good when you access variables from - templates, but makes unwrapping on the Java side a tricky - question. For example, it is possible to wrap a - non-java.util.Map object as - TemplateHashModel (FTL hash variable). But - then, it can't be unwrapped to java.util.Map, - since there is no wrapped java.util.Map around - at all.

    - -

    So what to do then? Basically there are two cases:

    - -
    -
      -
    • -

      Directives and methods that are written for presentation - purposes (like kind of ``tools'' for helping FreeMarker - templates) should declare their arguments as - TemplateModel-s and the more specific sub - interfaces of that. After all, the object wrapping is about - apparently transforming the data-model to something that - serves the purpose of the presentation layer, and these - methods are part of the presentation layer.

      -
    • - -
    • -

      Methods that are not for presentation related tasks (but - for business logic and like) should be implemented as plain - Java methods, and should not use any FreeMarker specific - classes at all, since according the MVC paradigm they must be - independent of the presentation technology (FreeMarker). If - such a method is called from a template, then it is the - responsibility of the object wrapper - to ensure the conversion of the arguments to the proper type. - If you use the DefaultObjectWrapper or the - BeansWrapper - then this will happen automatically (but be sure you are using - at least FreeMarker 2.3.3). Furthermore if you use - BeansWrapper, then the method will surely - get exactly the same instance that was earlier wrapped (as far - as it was wrapped by the - BeansWrapper).

      -
    • -
    - -
    - - - - -
    - - 13.  - Why I can't use non-string key in the - myMap[myKey] expression? And what to do - now? - - - -
    - - -
    - -

    The ``hash'' type of the FreeMarker Template Language (FTL) - is not the same as Java's Map. FTL's hash is an - associative array too, but it uses string keys exclusively. This - is because it was introduced for subvariables (as - password in user.password, - which is the same as user["password"]), and - variable names are strings.

    - -

    So FTL's hashes are not general purpose associate arrays - that could be used for looking up values with keys of arbitrary - type. FTL is presentation oriented language, and it has no feature - dedicated for that purpose. It has, however, methods. Methods are - part of the data-model, and they can do all kind of fancy - data-model related calculations, so of course you can add some - methods to the data-model for Map lookup. The - bad news is that the building of the data-model, as it's an - application specific issue, is the task of the programmers who use - FreeMarker, so it's their task to ensure that such methods are - present there to serve the template authors. (However, when - template authors need to call methods that are not about - presentation, then consider if the data-model is simple enough. - Maybe you should push some calculations back to the data-model - building phase. Ideally the data-model contains what should be - displayed, and not something that serves as the base of further - calculations.)

    - -

    If you read the programmer's guide, then you know that - technically, the data-model is a tree of - freemarker.template.TemplateModel objects. The - building of the data-model usually (but not necessary) happens by - automatically wrapping (enclosing) plain Java objects into - TemplateModel objects. The object that does - this wrapping is the object wrapper, and it's specified when you - configure FreeMarker. FreeMarker comes with a few object wrapper - implementations out-of-the-box, and probably the most widely used - of them is freemarker.ext.beans.BeansWrapper. - If you use an instance of this as the object wrapper, then - java.util.Map-s you put into the data-model - will also act as a method, so you can write - myMap(myKey) in the template, that will - internally call Map.get(myKey). There will be - no restriction regarding the type of myKey, as - Map.get(Object key) has no such restriction. If - the value of myKey was wrapped with - BeansWrapper or other object wrapper whose - wrapped objects support unwrapping, or it is given as literal in - the template, then the value will be automatically unwrapped to - plain Java object before the actual invocation of the - Map.get(Object key) method, so it will not be - invoked with TemplateModel-s.

    - -

    But there still will be a problem. Java's - Map is particular about the exact class of the - key, so for numerical keys calculated inside the templates you - will have to cast them to the proper Java type, otherwise the item - will not be found. For example if you use - Integer keys in a Map, then you have to write - ${myMap.get(123?int)}. This is an ugly effect - caused by that FTL's deliberately simplified type system just has - a single numerical type, while Java distinguishes a lot of - numerical types. (Ideally, in the above case, the programmers - ensure that the get method automatically - converts the key to Integer, so it's not the - problem of the template author. This can be done with wrapper - customization, but the wrapper has to know that the particular - Map object uses Integer - keys, which assumes application specific knowledge.) Note that the - casting is not needed when the key value comes directly from the - data-model (i.e. you didn't modified its value with arithmetical - caluclations in the template), including the case when it's the - return value of a method, and it was of the proper class before - wrapping, because then the result of the unwrapping will be of the - original type.

    -
    - - - - -
    - - 14.  - When I list the contents of a map (a hash) with - ?keys/?values, I get the - java.util.Map methods mixed with the real map - entries. Of course, I only want to get the map entries. - -
    - - -
    - -

    Certainly you are using BeansWrapper as - your object wrapper, or a custom subclass of it, and the - simpleMapWrapper property of that is left to - false. Unfortunatelly, it's the default (for - backward compatibility), so you have to explicitly set it to - true where you create the object - wrapper.

    -
    - - - - -
    - - 15.  - How can I modify sequences (lists) and hashes (maps) in - FreeMarker templates? - - - - - - - - - -
    - - -
    - -

    First of all, you may don't want to modify the - sequence/hash, just concatenate (add) two or more of them, which - results in a new sequence/hash, rather than modifying an existing - one. In this case use the sequence - concatenation and hash concatenation - operators. Also, you may use the subsequence - operator instead of removing sequence items. However, be - aware of the performance implications: these operations are fast, - but the hashes/sequences that are the result of many subseqent - applications of these operations (i.e. when you use the result of - the operation as the input of yet another operation, and so on) - will be slow to read.

    - -

    Now if you still want to modify sequences/hashes, then read - on...

    - -

    The FreeMarkes Template Language doesn't support the - modification of sequences/hashes. It's for displaying already - calculated things, not for calculating data. Keep templates - simple. But don't give it up, you will see some advices and tricks - bellow.

    - -

    The best is if you can divide the work between the - data-model builder program and the template so that the template - doesn't need to modify sequences/hashes. Maybe if you rethink your - data-model, you will realize this is possible. But, seldom there - are cases where you need to modify sequences/hashes for some - complex but purely presentation related algorithms. It seldom - happens, so think twice whether that calculation (or parts of it) - rather belongs to the data-model domain than to the presentation - domain. Let's assume you are sure it belongs to the presentation - domain. For example, you want to display a keyword index on some - very smart way, whose algorithm need you to create and write some - sequence variables. Then you should do something like this (ugly - situations has ugly solutions...):

    - -
    -
    -<#assign caculatedResults =
    -    'com.example.foo.SmartKeywordIndexHelper'?new().calculate(keywords)>
    -<#-- some simple algorithms comes here, like: -->
    -<ul>
    -  <#list caculatedResults as kw>
    -    <li><a href="${kw.link}">${kw.word}</a>
    -  </#list>
    -</ul>  
    - - -

    That is, you move out the complex part of the presentation - task from the template into Java code. Note that it doesn't affect - the data-model, so the presentation is still kept separated from - other the other application logic. Of course the drawback is that - for this the template author will need the help of a Java - programmer, but for complex algorithms that's probably needed - anyway.

    - -

    Now, if you still say you need to modify sequences/hashes - directly with the FreeMarker template, here are two solutions, but - please read the warning after them:

    - -
    -
      -
    • -

      You can write a TemplateMethodModelEx - and TemplateDirectiveModel implementation - that can modify certain types of sequences/hashes. Just - certain types, because - TemplateSequenceModel and - TemplateHashModel doesn't have methods for - modification, so you will need the sequence or hash to - implement some additional methods. An example of this solution - can be seen in FMPP. It allows you to do things like this - (pp stores the services provided by FMPP - for templates):

      - -
      -
      -<#assign a = pp.newWritableSequence()>
      -<@pp.add seq=a value="red" />  
      - - -

      The pp.add directive works only with - sequences that were created with - pp.newWritableSequence(). So for example - the template author can't modify a sequence that comes from - the data-model with this.

      -
    • - -
    • -

      A sequence can have some methods/directives if you use a - customized wrapper (so you can <@myList.append foo - />). (Also, if you use - BeansWrapper and configure it so it exposes - the public methods, you can use the Java API for variables - that are for java.util.Map-s and - java.util.List-s. Just like with Apache - Velocity.)

      -
    • -
    - - -

    But beware, these solutions have a problem: The sequence - concatenation, sequence slice - operator (like seq[5..10]) and - ?reverse do not copy the original sequence, - just wraps it (for efficiency), so the resulting sequence will - change if the original sequence is changed later (an abnormal - aliasing effect). The same problem exists with the result of hash concatenation; - it just wraps the two hashes, so the resulting hash will magically - change if you modify the hashes you have added earlier. As a - work-around, after you did the above problematic operations, - either be sure you will not modify the objects that were used as - input, or create a copy of the result with a method provided by - the solution described in above two points (e.g. in FMPP you could - do <#assign b = - pp.newWritableSequence(a[5..10])> and - <#assign c = pp.newWritableHash(hashA + - hashB)>). Of course this is easy to miss... so again, - rather try to build the data-model so you will not need to modify - collections, or use a presentation task helper class as was shown - earlier.

    -
    - - - - -
    - - 16.  - What about null and the FreeMarker - template language? - -
    - - -
    - -

    The FreeMarker template language doesn't know the Java - language null at all. It doesn't have - null keyword, and it can't test if something is - null or not. When it technically faces with a - null, it treats it exactly as a missing - variable. For example, both if x is - null in the data-model and if it's not present - at all, ${x!'missing'} will print ``missing'', - you can't tell the difference. Also, if for example you want to - test if a Java method has returned null, just - write something like <#if - foo.bar()??>.

    - -

    You may interested in the rationale behind this. From the - viewpoint of the presentation layer a null and - non-existent thing is almost always the same. The difference - between this two is usually just a technical detail, which is - rather the result of implementation details than of the - application logic. That you can't compare something to - null (unlike in Java); it doesn't make sense to - compare something with null in a template, - since the template language doesn't do identity comparison (like - the Java == operator when you compare two - objects) but the more common sense value comparison (like Java's - Object.equals(Object); that doesn't work with - null either). And how could FreeMarker tell if - something concrete equals with something that is missing and thus - unknown? Or if two missing (unknown) things are equal? Of course - these questions can't be answered.

    - -

    There is at least one problem with this - null-unaware approach. When you call a Java - method from a template, you may want to pass a - null value as argument (since the method was - designed to be used in Java language, where the concept of - null is known). In this case you can exploit a - bug of FreeMarker (that we will not fix until we provide a correct - solution for passing null values to a method): - if you specify a missing variable as the argument, then it will - not cause an error, but a null will be passed - to the method instead. Like foo.bar(nullArg) - will call the bar method with - null as argument, assuming that there is no - varaible exists with ``nullArg'' name.

    -
    - - - - -
    - - 17.  - How can I use the output of a directive (macro) in - expressions (as a parameter to another directive)? - -
    - - -
    - -

    Capture the output into a variable with the - assign or local directive. - For example:

    - -
    -
    -<#assign capturedOutput><@outputSomething /></#assign>
    -<@otherDirective someParam=capturedOutput />  
    - -
    - - - - -
    - - 18.  - Why do I have ``?''-s in the output instead of character - X? - -
    - - -
    - -

    This is because the character that you want to print can't - be represented with the charset (encoding) used for the - output stream, so the Java platform (not FreeMarker) substitutes - the problematic character with question mark. In general you - should use the same charset for the output as for the template - (use the getEncoding() method of the template - object), or which is even safer, you should always use UTF-8 - charset for the output. The charset used for the output stream is - not decided by FreeMarker, but by you, when you create the - Writer that you pass to the - process method of the template.

    - -

    Example: Here I use UTF-8 charset in a servlet:

    - -
    -
    -...        
    -resp.setContentType("text/html; charset=utf-8");
    -Writer out = resp.getWriter();
    -...
    -t.process(root, out);
    -...  
    - - -

    Note that the question marks (or other substitution - characters) may be produced outside FreeMarker, in which case the - above obviously will not help. For example a bad/missconfigured - database connection or JDBC driver may bring the text already with - substitution characters in it. HTML forms are another potential - source of encoding problems. It's a good idea to print the - numerical code of the characters of the string on various places, - to see where the problem occurs first.

    - -

    You can read more about charsets and FreeMarker here...

    -
    - - - - -
    - - 19.  - How to retrieve values calculated in templates after - template execution done? - -
    - - -
    - -

    First of all, be sure your application is designed well: - templates should display data, and almost never calculate data. If - you are still sure you want to do it, read on...

    - -

    When you use <#assign x = "foo">, - then you do not actually modify the data-model (since that is - read-only, see: Programmer's Guide/Miscellaneous/Multithreading), but - create the x variable in the runtime environment of the processing - (see Programmer's Guide/Miscellaneous/Variables, scopes). The problem is that this - runtime environment will be discarded when - Template.process returns, as it was created for - a single Template.process call:

    - -
    -
    -// internally an Environment will be created, and then discarded
    -myTemplate.process(root, out);  
    - - -

    To prevent this, you can do the below, which is equivalent - with the above, except that you have chance to return the - variables created in the template:

    - -
    -
    -Environment env = myTemplate.createProcessingEnvironment(root, out);
    -env.process();  // process the template
    -TemplateModel x = env.getVariable("x");  // get variable x  
    - -
    - - - - -
    - - 20.  - - - Can I allow users to upload templates and what are the - security implications? - -
    - - -
    - -

    In general you shouldn't allow that, unless those users are - system administrators or other trusted personnel. Consider - templates as part of the source code just like - *.java files are. If you still want to allow - users to upload templates, here are what to consider:

    - -
    -
      -
    • -

      Denial-of-Service (DoS) attacks: It's trivial to create - templates that run practically forever (with a loop), or - exhaust memory (by concatenating to a string in a loop). - FreeMarker can't enforce CPU or memory usage limits, so this - is something that has no solution on the - FreeMarker-level.

      -
    • - -
    • -

      Data-model and wrapping - (Configuration.setObjectWrapper): By - default the data-model gives access to the full public API of - the Java objects that you have put into the data-model (with - some exceptions). To avoid that, you have to construct the - data-model so that it only exposes the things that are - necessary for the template. For that, use - SimpleObjectWrapper and create the - data-model purely from Map-s, - List-s, Array-s, - String-s, Number-s, - Boolean-s and Date-s. - Or, you can implement your own extremely restrictive - ObjectWrapper, which for example could - expose your POJO-s safely.

      -
    • - -
    • -

      Template-loader - (Configuration.setTemplateLoader): - Templates may load other templates by name (by path), like - <#include "../secret.txt">. To avoid - loading sensitive data, you have to use a - TemplateLoader that double-checks that the - file to load is something that should be exposed. FreeMarker - tries to prevent the loading of files outside the template - root directory regardless of template loader, but depending on - the underlying storage mechanism, exploits may exist that - FreeMarker can't consider (like, just as an example, - ~ jumps to the current user's home - directory). Note that - freemarker.cache.FileTemplateLoader checks - the canonical paths, so that's maybe a good candidate for this - task, yet, adding a file extension check (file must be - *.ftl) is maybe a good idea.

      -
    • - -
    • -

      The new built-in - (Configuration.setNewBuiltinClassResolver, - Environment.setNewBuiltinClassResolver): - It's used in templates like - "com.example.SomeClass"?new(), and is - important for FTL libraries that are partially implemented in - Java, but shouldn't be needed in normal templates. While - new will not instantiate classes that are - not TemplateModel-s, FreeMarker contains a - TemplateModel class that can be used to - create arbitrary Java objects. Other "dangerous" - TemplateModel-s can exist in you - class-path. Plus, even if a class doesn't implement - TemplateModel, its static initialization - will be run. To avoid these, you should use a - TemplateClassResolver that restricts the - accessible classes (possibly based on which template asks for - them).

      -
    • -
    - -
    - - - - -
    - - 21.  - How to implement a function or macro in Java Language - instead of in the template language? - -
    - - -
    - -

    It's not possible (yet), but something very similar is - possible if you write a class that implements - freemarker.template.TemplateMethodModelEx or - freemarker.template.TemplateDirectiveModel - respectively, and then where you were write <#function - my - ...>...</#function> - or <#macro my - ...>...</#macro> - you write <#assign my = "your.package.YourClass - "?new()> - instead. Note that using the assign directive - for this works because functions (and methods) and macros are just - plain variables in FreeMarker. (For the same reason you could also - put TemplateMethodModelEx or - TemplateDirectiveModel instances into the - data-model before calling the template, or into the shared - variable map (see: - freemarker.template.Configuration.setSharedVariable(String, - TemplateModel)) when you initialize the - application.)

    -
    - - - - -
    - - 22.  - Why is FreeMarker logging suppressed for my - application? - -
    - - -
    - -

    It's because FreeMarker does not find any logging system. To - fix this, you must make available one of the following logging - systems for your application: SLF4J (recommended), Apache Commons - Logging, Log4J (org.apache.log4j), Avalon - (org.apache.log), or use J2SE 1.4 or later - (that contains java.util.logging). That is, the - class-loader used with your application must find one of the - mentioned classes. Until 2.4, if you want to use SLF4J or Commons - Logging you need to do some extra steps; see here...

    -
    - - - - -
    - - 23.  - In my Servlet - based application, how do I show a nice error page instead of a - stack trace when error occurs during template processing? - -
    - - -
    - -

    First of all, use RETHROW_HANDLER instead - of the default DEBUG_HANDLER (for more - information about template exception handlers read this...). Now - FreeMarker will not print anything to the output when an error - occurs, so the control is in your hands. After you have caught the - exception of - Template.process(...) - basically you can follow two strategies:

    - -
    -
      -
    • -

      Call httpResp.isCommitted(), and if - that returns false, then you call - httpResp.reset() and print a ``nice error - page'' for the visitor. If the return value was - true, then try to finish the page be - printing something that makes clear for the visitor that the - page generation was abruptly interrupted because of an error - on the Web server. You may have to print a lot of redundant - HTML end-tags and set colors and font size to ensure that the - error message will be actually readable in the browser window - (check the source code of the - HTML_DEBUG_HANDLER in - src\freemarker\template\TemplateException.java - to see an example).

      -
    • - -
    • -

      Use full page buffering. This means that the - Writer doesn't send the output to the - client progressively, but buffers the whole page in the - memory. Since you provide the Writer - instance for the - Template.process(...) - method, this is your responsibility, FreeMarker has nothing to - do with it. For example, you may use a - StringWriter, and if - Template.process(...) - returns by throwing an exception, then ignore the content - accumulated by the StringWriter, and send - an error page instead, otherwise you print the content of - StringWriter to the output. With this - method you surely don't have to deal with partially sent - pages, but it can have negative performance implications - depending on the characteristic of the pages (for example, the - user will experience more response delay for a long page that - is generated slowly, also the server will consume more RAM). - Note that using a StringWriter is surely - not the most efficient solution, as it often reallocates its - buffer as the accumulated content grows.

      -
    • -
    - -
    - - - - -
    - - 24.  - I'm using a visual HTML editor that mangles template tags. - Will you change the template language syntax to accommodate my - editor? - -
    - - -
    - -

    We won't change the standard version, because a lot of - templates depend on it.

    - -

    Our view is that the editors that break template code are - themselves broken. A good editor should ignore, not mangle, what - it doesn't understand.

    - -

    You maybe interested in that starting from FreeMarker 2.3.4 - you can use [ and ] instead - of < and >. For more - details read - this...

    -
    - - - - -
    - - 25.  - How fast is FreeMarker? Is it true that 2.x is slower than - 1.x (FreeMarker classic)? - -
    - - -
    - -

    First of all, don't forget that FreeMarker is only the view - rendering component in an MVC - system. Furthermore MVC templates tend to be simple: many static - text with a few interpolations and loops and conditional block. So - it is not like PHP or Model 1 JSP; your application performance is - not affected that much by the execution time of templates.

    - -

    FreeMarker is certainly fast enough that it will only very - rarely be a bottleneck in your application. Rather, other factors - such as the speed of the data-base operations or network bandwidth - will likely dominate. The impact of FreeMarker performance could - be noticeable only for really busy sites (say, over 30 hits per - second per server), where almost all database data is cached. If - you are finding FreeMarker slow, do make sure that the cache of - parsed templates works well - (Configuration.getTemplate be default uses - caching). Parsing a template file is a relatively costly step; in - most long-running server-side applications, you will want to parse - a template once and have it be used many times. (Note that - FreeMarker 2.1.4 and earlier versions have bugs that sometimes can - ruin caching.)

    - -

    FreeMarker 2.1 is slower than 1.7.1. This surely depends on - your templates, but it could be slower by a factor of 2 or 3. But - again, it does not means that response time will be 2 or 3 times - slower; most FreeMarker user simply should not be able to perceive - the change in the final response time.

    -
    - - - - -
    - - 26.  - How can my Java classes ask a template for information about - its structure (e.g. a list of all the variables)? - -
    - - -
    - -

    In FreeMarker 2.2, Template has an - undocumented method for examining the parsed template: - getRootTreeNode.

    - -

    But listing all accessed variables is not possible, because - variable names can be dynamically generated from data. However, - there's a more important reason why FreeMarker doesn't support - this. The design of FreeMarker is based on the idea of a - separation between business objects and presentation objects. This - separation takes two forms:

    - -
      -
    1. -

      The templates know what data to expect, but they don't - know how it's generated.

      -
    2. - -
    3. -

      The business objects know what data to produce, but they - don't know how it's going to be displayed. Therefore, they - don't know anything about templates.

      -
    4. -
    - -

    Since the business objects don't rely on the templates, if - you need to use them with some other presentation system, you - won't have to rewrite your application.

    -
    - - - - -
    - - 27.  - Will you ever provide backward compatibility? - -
    - - -
    - -

    FreeMarker 2.0 was a complete rewrite of FreeMarker 1.x, by - a new author. The 1.x series continues as separated project: - FreeMarker Classic. Since 2.x follows different philosophy than - 1.x, 2.0x releases were immature despite the high major version - number. This caused further radical changes between 2.01 and 2.1. - As of 2.1 things were much more matured, and 2.2 is almost - backward compatible with 2.1. We hope that this tendency - continues.

    - -

    Currently, the rule is that releases with different second - version number (as 2.1.x and 2.2.x) are not (fully) compatible. - Releases where only the third version number differs (as 2.2.1 and - 2.2.6) are compatible.

    - -

    We always provide backward compatible bugfix releases for - the released versions. So basically, you don't - have to switch to a new, non-backward - compatible release in an already written product. It's a something - for something situation... FreeMarker recovers faster from design - mistakes than many other projects, but the price of this is that - major releases are not backward compatible. This is admittedly not - optimal, it would be better if there are fewer design mistakes... - but, well, it is the reality.

    -
    - - - - -
    - - 28.  - If we distribute FreeMarker with our product, do we have to - release the source code for our product? - -
    - - -
    - -

    No. As of 2.0, FreeMarker is released under a BSD-style - license. This means that source or binary distributions may be - made freely, and can be included in other products, whether - commercial or open source.

    - -

    The only restrictions apply to the copyright of FreeMarker - itself, and the use of FreeMarker or its contributors as - endorsements of your own product. See the LICENSE for further details.

    - -

    If you use FreeMarker, we hope you'll send us a link to some - information about your product, but that's optional as - well.

    -
    - - - -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/app_install.html b/fmpp/docs/freemarker/app_install.html deleted file mode 100644 index 354365b..0000000 --- a/fmpp/docs/freemarker/app_install.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - FreeMarker Manual - Installing FreeMarker - - - - - - - - -
    - - - - - -

    -Appendix C   Installing FreeMarker

    - - -

    No real installation is needed. Simply ensure that - freemarker.jar is somewhere where your Java - application's class-loader will find it. In web application this usually - means putting freemarker.jar into the - WEB-INF/lib directory of your web application. (If - you want to use FreeMarker with JSP Model-2 style (which also means that - you can use custom JSP taglibs in the templates), some extra steps - needed. For more information please see the chapter about servlets.)

    FreeMarker has no required dependencies. But to use certain - optional FreeMarker features, the related party - libraries have to be available for the class-loader:

    -
      -
    • -

      Jaxen (recommended, download here) or Apache Xalan - is needed for XML XPath support. Please use at least Jaxen - 1.1-beta-8, not older versions! Apache Xalan classes are included in - a package-relocated form in Sun/Oracle J2SE 1.4-1.8 (maybe later - too), and FreeMarker will use those if it doesn't find Jaxen or - Xalan elsewhere. But as Oracle can change these internal packages - anytime, it's still recommended to use an external Jaxen or - Xalan.

      -
    • - -
    • -

      Obviously, javax.servlet classes are needed - for FreemarkerServlet. Servlet version 2.2 or - later is needed.

      -
    • - -
    • -

      For the custom JSP taglib support, you will need JSP 1.2 API - or later avilable. No JSP implementation is needed, just the API. - This is already present in pretty much every servlet container. For - more information please see the - chapter about servlets.

      -
    • - -
    • -

      Jython classes are needed for the Jython wrapper.

      -
    • - -
    • -

      Pre-1.0 JDOM is needed for the long deprecated - freemarker.ext.jdom package. (When it was - created, there was no JDOM 1.0 yet.)

      -
    • -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/app_legal.html b/fmpp/docs/freemarker/app_legal.html deleted file mode 100644 index d99dadf..0000000 --- a/fmpp/docs/freemarker/app_legal.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - FreeMarker Manual - Legal - - - - - - - - -
    - - - - - -

    -Appendix D   Legal

    - -
    -

    - - Appendix Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/app_license.html b/fmpp/docs/freemarker/app_license.html deleted file mode 100644 index 09e66c1..0000000 --- a/fmpp/docs/freemarker/app_license.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - FreeMarker Manual - License - - - - - - - - -
    - - - - - -

    -License

    - - -
    -
    -Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky
    -
    -Licensed under the Apache License, Version 2.0 (the "License");
    -you may not use this file except in compliance with the License.
    -You may obtain a copy of the License at
    -
    -http://www.apache.org/licenses/LICENSE-2.0
    -
    -Unless required by applicable law or agreed to in writing, software
    -distributed under the License is distributed on an "AS IS" BASIS,
    -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -See the License for the specific language governing permissions and
    -limitations under the License.
    -
    -==============================================================================
    -END LICENSE
    -
    -
    -FreeMarker subcomponents with different copyright owners
    ---------------------------------------------------------
    -
    -FreeMarker, both in its source code and binary form (freemarker.jar)
    -includes a number of files that are licensed by the Apache Software
    -Foundation under the Apache License, Version 2.0. This is the same
    -license as the license of FreeMaker, but the copyright owner is the
    -Apache Software Foundation. These files are:
    -  
    -    freemarker/ext/jsp/web-app_2_2.dtd
    -    freemarker/ext/jsp/web-app_2_3.dtd
    -    freemarker/ext/jsp/web-app_2_4.xsd
    -    freemarker/ext/jsp/web-app_2_5.xsd
    -    freemarker/ext/jsp/web-jsptaglibrary_1_1.dtd
    -    freemarker/ext/jsp/web-jsptaglibrary_1_2.dtd
    -    freemarker/ext/jsp/web-jsptaglibrary_2_0.xsd
    -    freemarker/ext/jsp/web-jsptaglibrary_2_1.xsd
    -
    -
    -Historical notes
    -----------------
    -
    -FreeMarker 1.x was released under the LGPL license. Later, by
    -community consensus, we have switched over to a BSD-style license. As
    -of FreeMarker 2.2pre1, the original author, Benjamin Geer, has
    -relinquished the copyright in behalf of Visigoth Software Society.
    -
    -With FreeMarker 2.3.21 the license has changed to Apache License,
    -Version 2.0, and the owner has changed from Visigoth Software Society
    -to three of the FreeMarker 2.X developers, Attila Szegedi, Daniel
    -Dekany, and Jonathan Revusky.  
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/app_versions.html b/fmpp/docs/freemarker/app_versions.html deleted file mode 100644 index ba45bcc..0000000 --- a/fmpp/docs/freemarker/app_versions.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - FreeMarker Manual - Version history - - - - - - - - -
    - - - - - -

    -Appendix B   Version history

    - -
    -

    - - Appendix Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/detailed-toc.html b/fmpp/docs/freemarker/detailed-toc.html deleted file mode 100644 index a079c74..0000000 --- a/fmpp/docs/freemarker/detailed-toc.html +++ /dev/null @@ -1,1989 +0,0 @@ - - - - - - - - FreeMarker Manual - - - - - - - - -
    - -
    -

    - - Detailed Table of Contents - -  [Show simplified...]

    - - -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui.html b/fmpp/docs/freemarker/dgui.html deleted file mode 100644 index 01d620a..0000000 --- a/fmpp/docs/freemarker/dgui.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - FreeMarker Manual - Template Author's Guide - - - - - - - - -
    - - - - - -

    -Part I   Template Author's Guide

    - -
    -

    - - Part Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_datamodel.html b/fmpp/docs/freemarker/dgui_datamodel.html deleted file mode 100644 index 5d8801e..0000000 --- a/fmpp/docs/freemarker/dgui_datamodel.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - FreeMarker Manual - Values, Types - - - - - - - - -
    - - - - - -

    -Chapter 2   Values, Types

    - -
    -

    - - Chapter Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_datamodel_basics.html b/fmpp/docs/freemarker/dgui_datamodel_basics.html deleted file mode 100644 index c3d7b2e..0000000 --- a/fmpp/docs/freemarker/dgui_datamodel_basics.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - FreeMarker Manual - Basics - - - - - - - - -
    - - - - - -

    -Basics

    - -
    -

    - - Page Contents - -

    - - -
    - - -
    -

    Note

    - -

    It is assumed that you have already read the Getting Started chapter.

    -
    -

    Understanding the concept of values and types is crucial for the - understanding of data-models. However, the concept of values and types - is not confined to data-models, as you will see.

    - - - - -

    -What is a value?

    - - - - -

    Real programmers can safely skip - this section.

    - -

    Examples of values as you know the term - from the everyday math are 16, 0.5, and so on, i.e. numbers. In the - case of computer languages the value term has a wider meaning, as a - value needn't be a number. For example, take this data-model:

    - -
    -
    -(root)
    - |
    - +- user = "Big Joe"
    - |
    - +- today = Jul 6, 2007
    - |
    - +- todayHoliday = false
    - |
    - +- lotteryNumbers
    - |   |
    - |   +- (1st) = 20
    - |   |
    - |   +- (2st) = 14
    - |   |
    - |   +- (3rd) = 42
    - |   |
    - |   +- (4th) = 8
    - |   |
    - |   +- (5th) = 15
    - |
    - +- cargo
    -     |
    -     +- name = "coal"
    -     |
    -     +- weight = 40  
    - - -

    We say that the value of the the - user variable is "Big Joe" (a string), the - value of today is Jul 6, - 2007 (a date), the value of - todayHoliday is false (a boolean, ie. a yes/no - thing). The value of - lotteryNumbers is the sequence that contains 20, - 14, 42, 8, 15. Surely lotteryNumbers is multiple - values in the sense that it contains multiple - values (for example, the 2nd item in it is a the - value 14), but still, - lotteryNumbers itself is a single value. It's - like a box that contains many other items; the whole box can be seen - as a single item. Last not least we also have the - value of cargo, which is a - hash (a box-like thing again).So, a value is something that can be - stored in a variable (e.g., in user or - cargo or cargo.name). But a - value need not be stored in a variable to be called a value, for - example we have the value 100 here:

    - -
    -
    -<#if cargo.weight < 100>Light cargo</#if>  
    - - -

    The temporaly result of a calculations are also called values, - like 20 and 120 when this template is executed (it will print - 120):

    - -
    -
    -${cargo.weight / 2 + 100}  
    - - -

    Explanation for this last: As the result of dividing the two - values, 40 (the weight of the cargo) and 2, a new value 20 is - created. Then 100 is added to it, so the value 120 is created. Then - 120 is printed - (${...}), and the - template execution goes on and all these values gone.

    - -

    Certainly now you feel what the value term means.

    - - - - - -

    -What is type?

    - - -

    Values have an important aspect, their type. For example the - type of the value of the user variable is string, - and the type of the value of the lotteryNumbers - variable is sequence. The type of a value is important because it - determines to a large extent how and where you can use the value. - Like ${user / 2} is an error, but - ${cargo.weight / 2} works and prints 20, since - division only does make sense for a number, but not for a string. - Or, using dot like in cargo.name does make sense - only if cargo is a hash. Or, you can list with - <#list ...> - sequences only. Or, the condition of <#if - ...> must be a boolean. And so on.

    - -
    -

    Note

    - -

    A little terminology... Saying "a boolean" or "a boolean - value" or "a value of type boolean" are all the same.

    -
    - - -

    A value can have multiple types at the same time, - although it's rarely utilized. For example in the data-model below - mouse is both a string and a hash:

    - -
    -
    -(root)
    - |
    - +- mouse = "Yerri"
    -     |
    -     +- age = 12
    -     |
    -     +- color = "brown"  
    - - -

    If you merge this template with the above data-model:

    - -
    -
    -${mouse}       <#-- uses mouse as a string -->
    -${mouse.age}   <#-- uses mouse as a hash -->
    -${mouse.color} <#-- uses mouse as a hash -->  
    - - -

    the output will be:

    - -
    -
    -Yerri
    -12
    -brown  
    - - - - - - -

    -The data-model is a hash

    - - -

    Looking at the various data-model examples you may already - realized: the thing marked as "(root)" is just a value of type hash. - When you write something like user, that means - that you want the "user" variable stored in the root hash. Like if - you were writing root.user, except that there is - no variable called "root" so that wouldn't work.

    - -

    Some may get confused by the fact that our example data-model, - that is, the root hash, contains further hashes and sequences - (lotteryNumbers and cargo). - There is nothing special in that. A hash contains other variables, - and those variables have a value, which can be a string, a number, - etc., and of course it can be a hash or sequence as well. Because, - as it was explained earlier, a sequence or a hash is just a value, - like a string or a number is.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_datamodel_types.html b/fmpp/docs/freemarker/dgui_datamodel_types.html deleted file mode 100644 index 251ccff..0000000 --- a/fmpp/docs/freemarker/dgui_datamodel_types.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - - - FreeMarker Manual - The types - - - - - - - - -
    - - - - - -

    -The types

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    The suppored types are:

    -
    - - - - - -

    -Scalars

    - - - - -

    These are the basic, simple kind of values. They can - be:

    - -
    -
      -
    • -

      String: It is simple text, e.g., the name of a - product.

      - -

      If you want to give a string value directly in the - template, rather than use a variable that comes from the data - model, you write the text between quotation marks, e.g., - "green mouse" or 'green - mouse'. (More details regarding the syntax can be - found later.)

      -
    • - -
    • -

      Number: For example the price of a product. - Whole numbers and non-whole - numbers are not distinguished; there is only a single number - type. So for example 3/2 will be always 1.5, and never 1. Just - like if you are using a calculator.

      - -

      If you want to give a numerical value directly in the - template, then you write for example: 150 or - -90.05 or 0.001. (More - details regarding the syntax can be found later.)

      -
    • - -
    • -

      Boolean: A boolean value represents a logical true - or false (yes or no). For example, if a the visitor has been - logged in or not. Typically you use booleans as the condition of - the if directive, like <#if - loggedIn - >...</#if> or - <#if price == - 0>...</#if>; in - the last case the result of the price == 0 - part is a boolean value.

      - -

      In the templates you can directly specify a boolean with - the reserved words true and - false.

      -
    • - -
    • -

      Date: A date-like value stores date/time related - data. It has three variations:

      - -
      -
        -
      • -

        Date: Like April 4, 2003. Day precision, no time of - day part.

        -
      • - -
      • -

        Time: Like 10:19:18 PM. Millisecond precision, no date - part.

        -
      • - -
      • -

        Date-time (sometimes called "time stamp") as April 4, - 2003 10:19:18 PM. Both date and time, with millisecond - precision.

        -
      • -
      - - -

      Unfortunately, because of the limitations of the Java - platform, FreeMarker sometimes can't decide which parts of the - date are in use (i.e., if it is date-time, a date or a time). - The solution for this problem is an advanced topic that will be - discussed later.

      - -

      It is possible to define date-like values directly in - templates, but this is an advanced topic that will be explained - later.

      -
    • -
    - - -

    Bear in mind that FreeMarker distinguishes strings from - numbers, booleans and date-like values. For example, while the - string "150" looks like the number - 150, a string is still just arbitrary sequence of - characters, and you can't do arithmetic with it, can't compare it - with another number, etc.

    - - - - - -

    -Containers

    - - - - -

    These are the values whose purpose is to contain other - variables; they are just containers. The contained variables are - often referred as subvariables. The container - types are:

    - -
    -
      -
    • -

      Hash: Associates a unique lookup name with each of - its subvariables. The name is an unrestricted string. A hash - doesn't define an ordering for the - subvariables in it. That is, there is no such thing as the first - subvariable, and the second subvariable, etc.; the variables are - just accessed by name.

      -
    • - -
    • -

      Sequence: Associates an integer number with each - of its subvariables. The first subvariable is associated with 0, - the second with 1, the third to 2, and so on; the subvariables - are ordered. These numbers are often called the - indexes of the subvariables. Sequences are - usually dense, i.e., all indexes up to the index of the last - subvariable have an associated subvariable, but it's not - strictly necessary. The type of the subvariable values need not - be the same.

      -
    • - -
    • -

      Collection: A collection, from the viewpoint of - the template author, is a restricted sequence. You cannot access - its size or retrieve its subvariables by index, but they can be - still listed with the list - directive.

      -
    • -
    - - -

    Note that since a value can - have multiple types, it is possible for a value to be both a - hash and a sequence, in which case it would support index-based - access as well as access by lookup name. However, typically a - container will be either a hash or a sequence, not both.

    - -

    As the value of the variables stored in hashes and sequences - (and collections) can be anything, it can be a hash or sequence (or - collection) as well. This way you can build arbitrarily deep - structures.

    - -

    The data-model itself (or better said the root of it) is a - hash.

    - - - - - -

    -Subroutines

    - - - - - - - -

    -Methods and functions

    - - - - - - -

    A value that is a method or a function is used to calculate - another value, influenced by the parameters you give to it.

    - -

    For programmer types: - Methods/functions are first-class values, just like in functional - programming languages. This means that functions/methods can be - the parameters or return values of other functions/methods, you - can assign them to variables, and so on.

    - -

    Suppose that programmers have put the method variable - avg in the data-model that can be used to - calculate the average of numbers. If you give the 3 and 5 as - parameters when you access avg, then you get - the value 4.

    - -

    The usage of methods will be explained later, but perhaps - this example helps to understand what methods are:

    - -
    -
    -The average of 3 and 5 is: ${avg(3, 5)}
    -The average of 6 and 10 and 20 is: ${avg(6, 10, 20)}
    -The average of the price of a python and an elephant is:
    -${avg(animals.python.price, animals.elephant.price)}  
    - - -

    this will output:

    - -
    -
    -The average of 3 and 5 is: 4
    -The average of 6 and 10 and 20 is: 12
    -The average of the price of a python and an elephant is:
    -4999.5  
    - - -

    What is the difference between a method and a function? As - far as the template author is concerned, nothing. Well not really - nothing, as methods typically come from the data-model (as they reflect the methods of Java - objects), and functions are defined in templates (with - the function - directive -- an advanced topic), but both can be used on - the same way.

    - - - - - - - -

    -User-defined directives

    - - - - - - - - -

    A value of this type can be used as user-defined directive - (with other words, as FreeMarker tag). An user-defined directive - is a subroutine, something like a little reusable template - fragment. But this is an advanced topic that will be explained - later in its own - chapter.

    - -

    For programmer types: - user-defined directives (such as macros), are first-class values - too, just like functions/methods are.

    - -

    Just to get an idea about user-defined directives (so just - ignore this if you won't understand), assume we have a variable, - box, whose value is a user-defined directive - that prints some kind of fancy HTML message box with a title bar - and a message in it. The box variable could be - used in the template like this (for example):

    - -
    -
    -<@box title="Attention!">
    -  Too much copy-pasting may leads to
    -  maintenance headaches.
    -</@box 
    - - - - - - - - -

    -Function/method versus user-defined directive

    - - -

    This is for advanced users again (so ignore it if you don't - understand). It's a frequent dilemma if you should use a - function/method or an user-defined directive to implement - something. The rule of thumb is: Implement the facility as - user-defined directive instead of as function/method if:

    - -
    -
      -
    • -

      ... the output (the return value) is markup (HTML, XML, - etc.). The main reason is that the result of functions are - subject to automatic XML-escaping (due to the nature of - ${...}), while - the output of user-defined directives are not (due to the - nature of - <@...>; - its output is assumed to be markup, and hence already - escaped).

      -
    • - -
    • -

      ... it's the side-effect that is important and not the - return value. For example, a directive whose purpose is to add - an entry to the server log is like that. (In fact you can't - have a return value for a user-defined directive, but some - kind of feedback is still possible by setting non-local - variables.)

      -
    • - -
    • -

      ... it will do flow control (like for example - list or if directives - do). You just can't do that with a function/method - anyway.

      -
    • -
    - - -

    The Java methods of FreeMarker-unaware Java objects are - normally visible as methods in templates, regardless of the nature - of the Java method. That said, you have no choice there.

    - - - - - - -

    -Miscellaneous

    - - - - - - - -

    -Nodes

    - - - - -

    Node variables represent a node in a tree structure, and are - used mostly with XML processing, which - is an advanced, and specialized topic.

    - -

    Still, a quick overview for advanced - users: A node is similar to a sequence that stores - other nodes, which are often referred as the children nodes. A - node stores a reference to its container node, which is often - referred as the parent node. The main point of being a node is the - topological information; other data must be stored by utilizing - that a value can have multiple types. Like, a value may be both a - node and a number, in which case it can store a number as the - "pay-load". Apart from the topological information, a node can - store some metainformation as well: a node name, a node type - (string), and a node namespace (string). For example, if the node - symbolizes a h1 element in an XHTML document, - then its name could be "h1", it's node type - could be "element", and it's namespace could be - "http://www.w3.org/1999/xhtml". But it's up to - the designer of the data-model if what meaning these - metainformations have, and if they are used at all. The way of - retrieving the topological and metainformations is described in a later chapter (that you - don't have to understand at this point).

    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_misc.html b/fmpp/docs/freemarker/dgui_misc.html deleted file mode 100644 index 927a719..0000000 --- a/fmpp/docs/freemarker/dgui_misc.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - FreeMarker Manual - Miscellaneous - - - - - - - - -
    - - - - - -

    -Chapter 4   Miscellaneous

    - - - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_misc_alternativesyntax.html b/fmpp/docs/freemarker/dgui_misc_alternativesyntax.html deleted file mode 100644 index 4cc41e8..0000000 --- a/fmpp/docs/freemarker/dgui_misc_alternativesyntax.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - FreeMarker Manual - Alternative (square bracket) syntax - - - - - - - - -
    - - - - - -

    -Alternative (square bracket) syntax

    - - -
    -

    Note

    - -

    This feature exists since FreeMarker 2.3.4.

    -
    -

    FreeMarker supports an alternative syntax, where - [ and ] is used instead of - < and > in FreeMarker - directives and comments, for example:

    -
      -
    • - Calling predefined directive: [#list animals as - animal]...[/#list] -
    • - -
    • - Calling user-defined directive: [@myMacro - /] -
    • - -
    • - Comment: [#-- the comment --] -
    • -
    -

    To use the alternative syntax instead of the default one, start - the template with the ftl directive - using the alternative syntax. If you don't know what is the - ftl directive, just start the template with - [#ftl], and remember that it should be the very - first thing in the file (except that white-space can precede it). For - example, this is how the last example of the Getting Started looks with - the alternative syntax (assuming it's a complete template, not just a - fragment):

    -
    -[#ftl]
    -<p>We have these animals:
    -<table border=1>
    -  <tr><th>Name<th>Price
    -  [#list animals as animal]
    -  <tr>
    -    <td>
    -      [#if animal.size = "large"]<b>[/#if]
    -      ${animal.name}
    -      [#if animal.size = "large"]</b>[/#if]
    -    <td>${animal.price} Euros
    -  [/#list]
    -</table>  
    -

    The alternative (square bracket) and the default (angle bracket) - syntax are mutually exclusive within a template. That is, either the - whole template uses alternative syntax, or the whole template uses the - default syntax. If the template uses alternative syntax, things like - <#if ...> are - count as static text, not as FTL tags. Similarly, if the template uses - the default syntax, things like [#if - ...] count as static text, not as - FTL tags.

    If you start the file with [#ftl - ...] (where the - ... stands for the - optional parameters; of course [#ftl] works too) - the file will surely use the alternative (square bracket) syntax. If - you start the file with <#ftl - ...> the file will surely use - the normal (angle bracket) syntax. If there is no - ftl directive in the file, then the programmer - decides what the syntax will be by configuring FreeMarker (programmers see - Configuration.setTagSyntax(int) in the API - javadocs). Most probably the programmers use the factory - default however. The factory default in 2.3.x is using the normal - syntax. The factory default in 2.4.x will be auto-detection, which - means that the first FreeMarker tag determines the syntax (it can be - anything, not just ftl).

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_misc_namespace.html b/fmpp/docs/freemarker/dgui_misc_namespace.html deleted file mode 100644 index 2137894..0000000 --- a/fmpp/docs/freemarker/dgui_misc_namespace.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - FreeMarker Manual - Namespaces - - - - - - - - -
    - - - - - -

    -Namespaces

    - - - - -

    When you run FTL templates, you have a (possibly empty) set of - variables that you have created with assign and - macro directives, as can be seen from the previous chapter. A set of variables - like this is called a namespace. In - simple cases you use only one namespace, the so-called main namespace. You don't realize this, since - normally you use only this namespace.

    But if you want to build reusable collection of macros, - functions and other variables -- usually referred as library by lingo -- the usage of multiple - namespaces becomes inevitable. Just consider if you have a big - collection of macros, that you use in several projects, or even you - want to share it with other people. It becomes impossible to be sure - that the library does not have a macro (or other variable) with the - same name as the name of a variable in the data-model, or with the - same name as a the name of a variable in another library used in the - template. In general, variables can clobber each other because of the - name clashes. So you should use a separate namespace for the variables - of each library.

    - - - - -

    -Creating a library

    - - -

    Let's create a simple library. Assume you commonly need the - variables copyright and mail - (before you ask, macros are variables):

    - -
    -
    -<#macro copyright date>
    -  <p>Copyright (C) ${date} Julia Smith. All rights reserved.</p>
    -</#macro>
    -
    -<#assign mail = "jsmith@acme.com">  
    - - -

    Store the above in the file lib/my_test.ftl - (in the directory where you store the templates). Assume you want to - use this in aWebPage.ftl. If you use - <#include "/lib/my_test.ftl"> in the - aWebPage.ftl, then it will create the two - variables in the main namespace, and it is not good now, since you - want them to be in a namespace that is used exclusively by the ``My - Test Library''. Instead of include you have to - use import - directive. This directive is, at the first glance, similar to - include, but it will create an empty namespace - for lib/my_test.ftl and will execute that there. - lib/my_test.ftl will find itself in an clean new - world, where only the variables of data-model are present (since - they are visible from everywhere), and will create the two variables - in this new world. That's fine for now, but you want to access the - two variables from aWebPage.ftl, and that uses - the main namespace, so it can't see the variables of the other - namespace. The solution is that the import - directive not only creates the new namespace, but a new hash - variable in the namespace used by the caller of - import (the main namespace in this case), that - will act as a gate into the newly created namespace. So this is how - aWebPage.ftl will look like:

    - -
    -
    -<#import "/lib/my_test.ftl" as my> <#-- the hash called "my" will be the "gate" -->
    -<@my.copyright date="1999-2002"/>
    -${my.mail}  
    - - -

    Note how it accesses the variables in the namespace created - for /lib/my_test.ftl using the newly created - namespace accessing hash, my. This will - print:

    - -
    -
    -  <p>Copyright (C) 1999-2002 Julia Smith. All rights reserved.</p>
    -jsmith@acme.com  
    - - -

    If you would have a variable called mail or - copyright in the main namespace, that would not - cause any confusion, since the two templates use separated - namespaces. For example, modify the copyright - macro in lib/my_test.ftl to this:

    - -
    -
    -<#macro copyright date>
    -  <p>Copyright (C) ${date} Julia Smith. All rights reserved.
    -  <br>Email: ${mail}</p>
    -</#macro>  
    - - -

    and then replace aWebPage.ftl with - this:

    - -
    -
    -<#import "/lib/my_test.ftl" as my>
    -<#assign mail="fred@acme.com">
    -<@my.copyright date="1999-2002"/>
    -${my.mail}
    -${mail}  
    - - -

    and the output will be this:

    - -
    -
    -  <p>Copyright (C) 1999-2002 Julia Smith. All rights reserved.
    -  <br>Email: jsmith@acme.com</p>
    -jsmith@acme.com
    -fred@acme.com  
    - - -

    This is like that because when you have called the - copyright macro, FreeMarker has temporarily - switch to the namespace that was created by the - import directive for - /lib/my_test.ftl. Thus, the - copyright macro always sees the - mail variable that exists there, and not the - other mail that exists in the main - namespace.

    - - - - - -

    -Writing the variables of imported namespaces

    - - -

    Occasionally you may want to create or replace a variable in - an imported namespace. You can do this with the - assign directive, if you use its - namespace parameter. For example, this:

    - -
    -
    -<#import "/lib/my_test.ftl" as my>
    -${my.mail}
    -<#assign mail="jsmith@other.com" in my>
    -${my.mail}  
    - - -

    will output this:

    - -
    -
    -jsmith@acme.com
    -jsmith@other.com  
    - - - - - - -

    -Namespaces and data-model

    - - -

    The variables of the data-model are visible from everywhere. - For example, if you have a variable called user - in the data-model, lib/my_test.ftl will access - that, exactly as aWebPage.ftl does:

    - -
    -
    -<#macro copyright date>
    -  <p>Copyright (C) ${date} ${user}. All rights reserved.</p>
    -</#macro>
    -
    -<#assign mail = "${user}@acme.com">  
    - - -

    If user is ``Fred'', then the usual - example:

    - -
    -
    -<#import "/lib/my_test.ftl" as my>
    -<@my.copyright date="1999-2002"/>
    -${my.mail}  
    - - -

    will print this:

    - -
    -
    -  <p>Copyright (C) 1999-2002 Fred. All rights reserved.</p>
    -Fred@acme.com  
    - - -

    Don't forget that the variables in the namespace (the - variables you create with assign or - macro directives) have precedence over the - variables of the data-model when you are in that namespace. Thus, - the contents of data-model does not interfere with the variables - created by the library.

    - -
    -

    Note

    - -

    In some unusual applications you want to create variables in - the template those are visible from all namespaces, exactly like - the variables of the data-model. But you can't change the - data-model with templates. Still, it is possible to achieve - similar result with the global directive; read - the reference for more - details.

    -
    - - - - - - -

    -The life-cycle of namespaces

    - - -

    A namespace is identified by the path that was used with the - import directive. If you try to - import with the same path for multiple times, it - will create the namespace and run the template specified by the path - for the very first invocation of import only. The - later imports with the same path will just create - a ``gate'' hash to the same namespace. For example, let this be the - aWebPage.ftl:

    - -
    -
    -<#import "/lib/my_test.ftl" as my>
    -<#import "/lib/my_test.ftl" as foo>
    -<#import "/lib/my_test.ftl" as bar>
    -${my.mail}, ${foo.mail}, ${bar.mail}
    -<#assign mail="jsmith@other.com" in my>
    -${my.mail}, ${foo.mail}, ${bar.mail}  
    - - -

    The output will be:

    - -
    -
    -jsmith@acme.com, jsmith@acme.com, jsmith@acme.com
    -jsmith@other.com, jsmith@other.com, jsmith@other.com  
    - - -

    since you see the same namespace through - my, foo and - bar.

    - -

    Note that namespaces are not hierarchical, they exist - independently of each other. That is, if you - import namespace N2 while you are in name space - N1, N2 will not be inside N1. N1 just gets a hash by which it can - access N2. This is the same N2 namespace that you would access if, - say, you import N2 when you are in the main - namespace.

    - -

    Each template - processing job has its own private set of namespaces. Each - template-processing job is a separated cosmos that exists only for - the short period of time while the given page is rendered, and then - it vanishes with all its populated namespaces. Thus, whenever we say - that ``import is called for the first time'' and - such, we are always talking in the context of a single template - processing job.

    - - - - - -

    -Writing libraries for other people

    - - - - -

    If you have written a good quality library that can be useful - for other people, you may want to make it available on the Internet - (like on http://freemarker.org/libraries.html). - To prevent clashes with the names of libraries used by other - authors, and to make it easy to write libraries that import other - published libraries, there is a de-facto standard that specifies the - format of library paths. The standard is that the library must be - available (importable) for templates and other libraries with a path - like this:

    - -

    /lib/yourcompany.com/your_library.ftl

    - -

    For example if you work for Example Inc. that owns the - www.example.com homepage, and you develop a widget library, then the - path of the FTL file to import should be:

    - -

    /lib/example.com/widget.ftl

    - -

    Note that the www is omitted. The part after the 3rd slash can - contain subdirectories such as:

    - -

    /lib/example.com/commons/string.ftl

    - -

    An important rule is that the path should not contain - upper-case letters. To separate words, use _, as - in wml_form (not - wmlForm).

    - -

    Note that if you do not develop the library for a company or - organization, you should use the URL of the project homepage, such - as /lib/example.sourceforge.net/example.ftl, or - /lib/geocities.com/jsmith/example.ftl.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_misc_userdefdir.html b/fmpp/docs/freemarker/dgui_misc_userdefdir.html deleted file mode 100644 index e73eaf7..0000000 --- a/fmpp/docs/freemarker/dgui_misc_userdefdir.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - - - - - FreeMarker Manual - Defining your own directives - - - - - - - - -
    - - - - - -

    -Defining your own directives

    - - - - -

    As far as template authors are concerned, user-defined - directives can be defined using the macro - directive. Java programmers who want to - implement directives in Java Language, rather than in a template, - should use - freemarker.template.TemplateDirectiveModel (see - more - here...).

    - - - - -

    -Basics

    - - - - -

    A macro is a template fragment associated with a variable. You - can use that variable in your template as a user-defined directive, - so it helps in repetitive tasks. For example, this creates a macro - variable that prints a big ``Hello Joe!'':

    - -
    -
    -<#macro greet>
    -  <font size="+2">Hello Joe!</font>
    -</#macro>  
    - - -

    The macro directive itself does not print - anything; it just creates the macro variable, so there will be a - variable called greet. Things between the - <#macro greet> and - </#macro> (called macro definition body) will be executed only - when you use the variable as directive. You use user-defined - directives by writing @ instead of - # in the FTL tag. Use the variable name as the - directive name. Also, the end-tag for user-defined directives is - mandatory. So you use greet like this:

    - -
    -
    -<@greet></@greet>  
    - - -

    But since - <anything></anything> - is equivalent with - <anything/> you - should use this shorter form (that is familiar for you if you know - XML):

    - -
    -
    -<@greet/>  
    - - -

    This will print:

    - -
    -
    -  <font size="+2">Hello Joe!</font>
    -    
    - - -

    But macros can do much more, since the thing between - <#macro ...> and - </#macro> is a template fragment, thus it - can contain interpolations - (${...}) and FTL tags - (e.g. <#if - ...>...</#if>).

    - -
    -

    Note

    - -

    Programmers will say on - <@...> that - you call the macro.

    -
    - - - - - - -

    -Parameters

    - - -

    Let's improve the greet macro so it can use - arbitrary name, not only ``Joe''. For this purpose you can use - parameters. You define the - parameters after the name of the macro in the - macro directive. Here we define one parameter for - the greet macro, - person:

    - -
    -
    -<#macro greet person>
    -  <font size="+2">Hello ${person}!</font>
    -</#macro>  
    - - -

    and then you can use this macro as:

    - -
    -
    -<@greet person="Fred"/> and <@greet person="Batman"/>  
    - - -

    which is similar to HTML syntax. This will print:

    - -
    -
    -  <font size="+2">Hello Fred!</font>
    - and   <font size="+2">Hello Batman!</font>
    -   
    - - -

    As you can see, the actual value of the macro parameter is - accessible in the macro definition body as a variable - (person). As with predefined directives, - the value of a parameter (the right side of =) is - an FTL expression. Thus, - unlike with HTML, the quotation marks around - "Fred" and "Batman" are not - optional. <@greet person=Fred/> would mean - that you use the value of variable Fred for the - person parameter, rather than the string - "Fred". Of course parameter value need not be a - string, it can be number, boolean, hash, sequence, etc., also you - can use complex expression on the right side of = - (e.g. someParam=(price + 50)*1.25).

    - -

    User-defined directives can have multiple parameters. For - example, add a new parameter color:

    - -
    -
    -<#macro greet person color>
    -  <font size="+2" color="${color}">Hello ${person}!</font>
    -</#macro>  
    - - -

    and then you can use this macro like:

    - -
    -
    -<@greet person="Fred" color="black"/>  
    - - -

    The order of parameters is not important, so this is - equivalent with the previous:

    - -
    -
    -<@greet color="black" person="Fred"/>  
    - - -

    When you call the macro, you can use only parameters that you - have defined in the macro directive (in this - case: person and color). So if - you try <@greet person="Fred" color="black" - background="green"/> then you will get an error, since - you haven't mentioned parameter background in the - <#macro - ...>.

    - -

    Also, you must give value for all parameters that you have - defined for the macro. So if you try <@greet - person="Fred"/> then you will get an error, since you - forgot to specify the value of color. However, it - often happens that you would specify the same value for a parameter - in most cases, so you want to specify the value only when you want a - different value for it than the usual. This can be achieved if you - specify the parameter in the macro directive as - param_name=usual_value. - For example, you want to use "black" for - color if you don't specify value for that - parameter when you use the greet - directive:

    - -
    -
    -<#macro greet person color="black">
    -  <font size="+2" color="${color}">Hello ${person}!</font>
    -</#macro>  
    - - -

    Now <@greet person="Fred"/> is OK, - since it is equivalent with <@greet person="Fred" - color="black"/>, thus the value of - color parameter is known. If you want - "red" for color, then you - write <@greet person="Fred" color="red"/>, - and this value will override the usual value specified with the - macro directive, so the value of - color parameter will be - "red".

    - -

    Also, it is important to realize that -- according to the - already explained FTL expression - rules -- someParam=foo and - someParam="${foo}" are very different. In the - fist case, you use the value of variable foo as - the value of the parameter. In the second case, you use a string literal - with interpolation, so the value of the parameter will be a - string -- in this case, the value of foo rendered - to text -- regardless of the type (as number, date, etc.) of - foo. Or, another example: - someParam=3/4 and - someParam="${3/4}" are different. If the - directive wants a numerical value for someParam, - it will not like the second variation. Do not exchange these.

    - -

    A very important aspect of macro parameters is that they are - local variables. For more information about local variables please - read: Defining variables in the template

    - - - - - -

    -Nested content

    - - -

    Custom directive can have nested content, similarly as - predefined directives like <#if - ...>nested - content</#if> can have. For example, - this creates a macro that draws borders around its nested - content:

    - -
    -
    -<#macro border>
    -  <table border=4 cellspacing=0 cellpadding=4><tr><td>
    -    <#nested>
    -  </tr></td></table>
    -</#macro>  
    - - -

    The <#nested> directive executes the - template fragment between the start-tag and end-tags of the - directive. So if you do this:

    - -
    -
    -<@border>The bordered text</@border>  
    - - -

    the output will be:

    - -
    -
    -  <table border=4 cellspacing=0 cellpadding=4><tr><td>
    -    The bordered text
    -  </td></tr></table>
    -   
    - - -

    The nested directive can be called for - multiple times, for example:

    - -
    -
    -<#macro do_thrice>
    -  <#nested>
    -  <#nested>
    -  <#nested>
    -</#macro>
    -<@do_thrice>
    -  Anything.
    -</@do_thrice>  
    - - -

    will print:

    - -
    -
    -  Anything.
    -  Anything.
    -  Anything.  
    - - -

    If you don't use the nested directive, then - the nested content will not be executed. Thus, if you accidentally - use the greet directive like this:

    - -
    -
    -<@greet person="Joe">
    -  Anything.
    -</@greet>  
    - - -

    then FreeMarker will not see this as an error, and simply - prints:

    - -
    -
    -<font size="+2">Hello Joe!</font>  
    - - -

    and the nested content will be ignored, since the - greet macro never uses nested - directive.

    - -

    The nested content can be anything that is valid FTL, - including other user-defined directives. Thus this is OK:

    - -
    -
    -<@border>
    -  <ul>
    -  <@do_thrice>
    -    <li><@greet person="Joe"/>
    -  </@do_thrice>
    -  </ul>
    -</@border>  
    - - -

    and will print:

    - -
    -
    -  <table border=4 cellspacing=0 cellpadding=4><tr><td>
    -      <ul>
    -    <li><font size="+2">Hello Joe!</font>
    -
    -    <li><font size="+2">Hello Joe!</font>
    -
    -    <li><font size="+2">Hello Joe!</font>
    -
    -  </ul>
    -
    -  </tr></td></table>  
    - - -

    The local variables of a - macro are not visible in the nested content. Say, this:

    - -
    -
    -<#macro repeat count>
    -  <#local y = "test">
    -  <#list 1..count as x>
    -    ${y} ${count}/${x}: <#nested>
    -  </#list>
    -</#macro>
    -<@repeat count=3>${y!"?"} ${x!"?"} ${count!"?"}</@repeat>  
    - - -

    will print this:

    - -
    -
    -    test 3/1: ? ? ?
    -    test 3/2: ? ? ?
    -    test 3/3: ? ? ?  
    - - -

    because the y, x and - count are the local (private) variables of the - macro, and are not visible from outside the macro definition. - Furthermore, a different set of local variables is used for each - macro call, so this will not cause confusion:

    - -
    -
    -<#macro test foo>${foo} (<#nested>) ${foo}</#macro>
    -<@test foo="A"><@test foo="B"><@test foo="C"/></@test></@test>  
    - - -

    and will print this:

    - -
    -
    -A (B (C () C) B) A  
    - - - - - - -

    -Macros with loop variables

    - - - - -

    Predefined directives like list can use - so-called loop variables; you should read Defining variables in the template to understand loop variables.

    - -

    User-defined directives can also have loop variables. For - example, let's extend the do_thrice directive of - the earlier examples so it exposes the current repetition number as - a loop variable. As with the predefined directives (as - list) the name of loop - variables is given when you call the directive (as - foo in <#list foos as - foo>...</#list>), - while the value of the variables is set by the - directive itself.

    - -
    -
    -<#macro do_thrice>
    -  <#nested 1>
    -  <#nested 2>
    -  <#nested 3>
    -</#macro>
    -<@do_thrice ; x> <#-- user-defined directive uses ";" instead of "as" -->
    -  ${x} Anything.
    -</@do_thrice>  
    - - -

    This will print:

    - -
    -
    -  1 Anything.
    -  2 Anything.
    -  3 Anything.
    -   
    - - -

    The syntactical rule is that you pass the actual value of the - loop variable for a certain "loop" (i.e. repetition of the nested - content) as the parameter of nested directive (of - course the parameter can by arbitrary expression). The name of the - loop variable is specified in the user-defined directive open tag - (<@...>) after the parameters and a - semicolon.

    - -

    A macro can use more the one loop variable (the order of - variables is significant):

    - -
    -
    -<#macro repeat count>
    -  <#list 1..count as x>
    -    <#nested x, x/2, x==count>
    -  </#list>
    -</#macro>
    -<@repeat count=4 ; c, halfc, last>
    -  ${c}. ${halfc}<#if last> Last!</#if>
    -</@repeat>  
    - - -

    The output will be:

    - -
    -
    -  1. 0.5
    -  2. 1
    -  3. 1.5
    -  4. 2 Last!
    -   
    - - -

    It is not a problem if you specify different number of loop - variables in the user-defined directive start-tag (that is, after - the semicolon) than with the nested directive. If - you specify less loop variables after the semicolon, then simply you - will not see the last few values that the nested - directive provides, since there is no loop variable to hold those - values. So these are all OK:

    - -
    -
    -<@repeat count=4 ; c, halfc, last>
    -  ${c}. ${halfc}<#if last> Last!</#if>
    -</@repeat>
    -<@repeat count=4 ; c, halfc>
    -  ${c}. ${halfc}
    -</@repeat>
    -<@repeat count=4>
    -  Just repeat it...
    -</@repeat>  
    - - -

    If you specify more variables after the semicolon than with - the nested directive, then the last few loop - variables will not be created (i.e. will be undefined in the nested - content).

    - - - - - -

    -More about user-defined directives and macros

    - - -

    Now you may read the relevant parts of the FreeMarker - Reference:

    - - - - -

    You can define methods in FTL as well, see the function - directive.

    - -

    Also, you may interested in namespaces: Namespaces. Namespaces help you to organize and - reuse your commonly used macros.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_misc_var.html b/fmpp/docs/freemarker/dgui_misc_var.html deleted file mode 100644 index 47c1712..0000000 --- a/fmpp/docs/freemarker/dgui_misc_var.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - FreeMarker Manual - Defining variables in the template - - - - - - - - -
    - - - - - -

    -Defining variables in the template

    - - -

    As we have described, a template can use the variables defined - in the data-model. A template can also define variables outside the - data-model for its own use. These temporary variables can be created - and replaced using FTL directives. Note that each template processing job - has its own private set of these variables that exists while the given - page is rendered. This variable set is initially empty, and will be - thrown away when the template processing job has been finished.

    You access a variable that you have defined in the template - exactly as if it were a variable in the data-model root. The variable - has precedence over any variable of the same name defined in the - data-model. That is, if you define a variable called ``foo'' and - coincidentally, there is a ``foo'' in the data-model as well, then the - variable created in the template will hide (not overwrite!) the - variable in the data-model root. For example, - ${foo} will print the value of the variable created - in the template.

    There are 3 kind of variables that are defined in a - template:

    -
      -
    • -

      ``plain'' variables: They - are accessible from everywhere in the template, or from the - templates inserted with include directive. You - can create and replace these variables with the assign. - Also, because macros and functions are just variable, the macro - directives and function - directives also set variables like - assign does.

      -
    • - -
    • -

      Local variables: They can - only be set inside a macro definition body, - and are only visible from there. A local variable only exists for - the duration of a macro call. You can create and replace local - variables inside macro definition bodies with the local - directive.

      -
    • - -
    • -

      Loop variables: Loop - variables are created automatically by directives like list, and - they only exist between the start-tag and end-tag of the - directive. Macro - parameters are local variables, not loop variables.

      -
    • - -
    • -

      Global variables: This is - an advanced topic, and this kind of variables should be seldom - used. Global variables are shared by all templates, even if they - belong to different name spaces because they were import-ed - as opposed to include-d. Thus, their visibility - is like that of data-model variables.They are set via the global - directive.

      -
    • -
    -

    Example: Create and replace variables with - assign:

    -
    -<#assign x = 1>  <#-- create variable x -->
    -${x}
    -<#assign x = x + 3> <#-- replace variable x -->
    -${x}  
    -

    Output:

    -
    -1
    -4  
    -

    Local variables hide (not overwrite) ``plain'' variables of the - same name. Loop variables hide (not overwrite) local and ``plain'' - variables of the same name. For example:

    -
    -<#assign x = "plain">
    -1. ${x}  <#-- we see the plain var. here -->
    -<@test/>
    -6. ${x}  <#-- the value of plain var. was not changed -->
    -<#list ["loop"] as x>
    -    7. ${x}  <#-- now the loop var. hides the plain var. -->
    -    <#assign x = "plain2"> <#-- replace the plain var, hiding does not mater here -->
    -    8. ${x}  <#-- it still hides the plain var. -->
    -</#list>
    -9. ${x}  <#-- the new value of plain var. -->
    -
    -<#macro test>
    -  2. ${x}  <#-- we still see the plain var. here -->
    -  <#local x = "local">
    -  3. ${x}  <#-- now the local var. hides it -->
    -  <#list ["loop"] as x>
    -    4. ${x}  <#-- now the loop var. hides the local var. -->
    -  </#list>
    -  5. ${x}  <#-- now we see the local var. again -->
    -</#macro>  
    -

    the output:

    -
    -1. plain
    -  2. plain
    -  3. local
    -    4. loop
    -  5. local
    -6. plain
    -    7. loop
    -    8. loop
    -9. plain2
    -   
    -

    An inner loop variable can hide an outer loop variable:

    -
    -<#list ["loop 1"] as x>
    -  ${x}
    -  <#list ["loop 2"] as x>
    -    ${x}
    -    <#list ["loop 3"] as x>
    -      ${x}
    -    </#list>
    -    ${x}
    -  </#list>
    -  ${x}
    -</#list>  
    -

    the output:

    -
    -  loop 1
    -    loop 2
    -      loop 3
    -    loop 2
    -  loop 1  
    -

    Note that the value of a loop variable is set by the directive - invocation that has created it (the <list - ...> tags in this case). There - is no other way to change the value of a loop variable (say, you can't - change its value with some kind of assignment directive). You can hide - temporarily a loop variable with another loop variable though, as you - have seen above.

    Sometimes it happens that a variable hides the variable in the - data-model with the same name, but you want to read the variable of - the data-model. In this case you can use the special variable - globals. For example, assume we have a variable - called user in the data-model with value ``Big - Joe'':

    -
    -<#assign user = "Joe Hider">
    -${user}          <#-- prints: Joe Hider -->
    -${.globals.user} <#-- prints: Big Joe -->  
    -

    Variables set via the global - directive hide data-model variables with the same name. Often, - global variables are set exactly for this purpose. But when not, you - can still access the data-model variable like - .data_model.user.

    For information about syntax of variables please read: The Template/Expressions

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_misc_whitespace.html b/fmpp/docs/freemarker/dgui_misc_whitespace.html deleted file mode 100644 index 0071d47..0000000 --- a/fmpp/docs/freemarker/dgui_misc_whitespace.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - FreeMarker Manual - White-space handling - - - - - - - - -
    - - - - - -

    -White-space handling

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    The control of the white-space in a template is a - problem that to some extent haunts every template engine in the - business.

    Let see this template. I have marked the components of template - with colors: text, interpolation, FTL tag. With the [BR]-s I visualize the line breaks.

    -
    -<p>List of users:[BR]
    -<#assign users = [{"name":"Joe",        "hidden":false},[BR]
    -                  {"name":"James Bond", "hidden":true},[BR]
    -                  {"name":"Julia",      "hidden":false}]>[BR]
    -<ul>[BR]
    -<#list users as user>[BR]
    -  <#if !user.hidden>[BR]
    -  <li>${user.name}[BR]
    -  </#if>[BR]
    -</#list>[BR]
    -</ul>[BR]
    -<p>That's all.  
    -

    If FreeMarker were to output all text as is, the output would be:

    -
    -<p>List of users:[BR]
    -[BR]
    -<ul>[BR]
    -[BR]
    -  [BR]
    -  <li>Joe[BR]
    -  [BR]
    -[BR]
    -  [BR]
    -[BR]
    -  [BR]  
    -  <li>Julia[BR]
    -  [BR]
    -[BR]
    -</ul>[BR]
    -<p>That's all.  
    -

    You have a lot of unwanted spaces and line breaks here. - Fortunately neither HTML nor XML is typically white-space sensitive, - but this amount of superfluous white-space can be annoying, and - needlessly increases the size of produced HTML. Of course, it is even - bigger problem when outputting white-space-sensitive formats.

    FreeMarker provides the following tools to cope with this - problem:

    -
      -
    • -

      Tools to ignore certain white-space of the template files - (parse time white-space - removal):

      - -
      -
        -
      • -

        White-space stripping: This feature automatically - ignores typical superfluous white-space around FTL tags. It - can be enabled or disabled on per template manner.

        -
      • - -
      • -

        Trimmer directives: t, - rt, lt. With these - directives you can explicitly tell FreeMarker to ignore - certain white-space. Read the - reference for more information.

        -
      • - -
      • -

        ftl - parameter strip_text: This removes all - top-level text from the template. It is useful for templates - that contain macro definitions only (and some other - non-outputting directives), because it removes the line-breaks - that you use between the macro definitions and between the - other top-level directives to improve the readability of the - template.

        -
      • -
      - -
    • - -
    • -

      Tools that remove white-space from the output (on-the-fly white-space - removal):

      - -
      -
        -
      • -

        compress directive.

        -
      • -
      - -
    • -
    - - - - - -

    -White-space stripping

    - - - - -

    If this feature is enabled for a template, then it - automatically ignores (i.e. does not print to the output) two kind - of typical superfluous white-space:

    - -
    -
      -
    • -

      Indentation white-space, and trailing white-space at the - end of the line (includes the line break) will be ignored in - lines that contains only FTL tags (e.g. - <@myMacro/>, <#if - ...>) and/or FTL - comments (e.g. <#-- blah -->), apart - from the the ignored white-space itself. For example, if a line - contains only an <#if - ...>, then the - indentation before the tag and the line break after the tag will - be ignored. However, if the line contains <#if - ...>x, then the - white-space in that line will not be ignored, because of the - x, as that is not FTL tag. Note that - according these rules, a line that contains <#if - ...><#list - ...> is subject to - white-space ignoring, while a line that contains - <#if ...> <#list - ...> is not, because the - white-space between the two FTL tags is embedded white-space, - not indentation or trailing white-space.

      -
    • - -
    • -

      White-space sandwiched between the following directives is - ignored: macro, function, - assign, global, - local, ftl, - import, but only if there is - only white-space and/or FTL comments - between the directives. In practice it means that you can put - empty lines between macro definitions and assignments as spacing - for better readability, without printing needless empty lines - (line breaks) to the output.

      -
    • -
    - - -

    The output of the last example with white-space stripping - enabled will be:

    - -
    -
    -<p>List of users:[BR]
    -<ul>[BR]
    -  <li>Joe[BR]
    -  <li>Julia[BR]
    -</ul>[BR]
    -<p>That's all.  
    - - -

    This is because after stripping the template becomes the - following; the ignored text is not colored:

    - -
    -
    -<p>List of users:[BR]
    -<#assign users = [{"name":"Joe",        "hidden":false},[BR]
    -                  {"name":"James Bond", "hidden":true},[BR]
    -                  {"name":"Julia",      "hidden":false}]>[BR]
    -<ul>[BR]
    -<#list users as user>[BR]
    -  <#if !user.hidden>[BR]
    -  <li>${user.name}[BR]
    -  </#if>[BR]
    -</#list>[BR]
    -</ul>[BR]
    -<p>That's all.  
    - - -

    White-space stripping can be enabled/disabled in per template - manner with the ftl directive. - If you don't specify this with the ftl directive, - then white-space stripping will be enabled or disabled depending on - how the programmer has configured FreeMarker. The factory default is - white-space stripping enabled, and the programmers probably left it - so (recommended). Note that enabling white-space stripping does - not degrade the performance of template - execution; white-space stripping is done during template - loading.

    - -

    White-space stripping can be disabled for a single line with - the nt - directive (for No Trim).

    - - - - - -

    -Using compress directive

    - - - - -

    Another solution is to use the compress - directive. As opposed to white-space stripping, this works - directly on the generated output, not on the template. That is, it - will investigate the printed output on the fly, and does not - investigate the FTL program that creates the output. It aggressively - removes indentations, empty lines and repeated spaces/tabs (for more - information read the reference). So the output - of:

    - -
    -
    -<#compress>
    -<#assign users = [{"name":"Joe",        "hidden":false},
    -                  {"name":"James Bond", "hidden":true},
    -                  {"name":"Julia",      "hidden":false}]>
    -List of users:
    -<#list users as user>
    -  <#if !user.hidden>
    -  - ${user.name}
    -  </#if>
    -</#list>
    -That's all.
    -</#compress>  
    - - -

    will be:

    - -
    -
    -List of users:
    -- Joe
    -- Julia
    -That's all.  
    - - -

    Note that compress is totally independent - of white-space stripping. So it is possible that the white-space of - template is stripped, and later the produced output is - compress-ed.

    - -

    Also, by default a user-defined directve called - compress is available in the data-model (due to - backward compatibility). This is the same as the directive, except - that you may optionally set the single_line - parameter, which will remove all intervening line breaks. If you - replace - <#compress>...</#compress> - on the last example with <@compress - single_line=true>...</@compress>, - then you get this output:

    - -
    -
    -List of users: - Joe - Julia That's all.  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_quickstart.html b/fmpp/docs/freemarker/dgui_quickstart.html deleted file mode 100644 index e562ae3..0000000 --- a/fmpp/docs/freemarker/dgui_quickstart.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - FreeMarker Manual - Getting Started - - - - - - - - -
    - - - - - -

    -Chapter 1   Getting Started

    - -
    -

    - - Chapter Contents - -

    - - -
    - - -

    This chapter is a very rough introduction to FreeMarker. The - chapters after this will go over things in much greater detail. - Nonetheless, once you have read this chapter, you will be able to write - simple but useful FreeMarker templates.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_quickstart_basics.html b/fmpp/docs/freemarker/dgui_quickstart_basics.html deleted file mode 100644 index 0a14161..0000000 --- a/fmpp/docs/freemarker/dgui_quickstart_basics.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - FreeMarker Manual - Template + data-model = output - - - - - - - - -
    - - - - - -

    -Template + data-model = output

    - - -

    Assume you need a HTML page in an e-shop application, similar to - this:

    -
    -<html>
    -<head>
    -  <title>Welcome!</title>
    -</head>
    -<body>
    -  <h1>Welcome Big Joe!</h1>
    -  <p>Our latest product:
    -  <a href="products/greenmouse.html">green mouse</a>!
    -</body>
    -</html>  
    -

    Let's say that the user name ("Big Joe" above) should depend on - who the logged in Web page visitor is, and the latest product should - come from a database and thus it potentially changes at any moment. In - this situation you can't just enter the user name nor the URL and name - of the latest product into the HTML, you can't use static HTML.

    FreeMarker's solution for this problem is using a template instead of the static HTML. The - template is the same as the static HTML, except that it contains some - instructions to FreeMarker that makes it dynamic:

    -
    -<html>
    -<head>
    -  <title>Welcome!</title>
    -</head>
    -<body>
    -  <h1>Welcome ${user}!</h1>
    -  <p>Our latest product:
    -  <a href="${latestProduct.url}">${latestProduct.name}</a>!
    -</body>
    -</html>  
    -

    The template is stored on the Web server, usually just like the - static HTML page would be. But whenever someone visits this page, - FreeMarker will step in and transform the template on-the-fly to plain - HTML by replacing the - ${...}-s with up-to-date - content (e.g., replacing ${user} with Big Joe or - whoever the visitor is) and send the result to the visitor's Web - browser. So the visitor's Web browser will receive something like the - first example HTML (i.e., plain HTML without FreeMarker instructions), - and it will not perceive that FreeMarker is used on the server. The - template file itself (which is, again, stored on the Web server) is - not changed during this, so the transformation will happen again and - again for each visiting. This ensures that the displayed information - is always up-to-date.

    As you see above, the template contains no instructions - regarding how to find out who the current visitor is, or how to query - the database to find out what the latest product is. It seems it just - already know these values. And indeed that's the case. An important - idea behind FreeMarker (actually, behind Web MVC) is that presentation - logic and "business logic" should be separated. In the template you - only deal with presentation issues, that is, visual design issues, - formatting issues. The data that will be displayed (such as the user - name and so on) is prepared outside FreeMarker, usually by routines - written in Java language or other general purpose language. So the - template author doesn't have to know how these values are calculated. - In fact, the way these values are calculated can be completely changed - while the templates can remain the same, and also, the look of the - page can be completely changed without touching anything but the - template. This separation can be especially useful when the template - authors (designers) and the programmers are different individuals, but - also helps managing application complexity even if the template author - and the programmer is the same person.

    While for FreeMarker (and for the template author) it's - not interesting how the data was calculated, - FreeMarker still have to know what the actual - data is. All the data that the template can use is packed into the so - called data-model. It's created by - the already mentioned routines that calculate the data. As far as the - template author is concerned, the data-model is a tree-like structure - (like folders and files on your hard disk), that in this case could be - visualized as:

    -
    -(root)
    -  |
    -  +- user = "Big Joe"
    -  |
    -  +- latestProduct
    -      |
    -      +- url = "products/greenmouse.html"
    -      |
    -      +- name = "green mouse"  
    -

    (To prevent misunderstandings: The data-model is not a text - file, the above is just a visualization of a data-model for you. It's - from Java objects, such as JavaBeans, Map-s, - List-s, etc., but let that be the problem of the - Java programmers.)

    Compare this with what you saw in the template earlier: - ${user} and - ${latestProduct.name}. As an analogy, the data - model is something like the file system of computers: the root and - latestProduct correspond to directories (folders) - and the user, url and - name correspond to files. url - and name are in the - latestProduct directory. So - latestProduct.name is like saying - name in the latestProduct - directory. But as I said, it's just an analogy; there are no files or - directories here.

    To recapitulate, a template and a data-model is needed for - FreeMarker to generate the output (like the HTML shown first):

    Template + data-model = output

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_quickstart_datamodel.html b/fmpp/docs/freemarker/dgui_quickstart_datamodel.html deleted file mode 100644 index 1a911e4..0000000 --- a/fmpp/docs/freemarker/dgui_quickstart_datamodel.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - FreeMarker Manual - The data-model at a glance - - - - - - - - -
    - - - - - -

    -The data-model at a glance

    - - -

    As you have seen, the data-model is basically a tree. This tree - can be arbitrarily complicated and deep, for example:

    -
    -(root)
    -  |
    -  +- animals
    -  |   |
    -  |   +- mouse
    -  |   |   |   
    -  |   |   +- size = "small"
    -  |   |   |   
    -  |   |   +- price = 50
    -  |   |
    -  |   +- elephant
    -  |   |   |   
    -  |   |   +- size = "large"
    -  |   |   |   
    -  |   |   +- price = 5000
    -  |   |
    -  |   +- python
    -  |       |   
    -  |       +- size = "medium"
    -  |       |   
    -  |       +- price = 4999
    -  |
    -  +- test = "It is a test"
    -  |
    -  +- whatnot
    -      |
    -      +- because = "don't know"  
    -

    The variables that act as directories (the root, - animals, mouse, - elephant, python, - whatnot) are called hashes. Hashes store other variables (the so - called subvariables) by - a lookup name (e.g., "animals", "mouse" or "price").

    The variables that store a single value - (size, price, - test and because) are called - scalars.

    When you want to - use a subvariable in a template, you specify its path from the root, - and separate the steps with dots. To access the - price of a mouse, you start from - the root and go into animals, and then go into - mouse then go into price. So you - write animals.mouse.price. When you put the special - ${...} codes around an - expression like this, you are telling FreeMarker to output the - corresponding text at that point.

    There is one more important kind of variable: sequences. They are similar to hashes, but they - don't store names for the variables they contain. Instead, they store - the subvariables sequentially, and you can access them with a - numerical index. For example, in this data-model, - animals and whatnot.fruits are - sequences:

    -
    -(root)
    -  |
    -  +- animals
    -  |   |
    -  |   +- (1st)
    -  |   |   |
    -  |   |   +- name = "mouse"
    -  |   |   |
    -  |   |   +- size = "small"
    -  |   |   |
    -  |   |   +- price = 50
    -  |   |
    -  |   +- (2nd)
    -  |   |   |
    -  |   |   +- name = "elephant"
    -  |   |   |
    -  |   |   +- size = "large"
    -  |   |   |
    -  |   |   +- price = 5000
    -  |   |
    -  |   +- (3rd)
    -  |       |
    -  |       +- name = "python"
    -  |       |
    -  |       +- size = "medium"
    -  |       |
    -  |       +- price = 4999
    -  |
    -  +- whatnot
    -      |
    -      +- fruits
    -          |
    -          +- (1st) = "orange"
    -          |
    -          +- (2nd) = "banana"  
    -

    To access a subvariable of a sequence you use a numerical index - in square brackets. Indexes start from 0 (it's a programmer tradition - to start with 0), thus the index of the first item is 0, the index of - the second item is 1, and so on. So to get the name of the first - animal you write animals[0].name. To get the second - item in whatnot.fruits (which is the string - "banana") you write - whatnot.fruits[1].

    Scalars can be further divided into these categories:

    -
      -
    • -

      String: Text, that is, an arbitrary sequence of characters - such as ''m'', ''o'', ''u'', ''s'', ''e'' above. For example the - name-s and size-s are - strings above.

      -
    • - -
    • -

      Number: It's a numerical value, like the - price-s above. The string - "50" and the number 50 are - two totally different things in FreeMarker. The former is just a - sequence of two characters (which happens to be readable as a - number for humans), while the latter is a numerical value that you - can use, say, in arithmetical calculations.

      -
    • - -
    • -

      Date-like: Either a date-time (stores a date with time of - the day), or a date (no time of day), or a time (time of day, no - date).

      -
    • - -
    • -

      Boolean: A true/false (yes/no, on/off, etc.) thing. Like - animals could have a protected subvariable, - which store if the animal is protected or not.

      -
    • -
    -

    Summary:

    -
      -
    • -

      The data-model can be visualized as a tree.

      -
    • - -
    • -

      Scalars store a single value. The value can be a string or a - number or a date-time/date/time or a boolean.

      -
    • - -
    • -

      Hashes are containers that store other variables and - associate them with a unique lookup name.

      -
    • - -
    • -

      Sequences are containers that store other variables in an - ordered sequence. The stored variables can be retrieved via their - numerical index, starting from 0.

      -
    • -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_quickstart_template.html b/fmpp/docs/freemarker/dgui_quickstart_template.html deleted file mode 100644 index fb88677..0000000 --- a/fmpp/docs/freemarker/dgui_quickstart_template.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - - - - - FreeMarker Manual - The template at a glance - - - - - - - - -
    - - - - - -

    -The template at a glance

    - - - - -

    The simplest template is a plain HTML file (or whatever text - file -- FreeMarker is not confined to HTML). When the client visits - that page, FreeMarker will send that HTML to the client as is. However - if you want that page to be more dynamic then you begin to put special - parts into the HTML which will be understood by FreeMarker:

    -
      -
    • -

      ${...}: - FreeMarker will replace it in the output with the actual value of - the thing inside the curly brackets. They are called interpolations. As an example see the very first example.

      -
    • - -
    • -

      FTL tags (for FreeMarker - Template Language tags): FTL tags are a bit similar to HTML tags, - but they are instructions to FreeMarker and will not be printed to - the output. The name of these tags start with - #. (User-defined FTL tags use - @ instead of #, but they are - an advanced topic.)

      -
    • - -
    • -

      Comments: Comments are - similar to HTML comments, but they are delimited by - <#-- and -->. Anything - between these delimiters and the delimiter itself will be ignored - by FreeMarker, and will not be written to the output.

      -
    • -
    -

    Anything not an FTL tag or an interpolation or comment is - considered as static text, and will not be interpreted by FreeMarker; - it is just printed to the output as is.

    With FTL tags you refer to so-called directives. This is the same kind of - relationship as between HTML tags (e.g.: - <table> and - </table>) and HTML elements (e.g., the - table element) to which you refer to with the HTML - tags. (If you don't feel this difference then just take "FTL tag" and - "directive" as synonyms.)

    - - - - -

    -Examples of directives

    - - -

    Though FreeMarker has far more directives, in this quick - overview we will only look at three of the most commonly used - ones.

    - - - - - - -

    -The if directive

    - - -

    With the if directive you can - conditionally skip a section of the template. For example, assume - that in the very first - example you want to greet your boss, Big Joe, differently - from other users:

    - -
    -
    -<html>
    -<head>
    -  <title>Welcome!</title>
    -</head>
    -<body>
    -  <h1>
    -    Welcome ${user}<#if user == "Big Joe">, our beloved leader</#if>!
    -  </h1>
    -  <p>Our latest product:
    -  <a href="${latestProduct.url}">${latestProduct.name}</a>!
    -</body>
    -</html>  
    - - -

    Here you have told FreeMarker that the '', our beloved - leader'' should be there only if the value of the variable - user is equal to the string "Big - Joe". In general, things between <#if - condition> and - </#if> tags are skipped if - condition is false - (the boolean value).

    - -

    Let's detail the - condition used here: - The == is an operator that tests if the values - at its left and right side are equivalent, and the results is a - boolean value, true or false accordingly. On the left side of - == I have referenced a - variable with the syntax that should be already familiar; - this will be replaced with the value of the variable. In general, - unquoted words inside directives or interpolations are treated as - references to variables. On the right side I have specified a - literal string. Literal strings in templates must - always be put inside quotation marks.

    - -

    This will print "Pythons are free today!" if their price is - 0:

    - -
    -
    -<#if animals.python.price == 0>
    -  Pythons are free today!
    -</#if>  
    - - -

    Similarly as earlier when a string was specified directly, - here a number is specified directly (0). Note - that the number is not quoted. If you quoted - it ("0"), FreeMarker were misinterpret it as a - string literal.

    - -

    This will print "Pythons are not free today!" if their price - is not 0:

    - -
    -
    -<#if animals.python.price != 0>
    -  Pythons are not free today!
    -</#if>  
    - - -

    As you may have guessed, != means not - equivalent.

    - -

    You can write things like this too (using the data-model used - to demonstrate hashes):

    - -
    -
    -<#if animals.python.price < animals.elephant.price>
    -  Pythons are cheaper than elephants today.
    -</#if>  
    - - -

    With the <#else> tag you can - specify what to do if the condition is false. For example:

    - -
    -
    -<#if animals.python.price < animals.elephant.price>
    -  Pythons are cheaper than elephants today.
    -<#else>
    -  Pythons are not cheaper than elephants today.
    -</#if>  
    - - -

    This prints ''Pythons are cheaper than elephants today.'' if - the price of python is less than the price of elephant, or else it - prints ''Pythons are not cheaper than elephants today.''

    - -

    If you have a variable with boolean value (a true/false - thing) then you can use it directly as the - condition of - if:

    - -
    -
    -<#if animals.python.protected>
    -  Warning! Pythons are protected animals!
    -</#if>  
    - - - - - - - - -

    -The list directive

    - - -

    This is useful when you want to list something. For example - if you merge this template with the data-model I used - earlier to demonstrate sequences:

    - -
    -
    -<p>We have these animals:
    -<table border=1>
    -  <tr><th>Name<th>Price
    -  <#list animals as animal>
    -  <tr><td>${animal.name}<td>${animal.price} Euros
    -  </#list>
    -</table>  
    - - -

    then the output will be:

    - -
    -
    -<p>We have these animals:
    -<table border=1>
    -  <tr><th>Name<th>Price
    -  <tr><td>mouse<td>50 Euros
    -  <tr><td>elephant<td>5000 Euros
    -  <tr><td>python<td>4999 Euros
    -</table>  
    - - -

    The generic format of the list directive - is:

    - -

    <#list sequence as - loopVariable>repeatThis</#list>

    - -

    The repeatThis - part will be repeated for each item in the sequence that you have - given with sequence, - one after the other, starting from the first item. In all - repetitions - loopVariable will - hold the value of the current item. This variable exists only - between the <#list ...> and - </#list> tags.

    - -

    As another example, we list the fruits of that example data - model:

    - -
    -
    -<p>And BTW we have these fruits:
    -<ul>
    -<#list whatnot.fruits as fruit>
    - <li>${fruit}
    -</#list>
    -<ul>  
    - - -

    The whatnot.fruits expression should be - familiar to you; it references a variable in - the data-model.

    - - - - - - - -

    -The include directive

    - - -

    With the include directive you can insert - the content of another file into the template.

    - -

    Suppose you have to show the same copyright notice on - several pages. You can create a file that contains the copyright - notice only, and insert that file everywhere where you need that - copyright notice. Say, you store this copyright notice in - copyright_footer.html:

    - -
    -
    -<hr>
    -<i>
    -Copyright (c) 2000 <a href="http://www.acmee.com">Acmee Inc</a>,
    -<br>
    -All Rights Reserved.
    -</i>  
    - - -

    Whenever you need that file you simply insert it with the - include directive:

    - -
    -
    -<html>
    -<head>
    -  <title>Test page</title>
    -</head>
    -<body>
    -  <h1>Test page</h1>
    -  <p>Blah blah...
    -<#include "/copyright_footer.html">
    -</body>
    -</html>  
    - - -

    and the output will be:

    - -
    -
    -<html>
    -<head>
    -  <title>Test page</title>
    -</head>
    -<body>
    -  <h1>Test page</h1>
    -  <p>Blah blah...
    -<hr>
    -<i>
    -Copyright (c) 2000 <a href="http://www.acmee.com">Acmee Inc</a>,
    -<br>
    -All Rights Reserved.
    -</i>
    -</body>
    -</html>  
    - - -

    If you change the copyright_footer.html, - then the visitor will see the new copyright notice on all - pages.

    - - - - - - -

    -Using directives together

    - - -

    You can use directives as many times on a page as you want, - and you can nest directives into each other similarly as you can - nest HTML elements into each other. For example this will list the - animals and print the name of large animals with bigger font:

    - -
    -
    -<p>We have these animals:
    -<table border=1>
    -  <tr><th>Name<th>Price
    -  <#list animals as animal>
    -  <tr>
    -    <td>
    -      <#if animal.size == "large"><font size="+1"></#if>
    -      ${animal.name}
    -      <#if animal.size == "large"></font></#if>
    -    <td>${animal.price} Euros
    -  </#list>
    -</table>  
    - - -

    Note that since FreeMarker does not interpret text outside FTL - tags, interpolations and comments, it doesn't see the above - font tags as badly nested ones.

    - - - - - -

    -Dealing with missing variables

    - - -

    In practice the data-model often has variables that are - optional (i.e., sometimes missing). To spot some typical human - mistakes, FreeMarker doesn't tolerate the referring to missing - variables unless you tell them explicitly what to do if the variable - is missing. Here we will show the two most typical ways of doing - that.

    - -

    Note for programmers: A - non-existent variable and a variable with null - value is the same for FreeMarker, so the "missing" term used here - covers both cases.

    - -

    Wherever you refer to a variable, you can specify a default - value for the case the variable is missing, by following the - variable name with a ! and the default value. - Like in the following example, when user is - missing from data model, the template will behave like if - user's value were the string - "Anonymous". (When user isn't - missing, this template behaves exactly like if - !"Anonymous" were not there):

    - -
    -
    -<h1>Welcome ${user!"Anonymous"}!</h1>  
    - - -

    You can ask whether a variable isn't missing by putting - ?? after its name. Combining this with the - already introduced if directive you can skip the - whole greeting if the user variable is - missing:

    - -
    -
    -<#if user??><h1>Welcome ${user}!</h1></#if>  
    - - -

    Regarding variable accessing with multiple steps, like - animals.python.price, writing - animals.python.price!0 is correct only if - animals.python is never missing and only the last - subvariable, price, is possibly missing (in which - case here we assume it's 0). If - animals or python is missing, - the template processing will stop with an "undefined variable" - error. To prevent that, you have to write - (animals.python.price)!0. In that case the - expression will be 0 even if - animals or python is missing. - Same logic goes for ??; - animals.python.price?? versus - (animals.python.price)??.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_template.html b/fmpp/docs/freemarker/dgui_template.html deleted file mode 100644 index dc7c65d..0000000 --- a/fmpp/docs/freemarker/dgui_template.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - FreeMarker Manual - The Template - - - - - - - - -
    - - - - - -

    -Chapter 3   The Template

    - -
    -

    - - Chapter Contents - -

    - - -
    - - -
    -

    Note

    - -

    It is assumed that you have already read the Getting Started and the Values, Types - chapter.

    -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_template_directives.html b/fmpp/docs/freemarker/dgui_template_directives.html deleted file mode 100644 index 67bd430..0000000 --- a/fmpp/docs/freemarker/dgui_template_directives.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - FreeMarker Manual - Directives - - - - - - - - -
    - - - - - -

    -Directives

    - - -

    You use FTL tags to call directives. In the example you have called the - list directive. Syntactically you have done it with - two tags: <#list animals as animal> and - </#list>.

    There are two kind of FTL tags:

    -
      -
    • -

      Start-tag: - <#directivename - parameters>

      -
    • - -
    • -

      End-tag: - </#directivename>

      -
    • -
    -

    This is similar to HTML or XML syntax, except that the tag name - starts with #. If the directive doesn't have nested - content (content between the start-tag and the end-tag), you must use - the start-tag with no end-tag. For example you write <#if - something>...</#if>, - but just <#include - something> as FreeMarker knows - that the include directive can't have nested - content.

    The format of the - parameters depends on - the - directivename.

    In fact there are two types of directives: predefined directives and - user-defined - directives. For user-defined directives you use - @ instead of #, for example - <@mydirective - parameters>...</@mydirective>. - Further difference is that if the directive has no nested content, you - must use a tag like <@mydirective - parameters />, similarly as in - XML (e.g. <img ... - />). But user-defined directives is an advanced topic - that will be discussed later.

    FTL tags, like HTML tags, must be properly nested. So the code - below is wrong, as the if directive is both inside - and outside of the nested content of the list - directive:

    -
    -<ul>
    -<#list animals as animal>
    -  <li>${animal.name} for ${animal.price} Euros
    -  <#if user == "Big Joe">
    -     (except for you)
    -</#list> <#-- WRONG! The "if" has to be closed first. -->
    -</#if>
    -</ul>  
    -

    Note that FreeMarker doesn't care about the nesting of HTML - tags, only about the nesting of FTL tags. It just sees HTML as flat - text, it doesn't interpret it in any way.

    If you try to use a non-existing directive (e.g., you mistype - the directive name), FreeMarker will decline to use the template and - produce an error message.

    FreeMarker ignores superfluous white-space inside FTL tags. So you - can write this:

    -
    -<#list[BR]
    -  animals       as[BR]
    -     animal[BR]
    ->[BR]
    -${animal.name} for ${animal.price} Euros[BR]
    -</#list    >  
    -

    You may not, however, insert white-space between the - < or </ and the directive - name.

    The complete list and description of all directives can be found - in the Template Language Reference/Directive Reference (but I recommend that you look - at the chapter about expressions first).

    -

    Note

    - -

    FreeMarker can be configured to use [ and - ] instead of < and - > in the FTL tags and FTL comments, like - [#if user == "Big - Joe"]...[/#if]. For more - information read: Miscellaneous/Alternative (square bracket) syntax.

    -
    -
    -

    Note

    - -

    FreeMarker can be configured so that it understands predefined - directives without # (like <if user - == "Big - Joe">...</if>). - However we don't recommend the usage of this mode. For more - information read: Template Language Reference/Deprecated FTL constructs/Old FTL syntax

    -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_template_exp.html b/fmpp/docs/freemarker/dgui_template_exp.html deleted file mode 100644 index b0c9e45..0000000 --- a/fmpp/docs/freemarker/dgui_template_exp.html +++ /dev/null @@ -1,2596 +0,0 @@ - - - - - - - - FreeMarker Manual - Expressions - - - - - - - - -
    - - - - - -

    -Expressions

    - - - - -

    When you supply values for interpolations or directive - parameters you can use variables or more complex expressions. For - example, if x is the number 8 and y is 5, the value of (x + - y)/2 resolves to the numerical value 6.5.

    Before we go into details, let's see some concrete - examples:

    -
      -
    • -

      When you supply value for interpolations: The usage of - interpolations is - ${expression} where - expression gives the value you want to insert into the output as - text. So ${(5 + 8)/2} prints ``6.5'' to the - output (or possibly ``6,5'' if the language of your output is not - US English).

      -
    • - -
    • -

      When you supply a value for the directive parameter: You - have already seen the if directive in the - Getting Started section. The syntax of this directive is: - <#if - expression>...</#if>. - The expression here must evaluate to a boolean value. For example - in <#if 2 < 3> the 2 < - 3 (2 is less than 3) is an expression which evaluates to - true.

      -
    • -
    - - - - - -

    -Quick overview (cheat sheet)

    - - -

    This is a reminder for those of you who already know - FreeMarker or are just experienced programmers:

    - -
    -
    - - -

    See also: Operator - precedence

    - - - - - -

    -Specify values directly

    - - - - - - -

    Often you want to specify a value directly and not as a result - of some calculations.

    - - - - - - -

    -Strings

    - - - - -

    To specify a string value directly you give the text in - quotation marks, e.g.: "some text" or in - apostrophe-quote, e.g. 'some text'. The two - forms are equivalent. If the text itself contains the character - used for the quoting (either " or - ') or backslashes, you have to precede them - with a backslash; this is called escaping. You can type any other - character, including line - breaks, in the text directly. Example:

    - -
    -
    -${"It's \"quoted\" and
    -this is a backslash: \\"}
    -
    -${'It\'s "quoted" and
    -this is a backslash: \\'}  
    - - -

    will print:

    - -
    -
    -It's "quoted" and
    -this is a backslash: \
    -
    -It's "quoted" and
    -this is a backslash: \  
    - - -
    -

    Note

    - -

    Of course, you could simply type the above text into the - template, without using - ${...}. But we do - it here just for the sake of example, to demonstrate - expressions.

    -
    - - - - - - -

    This is the list of all supported escape sequences. All - other usage of backlash in string literals is an error and any - attempt to use the template will fail.

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Escape sequenceMeaning
    \"Quotation mark (u0022)
    \'Apostrophe (a.k.a. apostrophe-quote) (u0027)
    \{Opening curly brace: {
    \\Back slash (u005C)
    \nLine feed (u000A)
    \rCarriage return (u000D)
    \tHorizontal tabulation (a.k.a. tab) (u0009)
    \bBackspace (u0008)
    \fForm feed (u000C)
    \lLess-than sign: <
    \gGreater-than sign: >
    \aAmpersand: &
    \xCodeCharacter given with its hexadecimal Unicode code (UCS code)
    -
    - - -

    The Code after - the \x is 1 to 4 hexadecimal digits. For - example this all put a copyright sign into the string: - "\xA9 1999-2001", - "\x0A9 1999-2001", - "\x00A9 1999-2001". When the character directly - after the last hexadecimal digit can be interpreted as hexadecimal - digit, you must use all 4 digits or else FreeMarker will - misunderstand you.

    - -

    Note that the character sequence ${ (and - #{) has special meaning. It's used to insert - the value of expressions (typically: the value of variables, as in - "Hello ${user}!"). This will be explained later. - If you want to print ${ or - #{, you should either use raw string literals - as explained below, or escape the { like in - "foo $\{bar}".

    - - - -

    A special kind of string literals is the raw string - literals. In raw string literals, backslash and - ${ have no special meaning, they are considered - as plain characters. To indicate that a string literal is a raw - string literal, you have to put an r directly - before the opening quotation mark or apostrophe-quote. - Example:

    - -
    -
    -${r"${foo}"}
    -${r"C:\foo\bar"}  
    - - -

    will print:

    - -
    -
    -${foo}
    -C:\foo\bar  
    - - - - - - - - -

    -Numbers

    - - - - -

    To specify a numerical value directly you type the number - without quotation marks. You have to use the dot as your decimal - separator and must not use any grouping separator symbols. You can - use - or + to indicate the - sign (+ is redundant). Scientific notation is - not yet supported (so 1E3 is wrong). Also, you - cannot omit the 0 before the decimal separator (so - .5 is wrong).

    - -

    Examples of valid number literals: 0.08, - -5.013, 8, - 008, 11, - +11

    - -

    Note that numerical literals like 08, - +8, 8.00 and - 8 are totally equivalent as they all symbolize - the number eight. Thus, ${08}, - ${+8}, ${8.00} and - ${8} will all print exactly same.

    - - - - - - - -

    -Booleans

    - - - - - - -

    To specify a boolean value you write true - or false. Don't use quotation marks.

    - - - - - - - -

    -Sequences

    - - - - - - - - - - -

    To specify a literal sequence, you list the subvariables separated by - commas, and put the whole list into square brackets. For - example:

    - -
    -
    -<#list ["winter", "spring", "summer", "autumn"] as x>
    -${x}
    -</#list>  
    - - -

    will print:

    - -
    -
    -winter
    -spring
    -summer
    -autumn
    -   
    - - -

    The items in the list are expressions, so you can do this - for example: [2 + 2, [1, 2, 3, 4], "whatnot"]. - Here the first subvariable will be the number 4, the second will - be another sequence, and the third subvariable will be the string - "whatnot".

    - - - - - - - -

    -Ranges

    - - -

    Ranges are just sequences, but they are created by - specifying what range of whole numbers they contain, instead of - specifying their items one by one. For example, - 0..<m, assuming the m - variable stores 5, will give a sequence that contains [0, - 1, 2, 3, 4]. Ranges are primarily used for iterating - over a range of numbers with <#list - ...> and for slicing - sequences and slicing - strings.

    - -

    The generic forms of range expressions are (where - start and - end can be any - expression that evaluates to a number):

    - -
    -
      -
    • -

      start..end: - Range with inclusive end. For example, 1..4 - gives [1, 2, 3, 4], and - 4..1 gives [4, 3, 2, 1]. - Beware, ranges with inclusive end never give an empty - sequence, so 0..length-1 is - WRONG, because when length is - 0 it gives [0, - -1].

      -
    • - -
    • -

      start..<end - or - start..!end: - Range with exclusive end. For example, - 1..<4 gives [1, 2, - 3], 4..<1 gives [4, - 3, 2], and 1..<1 gives - []. Note the last example; the result can - be an empty sequence. There's no difference between - ..< and ..!; the last - form is used in applications where using the - < character causes problems (for HTML - editors and such).

      -
    • - -
    • -

      start..*length: - Length limited range. For example, 10..*4 - gives [10, 11, 12, 13], - 10..*-4 gives [10, 9, 8, - 7], and 10..*0 gives - []. When these kind of ranges are used for - slicing, the slice will end without error if the end of the - sliced sequence or string is reached before the specified - range length was reached; see slicing - sequences for more.

      - -
      -

      Note

      - -

      Length limited ranges were introduced in FreeMarker - 2.3.21.

      -
      - -
    • - -
    • -

      start..: - Right-unbounded range. This are like length limited ranges - with infinite length. For example 1.. gives - [1, 2, 3, 4, 5, 6, ... ], up to infinity. - Be careful when processing (like listing) such ranges, as - processing all items of it it would take forever or until the - application runs out of memory and crashes. Just like with - length limited ranges, when these kind of ranges are used for - slicing, the slice will end when the end of the sliced - sequence or string is reached.

      - -
      -

      Warning!

      - -

      Right-unbounded ranges before FreeMarker 2.3.21 were - only used for slicing, and behaved like an empty sequence - for other purposes. To activate the new behavior, it's not - enough to use FreeMarker 2.3.21, the programmer also have to - set the incompatible_improvements - configuration setting to at least 2.3.21.

      -
      - -
    • -
    - - -

    Further notes on ranges:

    - -
    -
      -
    • -

      Range expressions themselves don't have square brackets, - for example, you write <#assign myRange = - 0..<x>, NOT <#assign myRange = - [0..<x]>. The last would create a sequence - that contains an item that's a range. The square brackets are - part of the slicing syntax, like - seq[myRange].

      -
    • - -
    • -

      You can write arithmetical expression on the sides of - the .. without parenthesis, like n - + 1 ..< m / 2 - 1.

      -
    • - -
    • -

      .., ..<, - ..! and ..* are - operators, so you can't have space inside them. Like - n .. <m is WRONG, but n ..< - m is good.

      -
    • - -
    • -

      The reported size of right-unbounded ranges is - 2147483647 (or 0 if - incompatible_improvements is less than - 2.3.21) due to a technical limitation (32 bits). However, when - listing them, their actual size is infinite.

      -
    • - -
    • -

      Ranges don't really store the numbers they consist of, - thus for example 0..1 and - 0..100000000 is equally fast to create and - takes the same amount of memory.

      -
    • -
    - - - - - - - - -

    -Hashes

    - - - - - - -

    To specify a hash in a template, you list the key/value - pairs separated by commas, and put the list into curly brackets. - The key and value within a key/value pair are separated with a - colon. Here is an example: { "name": "green mouse", - "price": 150 }. Note that both the names and the values - are expressions. The keys must be strings. The values can be if - any type.

    - - - - - - -

    -Retrieving variables

    - - - - - - - -

    -Top-level variables

    - - - - -

    To access a top-level variable, you simply use the variable - name. For example, the expression user will - evaluate to the value of variable stored with name - "user" in the root. So this will print what you store - there:

    - -
    -
    -${user}  
    - - -

    If there is no such top-level variable, then an error will - result when FreeMarker tries to evaluate the expression, and it - aborts template processing (unless programmers has configured - FreeMarker differently).

    - -

    In this expression the variable name can contain only - letters (including non-Latin letters), digits (including non-Latin - digits), underline (_), dollar ($), at sign (@) and hash (#). - Furthermore, the name must not start with a digit.

    - - - - - - - -

    -Retrieving data from a hash

    - - - - - - -

    If we already have a hash as a result of an expression, then - we can get its subvariable with a dot and the name of the - subvariable. Assume that we have this data-model:

    - -
    -
    -(root)
    - |
    - +- book
    - |   |
    - |   +- title = "Breeding green mouses"
    - |   |
    - |   +- author
    - |       |
    - |       +- name = "Julia Smith"
    - |       |
    - |       +- info = "Biologist, 1923-1985, Canada"
    - |
    - +- test = "title"  
    - - -

    Now we can read the title with - book.title, since the book expression will - return a hash (as explained in the last chapter). Applying this - logic further, we can read the name of the author with this - expression: book.author.name.

    - -

    There is an alternative syntax if we want to specify the - subvariable name with an expression: - book["title"]. In the square brackets you can - give any expression as long as it evaluates to a string. So with - this data-model you can also read the title with - book[test]. More examples; these are all - equivalent: book.author.name, - book["author"].name, - book.author.["name"], - book["author"]["name"].

    - -

    When you use the dot syntax, the same restrictions apply - regarding the variable name as with top-level variables (name can - contain only letters, digits, _, $, @, etc.). There are no such - restrictions when you use the square bracket syntax, since the - name is the result of an arbitrary expression. (Note, that to help - the FreeMarker XML support, if the subvariable name is - * (asterisk) or **, then you - do not have to use square bracket syntax.)

    - -

    As with the top-level variables, trying to access a - non-existent subvariable causes an error and aborts the processing - of the template (unless programmers has configured FreeMarker - differently).

    - - - - - - - -

    -Retrieving data from a sequence

    - - - - - - -

    This is the same as for hashes, but you can use the square - bracket syntax only, and the expression in the brackets must - evaluate to a number, not a string. For example to get the name of - the first animal of the example data-model (remember - that the number of the first item is 0, not 1): - animals[0].name

    - - - - - - - -

    -Special variables

    - - - - -

    Special variables are variables defined by the FreeMarker - engine itself. To access them, you use the - .variable_name - syntax.

    - -

    Normally you don't need to use special variables. They are - for expert users. The complete list of special variables can be - found in the reference.

    - - - - - - -

    -String operations

    - - - - - - - - - -

    -Interpolation (or concatenation)

    - - - - - - - - - - - - - - -

    If you want to insert the value of an expression into a - string, you can use - ${...} (and the - deprecated #{...}) - in string literals. - ${...} in string - literals behaves as - in text sections (so it - goes through the same locale sensitive number - and date/time formatting), except that it never go through automatic escaping.

    - -

    Example (assume that user is ``Big Joe''):

    - -
    -
    -<#assign s = "Hello ${user}!">
    -${s} <#-- Just to see what the value of s is -->  
    - - -

    This will print:

    - -
    -
    -Hello Big Joe!  
    - - -
    -

    Warning!

    - -

    A frequent mistake of users is the usage of interpolations - in places where they needn't/shouldn't/can't be used. - Interpolations work only in text sections (e.g. - <h1>Hello ${name}!</h1>) and in - string literals (e.g. <#include - "/footer/${company}.html">). A typical - WRONG usage is <#if - ${big}>...</#if>, which will cause a - syntactical error. You should simply write <#if - big>...</#if>. Also, <#if - "${big}">...</#if> is - WRONG, since it converts the parameter - value to string and the if directive wants a - boolean value, so it will cause a runtime error.

    -
    - - -

    Alternatively, you can use the + operator - to achieve similar result:

    - -
    -
    -<#assign s = "Hello " + user + "!">  
    - - -

    This gives the same result as the example with the - ${...}.

    - -
    -

    Warning!

    - -

    Because + follows the same rules as - ${...}, the - appended string is influenced by the locale, - number_format, - date_format, time_format, - datetime_format and - boolean_format, etc. settings, and thus the - result targets humans and isn't in generally machine parsable. - This mostly leads to problems with numbers, as many locales use - grouping (thousands separators) by default, and so - "someUrl?id=" + id becomes to something like - "someUrl?id=1 234". To prevent this, use the - ?c (for Computer audience) built-in, like in - "someUrl?id=" + id?c or - "someUrl?id=${id?c}", which will evaluate to - something like "someUrl?id=1234", regardless - of locale and format settings.

    -
    - - - - - - - - -

    -Getting a character

    - - - - - - -

    You can get a single character of a string at a given index - similarly as you can read the subvariable of a - sequence, e.g. user[0]. The result will - be a string whose length is 1; FTL doesn't have a separate - character type. As with sequence subvariables, the index must be a - number that is at least 0 and less than the length of the string, - or else an error will abort the template processing.

    - -

    Since the sequence subvariable syntax and the character - getter syntax clashes, you can use the character getter syntax - only if the variable is not a sequence as well (which is possible - because FTL supports multi-typed values), since in that case the - sequence behavior prevails. (To work this around, you can use - the - string built-in, e.g. - user?string[0]. Don't worry if you don't - understand this yet; built-ins will be discussed later.)

    - -

    Example (assume that user is "Big Joe"):

    - -
    -
    -${user[0]}
    -${user[4]}  
    - - -

    will print (note that the index of the first character is - 0):

    - -
    -
    -B
    -J  
    - - - - - - - - -

    -String slicing (substrings)

    - - - - - - - - - - -

    You can a slice a string in the same way as you slice a - sequence (see there), only here instead of sequence items - you work with characters.

    - -
    -
      -
    • -

      Decreasing ranges aren't allowed for string slicing. - (That's because unlike sequences, you seldom if ever want to - show a string reversed, so if that happens, that's almost - always the result of an oversight.)

      -
    • - -
    • -

      If a value is both a string and a sequence (a - multi-typed value), then slicing will slice the sequence - instead of the string. When you are processing XML, such - values are common. In such cases you can use - someXMLnode?string[range].

      -
    • - -
    • -

      There's a legacy bug where a range with - inclusive end that's one less than the - starting index and is non-negative (like in - "abc"[1..0]) will give an empty string - instead of an error. (It should be an error as it's a - decreasing range.) Currently this bug is emulated for backward - compatibility, but you shouldn't utilize it, as in the future - it will be certainly an error.

      -
    • -
    - - -

    Example:

    - -
    -
    -<#assign s = "ABCDEF">
    -${s[2..3]}
    -${s[2..<4]}
    -${s[2..*3]}
    -${s[2..*100]}
    -${s[2..]}  
    - - -

    will print:

    - -
    -
    -CD
    -CD
    -CDE
    -CDEF
    -CDEF  
    - - -
    -

    Note

    - -

    Some of the typical use-cases of string slicing is covered - by convenient built-ins: remove_beginning, - remove_ending, - keep_before, - keep_after

    -
    - - - - - - - -

    -Sequence operations

    - - - - - - - - - -

    -Concatenation

    - - - - - - - - - - -

    You can concatenate sequences in the same way as strings, - with +. Example:

    - -
    -
    -<#list ["Joe", "Fred"] + ["Julia", "Kate"] as user>
    -- ${user}
    -</#list>  
    - - -

    will print:

    - -
    -
    -- Joe
    -- Fred
    -- Julia
    -- Kate
    -   
    - - -

    Note that sequence concatenation is not to be used for many - repeated concatenations, like for appending items to a sequence - inside a loop. It's just for things like <#list users - + admins as person>. Although concatenating sequences - is fast and its speed is independently of the size of the - concatenated sequences, the resulting sequence will be always a - little bit slower to read than the original two sequences were. - This way the result of many repeated concatenations is a sequence - that is slow to read.

    - - - - - - - -

    -Sequence slicing

    - - - - - - - - -

    With - seq[range], - were range is a - range value as - described here, you can take a slice of the sequence. The - resulting sequence will contain the items from the original - sequence (seq) whose - indexes are in the range. For example:

    - -
    -
    -<#assert seq = ["A", "B", "C", "D", "E"]>
    -<#list seq[1..3] as i>${i}</#list>  
    - - -

    will print

    - -
    -
    -BCD   
    - - -

    Furthermore, the items in the slice will be in the same - order as in the range. Thus for example the above example with the - 3..1 range would print - DCB.

    - -

    The numbers in the range must be valid indexes in the - sequence, or else the processing of the template will be aborted - with error. Like in the last example, - seq[-1..0] would be an error as - seq[-1] is invalid, also - seq[1..5] would be because - seq[5] is invalid. (Note that - seq[100..<100] or - seq[100..*0] would be valid despite that 100 is - out of bounds, because those ranges are empty.)

    - -

    Length limited ranges - (start..*length) - and right-unbounded ranges - (start..) adapt to - the length of the sliced sequence. They will slice out at most as - many items as there is available:

    - -
    -
    -<#assign seq = ["A", "B", "C"]>
    -
    -Slicing with length limited ranges:
    -- <#list seq[0..*2] as i>${i}</#list>
    -- <#list seq[1..*2] as i>${i}</#list>
    -- <#list seq[2..*2] as i>${i}</#list> <#-- Not an error -->
    -- <#list seq[3..*2] as i>${i}</#list> <#-- Not an error -->
    -
    -Slicing with right-unlimited ranges:
    -- <#list seq[0..] as i>${i}</#list>
    -- <#list seq[1..] as i>${i}</#list>
    -- <#list seq[2..] as i>${i}</#list>
    -- <#list seq[3..] as i>${i}</#list>  
    - - -

    This will print:

    - -
    -
    -Slicing with length limited ranges:
    -- AB
    -- BC
    -- C
    --
    -
    -Slicing with right-unlimited ranges:
    -- ABC
    -- BC
    -- C
    --  
    - - -

    Note above that slicing with length limited and right - unbounded ranges allow the starting index to be past the last item - by one (but no more).

    - -
    -

    Note

    - -

    To split a sequence to slices of a given size, you should - use the chunk - built-in.

    -
    - - - - - - - -

    -Hash operations

    - - - - - - - - - -

    -Concatenation

    - - - - - - - - - - -

    You can concatenate hashes in the same way as strings, with - +. If both hashes contain the same key, the - hash on the right-hand side of the + takes - precedence. Example:

    - -
    -
    -<#assign ages = {"Joe":23, "Fred":25} + {"Joe":30, "Julia":18}>
    -- Joe is ${ages.Joe}
    -- Fred is ${ages.Fred}
    -- Julia is ${ages.Julia}  
    - - -

    will print:

    - -
    -
    -- Joe is 30
    -- Fred is 25
    -- Julia is 18  
    - - -

    Note that hash concatenation is not to be used for many - repeated concatenations, like for adding items to a hash inside a - loop. It's the same as with the sequence - concatenation.

    - - - - - - -

    -Arithmetical calculations

    - - - - - - - - - - - - - - -

    This is the basic 4-function calculator arithmetic plus the - modulus operator. So the operators are:

    - -
    -
      -
    • - Addition: + -
    • - -
    • - Subtraction: - -
    • - -
    • - Multiplication: * -
    • - -
    • - Division: / -
    • - -
    • - Modulus (remainder): % -
    • -
    - - - - -

    Example:

    - -
    -
    -${100 - x * x}
    -${x / 2}
    -${12 % 10}  
    - - -

    Assuming that x is 5, it will print:

    - -
    -
    -75
    -2.5
    -2  
    - - -

    Both operands must be expressions which evaluate to a - numerical value. So the example below will cause an error when - FreeMarker tries to evaluate it, since "5" is a - string and not the number 5:

    - -
    -
    -${3 * "5"} <#-- WRONG! -->  
    - - -

    There is an exception to the above rule. The - + operator, is used to concatenate - strings as well. If on one side of + is a - string and on the other side of + is a numerical - value, then it will convert the numerical value to string (using the - format appropriate for language of the page) and then use the - + as string concatenation operator. - Example:

    - -
    -
    -${3 + "5"}  
    - - -

    will output this:

    - -
    -
    -35  
    - - -

    Generally, FreeMarker never converts a string to a number - automatically, but it may convert a number to a string - automatically.

    - -

    People often want only the integer part of the result - of a division (or of other calculations). This is possible with the - int built-in. (Built-ins are explained later):

    - -
    -
    -${(x/2)?int}
    -${1.1?int}
    -${1.999?int}
    -${-1.1?int}
    -${-1.999?int}  
    - - -

    Assuming that x is 5, it will print:

    - -
    -
    -2
    -1
    -1
    --1
    --1  
    - - - - - - -

    -Comparison

    - - - - -

    Sometimes you want to know if two values are equal or not, or - which value is the greater.

    - -

    To show concrete examples I will use the if - directive here. The usage of if directive is: - <#if - expression>...</#if>, - where expression must evaluate to a boolean value or else an error - will abort the processing of the template. If the value of - expression is true then the things between the - begin and end-tag will be processed, otherwise they will be - skipped.

    - -

    To test two values for equality you use = - (or == as in Java or C; the two are absolutely - equivalent.) To test two values for inequality you use - !=. For example, assume that - user is ``Big Joe'':

    - -
    -
    -<#if user = "Big Joe">
    -  It is Big Joe
    -</#if>
    -<#if user != "Big Joe">
    -  It is not Big Joe
    -</#if>  
    - - -

    The user = "Big Joe" expression in the - <#if ...> will evaluate to the boolean - true, so the above will say ``It is Big - Joe''.

    - -

    The expressions on both sides of the = or - != must evaluate to a scalar. Furthermore, the - two scalars must have the same type (i.e. strings can only be - compared to strings and numbers can only be compared to numbers, - etc.) or else an error will abort template processing. For example - <#if 1 = "1"> will cause an error. Note - that FreeMarker does exact comparison, so string comparisons are - case and white-space sensitive: "x" and - "x " and "X" are not equal - values.

    - -

    For numerical and date, time and date-time values you can also - use <, <=, - >= and >. You can't use - them for strings! Example:

    - -
    -
    -<#if x <= 12>
    -  x is less or equivalent with 12
    -</#if>  
    - - -

    There's a problem with >= and - >. FreeMarker interprets the - > character as the closing character of the - FTL tag. To prevent this, you can use lt instead - of <, lte instead of - <=, gt instead of - > and gte instead of - >=, like in <#if x gt - y>. Another trick it to put the expression into parentheses like in - <#if (x > y)>, although it's considered - to be less elegant.

    - -
    -

    Note

    - -

    FreeMarker supports some other alternatives too, but these - are deprecated:

    - -
    -
      -
    • -

      Writing &gt; and - &lt; on the place of the problematic - relation marks, like in: <#if x &gt; - y> or <#if x &gt;= - y> . Note that in general FTL does not support - entity references (the - &...; - things) in FTL tags; it's just an exception with the - arithmetical comparisons.

      -
    • - -
    • -

      \lt, \lte, - \gt and \gte which are - the same as the ones without the backslash

      -
    • -
    - -
    - - - - - - -

    -Logical operations

    - - - - - - - - - - - - -

    Just the usual logical operators:

    - -
    -
      -
    • - Logical or: || -
    • - -
    • - Logical and: && -
    • - -
    • - Logical not: ! -
    • -
    - - -

    The operators will work with boolean values only. Otherwise an - error will abort the template processing.

    - -

    Example:

    - -
    -
    -<#if x < 12 && color = "green">
    -  We have less than 12 things, and they are green.
    -</#if>
    -<#if !hot> <#-- here hot must be a boolean -->
    -  It's not hot.
    -</#if>  
    - - - - - - -

    -Built-ins

    - - - - -

    Built-ins provide, as the name suggest, certain built-in - functionality that is always available. Typically, a built-in - provides a different version of a variable, or some information - about the variable in question. The syntax for accessing a built-in - is like that of accessing a subvariable in a hash, except that you - use the question mark instead of a dot. For example, to get the - upper case version of a string: - user?upper_case.

    - -

    You can find the complete list of - built-ins in the Reference. For now, just a few of the more - important ones:

    - -
    -
      -
    • -

      Built-ins to use with strings:

      - -
      -
        -
      • -

        html: The string with all special - HTML characters replaced with entity references (E.g. - < with - &lt;).

        -
      • - -
      • -

        cap_first: The string with the - first letter converted to upper case

        -
      • - -
      • -

        lower_case: The lowercase version - of the string

        -
      • - -
      • -

        upper_case: The uppercase version - of the string

        -
      • - -
      • -

        trim: The string without leading - and trailing white-spaces

        -
      • -
      - -
    • - -
    • -

      Built-ins to use with sequences:

      - -
      -
        -
      • -

        size: The number of elements in the - sequence

        -
      • -
      - -
    • - -
    • -

      Built-ins to use with numbers:

      - -
      -
        -
      • -

        int: The integer part of a number - (e.g. -1.9?int is - -1)

        -
      • -
      - -
    • -
    - - -

    Example:

    - -
    -
    -${test?html}
    -${test?upper_case?html}  
    - - -

    Assuming that test stores the string ``Tom - & Jerry'', the output will be:

    - -
    -
    -Tom &amp; Jerry
    -TOM &amp; JERRY  
    - - -

    Note the test?upper_case?html. Since the - result of test?upper_case is a string, you can - use the html built-in with it.

    - -

    Another example:

    - -
    -
    -${seasons?size}
    -${seasons[1]?cap_first} <#-- left side can by any expression -->
    -${"horse"?cap_first}  
    - - -

    Assuming that seasons stores the sequence - "winter", "spring", - "summer", "autumn", the output - will be:

    - -
    -
    -4
    -Spring
    -Horse  
    - - - - - - -

    -Method call

    - - - - - - -

    If you have a method then you can use the method call - operation on it. The method call operation is a comma-separated list - of expressions in parentheses. These values are called parameters. - The method call operation passes these values to the method which - will in turn return a result. This result will be the value of the - whole method call expression.

    - -

    For example, assume the programmers have made available a - method variable called repeat. You give a string - as the first parameter, and a number as the second parameter, and it - returns a string which repeats the first parameter the number of - times specified by the second parameter.

    - -
    -
    -${repeat("What", 3)}  
    - - -

    will print:

    - -
    -
    -WhatWhatWhat  
    - - -

    Here repeat was evaluated to the method - variable (according to how you access top-level - variables) and then ("What", 3) invoked - that method.

    - -

    I would like to emphasize that method calls are just plain - expressions, like everything else. So this:

    - -
    -
    -${repeat(repeat("x", 2), 3) + repeat("What", 4)?upper_case}  
    - - -

    will print this:

    - -
    -
    -xxxxxxWHATWHATWHATWHAT  
    - - - - - - -

    -Handling missing values

    - - -
    -

    Note

    - -

    These operators exist since FreeMarker 2.3.7 (replacing the - default, exists and - if_exists built-ins).

    -
    - - - - - - - - - - - - -

    As we explained earlier, an error will occur and abort the - template processing if you try to access a missing variable. However - two special operators can suppress this error, and handle the - problematic situation. The handled variable can be top-level - variable, hash subvariable, or sequence subvariable as well. - Furthermore these operators handle the situation when a method call - doesn't return a value (from the - viewpoint of Java programmers: it returns null or - it's return type is void), so it's more - correct to say that these operators handle missing values in - general, rather than just missing variables.

    - -

    For those who know what's Java - null, FreeMarker 2.3.x - treats them as missing values. Simply, the template language doesn't - know the concept of null. For example, if you - have a bean that has a maidenName property, and - the value of that property is null, then that's - the same as if there were no such property at all, as far as the - template is concerned (assuming you didn't configured FreeMarker to - use some extreme object wrapper, that is). The result of a method - call that returns null is also treated as a - missing variable (again, assuming that you use some usual object - wrapper). See more in the - FAQ.

    - -
    -

    Note

    - -

    If you wonder why is FreeMarker so picky about missing - variables, read this - FAQ entry.

    -
    - - - - - - - -

    -Default value operator

    - - - - -

    Synopsis: - unsafe_expr!default_expr - or unsafe_expr! or - (unsafe_expr)!default_expr - or - (unsafe_expr)!

    - -

    This operator allows you to specify a default value for the - case when the value is missing.

    - -

    Example. Assume no variable called mouse - is present:

    - -
    -
    -${mouse!"No mouse."}
    -<#assign mouse="Jerry">
    -${mouse!"No mouse."}  
    - - -

    The output will be:

    - -
    -
    -No mouse.
    -Jerry  
    - - -

    The default value can be any kind of expression, so it - doesn't have to be a string. For example you can write - hits!0 or colors!["red", "green", - "blue"]. There is no restriction regarding the - complexity of the expression that specifies the default value, for - example you can write: cargo.weight!(item.weight * - itemCount + 10).

    - -
    -

    Warning!

    - -

    If you have a composite expression after the - !, like 1 + x, - always use parenthesses, like - ${x!(1 + y)} or ${(x!1) + - y)}, depending on which interpretation you meant. - That's needed because due to a programming mistake in FreeMarker - 2.3.x, the precedence of ! (when it's used as - default value operator) is very low at its right side. This - means that, for example, ${x!1 + y} is - misinterpreted by FreeMarker as ${x!(1 + y)} - while it should mean ${(x!1) + y}. This - programming error will be fixed in FreeMarker 2.4, so you should - not utilize this wrong behavior, or else your templates will - break with FreeMarker 2.4!

    -
    - - -

    If the default value is omitted, then it will be empty - string and empty sequence and empty hash at the same time. (This - is possible because FreeMarker allows multi-type values.) Note the - consequence that you can't omit the default value if you want it - to be 0 or false. - Example:

    - -
    -
    -(${mouse!})
    -<#assign mouse = "Jerry">
    -(${mouse!})  
    - - -

    The output will be:

    - -
    -
    -()
    -(Jerry)  
    - - -
    -

    Warning!

    - -

    Due to syntactical ambiguities <@something - a=x! b=y /> will be interpreted as - <@something a=x!(b=y) />, that is, the - b=y will be interpreted as a comparison that - gives the default value for x, rather than - the specification of the b parameter. To - prevent this, write: <@something a=(x!) b=y - />

    -
    - - -

    You can use this operator in two ways with non-top-level - variables:

    - -
    -
    -product.color!"red"  
    - - -

    This will handle if color is missing - inside product (and returns - "red" if so), but will not handle if - product is missing. That is, the - product variable itself must exist, otherwise - the template processing will die with error.

    - -
    -
    -(product.color)!"red"  
    - - -

    This will handle if product.color is - missing. That is, if product is missing, or - product exists but it does not contain - color, the result will be - "red", and no error will occur. The important - difference between this and the previous example is that when - surrounded with parentheses, it is allowed for any component of - the expression to be undefined, while without parentheses only the - last component of the expression is allowed to be - undefined.

    - -

    Of course, the default value operator can be used with - sequence subvariables as well:

    - -
    -
    -<#assign seq = ['a', 'b']>
    -${seq[0]!'-'}
    -${seq[1]!'-'}
    -${seq[2]!'-'}
    -${seq[3]!'-'}  
    - - -

    the outpur will be:

    - -
    -
    -a
    -b
    --
    --  
    - - -

    A negative sequence index (as - seq[-1]!'-') will always cause an error, you - can't suppress that with this or any other operator.

    - - - - - - - -

    -Missing value test operator

    - - - - - - - - - - - - - - -

    Synopsis: - unsafe_expr?? or - (unsafe_expr)??

    - -

    This operator tells if a value is missing or not. Depending - on that, the result is either true or - false.

    - -

    Example. Assume no variable called mouse - is present:

    - -
    -
    -<#if mouse??>
    -  Mouse found
    -<#else>
    -  No mouse found
    -</#if>
    -Creating mouse...
    -<#assign mouse = "Jerry">
    -<#if mouse??>
    -  Mouse found
    -<#else>
    -  No mouse found
    -</#if>  
    - - -

    The output will be:

    - -
    -
    -  No mouse found
    -Creating mouse...
    -  Mouse found  
    - - -

    With non-top-level variables the rules are the same as with - the default value operator, that is, you can write - product.color?? and - (product.color)??.

    - - - - - - -

    -Parentheses

    - - - - -

    Parentheses can be used to group any expressions. Some - examples:

    - -
    -
    -                                   <#-- Output will be: -->
    -${3 * 2 + 2}                       <#-- 8 -->
    -${3 * (2 + 2)}                     <#-- 12 -->
    -${3 * ((2 + 2) * (1 / 2))}         <#-- 6 -->
    -${"green " + "mouse"?upper_case}   <#-- green MOUSE -->
    -${("green " + "mouse")?upper_case} <#-- GREEN MOUSE -->
    -<#if !( color = "red" || color = "green")>
    -  The color is nor red nor green
    -</#if>  
    - - -

    Note that the parentheses of a method call - expressions have nothing to do with the parentheses used for - grouping.

    - - - - - -

    -White-space in expressions

    - - -

    FTL ignores superfluous white-space in expressions. So - these are totally equivalent:

    - -
    -
    -${x + ":" + book.title?upper_case}  
    - - -

    and

    - -
    -
    -${x+":"+book.title?upper_case}  
    - - -

    and

    - -
    -
    -${
    -   x
    - + ":"   +  book   .   title
    -   ?   upper_case
    -      }  
    - - - - - - -

    -Operator precedence

    - - - - - - -

    The following table shows the precedence assigned to the - operators. The operators in this table are listed in precedence - order: the higher in the table an operator appears, the higher its - precedence. Operators with higher precedence are evaluated before - operators with a relatively lower precedence. Operators on the same - line have equal precedence. When binary operators (operators with - two ``parameters'', as + and - -) of equal precedence appear next to each other, - they are evaluated in left-to-right order.

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Operator groupOperators
    highest precedence operators[subvarName] - [subStringRange] . ? - (methodParams) - expr! - expr??
    unary prefix operators+expr - -expr !expr
    multiplicative operators* / %
    additive operators+ -
    numerical ranges.. ..< - ..! ..*
    relational operators< > <= >= (and equivalents: - gt, lt, etc.)
    equality operators== != (and equivalents: - =)
    logical "and" operator&&
    logical "or" operator||
    -
    - - -

    For those of you who know C, Java language or JavaScript, note - that the precedence rules are the same as in those languages, except - that FTL has some operators that do not exist in those - languages.

    - -

    The default value operator - (exp!exp) - is not yet in the table because of a programming mistake, which will - be only fixed in FreeMarker 2.4 due to backward compatibility - constraints. It meant to be a "highest precedence operator", but in - FreeMarker 2.3.x the precedence on its right side is very low by - accident. So if you have a composite expression on the right side, - always use paranthesses, etiher like x!(y + 1) or - like (x!y) + 1. Never write just x!y + - 1.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_template_overallstructure.html b/fmpp/docs/freemarker/dgui_template_overallstructure.html deleted file mode 100644 index 2c386f5..0000000 --- a/fmpp/docs/freemarker/dgui_template_overallstructure.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - FreeMarker Manual - Overall structure - - - - - - - - -
    - - - - - -

    -Overall structure

    - - -

    Templates are in fact programs you write in a language called - FTL (for FreeMarker - Template Language). This is a quite simple programming language - designed for writing templates and nothing else.

    A template (= FTL program) is a mix of the following - sections:

    -
      -
    • -

      Text: Text that will be printed to the output as - is.

      -
    • - -
    • -

      Interpolation: These sections will be replaced with a calculated - value in the output. Interpolations are delimited by - ${ and } (or with - #{ and }, but that shouldn't - be used anymore; see more - here).

      -
    • - -
    • -

      FTL tags: FTL tags are a bit similar to HTML tags, but they - are instructions to FreeMarker and will not be printed to the - output.

      -
    • - -
    • -

      Comments: Comments are similar to HTML comments, but they - are delimited by <#-- and - -->. Comments will be ignored by FreeMarker, - and will not be written to the output.

      -
    • -
    -

    Let's see a concrete template. I have marked the template's - components with colors: text, - interpolation, FTL tag, comment. With the [BR]-s I intend to visualize the - line breaks.

    -
    -<html>[BR]
    -<head>[BR]
    -  <title>Welcome!</title>[BR]
    -</head>[BR]
    -<body>[BR]
    -  <#-- Greet the user with his/her name -->[BR]
    -  <h1>Welcome ${user}!</h1>[BR]
    -  <p>We have these animals:[BR]
    -  <ul>[BR]
    -  <#list animals as animal>[BR]
    -    <li>${animal.name} for ${animal.price} Euros[BR]
    -  </#list>[BR]
    -  </ul>[BR]
    -</body>[BR]
    -</html>  
    -

    FTL distinguishes upper case and lower case letters. So - list is good directive name, while - List is not. Similarly ${name} - is not the same as ${Name} or - ${NAME}

    It is important to realize that interpolations can be used in - text (and in string literal - expressions; see later) - only.

    An FTL tag can't be inside - another FTL tag nor inside an - interpolation. For example - this is WRONG: <#if <#include - 'foo'>='bar'>...</#if>

    Comments can be placed - inside FTL tags and interpolations. For - example:

    -
    -<h1>Welcome ${user <#-- The name of user -->}!</h1>[BR]
    -<p>We have these animals:[BR]
    -<ul>[BR]
    -<#list <#-- some comment... --> animals as <#-- again... --> animal>[BR]
    -...  
    -
    -

    Note

    - -

    For those of you who have tried the above examples: You may - notice that some of spaces, tabs and line breaks are missing from - the template output, even though we said that text is printed as is. Don't bother with - it now. This is because the feature called ''white-space stripping'' - is turned on, and that automatically removes some superfluous - spaces, tabs and line breaks. This will be explained later.

    -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/dgui_template_valueinsertion.html b/fmpp/docs/freemarker/dgui_template_valueinsertion.html deleted file mode 100644 index 4dd914f..0000000 --- a/fmpp/docs/freemarker/dgui_template_valueinsertion.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - - - - FreeMarker Manual - Interpolations - - - - - - - - -
    - - - - - -

    -Interpolations

    - - -

    The format of interpolations is - ${expression}, where - expression can be all - kind of expression (e.g. ${100 + x}).

    The interpolation is used to insert the value of the - expression converted to - text (to string). Interpolations can be used only on two places: in - text sections (e.g., - <h1>Hello ${name}!</h1>) and in string literal - expressions (e.g., <#include - "/footer/${company}.html">).

    -

    Warning!

    - -

    A frequent mistake of users is the usage of interpolations in - places where they needn't/shouldn't/can't be used. Interpolations - work only in text sections (e.g. - <h1>Hello ${name}!</h1>) and in string literals - (e.g. <#include - "/footer/${company}.html">). A typical - WRONG usage is <#if - ${big}>...</#if>, which will give syntactical - error. You should simply write <#if - big>...</#if>. Also, <#if - "${big}">...</#if> is WRONG, - since it converts the parameter value to string and the - if directive wants a boolean value, so it will - cause a runtime error.

    -
    -

    The result of the expression must be a string, number or - date/time/date-time value. This is because only numbers and - date/time/date-time values are converted to string by interpolation - automatically, values of other types (such as booleans, sequences) - must be converted to string "manually" somehow (see some advices - later), or an error will stop the template processing.

    - - - - -

    -Guide for inserting strings; don't forget escaping!

    - - -

    If the interpolation is in a text section (i.e., not in a string literal - expression), the string that it will insert will be - automatically escaped if an escape - directive is in effect. If you are generating HTML it's - strongly recommended to utilize this to prevent cross-site-scripting - attacks and not-well-formed HTML pages. Here's a quick - example:

    - -
    -
    -<#escape x as x?html>
    -  ...
    -  <p>Title: ${book.title}</p>
    -  <p>Description: <#noescape>${book.description}</#noescape></p>
    -  <h2>Comments:</h2>
    -  <#list comments as comment>
    -    <div class="comment">
    -      ${comment}
    -    </div>
    -  </#list>
    -  ...
    -</#escape>  
    - - -

    This example shows that when generating HTML you better put - the whole template inside the escape directive. - Thus, if the book.title contains - &, it will be replaced with - &amp; in the output so the page remains - well-formed HTML. If a user comment contains tags like - <iframe> (or any other element), they will - become to &lt;iframe&gt; and like, - rendering them harmless. But sometimes you really have HTML in the - data-model, like let's assume book.description - above is stored as HTML in the database, in which case you have to - neutralize the enclosing escape with a - noescape. Without the enclosing - escape, the template would look like:

    - -
    -
    -  ...
    -  <p>Title: ${book.title?html}</p>
    -  <p>Description: ${book.description}</p>
    -  <h2>Comments:</h2>
    -  <#list comments as comment>
    -    <div class="comment">
    -      ${comment?html}
    -    </div>
    -  </#list>
    -  ...  
    - - -

    This does the same as the earlier example, but here you may - forget some ?html-s, which is a security risk. In - the earlier example you may forget some - noescape-s, which gives bad output too, but it's - at least no a security risk.

    - - - - - -

    -Guide for inserting numerical values

    - - -

    If the expression evaluates to a number then the numerical - value will be converted to string according the default number - format. This may includes the maximum number of decimals, grouping, - and like. Usually the programmer should set the default number - format; the template author don't have to deal with it (but he can - with the number_format setting; see in the documentation of - setting directive). Also, you can override - the default number format for a single interpolation with the string - built-in.

    - -

    The decimal separator used (and other such symbols, like the - group separator) depends on the current locale (language, country), - that also should be set by the programmer. For example, this - template:

    - -
    -
    -${1.5}  
    - - -

    will print something like this if the current locale is - English:

    - -
    -
    -1.5  
    - - -

    but if the current locale is German then it will print - something like:

    - -
    -
    -1,5  
    - - -

    since German people use comma as decimal separator.

    - -
    -

    Warning!

    - -

    As you can see, interpolations print for human audience (by - default at least), as opposed to ''computer audience''. In some - cases this is not good, like when you print a database record ID - as the part of an URL or as an invisible field value in a HTML - form, or when you print CSS/JavaScript numerical literals, because - these printed values will be read by computer programs and not by - humans. Most computer programs are very particular about the - format of the numbers, and understand only a kind of simple US - number formatting. For that, use the c (stands for - ''computer audience'') built-in, for example:

    - -
    -
    -<a href="/shop/productdetails?id=${product.id?c}">Details...</a>  
    - -
    - - - - - - -

    -Guide for inserting date/time/date-time values

    - - -

    If the expression evaluates to a date-like value then that - will be transformed to a text according to a default format. Usually - the programmer should set the default format; you don't have to deal - with it (but if you care, see the - date_format, time_format and - datetime_format settings in the - documentation of the setting - directive). Also, you can override the default formatting for - a single interpolation with the string - built-in.

    - -
    -

    Warning!

    - -

    To display a date-like value as text, FreeMarker must know - which parts of it are in use, that is, if only the date part - (year, month, day), or only the time part (hour, minute, second, - millisecond), or both. Unfortunately, because of the technical - limitations of Java platform, for some variables it is not - possible to detect this automatically; ask the programmer if the - data-model contains such problematic variables. When it's not - possible to find out which parts of the date are in use, then you - must help FreeMarker with the date, - time and datetime - built-ins (like ${lastUpdated?datetime}), or it - will stop with error.

    -
    - - - - - - -

    -Guide for inserting boolean values

    - - -

    By default an attempt to print boolean values with - interpolation causes an error and aborts template processing. For - example this will cause an error: ${a == 2} and - will not print ''true'' or something like that. That's because - there's no universally useful way of representing booleans - (sometimes you want to print yes/no, sometimes enabled/disabled, - on/off, etc.).

    - -

    However, you can convert booleans to strings with the ?string - built-in. For example, to print the value of the "married" - variable (assuming it's a boolean), you could write - ${married?string("yes", "no")}.

    - -

    FreeMarker can be configured with a default boolean format - with the boolean_format setting, then - ${married} and such will work. However, in most - applications it's not recommended, as boolean should be rendered - differently on different places, and leaving the formatting on the - default is possibly just an oversight and thus should generate - error.

    - -

    When you want to generate JavaScript or other computer - language parts, then ${someBoolean?c} - ("c" stands for computer audience) should be used to - print true/false. (Remember that ?c was also used - to print numbers for computer audience.)

    - - - - - -

    -The exact conversion rules

    - - -

    For those who are interested, the exact rules of conversion - from the expression value to string (which is then still subject to - escaping) are these, in this order:

    - -
      -
    1. -

      If the value is a number, then it is converted to string - in the format specified with the - number_format setting. So this usually - formats for human audience, as opposed to computer - audience.

      -
    2. - -
    3. -

      Else if the value is date, time or date-time, then it is - converted to string in the format specified with the - date_format, time_format - or datetime_format setting, respectively. If - it can't be detected what kind of date-like value it is (date vs - time vs date-time), an error will occur.

      -
    4. - -
    5. -

      Else if the value is a string, then there is no - conversion.

      -
    6. - -
    7. -

      Else if the engine is in classic compatibility - mode:

      - -
        -
      1. -

        If the value is a boolean, true values are converted - to "true", false values are converted to an empty - string.

        -
      2. - -
      3. -

        If the expression is undefined - (null or a variable is undefined), it is - converted to an empty string.

        -
      4. - -
      5. -

        Else an error will abort the template - processing.

        -
      6. -
      -
    8. - -
    9. -

      Else an error will abort the template processing.

      -
    10. -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/docgen-resources/docgen.css b/fmpp/docs/freemarker/docgen-resources/docgen.css deleted file mode 100644 index 5daaeaa..0000000 --- a/fmpp/docs/freemarker/docgen-resources/docgen.css +++ /dev/null @@ -1,147 +0,0 @@ -body { - background-color: #FFFFFF; color: #000000; - font-family: Arial, sans-serif; - padding: 0.5em; margin: 0 -} - -#mainContent {width: 43em; margin: 0; padding: 0 0 1.5em 2em} - -/* Overwiriting the browser defaults: */ - -p {margin-top: 1em; margin-bottom: 1em} -ul, ol {margin-top: 1em; margin-bottom: 1em} -ul ul, ul ol, ol ul, ol ol {margin-top: 0; margin-bottom: 0} -img {border: 0} -a {color: #0000CC; text-decoration:none} -a:hover {text-decoration: underline} -a:visited {color: #800080} - -/* pre and tt font issues: */ - -pre {font-size: 90%; font-family: "Courier New", monospace} -pre.metaTemplate {font-size: 100%} -/* Some browsers chose smaller font than for normal text otherwise: */ -tt {font-size: 100%; font-family: "Courier New", monospace} - -/* Table-based DocBook elements: */ - -div.programlisting, div.informaltable, div.table { - margin: 1em 0 1em 0 -} - -/* ToC: */ - -div.toc { - border: 1px #000000 solid; - padding: 0.5em; - background-color: #F0F0F0; - width: 90%; - margin: 1em 0 1em 0 -} -.toc ul.noMargin {margin-left: 0} -.toc ul {list-style-type: none; margin-left: 2.5em; padding-left: 0; margin-bottom: 0} -.toc li {list-style-type: none; margin-left: 0; padding-left: 0; margin-bottom: 0} -.toc p {margin: 0} - -/* FAQ: */ - -.question {color:#0050B2; margin-top: 2em; margin-bottom: 1em} - -/* Footnote: */ - -#footnotes { - font-size: 75%; - margin-top: 3em; - padding-top: 0.5em; - border-top: 1px solid #E0E0E0; -} - -/* Title-s: */ - -.rank_book, -.rank_part, -.rank_chapter, -.rank_section1, -.rank_section2, -.rank_section3, -.rank_simplesect, -.rank_note, -.indexLabel { - font-family: Arial, sans-serif; font-weight: bold; color:#0050B2 -} -.rank_book {font-size: 230%; padding: 0; margin: 2em 0 1.5em 0;} -.rank_part {font-size: 220%; padding: 0; margin: 2em 0 1.5em 0} -.rank_chapter {font-size: 200%; padding: 0; margin: 2em 0 1.5em 0} -.rank_section1 { font-size: 150%; padding: 0; margin: 1.5em 0 1.0em 0;} -.rank_section2 { font-size: 112%; padding: 0; margin: 1.5em 0 1.0em 0;} -.rank_section3 { font-size: 95%; padding: 0; margin: 1.5em 0 1.0em 0;} -.rank_simplesect {font-size: 100%; padding: 0; margin: 1.5em 0 1.0em 0; - font-weight: normal; font-style: italic -} -.indexLabel {font-size: 108%; padding: 0; margin: 1.0em 0 1.0em 0;} - -.rank_note {font-size: 100%; color: black; padding: 0; margin: 1em 0 0.5em 0;} - -#pageTopTitle {margin-top: 1em; margin-bottom: 1em; border: none;} - -/* Footer: */ - -.footer {font-size: 83%; color: #A0A0A0; font-style: italic} -.smallFooter {font-size: 63%; color: #A0A0A0; font-style: italic} - -/* Nav. bar: */ - -div.navigation { - background-image: url(img/navigation-gradient.gif); - background-repeat: repeat-y; - background-position: left; - background-color: #F0F0F0; - border-top: solid black 1px; - border-bottom: solid black 1px; - width: 100%; /* IE6 Peekaboo bug workaround */ -} - -div.missingNavigationFooterLine { - height: 1px; - border-bottom: solid black 1px; -} - -div.bookmarks { - padding: 0.2em 0.3em 0.2em 0.3em; -} -span.bookmarks { -} -.disabledBookmark {color: #808080} - -/* -Because the buttons are floating div-s, this panel uses -two div.pagersVerticalSpacer-s inserad padding. -*/ -div.pagers { - padding: 0 0.3em; -} -div.pagersVerticalSpacer { - clear: both; - height: 0.2em; -} -.disabledPager {color: #808080} - -div.pagerButton { - float: left; - margin-right: 0.5em; - padding: 0.1em 0.3em; - border-width: 0.15em; - border-style: solid; - border-color: #FFFFFF #A0A0A0 #A0A0A0 #F0F0F0; - background: #E0E0E0; -} - -.hideA {color: #000000;} - -div.breadcrumb { - padding: 0.2em 0.3em 0.2em 0.3em; -} - -span.breadcrumb { - font-size: 80%; /* Don't use 0.8em due to MSIE6 bug */ -} diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/1.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/1.gif deleted file mode 100644 index 0d66977..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/1.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/10.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/10.gif deleted file mode 100644 index fb50b06..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/10.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/11.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/11.gif deleted file mode 100644 index 9f5dba4..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/11.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/12.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/12.gif deleted file mode 100644 index a373d0b..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/12.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/13.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/13.gif deleted file mode 100644 index b00b163..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/13.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/14.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/14.gif deleted file mode 100644 index 6d6642e..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/14.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/2.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/2.gif deleted file mode 100644 index 100ff79..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/2.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/3.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/3.gif deleted file mode 100644 index 5008ca7..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/3.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/4.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/4.gif deleted file mode 100644 index 0e5617d..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/4.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/5.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/5.gif deleted file mode 100644 index 9bc75ad..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/5.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/6.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/6.gif deleted file mode 100644 index d396407..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/6.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/7.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/7.gif deleted file mode 100644 index c90b2f3..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/7.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/8.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/8.gif deleted file mode 100644 index 6fe3287..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/8.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/callouts/9.gif b/fmpp/docs/freemarker/docgen-resources/img/callouts/9.gif deleted file mode 100644 index bc5c812..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/callouts/9.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/linktargetmarker.gif b/fmpp/docs/freemarker/docgen-resources/img/linktargetmarker.gif deleted file mode 100644 index 29d19c5..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/linktargetmarker.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/navigation-gradient.gif b/fmpp/docs/freemarker/docgen-resources/img/navigation-gradient.gif deleted file mode 100644 index ec73225..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/navigation-gradient.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/none.gif b/fmpp/docs/freemarker/docgen-resources/img/none.gif deleted file mode 100644 index f191b28..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/none.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/img/xxe.gif b/fmpp/docs/freemarker/docgen-resources/img/xxe.gif deleted file mode 100644 index a4e617f..0000000 Binary files a/fmpp/docs/freemarker/docgen-resources/img/xxe.gif and /dev/null differ diff --git a/fmpp/docs/freemarker/docgen-resources/jquery.js b/fmpp/docs/freemarker/docgen-resources/jquery.js deleted file mode 100644 index c327fae..0000000 --- a/fmpp/docs/freemarker/docgen-resources/jquery.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * jQuery JavaScript Library v1.3.1 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-01-21 20:42:16 -0500 (Wed, 21 Jan 2009) - * Revision: 6158 - */ -(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.makeArray(E))},selector:"",jquery:"1.3.1",size:function(){return this.length},get:function(E){return E===g?o.makeArray(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,find:function(E){if(this.length===1&&!/,/.test(E)){var G=this.pushStack([],"find",E);G.length=0;o.find(E,this[0],G);return G}else{var F=o.map(this,function(H){return o.find(E,H)});return this.pushStack(/[^+>] [^+>]/.test(E)?o.unique(F):F,"find",E)}},clone:function(F){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.cloneNode(true),H=document.createElement("div");H.appendChild(I);return o.clean([H.innerHTML])[0]}else{return this.cloneNode(true)}});var G=E.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(F===true){this.find("*").andSelf().each(function(I){if(this.nodeType==3){return}var H=o.data(this,"events");for(var K in H){for(var J in H[K]){o.event.add(G[I],K,H[K][J],H[K][J].data)}}})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var F=o.expr.match.POS.test(E)?o(E):null;return this.map(function(){var G=this;while(G&&G.ownerDocument){if(F?F.index(G)>-1:o(G).is(E)){return G}G=G.parentNode}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML:null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(K,N,M){if(this[0]){var J=(this[0].ownerDocument||this[0]).createDocumentFragment(),G=o.clean(K,(this[0].ownerDocument||this[0]),J),I=J.firstChild,E=this.length>1?J.cloneNode(true):J;if(I){for(var H=0,F=this.length;H0?E.cloneNode(true):J)}}if(G){o.each(G,z)}}return this;function L(O,P){return N&&o.nodeName(O,"table")&&o.nodeName(P,"tr")?(O.getElementsByTagName("tbody")[0]||O.appendChild(O.ownerDocument.createElement("tbody"))):O}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(G,E,I){if(E=="width"||E=="height"){var K,F={position:"absolute",visibility:"hidden",display:"block"},J=E=="width"?["Left","Right"]:["Top","Bottom"];function H(){K=E=="width"?G.offsetWidth:G.offsetHeight;var M=0,L=0;o.each(J,function(){M+=parseFloat(o.curCSS(G,"padding"+this,true))||0;L+=parseFloat(o.curCSS(G,"border"+this+"Width",true))||0});K-=Math.round(M+L)}if(o(G).is(":visible")){H()}else{o.swap(G,F,H)}return Math.max(0,K)}return o.curCSS(G,E,I)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,R){if(typeof R==="number"){R+=""}if(!R){return}if(typeof R==="string"){R=R.replace(/(<(\w+)[^>]*?)\/>/g,function(T,U,S){return S.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?T:U+">"});var O=o.trim(R).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+R+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var N=!O.indexOf(""&&O.indexOf("=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(R)){L.insertBefore(K.createTextNode(R.match(/^\s*/)[0]),L.firstChild)}R=o.makeArray(L.childNodes)}if(R.nodeType){G.push(R)}else{G=o.merge(G,R)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); -/* - * Sizzle CSS Selector Engine - v0.9.3 - * Copyright 2009, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var Q=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,K=0,G=Object.prototype.toString;var F=function(X,T,aa,ab){aa=aa||[];T=T||document;if(T.nodeType!==1&&T.nodeType!==9){return[]}if(!X||typeof X!=="string"){return aa}var Y=[],V,ae,ah,S,ac,U,W=true;Q.lastIndex=0;while((V=Q.exec(X))!==null){Y.push(V[1]);if(V[2]){U=RegExp.rightContext;break}}if(Y.length>1&&L.exec(X)){if(Y.length===2&&H.relative[Y[0]]){ae=I(Y[0]+Y[1],T)}else{ae=H.relative[Y[0]]?[T]:F(Y.shift(),T);while(Y.length){X=Y.shift();if(H.relative[X]){X+=Y.shift()}ae=I(X,ae)}}}else{var ad=ab?{expr:Y.pop(),set:E(ab)}:F.find(Y.pop(),Y.length===1&&T.parentNode?T.parentNode:T,P(T));ae=F.filter(ad.expr,ad.set);if(Y.length>0){ah=E(ae)}else{W=false}while(Y.length){var ag=Y.pop(),af=ag;if(!H.relative[ag]){ag=""}else{af=Y.pop()}if(af==null){af=T}H.relative[ag](ah,af,P(T))}}if(!ah){ah=ae}if(!ah){throw"Syntax error, unrecognized expression: "+(ag||X)}if(G.call(ah)==="[object Array]"){if(!W){aa.push.apply(aa,ah)}else{if(T.nodeType===1){for(var Z=0;ah[Z]!=null;Z++){if(ah[Z]&&(ah[Z]===true||ah[Z].nodeType===1&&J(T,ah[Z]))){aa.push(ae[Z])}}}else{for(var Z=0;ah[Z]!=null;Z++){if(ah[Z]&&ah[Z].nodeType===1){aa.push(ae[Z])}}}}}else{E(ah,aa)}if(U){F(U,T,aa,ab)}return aa};F.matches=function(S,T){return F(S,null,null,T)};F.find=function(Z,S,aa){var Y,W;if(!Z){return[]}for(var V=0,U=H.order.length;V":function(X,T,Y){if(typeof T==="string"&&!/\W/.test(T)){T=Y?T:T.toUpperCase();for(var U=0,S=X.length;U=0){if(!U){S.push(X)}}else{if(U){T[W]=false}}}}return false},ID:function(S){return S[1].replace(/\\/g,"")},TAG:function(T,S){for(var U=0;S[U]===false;U++){}return S[U]&&P(S[U])?T[1]:T[1].toUpperCase()},CHILD:function(S){if(S[1]=="nth"){var T=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(S[2]=="even"&&"2n"||S[2]=="odd"&&"2n+1"||!/\D/.test(S[2])&&"0n+"+S[2]||S[2]);S[2]=(T[1]+(T[2]||1))-0;S[3]=T[3]-0}S[0]="done"+(K++);return S},ATTR:function(T){var S=T[1].replace(/\\/g,"");if(H.attrMap[S]){T[1]=H.attrMap[S]}if(T[2]==="~="){T[4]=" "+T[4]+" "}return T},PSEUDO:function(W,T,U,S,X){if(W[1]==="not"){if(W[3].match(Q).length>1){W[3]=F(W[3],null,null,T)}else{var V=F.filter(W[3],T,U,true^X);if(!U){S.push.apply(S,V)}return false}}else{if(H.match.POS.test(W[0])){return true}}return W},POS:function(S){S.unshift(true);return S}},filters:{enabled:function(S){return S.disabled===false&&S.type!=="hidden"},disabled:function(S){return S.disabled===true},checked:function(S){return S.checked===true},selected:function(S){S.parentNode.selectedIndex;return S.selected===true},parent:function(S){return !!S.firstChild},empty:function(S){return !S.firstChild},has:function(U,T,S){return !!F(S[3],U).length},header:function(S){return/h\d/i.test(S.nodeName)},text:function(S){return"text"===S.type},radio:function(S){return"radio"===S.type},checkbox:function(S){return"checkbox"===S.type},file:function(S){return"file"===S.type},password:function(S){return"password"===S.type},submit:function(S){return"submit"===S.type},image:function(S){return"image"===S.type},reset:function(S){return"reset"===S.type},button:function(S){return"button"===S.type||S.nodeName.toUpperCase()==="BUTTON"},input:function(S){return/input|select|textarea|button/i.test(S.nodeName)}},setFilters:{first:function(T,S){return S===0},last:function(U,T,S,V){return T===V.length-1},even:function(T,S){return S%2===0},odd:function(T,S){return S%2===1},lt:function(U,T,S){return TS[3]-0},nth:function(U,T,S){return S[3]-0==T},eq:function(U,T,S){return S[3]-0==T}},filter:{CHILD:function(S,V){var Y=V[1],Z=S.parentNode;var X=V[0];if(Z&&(!Z[X]||!S.nodeIndex)){var W=1;for(var T=Z.firstChild;T;T=T.nextSibling){if(T.nodeType==1){T.nodeIndex=W++}}Z[X]=W-1}if(Y=="first"){return S.nodeIndex==1}else{if(Y=="last"){return S.nodeIndex==Z[X]}else{if(Y=="only"){return Z[X]==1}else{if(Y=="nth"){var ab=false,U=V[2],aa=V[3];if(U==1&&aa==0){return true}if(U==0){if(S.nodeIndex==aa){ab=true}}else{if((S.nodeIndex-aa)%U==0&&(S.nodeIndex-aa)/U>=0){ab=true}}return ab}}}}},PSEUDO:function(Y,U,V,Z){var T=U[1],W=H.filters[T];if(W){return W(Y,V,U,Z)}else{if(T==="contains"){return(Y.textContent||Y.innerText||"").indexOf(U[3])>=0}else{if(T==="not"){var X=U[3];for(var V=0,S=X.length;V=0:V==="~="?(" "+X+" ").indexOf(T)>=0:!U[4]?S:V==="!="?X!=T:V==="^="?X.indexOf(T)===0:V==="$="?X.substr(X.length-T.length)===T:V==="|="?X===T||X.substr(0,T.length+1)===T+"-":false},POS:function(W,T,U,X){var S=T[2],V=H.setFilters[S];if(V){return V(W,U,T,X)}}}};var L=H.match.POS;for(var N in H.match){H.match[N]=RegExp(H.match[N].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(T,S){T=Array.prototype.slice.call(T);if(S){S.push.apply(S,T);return S}return T};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(M){E=function(W,V){var T=V||[];if(G.call(W)==="[object Array]"){Array.prototype.push.apply(T,W)}else{if(typeof W.length==="number"){for(var U=0,S=W.length;U";var S=document.documentElement;S.insertBefore(T,S.firstChild);if(!!document.getElementById(U)){H.find.ID=function(W,X,Y){if(typeof X.getElementById!=="undefined"&&!Y){var V=X.getElementById(W[1]);return V?V.id===W[1]||typeof V.getAttributeNode!=="undefined"&&V.getAttributeNode("id").nodeValue===W[1]?[V]:g:[]}};H.filter.ID=function(X,V){var W=typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id");return X.nodeType===1&&W&&W.nodeValue===V}}S.removeChild(T)})();(function(){var S=document.createElement("div");S.appendChild(document.createComment(""));if(S.getElementsByTagName("*").length>0){H.find.TAG=function(T,X){var W=X.getElementsByTagName(T[1]);if(T[1]==="*"){var V=[];for(var U=0;W[U];U++){if(W[U].nodeType===1){V.push(W[U])}}W=V}return W}}S.innerHTML="";if(S.firstChild&&S.firstChild.getAttribute("href")!=="#"){H.attrHandle.href=function(T){return T.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var S=F,T=document.createElement("div");T.innerHTML="

    ";if(T.querySelectorAll&&T.querySelectorAll(".TEST").length===0){return}F=function(X,W,U,V){W=W||document;if(!V&&W.nodeType===9&&!P(W)){try{return E(W.querySelectorAll(X),U)}catch(Y){}}return S(X,W,U,V)};F.find=S.find;F.filter=S.filter;F.selectors=S.selectors;F.matches=S.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){H.order.splice(1,0,"CLASS");H.find.CLASS=function(S,T){return T.getElementsByClassName(S[1])}}function O(T,Z,Y,ac,aa,ab){for(var W=0,U=ac.length;W0){W=S;break}}}S=S[T]}ab[V]=W}}}var J=document.compareDocumentPosition?function(T,S){return T.compareDocumentPosition(S)&16}:function(T,S){return T!==S&&(T.contains?T.contains(S):true)};var P=function(S){return S.nodeType===9&&S.documentElement.nodeName!=="HTML"||!!S.ownerDocument&&P(S.ownerDocument)};var I=function(S,Z){var V=[],W="",X,U=Z.nodeType?[Z]:Z;while((X=H.match.PSEUDO.exec(S))){W+=X[0];S=S.replace(H.match.PSEUDO,"")}S=H.relative[S]?S+"*":S;for(var Y=0,T=U.length;Y=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}this[H].style.display=o.data(this[H],"olddisplay",K)}}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)==1){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(H,F){var E=H?"Left":"Top",G=H?"Right":"Bottom";o.fn["inner"+F]=function(){return this[F.toLowerCase()]()+j(this,"padding"+E)+j(this,"padding"+G)};o.fn["outer"+F]=function(J){return this["inner"+F]()+j(this,"border"+E+"Width")+j(this,"border"+G+"Width")+(J?j(this,"margin"+E)+j(this,"margin"+G):0)};var I=F.toLowerCase();o.fn[I]=function(J){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+F]||document.body["client"+F]:this[0]==document?Math.max(document.documentElement["client"+F],document.body["scroll"+F],document.documentElement["scroll"+F],document.body["offset"+F],document.documentElement["offset"+F]):J===g?(this.length?o.css(this[0],I):null):this.css(I,typeof J==="string"?J:J+"px")}})})(); \ No newline at end of file diff --git a/fmpp/docs/freemarker/docgen-resources/linktargetmarker.js b/fmpp/docs/freemarker/docgen-resources/linktargetmarker.js deleted file mode 100644 index a0f5253..0000000 --- a/fmpp/docs/freemarker/docgen-resources/linktargetmarker.js +++ /dev/null @@ -1,43 +0,0 @@ -var markerTimerId; - -function escId(myid) { - return '#' + myid.replace(/\./g, "\\."); -} - -function showMarker(name) { - if (markerTimerId) { - clearTimeout(markerTimerId); - showMarker_endAnimation(); - markerTimerId = null; - } - var target = $("a[name='" + name + "']"); - target.before( - "" - + "" - + ""); - markerTimerId = setTimeout('showMarker_endAnimation()', 1000); -} - -function showMarker_endAnimation() { - $('#docgen_marker').remove(); -} - -function extractTargetName(href) { - anchorIdx = href.indexOf('#'); - if (anchorIdx == -1) return null; - queryIdx = href.indexOf('?'); - return href.substring( - anchorIdx + 1, - queryIdx != -1 ? queryIdx : href.length); -} - -$(document).ready(function() { - $("a[href^='#']").click(function(event) { - showMarker(extractTargetName($(this).attr('href'))); - }); - - if (location.href.indexOf('#') != -1) { - showMarker(extractTargetName(location.href)); - } -}); diff --git a/fmpp/docs/freemarker/eclipse-toc.xml b/fmpp/docs/freemarker/eclipse-toc.xml deleted file mode 100644 index 133e9f6..0000000 --- a/fmpp/docs/freemarker/eclipse-toc.xml +++ /dev/null @@ -1,643 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/docs/freemarker/figures/model2sketch.png b/fmpp/docs/freemarker/figures/model2sketch.png deleted file mode 100644 index 93f9a6b..0000000 Binary files a/fmpp/docs/freemarker/figures/model2sketch.png and /dev/null differ diff --git a/fmpp/docs/freemarker/figures/overview.png b/fmpp/docs/freemarker/figures/overview.png deleted file mode 100644 index be8e504..0000000 Binary files a/fmpp/docs/freemarker/figures/overview.png and /dev/null differ diff --git a/fmpp/docs/freemarker/figures/tree.png b/fmpp/docs/freemarker/figures/tree.png deleted file mode 100644 index dcd9bf3..0000000 Binary files a/fmpp/docs/freemarker/figures/tree.png and /dev/null differ diff --git a/fmpp/docs/freemarker/gloss.html b/fmpp/docs/freemarker/gloss.html deleted file mode 100644 index 63f5e2a..0000000 --- a/fmpp/docs/freemarker/gloss.html +++ /dev/null @@ -1,745 +0,0 @@ - - - - - - - - FreeMarker Manual - Glossary - - - - - - - - -
    - - - - - -

    -Glossary

    - -

    -A | B | C | D | E | F | H | L | M | O | P | R | S | T | U | W | X

    - -
    - -
    Attribute
    - - -
    -

    In connection with XML or HTML - (or SGML in general), attributes are - the named values associated with elements. For example, in - <body bgcolor=black - text=green>...</body>, - the attributes are bgcolor=black and - text=green. On the left side of - = is the name of the attribute, while on the right - side is the value of the attribute. Note that in XML, the values must - be quoted (for example: <body bgcolor="black" - text='green'>), while in HTML it is optional for certain - values.

    - - - -

    See Also - Start-tag -

    -
    - - -
    Boolean
    - - -
    -

    This is a variable type. A boolean variable represents a logical - true or false (yes or no). For example, if the visitor has been logged - in or not. There are only two possible boolean values: - true and false. Typically, you - will use booleans with an <#if - ...> directive when you want - to display text based on some condition, say, you show a certain part - of the page only for visitors who has logged in.

    - -
    - - -
    Character
    - - -
    -

    A symbol that people use in writing. Examples of characters: - Latin capital letter A (``A''), Latin small letter A (``a''), digit - four (``4''), number sign (``#''), colon (``:'')

    - -
    - - -
    Charset
    - - -
    -

    A charset is a rule (algorithm) for transforming a sequence of - characters (text) to a sequence - of bits (or in practice, to a sequence of bytes). Whenever a character - sequence is stored on a digital media, or sent through a digital - channel (network), a charset must be applied. Examples of charsets are - ISO-8859-1, ISO-8859-6, Shift_JIS , UTF-8.

    - -

    The capabilities of different charsers are different, that is, - not all charsets can be used for all languages. For example ISO-8859-1 - can't represent Arabic letters, but ISO-8859-6 can, however it can't - represent the accented letters that that ISO-8859-1 can. Most charsets - are highly restrictive regarding the allowed characters. UTF-8 allows - virtually all possible characters, but most text editors can't handle - it yet (2004).

    - -

    When different software components exchange text (as the HTTP - server and the browser, or the text editor you use for saving - templates and FreeMarker who loads them), it's very important that - they agree in the charset used for the binary encoding of the text. If - they don't, then the binary data will be misinterpreted by the - receiver (loader) component, which usually results in the distortion - of the non-English letters.

    - -
    - - -
    Collection
    - - -
    -

    A variable that (in conjunction with the list - directive) can spit out a series of variables.

    - -
    - - -
    Data-model
    - - -
    -

    Something that holds the information the template has to show - (or use in some other ways) when the template processor assembles the - output (e.g. a Web page). In FreeMarker this is best visualized as a - tree.

    - -
    - - -
    Directive
    - - -
    -

    Instructions to FreeMarker used in FTL templates. They are invoked by FTL tags.

    - - - - - -

    See Also - Predefined directive, - User-defined directive -

    -
    - - -
    Element
    - - -
    -

    Elements are the most fundamental building pieces of SGML documents; an SGML document is - basically a tree of elements. Example of elements used in HTML: body, - head, title, p, h1, h2.

    - -
    - - -
    End-tag
    - - -
    -

    Tag, which indicates that the - following content is not under the element. Example: - </body>.

    - - - -

    See Also - Start-tag -

    -
    - - -
    Environment
    - - -
    -

    An Environment object stores the runtime - state of a single template template processing job. - That is, for each - Template.process(...) - call, an Environment instance will be created, and - then discarded when process returns. This object - stores the set of temporary variables created by the template, the - value of settings set by the template, the reference to the data-model - root, etc. Everything that is needed to fulfill the template - processing job.

    - -
    - - -
    Extensible Markup Language
    - - -
    -

    A subset (restricted version) of SGML. This is less powerful than SGML, but - it easier to learn and much easier to process with programs. If you - are an HTML author: XML documents are similar to HTML documents, but - the XML standard doesn't specify the usable elements. XML is a much - more general-purpose thing than HTML. For example you can use XML to - describe Web pages (like HTML) or to describe non-visual information - like a phone book database.

    - - - -

    See Also - Standard Generalized Markup Language -

    -
    - - -
    FreeMarker Template Language
    - - -
    -

    Simple programming language designed to write text file - templates, especially HTML templates.

    - -
    - - -
    FTL
    - - -

    See - FreeMarker Template Language -

    - - -
    FTL tag
    - - -
    -

    Tag-like text fragment used to - invoke FreeMarker directives in - FTL templates. These are similar to HTML - or XML tags at the first glance. The most prominent difference is that - the tag name is started with # or - @. Another important difference is that FTL tags do - not use attributes, but a - substantially different syntax to specify parameters. Examples of FTL - tags: <#if newUser>, - </#if>, <@menuitem - title="Projects" link="projects.html"/>

    - -
    - - -
    Full-qualified name
    - - -
    -

    ... of nodes (XML node or other FTL node variable): The - full-qualified name of a node specifies not only the node name - (node?node_name), but - also the node namespace - (node?node_namespace), - this way it unambiguously identify a certain kind of node. The format - of the full-qualified name is - nodeName or - prefix:nodeName. - The prefix is shorthand to identify the node namespace (the a node - namespace is usually specified with a long ugly URI). In FTL, prefixes - are associated with the node namespaces with the - ns_prefixes parameter of the ftl - directive. In XML files, prefixes are associated with the node - namespaces with the - xmlns:prefix attributes. - The lack of the prefix means that the node uses the default node - namespace, if a default node namespace is defined; otherwise it means - that the node does not belong to any node namespace. The default node - namespace is defined in FTL by registering reserved prefix - D with the ns_prefixes parameter - of the ftl directive. In XML files it is defined - with attribute xmlns.

    - -

    ... of Java classes: The full-qualified name of a Java class - contains both the class name and the name of the package the class - belongs to. This way it unambiguously specifies the class, regardless - of the context. An example of full-qualifed class name: - java.util.Map (as opposed to - Map).

    - -
    - - -
    Hash
    - - -
    -

    A variable that acts as a container that stores subvariables - that can be retrieved via a string that is a lookup name.

    - - - -

    See Also - Sequence -

    -
    - - -
    Line break
    - - -
    -

    Line break is a special character (or a sequence of special - characters) that causes a line breaking when you see the text as plain - text (say, when you read the text with Windows notepad). Typically you - type this character by hitting ENTER or RETURN key. The line break is - represented with different characters on different platforms (to cause - incompatibility and confusion...): ``line feed'' character on UNIX-es, - ``carriage return'' character on Macintosh, ``carriage return''+``line - feed'' (two characters!) on Windows and DOS. Note that line breaks in - HTML do not have a visual effect when viewed in a browser; you must - use markup such as <BR> for that. This manual - never means <BR> when it says - ``line-break''.

    - -
    - - -
    Macro definition body
    - - -
    -

    The template fragment between the <#macro - ...> and - </#macro>. This template fragment will be - executed when you call the macro (for example as - <@myMacro/>).

    - -
    - - -
    Method
    - - -
    -

    A variable that calculates something based on parameters you - give, and returns the result.

    - -
    - - -
    MVC pattern
    - - -
    -

    MVC stands for Model View Controller. It's a design pattern - started his life in the 70's as a framework developer by Trygve - Reenskaug for Smalltalk, and was used primary for for UI-s (user - interfaces). MVC considers three roles:

    - -
    -
      -
    • - Model: Model represents application (domain) specific - information in a non-visual way. For example, an array of product - objects in the memory of your computer is the part of the - model. -
    • - -
    • - View: View displays the model and provides UI. For example, - it's the task of the view component to render the array of product - objects to a HTML page. -
    • - -
    • - Controller: The controller handles user input, modifies the - model, and ensures that the view is updated when needed. For - example it is the task of controller to take the incoming HTTP - requests, parse the received parameters (forms), dispatch the - requests to the proper business logic object, and chose the right - template for the HTTP response. -
    • -
    - - -

    The most important thing for us when applying MVC for Web - applications is the separation of View from the other two roles. This - allows the separation of designers (HTML authors) from programmers. - Designers deal with the visual aspects, programmers deal with the - application logic and other technical issues; everybody works on what - he is good at. Designers and programmers are less dependent on each - other. Designers can change the appearance without programmers having - to change or recompile the program.

    - -

    For more information I recommend reading chapter - 4.4 of Designing Enterprise Applications with the J2EE Platform - blueprint.

    - -
    - - -
    Output encoding
    - - -
    -

    Means output charset. In - the Java world the term ``encoding'' is commonly (mis)used as a - synonym to ``charset''.

    - -
    - - -
    Predefined directive
    - - -
    -

    Directive what is defined by FreeMarker, thus always available. - Example of predefined directives: if, - list, include

    - - - -

    See Also - User-defined directive -

    -
    - - -
    Regular expression
    - - -
    -

    A regular expression is a string that specifies a set of strings - that matches it. For example, the regular expression - "fo*" matches "f", - "fo", "foo", etc. Regular - expressions are used in several languages and other tools. In - FreeMarker, the usage of them is a ``power user'' option. So if you - have never used them before, there is no need to worry about not being - familiar with them. But if you are interested in regular expressions, - you can find several Web pages and books about them. FreeMarker uses - the variation of regular expressions described at: http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html

    - -
    - - -
    Scalar
    - - -
    -

    A scalar variable stores a single value. A scalar is either a - string or a number or a date/time or a boolean.

    - -
    - - -
    Sequence
    - - -
    -

    A sequence is a variable that contains a sequence of - subvariables. The sequence's subvariables are accessible via numerical - index, where the index of the very first object is 0, the index of the - second objects is 1, the index of the third object is 2, etc.

    - - - -

    See Also - Hash -

    -
    - - -
    SGML
    - - -

    See - Standard Generalized Markup Language -

    - - -
    Standard Generalized Markup Language
    - - -
    -

    This is an international standard (ISO 8879) that specifies the - rules for the creation of platform-independent markup languages. HTML - is a markup language created with SGML. XML is a subset (restricted version) of - SGML.

    - - - -

    See Also - Extensible Markup Language -

    -
    - - -
    Start-tag
    - - -
    -

    Tag, which indicates that the - following content is under the element, up to the end-tag. The start-tag may also - specifies attributes for the - element. An example of a start-tag: <body - bgcolor=black>

    - -
    - - -
    String
    - - -
    -

    A sequence of characters - such as ``m'', ``o'', ``u'', ``s'', ``e''.

    - -
    - - -
    Tag
    - - -
    -

    Text fragment indicating the usage of an element in SGML. - Examples of tags: <body bgcolor=black>, - </body>

    - - - - - -

    See Also - Start-tag, - End-tag -

    -
    - - -
    Template
    - - -
    -

    A template is a text file with some special character sequences - embedded into it. A template processor (e.g. FreeMarker) will - interpret special character sequences and it outputs a more or less - different text from the original text file, where the differences are - often based on a data-model. - Thus, the original text acts as a template of the possible - outputs.

    - -
    - - -
    Template encoding
    - - -
    -

    Means template charset. In - the Java world the term ``encoding'' is commonly (mis)used as a - synonym to ``charset''.

    - -
    - - -
    Template processing job
    - - -
    -

    A template processing job is the act when FreeMarker merges a - template with a data-model to produce the output for a visitor. Note - that this may includes the execution of multiple template files - because the template file used for the Web page may invokes other - templates with include and - import directives. Each template-processing job is - a separated cosmos that exists only for the short period of time while - the given page is being rendered for the visitor, and then it vanishes - with all the variables created in the templates (for example, - variables created with assign, - macro or global - directives).

    - -
    - - -
    Thread-safe
    - - -
    -

    An object is thread-safe if it is safe to call its methods from - multiple threads, even in parallel (i.e. multiple threads execute the - methods of the object at the same time). Non-thread-safe objects may - behave unpredictably in this situation, and generate wrong results, - corrupt internal data structures, etc. Thread-safety is typically - achieved in two ways with Java: with the usage - synchronized statement (or - synchronized methods), and with the immutability of - encapsulated data (i.e. you can't modify the field after you have - created the object).

    - -
    - - -
    Transform
    - - -
    -

    This term refers to user-defined directives that are implemetned - with the now obsolete TemplateTransformModel Java - interface. The feature was originally made for implementing output - filters, hence the name.

    - -
    - - -
    UCS
    - - -
    -

    This is international standard (ISO-10646) that defines a huge - set of characters and assigns a - unique number for each character (``!'' is 33, ..., ``A'' is 61, ``B'' - is 62, ..., Arabic letter hamza is 1569... etc.). This character set - (not charset) contains almost all characters used today (Latin - alphabet, Cyrillic alphabet, Chinese letters, etc.). The idea behind - UCS is that we can specify any character with a unique number, not - mater what the platform or the language is.

    - - - -

    See Also - Unicode -

    -
    - - -
    Unicode
    - - -
    -

    De-facto standard developed by Unicode organization. It deals - with the classification of the characters in UCS (which is letter, which is digit, which - is uppercase, which is lowercase, etc.), and with other problems of - processing text made from the characters of UCS (e.g. - normalization).

    - -
    - - -
    User-defined directive
    - - -
    -

    Directive that is not defined by the FreeMarker core, but by the - user. These are typically application domain specific directives, like - pull-down menu generation directives, HTML form handling - directives.

    - - - -

    See Also - Predefined directive -

    -
    - - -
    White-space
    - - -
    -

    Characters that are totally transparent but have impact on the - visual appearance of the text. Examples of white-space characters: - space, tab (horizontal and vertical), line breaks (CR and LF), form - feed.

    - - - -

    See Also - Line break -

    -
    - - -
    XML
    - - -

    See - Extensible Markup Language -

    - -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/index.html b/fmpp/docs/freemarker/index.html deleted file mode 100644 index cff1866..0000000 --- a/fmpp/docs/freemarker/index.html +++ /dev/null @@ -1,599 +0,0 @@ - - - - - - - - FreeMarker Manual - - - - - - - - -
    - - - - - -

    -FreeMarker Manual
    For FreeMarker 2.3.21
    -

    - -
    -

    - - Table of Contents - -  [Show detailed...]

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui.html b/fmpp/docs/freemarker/pgui.html deleted file mode 100644 index 2417003..0000000 --- a/fmpp/docs/freemarker/pgui.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - FreeMarker Manual - Programmer's Guide - - - - - - - - -
    - - - - - -

    -Part II   Programmer's Guide

    - - - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_config.html b/fmpp/docs/freemarker/pgui_config.html deleted file mode 100644 index ffeb7a8..0000000 --- a/fmpp/docs/freemarker/pgui_config.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - FreeMarker Manual - The Configuration - - - - - - - - -
    - - - - - -

    -Chapter 3   The Configuration

    - -
    -

    - - Chapter Contents - -

    - - -
    - - -

    This is just an overview. See the FreeMarker Java API documentation for the - details.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_config_basics.html b/fmpp/docs/freemarker/pgui_config_basics.html deleted file mode 100644 index 74db8b0..0000000 --- a/fmpp/docs/freemarker/pgui_config_basics.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - FreeMarker Manual - Basics - - - - - - - - -
    - - - - - -

    -Basics

    - - -

    First of all, be sure you have read the Getting Started - chapter.

    A configuration is a - freemarker.template.Configuration object that - stores your common (global, application level) settings and defines - variables that you want to be available in all templates (so called - shared variables). Also, it deals with the creation and caching of - Template instances.

    An application typically should use only a single shared - Configuration instance. More precisely, typically - you should have one Configuration instance per - independently developed components (like projects, modules, etc.) that - internally use FreeMarker, as each should create its own - instance.

    As running templates are influenced by the configuration - settings, each Template instance has a - Configuration instance associated with it, via the - corresponding Template constructor parameter. - Usually you obtain Template instances with - Configuration.getTemplate (not by directly calling - the Template constructor), in which case the - associated Configuration instance will be the one - whose getTemplate method has been called.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_config_errorhandling.html b/fmpp/docs/freemarker/pgui_config_errorhandling.html deleted file mode 100644 index 1d55408..0000000 --- a/fmpp/docs/freemarker/pgui_config_errorhandling.html +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - - FreeMarker Manual - Error handling - - - - - - - - -
    - - - - - -

    -Error handling

    - - - - - - - - - -

    -The possible exceptions

    - - -

    The exceptions that can occur regarding FreeMarker could be - classified like this:

    - -
    -
      -
    • -

      Exceptions occurring when you configure FreeMarker: - Typically you configure FreeMarker only once in your - application, when your application initializes itself. Of - course, during this, exceptions can occur, as it is obvious from - the FreeMarker API...

      -
    • - -
    • -

      Exceptions occurring when loading and parsing templates: - When you call - Configuration.getTemplate(...), - FreeMarker has to load the template file into the memory and - parse it (unless the template is already cached in - that Configuration object). During this, two - kind of exceptions can occur:

      - -
      -
        -
      • -

        IOException because the template - file was not found, or other I/O problem occurred while - trying to read it, for example you have no right to read the - file, or there are disk errors. The emitter of these errors - is the TemplateLoader - object, which is plugged into the - Configuration object. (For the sake of - correctness: When I say ``file'' here, that's a - simplification. For example, templates can be stored in a - table of a relational database as well. This is the business - of the TemplateLoader.)

        -
      • - -
      • -

        freemarker.core.ParseException - because the template file is syntactically incorrect - according the rules of the FTL language. The point is that - this error occurs when you obtain the - Template object - (Configuration.getTemplate(...)), - and not when you execute - (Template.process(...)) - the template. This exception is an - IOException subclass.

        -
      • -
      - -
    • - -
    • -

      Exceptions occurring when executing (processing) - templates, that is, when you call - Template.process(...). - Two kind of exceptions can occur:

      - -
      -
        -
      • -

        IOException because there was an - error when trying to write into the output writer.

        -
      • - -
      • -

        freemarker.template.TemplatException - because other problem occurred while executing the template. - For example, a frequent error is when a template refers to a - variable which is not existing. Be default, when a - TemplatException occurs, FreeMarker - prints the FTL error message and the stack trace to the - output writer with plain text format, and then aborts the - template execution by re-throwing the - TemplatException, which then you can - catch as - Template.process(...) - throws it. But this behavior can be customized. FreeMarker - always logs - TemplatException-s.

        -
      • -
      - -
    • -
    - - - - - - -

    -Customizing the behavior regarding TemplatException-s

    - - -

    TemplateException-s thrown during the - template processing are handled by the - freemarker.template.TemplateExceptionHandler - object, which is plugged into the Configuration - object with its - setTemplateExceptionHandler(...) - mehod. The TemplateExceptionHandler contains 1 - method:

    - -
    -
    -void handleTemplateException(TemplateException te, Environment env, Writer out) 
    -        throws TemplateException;  
    - - -

    Whenever a TemplateException occurs, this - method will be called. The exception to handle is passed with the - te argument, the runtime environment of the - template processing is accessible with the env - argument, and the handler can print to the output using the - out argument. If the method throws exception - (usually it re-throws te), then the template - processing will be aborted, and - Template.process(...) - will throw the same exception. If - handleTemplateException doesn't throw exception, - then template processing continues as if nothing had happen, but the - statement that caused the exception will be skipped (see more - later). Of course, the handler can still print an error indicator to - the output.

    - -

    In any case, before the - TemplateExceptionHandler is invoked, FreeMarker - will log the - exception.

    - -

    Let's see how FreeMarker skips ``statements'' when the error - handler doesn't throw exception, through examples. Assume we are - using this template exception handler:

    - -
    -
    -class MyTemplateExceptionHandler implements TemplateExceptionHandler {
    -    public void handleTemplateException(TemplateException te, Environment env, java.io.Writer out)
    -            throws TemplateException {
    -        try {
    -            out.write("[ERROR: " + te.getMessage() + "]");
    -        } catch (IOException e) {
    -            throw new TemplateException("Failed to print error message. Cause: " + e, env);
    -        }
    -    }
    -}
    -
    -...
    -
    -cfg.setTemplateExceptionHandler(new MyTemplateExceptionHandler());  
    - - -

    If an error occurs in an interpolation which is not inside an - FTL tag (that is, not enclosed into - <#...> or - <@...>), then - the whole interpolation will be skipped. So this template (assuming - that badVar is missing from the - data-model):

    - -
    -
    -a${badVar}b  
    - - -

    will print this if we use the - MyTemplateExceptionHandler:

    - -
    -
    -a[ERROR: Expression badVar is undefined on line 1, column 4 in test.ftl.]b  
    - - -

    This template will print the same (except that the column - number will differ...):

    - -
    -
    -a${"moo" + badVar}b  
    - - -

    since, as it was written, the whole interpolation is skipped - if any error occurs inside it.

    - -

    If an error occurs when evaluating the value of a parameter - for a directive call, or if there are other problems with the - parameter list, or if an error occurs when evaluating - exp in - <@exp - ...>, or if the value of - exp is not an - user-defined directive, then the whole directive call is skipped. - For example this:

    - -
    -
    -a<#if badVar>Foo</#if>b  
    - - -

    will print this:

    - -
    -
    -a[ERROR: Expression badVar is undefined on line 1, column 7 in test.ftl.]b  
    - - -

    Note that the error occurred in the if - start-tag (<#if badVar>), but the whole - directive call was skipped. Logically, the nested content - (Foo) was skipped with this, since the nested - content is handled (printed) by the enclosing directive - (if).

    - -

    The output will be the same with this (except that the column - number will differ...):

    - -
    -
    -a<#if "foo${badVar}" == "foobar">Foo</#if>b  
    - - -

    since, as it was written, the whole directive calling will be - skipped if any error occurs during the parameter evaluation.

    - -

    The directive call will not be skipped if the error occurs - after the execution of the directive was already started. That is, - if an error occurs in the nested content:

    - -
    -
    -a
    -<#if true>
    -  Foo
    -  ${badVar}
    -  Bar
    -</#if>
    -c  
    - - -

    or in the macro definition body:

    - -
    -
    -a
    -<@test />
    -b
    -<#macro test>
    -  Foo
    -  ${badVar}
    -  Bar
    -</#macro>  
    - - -

    the output will be something like:

    - -
    -
    -a
    -  Foo
    -  [ERROR: Expression badVar is undefined on line 4, column 5 in test.ftl.]
    -  Bar
    -c  
    - - -

    FreeMarker comes with these prewritten error handlers:

    - -
    -
      -
    • -

      TemplateExceptionHandler.DEBUG_HANDLER: - Prints stack trace (includes FTL error message and FTL stack - trace) and re-throws the exception. This is the default handler - (that is, it is initially prugged into all new - Configuration objects).

      -
    • - -
    • -

      TemplateExceptionHandler.HTML_DEBUG_HANDLER: - Same as DEBUG_HANDLER, but it formats the - stack trace so that it will be readable with Web browsers. - Recommended over DEBUG_HANDLER when you - generate HTML pages.

      -
    • - -
    • -

      TemplateExceptionHandler.IGNORE_HANDLER: - Simply suppresses all exceptions (but remember, FreeMarker will - still log them). It does nothing to handle the event. It does - not re-throw the exception.

      -
    • - -
    • -

      TemplateExceptionHandler.RETHROW_HANDLER: - Simply re-throws all exceptions, it doesn't do anything else. - This handler can be good for Web applications (assuming you - don't want to continue template processing after exception), - because it gives the most control to the Web application over - page generation on error conditions (since FreeMarker doesn't - print anything to the output about the error). For more - information about handling errors in Web applications see the FAQ.

      -
    • -
    - - - - - - -

    -Explicit error handling in templates

    - - -

    Although it has nothing to do with the FreeMarker - configuration (the topic of this chapter), for the sake of - completeness it is mentioned here that you can handle errors - directly in templates as well. This is usually a bad practice (try - keep templates simple and non-technical), but nonetheless necessary - sometimes:

    - -
    -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_config_settings.html b/fmpp/docs/freemarker/pgui_config_settings.html deleted file mode 100644 index d955bab..0000000 --- a/fmpp/docs/freemarker/pgui_config_settings.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - - FreeMarker Manual - Settings - - - - - - - - -
    - - - - - -

    -Settings

    - - -

    Settings are named values that - influence the behavior of FreeMarker. Examples of settings are: - locale, number_format

    Settings stored in Configuration instance can - be overridden in a Template instance. For example - you set "en_US" for the locale - setting in the configuration, then the locale in - all templates that use this configuration will be - "en_US", except in templates where the locale was - explicitly specified differently (see localization). Thus, - values in a Configuration serve as defaults that - can be overridden in a per template manner. The value comes from - Configuration instance or - Template instance can be further overridden for a - single Template.process call. For each such call a - freemarker.core.Environment object is created - internally that holds the runtime environment of the template - processing, including the setting values that were overridden on that - level. The values stored there can even be changed during the template - processing, so a template can set settings itself, like switching - locale at the middle of the output.

    This can be imagined as 3 layers - (Configuration, Template, - Environment) of settings, where the topmost layer - that contains the value for a certain setting provides the effective - value of that setting. For example (settings A to F are just imaginary - settings for this example):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Setting ASetting BSetting CSetting DSetting ESetting F
    Layer 3: Environment1--1--
    Layer 2: Template22--2-
    Layer 1: Configuration3333--
    -
    -

    The effective value of settings will be: A = 1, B = 2, C = 3, D - = 1, E = 2. The F setting is probably null, or it - throws exception when you try to get it.

    Let's see exactly how to set settings:

    -
      -
    • -

      Configuration layer: In principle you set - the settings with the setter methods of the - Configuration object, fore example:

      - -
      -
      -Configuration myCfg = new Configuration(Configuration.VERSION_2_3_21);
      -myCfg.setLocale(java.util.Locale.ITALY);
      -myCfg.setNumberFormat("0.####");  
      - - -

      You do it before you start to actually use the - Configuration object (typically, when you - initialize the application); you should treat the object as - read-only after that.

      - -

      In practice, in most Web application frameworks you have to - specify the setting in a framework-specific configuration file - that require specifying setting as String - name-value pairs (like in a .properties file). - In that case the authors of the frameworks most probably use the - setSetting(String name, String value) method of - Configuration; see available setting names and - the format of the values in the API doc of - setSetting. Example for Spring - Framework:

      - -
      -
      -<bean id="freemarkerConfig"
      -    class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
      -  <property name="freemarkerSettings">
      -    <props>
      -      <prop key="incompatible_improvements">2.3.21</prop>
      -      <prop key="locale">it_IT</prop>
      -      <prop key="number_format">0.####</prop>
      -    </props>
      -  </property>
      -</bean>  
      - - -

      Note that this kind of configuring - (String key-value pairs) is unfortunately - limited compared to directly using the API of - Configuration.

      -
    • - -
    • -

      Template layer: The - locale setting of the template is set by - Configuration.getTemplate(...) to the requested - locale. Otherwise you shouldn't set settings here, unless you - manage the Template objects instead of a - freemarker.cache.TemplateCache, in which case - you should set the setting before the Template - object is first used, and then treat the - Template object as read-only.

      -
    • - -
    • -

      Environment layer: There are two ways - doing it:

      - -
      -
        -
      • -

        With Java API: Use the setter methods of the - Environment object. Certainly you want to - do that just before the processing of the template is started, - and then you run into the problem that when you call - myTemplate.process(...) it creates the - Environment object internally and the - immediately processes the template, so you had no chance. The - solution is that this two steps can be separated like - this:

        - -
        -
        -Environment env = myTemplate.createProcessingEnvironment(root, out);
        -env.setLocale(java.util.Locale.ITALY);
        -env.setNumberFormat("0.####");
        -env.process();  // process the template  
        - -
      • - -
      • -

        Directly in the Template (considered as bad style, - usually): Use the setting - directive, for example:

        - -
        -
        -<#setting locale="it_IT">
        -<#setting number_format="0.####">  
        - -
      • -
      - - -

      There are no restriction regarding when can you change the - settings in this layer.

      -
    • -
    -

    To see the list of supported settings and their meaning, please - read the following parts of the FreeMarker Java API - documentation:

    -
      -
    • -

      Setter methods of - freemarker.core.Configurable for the settings - that are in all three layers

      -
    • - -
    • -

      Setter methods of - freemarker.template.Configuration for the - settings that are available only in the - Configuration layer

      -
    • - -
    • -

      freemarker.core.Configurable.setSetting(String, - String) for settings that are available in all three - layers and are writable with String key-value - pairs.

      -
    • - -
    • -

      freemarker.template.Configuration.setSetting(String, - String) for settings that are available only in the - Configuration layer and are writable with - String key-value pairs.

      -
    • -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_config_sharedvariables.html b/fmpp/docs/freemarker/pgui_config_sharedvariables.html deleted file mode 100644 index af200b4..0000000 --- a/fmpp/docs/freemarker/pgui_config_sharedvariables.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - FreeMarker Manual - Shared variables - - - - - - - - -
    - - - - - -

    -Shared variables

    - - -

    Shared variables are variables - that are defined for all templates. You can add shared variables to - the configuration with the setSharedVariable - methods:

    -
    -Configuration cfg = new Configuration(Configuration.VERSION_2_3_21);
    -...
    -cfg.setSharedVariable("warp", new WarpDirective());
    -cfg.setSharedVariable("company", "Foo Inc.");  
    -

    In all templates that use this configuration, an user-defined - directive with name wrap and a string with name - company will be visible in the data-model root, so - you don't have to add them to the root hash again and again. A - variable in the root object that you pass to the - Template.process will hide the shared variable with - the same name.

    -

    Warning!

    - -

    Never use TemplateModel implementation that - is not thread-safe for - shared variables, if the configuration is used by multiple threads! - This is the typical situation for Servlet based Web sites.

    -
    -

    Due to backward compatibility heritage, the set of shared - variables is initially (i.e., for a new - Configuration instance) not empty. It contains the - following user-defined directives (they are "user-defined" in the - sense that you use @ to call them instead of - #):

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    nameclass
    capture_outputfreemarker.template.utility.CaptureOutput
    compressfreemarker.template.utility.StandardCompress
    html_escapefreemarker.template.utility.HtmlEscape
    normalize_newlinesfreemarker.template.utility.NormalizeNewlines
    xml_escapefreemarker.template.utility.XmlEscape
    -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_config_templateloading.html b/fmpp/docs/freemarker/pgui_config_templateloading.html deleted file mode 100644 index 9455b32..0000000 --- a/fmpp/docs/freemarker/pgui_config_templateloading.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - - FreeMarker Manual - Template loading - - - - - - - - -
    - - - - - -

    -Template loading

    - - - - - - - - - -

    -Template loaders

    - - - - -

    Template loaders are objects that load raw textual data based - on abstract template paths like "index.ftl" or - "products/catalog.ftl". It is up to the concrete - template loader object what source does it use to fetch the - requested data (files in a directory, data base, etc.). When you - call cfg.getTemplate (where - cfg is a Configuration - instance), FreeMarker ask the template loader you have set up for - the cfg to return the text for the given template - path, and then FreeMarker parses that text as template.

    - - - - - - -

    -Built-in template loaders

    - - -

    You can set up three template loading methods in the - Configuration using the following convenience - methods. (Each method will create a template loader object - internally and set up the Configuration - instance to use that.)

    - -
    -
    -void setDirectoryForTemplateLoading(File dir);  
    - - -

    or

    - -
    -
    -void setClassForTemplateLoading(Class cl, String prefix);  
    - - -

    or

    - -
    -
    -void setServletContextForTemplateLoading(Object servletContext, String path);  
    - - -

    The first method above sets an explicit directory on the - file system from which to load templates. Needless to say perhaps, - the File parameter must be an existing - directory. Otherwise, an exception will be thrown.

    - -

    The second call takes a Class as a - parameter and a prefix. This is for when you want to load - templates via the same mechanism that a java - ClassLoader uses to load classes. This means - that the class you pass in will be used to call - Class.getResource() to find the templates. The - prefix parameter is prepended to the name of - the template. The classloading mechanism will very likely be the - preferred means of loading templates for production code, since - loading from the classpath mechanism is usually more foolproof - than specifying an explicit directory location on the file system. - It is also nicer in a final application to keep everything in a - .jar file that the user can simply execute - directly and have all the icons and text and everything else - inside the .jar file.

    - -

    The third call takes the context of your web application, - and a base path, which is interpreted relative to the web - application root directory (that's the parent of the - WEB-INF directory). This loader will load the - templates from the web application directory. Note that we refer - to "directory" here although this loading method works even for - unpacked .war files since it uses - ServletContext.getResource() to access the - templates. If you omit the second parameter (or use - ""), you can simply store the static files - (.html, .jpg, etc.) mixed - with the .ftl files, just - .ftl files will be sent to the client - processed. Of course, you must set up a Servlet for the - *.ftl uri-pattern in - WEB-INF/web.xml for this, otherwise the client - will get the templates as is, and thus may see confidential - content! You should not use empty path if this is a problem for - your site, rather you should store the templates somewhere inside - the WEB-INF directory, so the raw templates are - never served accidentally. This mechanism will very likely be the - preferred means of loading templates for servlet applications, - since the templates can be updated without restarting the web - application, while this often doesn't work with the class-loader - mechanism.

    - - - - - - - -

    -Loading templates from multiple locations

    - - -

    If you need to load templates from multiple locations, you - have to instantiate the template loader objects for every - location, wrap them into a special template loader named - MultiTemplateLoader and finally pass that - loader to the setTemplateLoader(TemplateLoader - loader) method of Configuration. - Here's an example for loading templates from two distinct - directories and with the class-loader:

    - -
    -
    -import freemarker.cache.*; // template loaders live in this package
    -
    -...
    -
    -FileTemplateLoader ftl1 = new FileTemplateLoader(new File("/tmp/templates"));
    -FileTemplateLoader ftl2 = new FileTemplateLoader(new File("/usr/data/templates"));
    -ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), "");
    -TemplateLoader[] loaders = new TemplateLoader[] { ftl1, ftl2, ctl };
    -MultiTemplateLoader mtl = new MultiTemplateLoader(loaders);
    -
    -cfg.setTemplateLoader(mtl);  
    - - -

    Now FreeMarker will try to load templates from - /tmp/templates directory, and if it does not - find the requested template there, it will try to load that from - /usr/data/templates, and if it still does not - find the requested template, then it tries to load that with the - class-loader.

    - - - - - - - -

    -Loading templates from other sources

    - - -

    If none of the built-in class loaders are good for you, you - will have to write your own class that implements the - freemarker.cache.TemplateLoader interface and - pass it to the setTemplateLoader(TemplateLoader - loader) method of Configuration. - Please read the API JavaDoc for more information.

    - -

    If your template source accesses the templates through an - URL, you needn't implement a TemplateLoader - from scratch; you can choose to subclass - freemarker.cache.URLTemplateLoader instead and - just implement the URL getURL(String - templateName) method.

    - - - - - - - -

    -The template path (template name)

    - - - - - - - - -

    It is up to the template loader how it interprets template - paths (also known as template names). But to work together with - other components there are restrictions regarding the format of - the path. In general, it is strongly recommended that template - loaders use URL-style paths. The path must not use - /, ./ and - ../ and :// with other - meaning than they have in URL paths (or in UN*X paths). The - characters * and ? are also - reserved. FreeMarker always normalizes the paths before passing - them to the template loader, so the paths don't contain - /../ or such, and are relative to the imaginary - template root directory (that is, they don't start with - /).

    - -

    Note that FreeMarker template path should always uses slash - (not backslash) regardless of the host OS.

    - - - - - - -

    -Template caching

    - - - - - - -

    FreeMarker caches templates (assuming you use the - Configuration methods to create - Template objects). This means that when you call - getTemplate, FreeMarker not only returns the - resulting Template object, but stores it in a - cache, so when next time you call getTemplate - with the same (or equivalent) path, it just returns the cached - Template instance, and will not load and parse - the template file again.

    - -

    If you change the template file, then FreeMarker will re-load - and re-parse the template automatically when you get the template - next time. However, since checking if the file has been changed can - be time consuming, there is a Configuration level - setting called ``update delay''. This is the time that must elapse - since the last checking for a newer version of a certain template - before FreeMarker will check that again. This is set to 5 seconds by - default. If you want to see the changes of templates immediately, - set it to 0. Note that some template loaders may have problems with - template updating. For example, class-loader based template loaders - typically do not notice that you have changed the template - file.

    - -

    A template will be removed from the cache if you call - getTemplate and FreeMarker realizes that the - template file has been removed meanwhile. Also, if the JVM thinks - that it begins to run out of memory, by default it can arbitrarily - drop templates from the cache. Furthermore, you can empty the cache - manually with the clearTemplateCache method of - Configuration.

    - -

    The actual strategy of when a cached template should be thrown - away is pluggable with the cache_storage setting, - by which you can plug any CacheStorage - implementation. For most users - freemarker.cache.MruCacheStorage will be - sufficient. This cache storage implements a two-level Most Recently - Used cache. In the first level, items are strongly referenced up to - the specified maximum (strongly referenced items can't be dropped by - the JVM, as opposed to softly referenced items). When the maximum is - exceeded, the least recently used item is moved into the second - level cache, where they are softly referenced, up to another - specified maximum. The size of the strong and soft parts can be - specified with the constructor. For example, set the size of the - strong part to 20, and the size of soft part to 250:

    - -
    -
    -cfg.setCacheStorage(new freemarker.cache.MruCacheStorage(20, 250))  
    - - -

    Or, since MruCacheStorage is the default - cache storage implementation:

    - -
    -
    -cfg.setSetting(Configuration.CACHE_STORAGE_KEY, "strong:20, soft:250");  
    - - -

    When you create a new Configuration object, - initially it uses an MruCacheStorage where - strongSizeLimit is 0, and - softSizeLimit is - Integer.MAX_VALUE (that is, in practice, - infinite). But using non-0 strongSizeLimit is - maybe a better strategy for high load servers, since it seems that, - with only softly referenced items, JVM tends to cause just higher - resource consumption if the resource consumption was already high, - because it constantly throws frequently used templates from the - cache, which then have to be re-loaded and re-parsed.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_datamodel.html b/fmpp/docs/freemarker/pgui_datamodel.html deleted file mode 100644 index 4c7132f..0000000 --- a/fmpp/docs/freemarker/pgui_datamodel.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - FreeMarker Manual - The Data Model - - - - - - - - -
    - - - - - -

    -Chapter 2   The Data Model

    - -
    -

    - - Chapter Contents - -

    - - -
    - - -

    This is just an introductory explanation. See the FreeMarker Java API documentation for more - detailed information.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_datamodel_basics.html b/fmpp/docs/freemarker/pgui_datamodel_basics.html deleted file mode 100644 index 3ff9cd1..0000000 --- a/fmpp/docs/freemarker/pgui_datamodel_basics.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - FreeMarker Manual - Basics - - - - - - - - -
    - - - - - -

    -Basics

    - - -

    You have seen how to build a data-model in the Getting Started using the standard - Java classes (Map, String, - etc.). Internally, the variables available in the template are java - objects that implement the - freemarker.template.TemplateModel interface. But - you could use standard java collections as variables in your - data-model, because these were replaced with the appropriate - TemplateModel instances behind the scenes. This - facility is called object wrapping. - The object wrapping facility can convert any kind - of object transparently to the instances of classes that implement - TemplateModel interface. This makes it possible, - for example, to access java.sql.ResultSet as - sequence variable in templates, or to access - javax.servlet.ServletRequest objects as a hash - variable that contains the request attributes, or even to traverse XML - documents as FTL variables (see here). To - wrap (convert) these objects, however, you need to plug the proper, so - called, object wrapper implementation (possibly your custom - implementation); this will be discussed later. The meat for now - is that any object that you want to access from the templates, sooner - or later must be converted to an object that implements - TemplateModel interface. So first you should - familiarize yourself with writing of TemplateModel - implementations.

    There is roughly one - freemarker.template.TemplateModel descendant - interface corresponding to each basic type of variable - (TemplateHashModel for hashes, - TemplateSequenceModel sequences, - TemplateNumberModel for numbers, etc.). For - example, if you want to expose a java.sql.ResultSet - as a sequence for the templates, then you have to write a - TemplateSequenceModel implementation that can read - java.sql.ResultSet-s. We used to say on this, that - you wrap the - java.sql.ResultSet with your - TemplateModel implementation, as basically you just - encapsulate the java.sql.ResultSet to provide - access to it with the common TemplateSequenceModel - interface. Note that a class can implement multiple - TemplateModel interfaces; this is why FTL variables - can have multiple types (see: Template Author's Guide/Values, Types/Basics)

    Note that a trivial implementation of these interfaces is - provided with the freemarker.template package. For - example, to convert a String to FTL string - variable, you can use SimpleScalar, to convert a - java.util.Map to FTL hash variable, you can use - SimpleHash, etc.

    An easy way to try your own TemplateModel - implementation, is to create an instance of that, and drop it directly - into the data-model (as put it into the root hash). - The object wrapper will expose it untouched for the template, as it - already implements TemplateModel, so no conversion - (wrapping) needed. (This trick is also useful in cases when you do not - want the object wrapper to try to wrap (convert) a certain - object.)

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_datamodel_directive.html b/fmpp/docs/freemarker/pgui_datamodel_directive.html deleted file mode 100644 index 5a8ffe5..0000000 --- a/fmpp/docs/freemarker/pgui_datamodel_directive.html +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - FreeMarker Manual - Directives - - - - - - - - -
    - - - - - -

    -Directives

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Java programmers can implement user-defined directives in Java - using the TemplateDirectiveModel interface. See in - the API documentation.

    -

    Note

    - -

    TemplateDirectiveModel was introduced in - FreeMarker 2.3.11, replacing the soon to be depreciated - TemplateTransformModel.

    -
    - - - - - -

    -Example 1

    - - -

    We will implement a directive which converts all output - between its start-tag and end-tag to upper case. Like, this - template:

    - -
    -
    -foo
    -<@upper>
    -  bar
    -  <#-- All kind of FTL is allowed here -->
    -  <#list ["red", "green", "blue"] as color>
    -    ${color}
    -  </#list>
    -  baaz
    -</@upper>
    -wombat  
    - - -

    will output this:

    - -
    -
    -foo
    -  BAR
    -    RED
    -    GREEN
    -    BLUE
    -  BAAZ
    -wombat  
    - - -

    This is the source code of the directive class:

    - -
    -
    -package com.example;
    -import java.io.IOException;
    -import java.io.Writer;
    -import java.util.Map;
    -
    -import freemarker.core.Environment;
    -import freemarker.template.TemplateDirectiveBody;
    -import freemarker.template.TemplateDirectiveModel;
    -import freemarker.template.TemplateException;
    -import freemarker.template.TemplateModel;
    -import freemarker.template.TemplateModelException;
    -
    -/**
    - *  FreeMarker user-defined directive that progressively transforms
    - *  the output of its nested content to upper-case.
    - *  
    - *  
    - *  <p><b>Directive info</b></p>
    - * 
    - *  <p>Directive parameters: None
    - *  <p>Loop variables: None
    - *  <p>Directive nested content: Yes
    - */
    -public class UpperDirective implements TemplateDirectiveModel {
    -    
    -    public void execute(Environment env,
    -            Map params, TemplateModel[] loopVars,
    -            TemplateDirectiveBody body)
    -            throws TemplateException, IOException {
    -        // Check if no parameters were given:
    -        if (!params.isEmpty()) {
    -            throw new TemplateModelException(
    -                    "This directive doesn't allow parameters.");
    -        }
    -        if (loopVars.length != 0) {
    -                throw new TemplateModelException(
    -                    "This directive doesn't allow loop variables.");
    -        }
    -        
    -        // If there is non-empty nested content:
    -        if (body != null) {
    -            // Executes the nested body. Same as <#nested> in FTL, except
    -            // that we use our own writer instead of the current output writer.
    -            body.render(new UpperCaseFilterWriter(env.getOut()));
    -        } else {
    -            throw new RuntimeException("missing body");
    -        }
    -    }
    -    
    -    /**
    -     * A {@link Writer} that transforms the character stream to upper case
    -     * and forwards it to another {@link Writer}.
    -     */ 
    -    private static class UpperCaseFilterWriter extends Writer {
    -       
    -        private final Writer out;
    -           
    -        UpperCaseFilterWriter (Writer out) {
    -            this.out = out;
    -        }
    -
    -        public void write(char[] cbuf, int off, int len)
    -                throws IOException {
    -            char[] transformedCbuf = new char[len];
    -            for (int i = 0; i < len; i++) {
    -                transformedCbuf[i] = Character.toUpperCase(cbuf[i + off]);
    -            }
    -            out.write(transformedCbuf);
    -        }
    -
    -        public void flush() throws IOException {
    -            out.flush();
    -        }
    -
    -        public void close() throws IOException {
    -            out.close();
    -        }
    -    }
    -
    -}  
    - - -

    Now we still need to create an instance of this class, and - make this directive available to the template with the name "upper" - (or with whatever name we want) somehow. A possible solution is to - put the directive in the data-model:

    - -
    -
    -root.put("upper", new com.example.UpperDirective());  
    - - -

    But typically it is better practice to put commonly used - directives into the Configuration as shared - variables.

    - -

    It is also possible to put the directive into an FTL library - (collection of macros and like in a template, that you - include or import in other - templates) using the new - built-in:

    - -
    -
    -<#-- Maybe you have directives that you have implemented in FTL -->
    -<#macro something>
    -  ...
    -</#macro>
    -
    -<#-- Now you can't use <#macro upper>, but instead you can: -->
    -<#assign upper = "com.example.UpperDirective"?new()>  
    - - - - - - -

    -Example 2

    - - -

    We will create a directive that executes its nested content - again and again for the specified number of times (similarly to - list directive), optionally separating the the - output of the repetations with a <hr>-s. - Let's call this directive "repeat". Example template:

    - -
    -
    -<#assign x = 1>
    -
    -<@repeat count=4>
    -  Test ${x}
    -  <#assign x = x + 1>
    -</@repeat>
    -
    -<@repeat count=3 hr=true>
    -  Test
    -</@repeat>
    -
    -<@repeat count=3; cnt>
    -  ${cnt}. Test
    -</@repeat>  
    - - -

    Output:

    - -
    -
    -  Test 1
    -  Test 2
    -  Test 3
    -  Test 4
    -
    -  Test
    -<hr>  Test
    -<hr>  Test
    -
    -  1. Test
    -  2. Test
    -  3. Test
    -   
    - - -

    The class:

    - -
    -
    -package com.example;
    -import java.io.IOException;
    -import java.io.Writer;
    -import java.util.Iterator;
    -import java.util.Map;
    -
    -import freemarker.core.Environment;
    -import freemarker.template.SimpleNumber;
    -import freemarker.template.TemplateBooleanModel;
    -import freemarker.template.TemplateDirectiveBody;
    -import freemarker.template.TemplateDirectiveModel;
    -import freemarker.template.TemplateException;
    -import freemarker.template.TemplateModel;
    -import freemarker.template.TemplateModelException;
    -import freemarker.template.TemplateNumberModel;
    -
    -/**
    - * FreeMarker user-defined directive for repeating a section of a template,
    - * optionally with separating the output of the repetations with
    - * <tt>&lt;hr></tt>-s.
    - *
    - * 
    - * <p><b>Directive info</b></p>
    - * 
    - * <p>Parameters:
    - * <ul>
    - *   <li><code>count</code>: The number of repetations. Required!
    - *       Must be a non-negative number. If it is not a whole number then it will
    - *       be rounded <em>down</em>.
    - *   <li><code>hr</code>: Tells if a HTML "hr" element could be printed between
    - *       repetations. Boolean. Optional, defaults to <code>false</code>. 
    - * </ul>
    - *
    - * <p>Loop variables: One, optional. It gives the number of the current
    - *    repetation, starting from 1.
    - * 
    - * <p>Nested content: Yes
    - */
    -public class RepeatDirective implements TemplateDirectiveModel {
    -    
    -    private static final String PARAM_NAME_COUNT = "count";
    -    private static final String PARAM_NAME_HR = "hr";
    -    
    -    public void execute(Environment env,
    -            Map params, TemplateModel[] loopVars,
    -            TemplateDirectiveBody body)
    -            throws TemplateException, IOException {
    -        
    -        // ---------------------------------------------------------------------
    -        // Processing the parameters:
    -        
    -        int countParam = 0;
    -        boolean countParamSet = false;
    -        boolean hrParam = false;
    -        
    -        Iterator paramIter = params.entrySet().iterator();
    -        while (paramIter.hasNext()) {
    -            Map.Entry ent = (Map.Entry) paramIter.next();
    -            
    -            String paramName = (String) ent.getKey();
    -            TemplateModel paramValue = (TemplateModel) ent.getValue();
    -            
    -            if (paramName.equals(PARAM_NAME_COUNT)) {
    -                if (!(paramValue instanceof TemplateNumberModel)) {
    -                    throw new TemplateModelException(
    -                            "The \"" + PARAM_NAME_HR + "\" parameter "
    -                            + "must be a number.");
    -                }
    -                countParam = ((TemplateNumberModel) paramValue)
    -                        .getAsNumber().intValue();
    -                countParamSet = true;
    -                if (countParam < 0) {
    -                    throw new TemplateModelException(
    -                            "The \"" + PARAM_NAME_HR + "\" parameter "
    -                            + "can't be negative.");
    -                }
    -            } else if (paramName.equals(PARAM_NAME_HR)) {
    -                if (!(paramValue instanceof TemplateBooleanModel)) {
    -                    throw new TemplateModelException(
    -                            "The \"" + PARAM_NAME_HR + "\" parameter "
    -                            + "must be a boolean.");
    -                }
    -                hrParam = ((TemplateBooleanModel) paramValue)
    -                        .getAsBoolean();
    -            } else {
    -                throw new TemplateModelException(
    -                        "Unsupported parameter: " + paramName);
    -            }
    -        }
    -        if (!countParamSet) {
    -                throw new TemplateModelException(
    -                        "The required \"" + PARAM_NAME_COUNT + "\" paramter"
    -                        + "is missing.");
    -        }
    -        
    -        if (loopVars.length > 1) {
    -                throw new TemplateModelException(
    -                        "At most one loop variable is allowed.");
    -        }
    -        
    -        // Yeah, it was long and boring...
    -        
    -        // ---------------------------------------------------------------------
    -        // Do the actual directive execution:
    -        
    -        Writer out = env.getOut();
    -        if (body != null) {
    -            for (int i = 0; i < countParam; i++) {
    -                // Prints a <hr> between all repetations if the "hr" parameter
    -                // was true:
    -                if (hrParam && i != 0) {
    -                    out.write("<hr>");
    -                }
    -                
    -                // Set the loop variable, if there is one:
    -                if (loopVars.length > 0) {
    -                    loopVars[0] = new SimpleNumber(i + 1);
    -                }
    -                
    -                // Executes the nested body (same as <#nested> in FTL). In this
    -                // case we don't provide a special writer as the parameter:
    -                body.render(env.getOut());
    -            }
    -        }
    -    }
    -
    -}  
    - - - - - - -

    -Notices

    - - -

    It's important that a - TemplateDirectiveModel object usually should not - be stateful. The typical mistake is the storing of the state of the - directive call execution in the fields of the object. Think of - nested calls of the same directive, or directive objects used as - shared variables accessed by multiple threads concurrently.

    - -

    Unfortunatelly, TemplateDirectiveModel-s - don't support passing parameters by position (rather than by name). - This is fixed starting from FreeMarker 2.4.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_datamodel_method.html b/fmpp/docs/freemarker/pgui_datamodel_method.html deleted file mode 100644 index 66d4b1a..0000000 --- a/fmpp/docs/freemarker/pgui_datamodel_method.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - FreeMarker Manual - Methods - - - - - - - - -
    - - - - - -

    -Methods

    - - -

    Method variables exposed to a template implement the - TemplateMethodModel interface. This contains one - method: TemplateModel exec(java.util.List - arguments). When you call a method with a method call expression, - then the exec method will be called. The arguments - parameter will contain the values of the FTL method call arguments. - The return value of exec gives the value of the FTL - method call expression.

    The TemplateMethodModelEx interface extends - TemplateMethodModel. It does not add any new - methods. The fact that the object implements this - marker interface indicates to the FTL engine that - the arguments should be put to the java.util.List - directly as TemplateModel-s. Otherwise they will be - put to the list as String-s.

    For obvious reasons there is no default implementation for these - interfaces.

    Example: This is a method, which returns the index within the - second string of the first occurrence of the first string, or -1 if - the second string doesn't contains the first.

    -
    -public class IndexOfMethod implements TemplateMethodModel {
    -    
    -    public TemplateModel exec(List args) throws TemplateModelException {
    -        if (args.size() != 2) {
    -            throw new TemplateModelException("Wrong arguments");
    -        }
    -        return new SimpleNumber(
    -            ((String) args.get(1)).indexOf((String) args.get(0)));
    -    }
    -}  
    -

    If you put an instance of this, say, into the root:

    -
    -root.put("indexOf", new IndexOfMethod());  
    -

    then you can call it in the template:

    -
    -<#assign x = "something">
    -${indexOf("met", x)}
    -${indexOf("foo", x)}  
    -

    and then the output will be:

    -
    -2
    --1  
    -

    If you need to access the runtime FTL environment (read/write - variables, get the current locale, etc.), you can get it with - Environment.getCurrentEnvironment().

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_datamodel_node.html b/fmpp/docs/freemarker/pgui_datamodel_node.html deleted file mode 100644 index 6a076c8..0000000 --- a/fmpp/docs/freemarker/pgui_datamodel_node.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - FreeMarker Manual - Node variables - - - - - - - - -
    - - - - - -

    -Node variables

    - - -

    A node variable embodies a node in a tree structure. Node - variables were introduced to help the handling of - XML documents in the data-model, but they can be used for the - modeling of other tree structures as well. For more information about - nodes from the point of view of the template language read this earlier section.

    A node variable has the following properties, provided by the - methods of TemplateNodeModel interface:

    -
      -
    • -

      Basic properties:

      - -
      -
        -
      • -

        TemplateSequenceModel - getChildNodes(): A node has sequence of children - (except if the node is a leaf node, in which case the method - return an empty sequence or null). The child nodes should be - node variables as well.

        -
      • - -
      • -

        TemplateNodeModel getParentNode(): A - node has exactly 1 parent node, except if the node is root - node of the tree, in which case the method returns - null.

        -
      • -
      - -
    • - -
    • -

      Optional properties. If a property does not make sense in - the concrete use case, the corresponding method should return - null:

      - -
      -
        -
      • -

        String getNodeName(): The node name - is the name of the macro, that handles the node when you use - recurse - and visit - directives. Thus, if you want to use these directives with the - node, the node name is required.

        -
      • - -
      • -

        String getNodeType(): In the case of - XML: "element", "text", - "comment", ...etc. This information, if - available, is used by the recurse and - visit directives to find the default - handler macro for a node. Also it can be useful for other - application specific purposes.

        -
      • - -
      • -

        String getNamespaceURI(): The node - namespace (has nothing to do with FTL namespaces used for - libraries) this node belongs to. For example, in the case of - XML, this is the URI of the XML namespace the element or - attribute belongs to. This information, if available, is used - by the recurse and visit - directives to find the FTL namespaces that store the handler - macros.

        -
      • -
      - -
    • -
    -

    On the FTL side, the direct utilization of node properties is - done with node built-ins, and - with the visit and recurse - macros.

    In most use cases, variables that implement - TemplateNodeModel, implement other interfaces as - well, since node variable properties just provide the basic - infrastructure for navigating between nodes. For a concrete example, - see how FreeMarker deals with XML.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_datamodel_objectWrapper.html b/fmpp/docs/freemarker/pgui_datamodel_objectWrapper.html deleted file mode 100644 index 28b2272..0000000 --- a/fmpp/docs/freemarker/pgui_datamodel_objectWrapper.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - - FreeMarker Manual - Object wrappers - - - - - - - - -
    - - - - - -

    -Object wrappers

    - - -

    When you add something to a container, it may receive any Java - object as a parameter, not necessarily a - TemplateModel, as you could see in the FreeMarker - API. This is because the container implementation can silently replace - that object with the appropriate TemplateModel - object. For example if you add a String to the - container, perhaps it will be replaced with a - SimpleScalar instance which stores the same - text.

    As for when the replacement occurs, it's the business of the - container in question (i.e. the business of the class that implements - the container interface), but it must happen at the latest when you - get the subvariable, as the getter methods (according to the - interfaces) return TemplateModel, not - Object. For example, SimpleHash, - SimpleSequence and - SimpleCollection use the laziest strategy; they - replace a non-TemplateModel subvariable with an - appropriate TemplateModel object when you get the - subvariable for the first time.

    As for what java objects can be replaced, and with what - TemplateModel implementations, it is either handled - by the container implementation itself, or it delegates this to an - ObjectWrapper instance. - ObjectWrapper is an interface that specifies one - method: TemplateModel wrap(java.lang.Object obj). - You pass in an Object, and it returns the - corresponding TemplateModel object, or throws a - TemplateModelException if this is not possible. The - replacement rules are coded into the ObjectWrapper - implementation.

    The most important ObjectWrapper - implementations that the FreeMarker core provides are:

    -
      -
    • -

      freemarker.template.DefaultObjectWrapper: - It replaces String with - SimpleScalar, Number with - SimpleNumber, List and array - with SimpleSequence, Map - with SimpleHash, Boolean - with TemplateBooleanModel.TRUE or - TemplateBooleanModel.FALSE, W3C DOM nodes with - freemarker.ext.dom.NodeModel. For Jython - objects, this wrapper will invoke - freemarker.ext.jython.JythonWrapper. For all - other objects, it will invoke BeansWrapper.

      -
    • - -
    • -

      freemarker.ext.beans.BeansWrapper: It can - expose JavaBean properties and other members of arbitrary objects - using Java reflection; there is a separated chapter about it. - DefaultObjectWrapper extends this - wrapper.

      -
    • -
    -

    For a concrete example, let's see how the - SimpleXxx classes - work:

    -
    -Map map = new HashMap();
    -map.put("anotherString", "blah");
    -map.put("anotherNumber", new Double(3.14));
    -List list = new ArrayList();
    -list.add("red");
    -list.add("green");
    -list.add("blue");
    -
    -// Get the object wrapper we will use. The details of the
    -// construction aren't important now (see JavaDocs for that):
    -ObjectWrapper wrapper
    -        = new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_21)
    -          .build();
    -
    -// Normaly, you would create a plain java.util.HashMap here, and
    -// later let the ObjectWrapper wrap it in Template.process(...).
    -// But for demonstration purposes we will bypass the object wrapper
    -// and create a SimpleHash directly that's like the wrapper would
    -// create:
    -SimpleHash root = new SimpleHash(wrapper);
    -root.put("theString", "wombat");
    -root.put("theNumber", new Integer(8));
    -root.put("theMap", map);
    -root.put("theList", list);  
    -

    Assuming that root is the data-model root, - the resulting data-model is:

    -
    -(root)
    - |
    - +- theString = "wombat"
    - |
    - +- theNumber = 8
    - |
    - +- theMap
    - |   |
    - |   +- anotherString = "blah"
    - |   |
    - |   +- anotherNumber = 3.14
    - |
    - +- theList
    -     |
    -     +- (1st) = "red"
    -     |
    -     +- (2nd) = "green"
    -     |
    -     +- (3rd) = "blue"  
    -

    Note that the Object-s inside - theMap and theList are - accessible as subvariables too. This is because when you, say, try to - access theMap.anotherString, then the - SimpleHash (which is used as root hash here) will - silently replace the Map - (theMap) with a SimpleHash - instance that uses the same wrapper as the root hash, so when you try - to access the anotherString subvariable of it, it - will replace that with a SimpleScalar.

    If you drop an ``arbitrary'' object into the data-model, - DefaultObjectWrapper will fall back to - BeansWrapper to wrap the it:

    -
    -SimpleHash root = new SimpleHash(wrapper);
    -// expose a "simple" java objects:
    -root.put("theString", "wombat");
    -// expose an "arbitrary" java objects:
    -root.put("theObject", new TestObject("green mouse", 1200));  
    -

    Assuming this is TestObject:

    -
    -public class TestObject {
    -    private String name;
    -    private int price;
    -
    -    public TestObject(String name, int price) {
    -        this.name = name;
    -        this.price = price;
    -    }
    -
    -    // JavaBean properties
    -    // Note that public fields are not visible directly;
    -    // you must write a getter method for them.
    -    public String getName() {return name;}
    -    public int getPrice() {return price;}
    -    
    -    // A method
    -    public double sin(double x) {
    -        return Math.sin(x);
    -    }
    -}  
    -

    The data-model will be:

    -
    -(root)
    - |
    - +- theString = "wombat"
    - |
    - +- theObject
    -     |
    -     +- name = "green mouse"
    -     |
    -     +- price = 1200
    -     |
    -     +- number sin(number)  
    -

    So we can merge it with this template:

    -
    -${theObject.name}
    -${theObject.price}
    -${theObject.sin(123)}  
    -

    Which will output:

    -
    -green mouse
    -1200
    --0,45990349068959124  
    -

    You have seen in earlier examples of this manual that we have - used java.util.HashMap as root hash, and not - SimpleHash or other FreeMarker specific class. It - works because - Template.process(...) - automatically wraps the object you give as its data-model argument. It - uses the object wrapper dictated by the - Configuration level setting, - object_wrapper (unless you explicitly specify an - ObjectWrapper as its parameter). Thus, in simple - FreeMarker application you need not know about - TemplateModel-s at all. Note that the root need not - be a java.util.Map. It can be anything that is - wrapped so that it implements the TemplateHashModel - interface.

    You can configure what ObjectWrapper - FreeMarker uses with - cfg.setObjectWrapper(ObjectWrapper), where - cfg is the Configuration - instance. Note that you can plug in your custom - ObjectWrapper implementation here, hence you have - full control over how templates see the data-model.

    For TemplateModel implementations that wrap - basic Java container types, as java.util.Map-s and - java.util.List-s, the convention is that they use - the same object wrapper to wrap their subvariables as their parent - container does (that's why the SimpleHash - constructor has an ObjectWrapper parameter). - Technically correctly said, they are instantiated by their parent - container (so it has full control over the creation of them), and the - parent container create them so they will use the same object wrapper - as the parent itself. Thus, if wrapper is used for - the wrapping of the root hash (see it in the examples above), it will - be used for the wrapping of the subvariables (and the subvariables of - the subvariables, etc.) as well. This is exactly the same phenomenon - as you have seen with theMap.anotherString - earlier.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_datamodel_parent.html b/fmpp/docs/freemarker/pgui_datamodel_parent.html deleted file mode 100644 index f633c28..0000000 --- a/fmpp/docs/freemarker/pgui_datamodel_parent.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - FreeMarker Manual - Containers - - - - - - - - -
    - - - - - -

    -Containers

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    These are hashes, sequences, and collections.

    - - - - -

    -Hashes

    - - - - -

    Hashes are java objects that implement - TemplateHashModel interface. - TemplateHashModel contains two methods: - TemplateModel get(String key), which returns the - subvariable of the given name, and boolean - isEmpty(), which indicates if the hash has zero - subvariable or not. The get method returns null - if no subvariable with the given name exists.

    - -

    The TemplateHashModelEx interface extends - TemplateHashModel. It adds methods by which values and keys built-ins can enumerate the - subvariables of the hash.

    - -

    The commonly used implementation is - SimpleHash, which implements - TemplateHashModelEx. Internally it uses a - java.util.Hash to store the subvariables. - SimpleHash has methods by which you can add and - remove subvariable. These methods should be used to initialize the - variable directly after its creation.

    - -

    Containers are immutable within FTL. That is, you can't add, - replace or remove the subvariables they contain.

    - - - - - -

    -Sequences

    - - - - -

    Sequences are java objects that implement - TemplateSequenceModel. It contains two methods: - TemplateModel get(int index) and int - size().

    - -

    The commonly used implementation is - SimpleSequence. It uses internally a - java.util.List to store its subvariables. - SimpleSequence has methods by which you can add - subvariables. These methods should be used to populate the sequence - directly after its creation.

    - - - - - -

    -Collections

    - - - - -

    Collections are java objects that implement the - TemplateCollectionModel interface. That interface - has one method: TemplateModelIterator iterator(). - The TemplateModelIterator interface is similar to - java.util.Iterator, but it returns - TemplateModels instead of - Object-s, and it can throw - TemplateModelExceptions.

    - -

    The commonly used implementation is - SimpleCollection.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_datamodel_scalar.html b/fmpp/docs/freemarker/pgui_datamodel_scalar.html deleted file mode 100644 index 8bd2c75..0000000 --- a/fmpp/docs/freemarker/pgui_datamodel_scalar.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - FreeMarker Manual - Scalars - - - - - - - - -
    - - - - - -

    -Scalars

    - - -

    There are 4 scalar types:

    -
      -
    • - Boolean -
    • - -
    • - Number -
    • - -
    • - String -
    • - -
    • - Date-like (subtypes: date (no time part), time or - date-time) -
    • -
    -

    For each scalar type is a - TemplateTypeModel - interface, where Type is - the name of the type. These interfaces define only one method: - type - getAsType();. This returns the - value of the variable with the Java type (boolean, - Number, String and - Date respectively).

    -

    Note

    - -

    For historical reasons the interface for string scalars is - called TemplateScalarModel, not - TemplateStringModel.

    -
    -

    A trivial implementation of these interfaces are available in - freemarker.template package with - SimpleType class name. - However, there is no SimpleBooleanModel; to - represent the boolean values you can use the - TemplateBooleanModel.TRUE and - TemplateBooleanModel.FALSE singletons.

    -

    Note

    - -

    For historical reasons the class for string scalars is called - SimpleScalar, not - SimpleString.

    -
    -

    Scalars are immutable within FTL. When you set the value of a - variable in a template, then you replace the - TemplateTypeModel - instance with another instance, and don't change the value stored in - the original instance.

    - - - - -

    -Difficulties with the "date-like" type

    - - - - - - -

    There is a complication around date-like types, because Java - API usually does not differentiate - java.util.Date-s that store only the date part - (April 4, 2003), only the time part (10:19:18 PM), or both (April 4, - 2003 10:19:18 PM). To display the value as text correctly (or to do - certain other operations), FreeMarker must know what parts of the - java.util.Date stores meaningful information, and - what parts are unused (usually 0-ed out). Unfortunately, this - information is usually only available when the value comes from a - database, because most databases have separate date, time and - date-time (aka. timestap) types, and java.sql has - 3 corresponding java.util.Date subclasses for - them.

    - -

    TemplateDateModel interface has two - methods: java.util.Date getAsDate() and - int getDateType(). A typical implementation of - this interface, stores a java.util.Date object, - plus an integer that tells the subtype. The value of this integer - must be a constant from the TemplateDateModel - interface: DATE, TIME, - DATETIME and UNKNOWN.

    - -

    About UNKNOWN: java.lang - and java.util classes are usually converted - automatically into TemplateModel implementations - be the ObjectWrapper (see object wrapping - earlier). If the object wrapper has to wrap a - java.util.Date, that is not an instance of a - java.sql date class, it can't decide what the - subtype is, so it uses UNKNOWN. Later, if the - template has to use this variable, and the subtype is needed for the - operation, it will stop with error. To prevent this, for the - problematic variables the template author must specify the subtype - explicitly using the date, - time or datetime - built-ins (like lastUpdated?datetime). - Note that if you use string built-in with format - parameter, as foo?string["MM/dd/yyyy"], then - FreeMarker doesn't need to know the subtype.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc.html b/fmpp/docs/freemarker/pgui_misc.html deleted file mode 100644 index 6b67053..0000000 --- a/fmpp/docs/freemarker/pgui_misc.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - FreeMarker Manual - Miscellaneous - - - - - - - - -
    - - - - - -

    -Chapter 4   Miscellaneous

    - - - - -

    This is just an introductory guide. See the FreeMarker Java API documentation for the - details.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_ant.html b/fmpp/docs/freemarker/pgui_misc_ant.html deleted file mode 100644 index c4a3e25..0000000 --- a/fmpp/docs/freemarker/pgui_misc_ant.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - FreeMarker Manual - Using FreeMarker with Ant - - - - - - - - -
    - - - - - -

    -Using FreeMarker with Ant

    - - -

    There are two ``FreeMarker Ant tasks'' that we know - about:

    -
      -
    • -

      FreemarkerXmlTask: It comes with the - FreeMarker distribution, packed into the - freemarker.jar. This is a lightweight, - easy-to-use Ant task for transforming XML documents with - FreeMarker templates. Its approach is that the source files (input - files) are XML files, which are rendered to corresponding output - files, by a single template. That is, for each XML file, the - template will be executed (with the XML document in the - data-model), and the template output will be written into a file - of similar name than the name of the XML file. Thus, the template - file plays a similar role as an XSLT style sheet, but it is FTL, - not XSLT.

      -
    • - -
    • -

      FMPP: It's a more heavyweight, less XML centric, - third party Ant task (and standalone command-line tool). Its - primary approach is that the source files (input files) are - template files that generate the corresponding output files - themselves, but it also supports the approach of - FreemarkerXmlTask for the source files that are - XML-s. Also, it has extra features over the - FreemarkerXmlTask. What's its drawback then? As - it is more complex and more generalized, it's harder to learn and - use it.

      -
    • -
    -

    This section introduces the - FreemarkerXmlTask. For more information about FMPP - visit its homepage: http://fmpp.sourceforge.net/.

    In order to use the FreemarkerXmlTask, you - must first define the - freemarker.ext.ant.FreemarkerXmlTask inside your - Ant buildfile, then call the task. Suppose you want to transform - several XML documents to HTML using the hypothetical "xml2html.ftl" - template, with XML documents located in the directory "xml" and HTML - documents generated into directory "html". You would write something - like:

    -
    -<taskdef name="freemarker" classname="freemarker.ext.ant.FreemarkerXmlTask">
    -  <classpath>
    -    <pathelement location="freemarker.jar" />
    -  </classpath>
    -</taskdef>
    -<mkdir dir="html" />
    -<freemarker basedir="xml" destdir="html" includes="**/*.xml" template="xml2html.ftl" />  
    -

    The task would invoke the template for every XML document. Every - document would be parsed into a DOM tree, then wrapped as a FreeMarker - node variable. When template processing begins, the special variable, - .node, is set to the root node of the XML - document.

    Note that if you are using the legacy (FreeMarker 2.2.x and - earlier) XML adapter implementation, that still works, and the root of - the XML tree is placed in the data-model as the variable - document. That contains an instance of the legacy - freemarker.ext.xml.NodeListModel class.

    Note that all properties defined by the build file would be made - available as a hash model named "properties". Several other models are - made available; for detailed description of what variables are made - available to templates as well as what other attributes can the task - accept, see the JavaDoc for - freemarker.ext.ant.FreemarkerXmlTask.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_beanwrapper.html b/fmpp/docs/freemarker/pgui_misc_beanwrapper.html deleted file mode 100644 index b03a07f..0000000 --- a/fmpp/docs/freemarker/pgui_misc_beanwrapper.html +++ /dev/null @@ -1,761 +0,0 @@ - - - - - - - - FreeMarker Manual - Bean wrapper - - - - - - - - -
    - - - - - -

    -Bean wrapper

    - - - - -

    The freemarker.ext.beans.BeansWrapper is an - object wrapper - that was originally added to FreeMarker so arbitrary POJO-s (Plain Old - Java Objects) can be wrapped into TemplateModel - interfaces. Since then it has becomed the normal way of doing things, - and in fact the DefaultObjectWrapper itself is a - BeansWrapper extension. So everything described - here goes for the DefaultObjectWrapper too, except - that the DefaultObjectWrapper will wrap - String, Number, - Date, array, - Collection (like List), - Map, Boolean and - Iterator objects with the - freemarker.template.SimpleXxx - classes, and W3C DOM nodes with - freemarker.ext.dom.NodeModel (more about wrapped W3C DOM...), so for those the - above described rules doesn't apply.

    You will want to use BeansWrapper instead of - DefaultObjectWrapper when any of these - stands:

    -
      -
    • -

      The Collection-s and - Map-s of the model should be allowed to be - modified during template execution. - (DefaultObjectWrapper prevents that, since it - creates a copy of the collections when they are wrapped, and the - copies will be read-only.)

      -
    • - -
    • -

      If the identity of the array, - Collection and Map objects - must be kept when they are passed to a wrapped object's method in - the template. That is, if those methods must get exactly the same - object that was earlier wrapped.

      -
    • - -
    • -

      If the Java API of the earlier listed classes - (String, Map, - List ...etc) should be visible for the - templates. Even with BeansWrapper, they are not - visible by default, but it can be achieved by setting the exposure - level (see later). Note that this is usually a bad practice; try - to use the built-ins (like - foo?size, foo?upper, - foo?replace('_', '-') ...etc) instead of the - Java API.

      -
    • -
    -

    Below is a summary of the TemplateModel-s - that the BeansWrapper creates. Let's assume that - the object is called obj before wrapping, and - model after wrapping for the sake of the following - discussion.

    - - - - -

    -TemplateHashModel functionality

    - - -

    Every object will be wrapped into a - TemplateHashModel that will expose JavaBeans - properties and methods of the object. This way, you can use - model.foo in the template to invoke - obj.getFoo() or obj.isFoo() - methods. (Note that public fields are not visible directly; you must - write a getter method for them.) Public methods are also retrievable - through the hash model as template method models, therefore you can - use the model.doBar() to invoke - object.doBar(). More on this on discussion of - method model functionality.

    - -

    If the requested key can not be mapped to a bean property or - method, the framework will attempt to locate the so-called "generic - get method", that is a method with signature public - any-return-type - get(String) or public - any-return-type - get(Object) and invoke that method with the requested key. - Note that this allows convenient access to mappings in a - java.util.Map and similar classes - as long as - the keys of the map are Strings and some property - or method name does not shadow the mapping. (There is a solution to - avoid shadowing, read on.) Also note that the models for - java.util.ResourceBundle objects use the - getObject(String) as the generic get - method.

    - -

    If you call setExposeFields(true) on a - BeansWrapper instance, it will also expose - public, non-static fields of classes as hash keys and values. I.e. - if foo is a public, non-static field of the class - Bar, and bar is a template - variable wrapping an instance of Bar, then - bar.foo expression will evaluate as the value of - the field foo of the bar - object. The public fields in all superclasses of the class are also - exposed.

    - - - - - -

    -A word on security

    - - -

    By default, you will not be able to access several methods - that are considered not safe for templating. For instance, you can't - use synchronization methods (wait, - notify, notifyAll), thread and - thread group management methods (stop, - suspend, resume, - setDaemon, setPriority), - reflection (Field - setXxx methods, - Method.invoke, - Constructor.newInstance, - Class.newInstance, - Class.getClassLoader etc.) and various dangerous - methods in System and Runtime - classes (exec, exit, - halt, load, etc.). The - BeansWrapper has several security levels (called - "levels of method exposure"), and the default called - EXPOSE_SAFE is probably suited for most - applications. There is a no-safeguard level called - EXPOSE_ALL that allows you to call even the above - unsafe methods, and a strict level - EXPOSE_PROPERTIES_ONLY that will expose only bean - property getters. Finally, there is a level named - EXPOSE_NOTHING that will expose no properties and - no methods. The only data you will be able to access through hash - model interface in this case are items in maps and resource bundles, - as well as objects returned from a call to generic - get(Object) or get(String) - methods - provided the affected objects have such method.

    - - - - - -

    -TemplateScalarModel functionality

    - - -

    Models for java.lang.String objects will - implement TemplateScalarModel whose - getAsString() method simply delegates to - toString(). Note that wrapping - String objects into Bean wrappers provides much - more functionality than just them being scalars: because of the hash - interface described above, the models that wrap - Strings also provide access to all - String methods (indexOf, - substring, etc.), though most of them has native - FreeMarker equivalent which are better to use - (s?index_of(n), - s[start..<end], etc).

    - - - - - -

    -TemplateNumberModel functionality

    - - -

    Model wrappers for objects that are instances of - java.lang.Number implement - TemplateNumberModel whose - getAsNumber() method returns the wrapped number - object. Note that wrapping Number objects into - Bean wrappers provides much more functionality than just them being - number models: because of the hash interface described above, the - models that wrap Numbers also provide access to - all their methods.

    - - - - - -

    -TemplateCollectionModel functionality

    - - -

    Model wrappers for native Java arrays and all classes that - implement java.util.Collection will implement - TemplateCollectionModel and thus gain the - additional capability of being usable through - list directive.

    - - - - - -

    -TemplateSequenceModel functionality

    - - -

    Model wrappers for native Java arrays and all classes that - implement java.util.List will implement - TemplateSequenceModel and thus their elements - will be accessible by index using the model[i] - syntax. You can also query the length of the array or the size of - the list using the model?size built-in.

    - -

    Also, every method that takes a single parameter that is - assignable through reflective method invocation from a - java.lang.Integer (these are - int, long, - float, double, - java.lang.Object, - java.lang.Number, and - java.lang.Integer) also implements this - interface. What this means is that you have a convenient way for - accessing the so-called indexed bean properties: - model.foo[i] will translate into - obj.getFoo(i).

    - - - - - -

    -TemplateMethodModel functionality

    - - -

    All methods of an object are represented as - TemplateMethodModelEx objects accessible using a - hash key with method name on their object's model. When you call a - method using - model.method(arg1, - arg2, - ...) the arguments are passed - to the method as template models. The method will first try to - unwrap them - see below for details about unwrapping. These - unwrapped arguments are then used for the actual method call. In - case the method is overloaded, the most specific method will be - selected using the same rules that are used by the Java compiler to - select a method from several overloaded methods. In case that no - method signature matches the passed parameters, or that no method - can be chosen without ambiguity, a - TemplateModelException is thrown.

    - -

    Methods of return type void return - TemplateModel.NOTHING, so they can be safely - called with the ${obj.method(args)} - syntax.

    - -

    Models for instances of java.util.Map also - implement TemplateMethodModelEx as a means for - invoking their get() method. As it was discussed - previously, you can use the hash functionality to access the "get" - method as well, but it has several drawbacks: it's slower because - first property and method names are checked for the key; keys that - conflict with property and method names will be shadowed by them; - finally you can use String keys only with that - approach. In contrast, invoking model(key) - translates to model.get(key) directly: it's - faster because there's no property and method name lookup; it is - subject to no shadowing; and finally it works for non-String keys - since the argument is unwrapped just as with ordinary method calls. - In effect, model(key) on a Map - is equal to model.get(key), only shorter to - write.

    - -

    Models for java.util.ResourceBundle also - implement TemplateMethodModelEx as a convenient - way of resource access and message formatting. A single-argument - call to a bundle will retrieve the resource with the name that - corresponds to the toString() value of the - unwrapped argument. A multiple-argument call to a bundle will also - retrieve the resource with the name that corresponds to the - toString() value of the unwrapped argument, but - it will use it as a format pattern and pass it to - java.text.MessageFormat using the unwrapped - values of second and later arguments as formatting parameters. - MessageFormat objects will be initialized with - the locale of the bundle that originated them.

    - - - - - -

    -Unwrapping rules

    - - -

    When invoking a Java method from a template, its arguments - need to be converted from template models back to Java objects. - Assuming that the target type (the declared type of the method's - formal parameter) is denoted as T, the following - rules are tried in the following order:

    - -
    -
      -
    • -

      If the model is the null model for this wrapper, Java - null is returned.

      -
    • - -
    • -

      If the model implements - AdapterTemplateModel, the result of - model.getAdaptedObject(T) is returned if it - is instance of T or it is a number and can be - converted to T using numeric coercion as - described three bullets lower. All - models created by the BeansWrapper are themselves - AdapterTemplateModel implementations, so unwrapping a model that - was created by BeansWrapper for an underlying Java object always - yields the original Java object.

      -
    • - -
    • -

      If the model implements the deprecated - WrapperTemplateModel, the result of - model.getWrappedObject() is returned if it is - instance of T or it is a number and can be - converted to T using numeric coercion as - described two bullets lower.

      -
    • - -
    • -

      If T is - java.lang.String, then if model implements - TemplateScalarModel its string value is - returned. Note that if the model - doesn't implement TemplateScalarModel we don't attempt to - automatically convert the model to string using - String.valueOf(model). You'll have to use the ?string built-in - explicitly to pass non-scalars as strings.

      -
    • - -
    • -

      If T is a primitive numeric type or - java.lang.Number is assignable from - T, and model implements - TemplateNumberModel, then its numeric value - is returned if it is instance of T or its - boxing type (if T is primitive type). - Otherwise, if T is a built-in Java numeric - type (primitive type or a standard subclass of - java.lang.Number, including - BigInteger and BigDecimal) - a new object of class T or its boxing type is - created with the number model's appropriately coerced - value.

      -
    • - -
    • -

      If T is boolean or - java.lang.Boolean, and model implements - TemplateBooleanModel, then its boolean value - is returned.

      -
    • - -
    • -

      If T is - java.util.Map and the model implements - TemplateHashModel, then a special Map - representation of the hash model is returned.

      -
    • - -
    • -

      If T is - java.util.List and the model implements - TemplateSequenceModel, then a special List - representation of the sequence model is returned.

      -
    • - -
    • -

      If T is - java.util.Set and the model implements - TemplateCollectionModel, then a special Set - representation of the collection model is returned.

      -
    • - -
    • -

      If T is - java.util.Collection or - java.lang.Iterable and the model implements - either TemplateCollectionModel or - TemplateSequenceModel, then a special Set or - List representation of the collection or sequence model - (respectively) is returned.

      -
    • - -
    • -

      If T is a Java array type and the model - implements TemplateSequenceModel, then a new - array of the specified type is created and its elements - unwrapped into the array recursively using the array's component - type as T.

      -
    • - -
    • -

      If T is char or - java.lang.Character, and model implements - TemplateScalarModel, and its string - representation contains exactly one character, then a - java.lang.Character with that value is - retured.

      -
    • - -
    • -

      If java.util.Date is assignable from - T, and model implements - TemplateDateModel, and its date value is - instance of T, then its date value is - returned.

      -
    • - -
    • -

      If model is a number model, and its numeric value is - instance of T, the numeric value is returned. - You can have a custom subclass of - java.lang.Number that implements a custom interface, and T might - be that interface. (*)

      -
    • - -
    • -

      If model is a date model, and its date value is instance - of T, the date value is returned. Similar consideration as for - (*)

      -
    • - -
    • -

      If model is a scalar model, and T is - assignable from java.lang.String, the string - value is returned. This covers - cases when T is java.lang.Object, java.lang.Comparable, and - java.io.Serializable (**)

      -
    • - -
    • -

      If model is a boolean model, and T is - assignable from java.lang.Boolean, the - boolean value is returned. Same as - (**)

      -
    • - -
    • -

      If model is a hash model, and T is - assignable from - freemarker.ext.beans.HashAdapter, a hash - adapter is returned. Same as - (**)

      -
    • - -
    • -

      If model is a sequence model, and T is - assignable from - freemarker.ext.beans.SequenceAdapter, a - sequence adapter is returned. Same - as (**)

      -
    • - -
    • -

      If model is a collection model, and T - is assignable from - freemarker.ext.beans.SetAdapter, a set - adapter for the collection is returned. Same as (**)

      -
    • - -
    • -

      If the model is instance of T, the - model itself is returned. This - covers the case where the method explicitly declared a - FreeMarker-specific model interface, as well as allows returning - directive, method and transform models when java.lang.Object is - requested.

      -
    • - -
    • -

      An exception signifying no conversion is possible is - thrown.

      -
    • -
    - - - - - - -

    -Accessing static methods

    - - - - -

    The TemplateHashModel returned from - BeansWrapper.getStaticModels() can be used to - create hash models for accessing static methods and fields of an - arbitrary class.

    - -
    -
    -BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
    -TemplateHashModel staticModels = wrapper.getStaticModels();
    -TemplateHashModel fileStatics =
    -    (TemplateHashModel) staticModels.get("java.io.File");  
    - - -

    And you will get a template hash model that exposes all static - methods and static fields (both final and non-final) of the - java.lang.System class as hash keys. Suppose that - you put the previous model in your root model:

    - -
    -
    -root.put("File", fileStatics);  
    - - -

    From now on, you can use ${File.SEPARATOR} - to insert the file separator character into your template, or you - can even list all roots of your file system by:

    - -
    -
    -<#list File.listRoots() as fileSystemRoot>...</#list>  
    - - -

    Of course, you must be aware of the potential security issues - this model brings.

    - -

    You can even give the template authors complete freedom over - which classes' static methods they use by placing the static models - hash into your template root model with

    - -
    -
    -root.put("statics", BeansWrapper.getDefaultInstance().getStaticModels());  
    - - -

    This object exposes just about any class' static methods if - it's used as a hash with class name as the key. You can then use - expression like - ${statics["java.lang.System"].currentTimeMillis()} - in your template. Note, however that this has even more security - implications, as someone could even invoke - System.exit() using this model if the method - exposure level is weakened to EXPOSE_ALL.

    - -

    Note that in above examples, we always use the default - BeansWrapper instance. This is a convenient - static wrapper instance that you can use in most cases. You are also - free to create your own BeansWrapper instances - and use them instead especially when you want to modify some of its - characteristics (like model caching, security level, or the null - model representation).

    - - - - - -

    -Accessing enums

    - - - - -

    The TemplateHashModel returned from - BeansWrapper.getEnumModels() can be used to - create hash models for accessing values of enums on JRE 1.5 or - later. (An attempt to invoke this method on an earlier JRE will - result in an - UnsupportedOperationException.)

    - -
    -
    -BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
    -TemplateHashModel enumModels = wrapper.getEnumModels();
    -TemplateHashModel roundingModeEnums =
    -    (TemplateHashModel) enumModels.get("java.math.RoundingMode");  
    - - -

    And you will get a template hash model that exposes all enum - values of the java.math.RoundingMode class as - hash keys. Suppose that you put the previous model in your root - model:

    - -
    -
    -root.put("RoundingMode", roundingModeEnums);  
    - - -

    From now on, you can use RoundingMode.UP as - an expression to reference the UP enum value in - your template.

    - -

    You can even give the template authors complete freedom over - which enum classes they use by placing the enum models hash into - your template root model with

    - -
    -
    -root.put("enums", BeansWrapper.getDefaultInstance().getEnumModels());  
    - - -

    This object exposes any enum class if it's used as a hash with - class name as the key. You can then use expression like - ${enums["java.math.RoundingMode"].UP} in your - template.

    - -

    The exposed enum values can be used as scalars (they'll - delegate to their toString() method), and can be - used in equality and inequality comparisons as well.

    - -

    Note that in above examples, we always use the default - BeansWrapper instance. This is a convenient - static wrapper instance that you can use in most cases. You are also - free to create your own BeansWrapper instances - and use them instead especially when you want to modify some of its - characteristics (like model caching, security level, or the null - model representation).

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_charset.html b/fmpp/docs/freemarker/pgui_misc_charset.html deleted file mode 100644 index fd3a06b..0000000 --- a/fmpp/docs/freemarker/pgui_misc_charset.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - FreeMarker Manual - Charset issues - - - - - - - - -
    - - - - - -

    -Charset issues

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    FreeMarker, as most Java applications, works with "UNICODE text" (UTF-16). Nonetheless, - there are situations when it must deal with charsets, because it has to exchange - data with the outer world that may uses various other charsets.

    - - - - -

    -The charset of the input

    - - -

    When FreeMarker has to load a template file (or an unparsed - text file), then it must know the charset of the file, since files - are just raw byte sequences. You can use the - encoding setting to specify the - charset. This setting takes effect only when FreeMarker loads a - template (parsed or unparsed) with the - getTemplate method of - Configuration. Note that the include - directive uses this method internally, so the value of the - encoding setting is significant for an already - loaded template if the template contains include - directive call.

    - -

    The getter and setter method of the - encoding setting is special in the first - (configuration) layer. The getter method guesses the return value - based on a Locale passed as parameter; it looks - up the encoding in a table that maps locales to encodings (called - encoding map), and if the locale was not found there, it returns the - default encoding. You can fill the encoding map with the - setEncoding(Locale locale, String encoding) - method of the configuration; the encoding map is initially empty. - The default encoding is initially the value of the - file.encoding system property, but you always - should set a default default with the - setDefaultEncoding method, rather than relying on - that. For new projects, a popular default encoding is - utf-8.

    - -

    You can give the charset directly by overriding the - encoding setting in the template layer or runtime - environment layer (When you specify an encoding as the parameter of - getTemplate method, you override the - encoding setting in the template layer.). If you - don't override it, the effective value will be what the - configuration.getEncoding(Locale) method returns - for the effective value of the locale - setting.

    - -

    Also, instead of relying on this charset guessing mechanism, - you can specify the charset of the template in the template file - itself, with the ftl - directive, like <#ftl - encoding="utf-8">.

    - -

    Note that the charset of the template is independent from the - charset of the output that the tempalte generates (unless the - enclosing software deliberately sets the output charset to the same - as the template charset).

    - - - - - -

    -The charset of the output

    - - -
    -

    Note

    - -

    The output_encoding setting/variable and - the url - built-in is available since FreeMarker 2.3.1. It doesn't - exist in 2.3.

    -
    - - -

    In principle FreeMarker does not deal with the charset - of the output, since it writes the output to a - java.io.Writer. Since the - Writer is made by the software that encapsulates - FreeMarker (such as a Web application framework), the output charset - is controlled by the encapsulating software. Still, FreeMarker has a - setting called output_encoding (starting from - FreeMarker version 2.3.1). The enclosing software should set this - setting (to the charset that the Writer uses), to - inform FreeMarker what charset is used for the output (otherwise - FreeMarker can't find it out). Some features, such as the url built-in, - and the output_encoding special - variable utilize this information. Thus, if the enclosing - software doesn't set this setting then FreeMarker features that need - to know the output charset can't be used.

    - -

    If you write software that will use FreeMarker, you may wonder - what output charset should you choose. Of course it depends on the - consumer of the FreeMarker output, but if the consumer is flexible - regarding this question, then the common practice is either using - the charset of the template file for the output, or using UTF-8. - Using UTF-8 is usually a better practice, because arbitrary text may - comes from the data-model, which then possibly contains characters - that couldn't be encoded with the charset of the template.

    - -

    FreeMarker settings can be set for each individual template - processing if you use - Template.createProcessingEnvironment(...) - plus - Environment.process(...) - instead of - Template.process(...). - Thus, you can set the output_encoding setting for - each template execution independently:

    - -
    -
    -Writer w = new OutputStreamWriter(out, outputCharset);
    -Environment env = template.createProcessingEnvironment(dataModel, w);
    -env.setOutputEncoding(outputCharset);
    -env.process();  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_jythonwrapper.html b/fmpp/docs/freemarker/pgui_misc_jythonwrapper.html deleted file mode 100644 index cffaad9..0000000 --- a/fmpp/docs/freemarker/pgui_misc_jythonwrapper.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - FreeMarker Manual - Jython wrapper - - - - - - - - -
    - - - - - -

    -Jython wrapper

    - - - - -

    The freemarker.ext.jython package consists of - models that enable any Jython object to be used as a - TemplateModel. In the very basic case, you only - need to call the

    -
    -public TemplateModel wrap(Object obj);  
    -

    method of the - freemarker.ext.jython.JythonWrapper class. This - method will wrap the passed object into an appropriate - TemplateModel. Below is a summary of the properties - of returned model wrappers. Let's assume that the model that resulted - from the JythonWrapper call on object - obj is named model in the - template model root for the sake of the following discussion.

    - - - - -

    -TemplateHashModel functionality

    - - -

    PyDictionary and - PyStringMap will be wrapped into a hash model. - Key lookups are mapped to the __finditem__ - method; if an item is not found, a model for None - is returned.

    - - - - - -

    -TemplateScalarModel functionality

    - - -

    Every python object will implement - TemplateScalarModel whose - getAsString() method simply delegates to - toString().

    - - - - - -

    -TemplateBooleanModel functionality

    - - -

    Every python object will implement - TemplateBooleanModel whose - getAsBoolean() method simply delegates to - __nonzero__() in accordance with Python semantics - of true/false.

    - - - - - -

    -TemplateNumberModel functionality

    - - -

    Model wrappers for PyInteger, - PyLong, and PyFloat objects - implement TemplateNumberModel whose - getAsNumber() method returns - __tojava__(java.lang.Number.class).

    - - - - - -

    -TemplateSequenceModel functionality

    - - -

    Model wrappers for all classes that extend - PySequence will implement - TemplateSequenceModel and thus their elements - will be accessible by index using the model[i] - syntax, which will delegate to __finditem__(i). - You can also query the length of the array or the size of the list - using the model?size built-in, which will - delegate to __len__().

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_logging.html b/fmpp/docs/freemarker/pgui_misc_logging.html deleted file mode 100644 index e4a1da6..0000000 --- a/fmpp/docs/freemarker/pgui_misc_logging.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - FreeMarker Manual - Logging - - - - - - - - -
    - - - - - -

    -Logging

    - - -

    FreeMarker integrates with the following logging packages: SLF4J, Apache Commons - Logging, Log4J, Avalon - LogKit, and java.util.logging. - By default, FreeMarker will look for the following logging packages in - this order, and will automatically use the first package it finds: - Log4J, Avalon, java.util.logging. However, - if you call the static selectLoggerLibrary method - on the freemarker.log.Logger class with appropriate - parameter and before using any FreeMarker classes that log - messages, you can explicitly select a logger package, or - even disable the logging. See the API documentation for more - details.

    -

    Note

    - -

    Prior to FreeMarker 2.4, SLF4J and Apache Commons Logging - aren't searched automatically due to backward compatibility - constraints, so to use one of them you must do this:

    - -
    -
    -import freemarker.log.Logger;
    -...
    -    // IMPORTANT: This should be executed before using other FreeMarker classes!
    -    Logger.selectLoggerLibrary(Logger.LIBRARY_SLF4J);  // or Logger.LIBRARY_COMMONS
    -...  
    - - -

    Doing this is recommended, because starting from 2.4 SLF4J - will be used by default if present, otherwise Apache Commons Logging - if present, otherwise Log4J if present, etc.

    -
    -

    All log messages produced by FreeMarker are logged into the - logger hierarchy whose top-level logger is named - freemarker. Currently used loggers are:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Logger namePurpose
    freemarker.beansLogs messages of the Beans wrapper module.
    freemarker.cacheLogs messages related to template loading and caching.
    freemarker.runtimeLogs template exceptions thrown during template - processing.
    freemarker.runtime.attemptLogs template exceptions thrown during template processing - and caught by - attempt/recover - directives, with DEBUG severity. Note that such exceptions will - be still also logged with their normal logger (like - freemarker.runtime).
    freemarker.servletLogs messages of the FreemarkerServlet - class.
    freemarker.jspLogs messages of the FreeMarker JSP support.
    -
    -

    You can call the static selectLoggerLibrary - method on the freemarker.log.Logger class and pass - it a string that will be used to prefix the above mentioned logger - names. This is useful if you want to have separate loggers on a - per-web-application basis (assuming the application uses its own local - freemarker.jar). Also, you can disable logging with - Logger.selectLoggerLibrary(Logger.LIBRARY_NONE). In - any case, selectLoggerLibrary must be called early, - before FreeMarker could log anything, or else it will not have - (consistent) effect.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_multithreading.html b/fmpp/docs/freemarker/pgui_misc_multithreading.html deleted file mode 100644 index 183841d..0000000 --- a/fmpp/docs/freemarker/pgui_misc_multithreading.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - FreeMarker Manual - Multithreading - - - - - - - - -
    - - - - - -

    -Multithreading

    - - -

    In a multithreaded environment Configuration - instances, Template instances and data-models - should be handled as immutable (read-only) objects. That is, you - create and initialize them (for example with - set... methods), and - then you don't modify them later (e.g. you don't call - set...). This allows us - to avoid expensive synchronized blocks in a multithreaded environment. - Beware with Template instances; when you get a - Template instance with - Configuration.getTemplate, you may get an instance - from the template cache that is already used by other threads, so do - not call its set... - methods (calling process is of course fine).

    The above restrictions do not apply if you access all objects - from the same single thread only.

    It is impossible to modify the data-model object or a shared variable with FTL, - unless you put methods (or other objects) into the data-model that do - that. We discourage you from writing methods that modify the - data-model object or the shared variables. Try to use variables that - are stored in the environment object instead (this object is created - for a single Template.process call to store the - runtime state of processing), so you don't modify data that are - possibly used by multiple threads. For more information read: Variables, scopes

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_secureenv.html b/fmpp/docs/freemarker/pgui_misc_secureenv.html deleted file mode 100644 index 35991dc..0000000 --- a/fmpp/docs/freemarker/pgui_misc_secureenv.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - FreeMarker Manual - Configuring security policy for FreeMarker - - - - - - - - -
    - - - - - -

    -Configuring security policy for FreeMarker

    - - -

    When FreeMarker is used in a Java virtual machine with a - security manager installed, you have to grant it few permissions to - ensure it operates properly. Most notably, you need these entries to - your security policy file for - freemarker.jar:

    -
    -grant codeBase "file:/path/to/freemarker.jar" 
    -{
    -  permission java.util.PropertyPermission "file.encoding", "read";
    -  permission java.util.PropertyPermission "freemarker.*", "read";
    -}  
    -

    Additionally, if you are loading templates from a directory, you - need to give FreeMarker permissions to read files from that directory - using the following permission:

    -
    -grant codeBase "file:/path/to/freemarker.jar" 
    -{
    -  ...
    -  permission java.io.FilePermission "/path/to/templates/-", "read";
    -}  
    -

    Finally, if you're just using the default template loading - mechanism which loads templates from the current directory, then - specify these permissions additionally: (note that the expression - ${user.dir} will be evaluated at run time by the - policy interpreter, pretty much as if it were a FreeMarker - template)

    -
    -
    -grant codeBase "file:/path/to/freemarker.jar" 
    -{
    -  ...
    -  permission java.util.PropertyPermission "user.dir", "read";
    -  permission java.io.FilePermission "${user.dir}/-", "read";
    -}  
    -

    Naturally, if you're running under Windows, use double backslash - instead of a single slash for separating directory components in - paths.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_servlet.html b/fmpp/docs/freemarker/pgui_misc_servlet.html deleted file mode 100644 index 2fce7c3..0000000 --- a/fmpp/docs/freemarker/pgui_misc_servlet.html +++ /dev/null @@ -1,660 +0,0 @@ - - - - - - - - FreeMarker Manual - Using FreeMarker with servlets - - - - - - - - -
    - - - - - -

    -Using FreeMarker with servlets

    - - - - -

    In a fundamental sense, using FreeMarker in the web application - space is no different from anywhere else; FreeMarker writes its output - to a Writer that you pass to the - Template.process method, and it does not care if - that Writer prints to the console or to a file or - to the output stream of HttpServletResponse. - FreeMarker knows nothing about servlets and Web; it just merges Java - object with template files and generates text output from them. From - here, it is up to you how to build a Web application around - this.

    But, probably you want to use FreeMarker with some already - existing Web application framework. Many frameworks rely on the - ``Model 2'' architecture, where JSP pages handle presentation. If you - use such a framework (for example, Apache Struts), - then read on. For other frameworks please refer to the documentation - of the framework.

    - - - - -

    -Using FreeMarker for ``Model 2''

    - - -

    Many frameworks follow the strategy that the HTTP request is - dispatched to user-defined ``action'' classes that put data into - ServletContext, HttpSession - and HttpServletRequest objects as attributes, and - then the request is forwarded by the framework to a JSP page (the - view) that will generate the HTML page using the data sent with the - attributes. This is often referred as Model 2.

    - -

    figure

    - - -

    With these frameworks you can simply use FTL files instead of - JSP files. But, since your servlet container (Web application - server), unlike with JSP files, does not know out-of-the-box what to - do with FTL files, a little extra configuring is needed for your Web - application:

    - -
      -
    1. -

      Copy freemarker.jar (from the - lib directory of the FreeMarker distribution) - into the WEB-INF/lib directory of your Web - application.

      -
    2. - -
    3. -

      Insert the following section to the - WEB-INF/web.xml file of your Web application - (and adjust it if required):

      -
    4. -
    - -
    -
    -<servlet>
    -  <servlet-name>freemarker</servlet-name>
    -  <servlet-class>freemarker.ext.servlet.FreemarkerServlet</servlet-class>
    -    
    -  <!-- FreemarkerServlet settings: -->
    -  <init-param>
    -    <param-name>TemplatePath</param-name>
    -    <param-value>/</param-value>
    -  </init-param>
    -  <init-param>
    -    <param-name>NoCache</param-name>
    -    <param-value>true</param-value>
    -  </init-param>
    -  <init-param>
    -    <param-name>ContentType</param-name>
    -    <param-value>text/html; charset=UTF-8</param-value> <!-- Forces UTF-8 output encoding! -->
    -  </init-param>
    -    
    -  <!-- FreeMarker settings: -->
    -  <init-param>
    -    <param-name>incompatible_improvements</param-name>
    -    <param-value>2.3.21</param-value>
    -  </init-param>
    -  <init-param>
    -    <param-name>template_exception_handler</param-name>
    -    <!-- Some may prefer "html_debug" for development. -->
    -    <param-value>rethrow</param-value>
    -  </init-param>
    -  <init-param>
    -    <param-name>template_update_delay</param-name>
    -    <param-value>0</param-value> <!-- 0 is for development only! Use higher value otherwise. -->
    -  </init-param>
    -  <init-param>
    -    <param-name>default_encoding</param-name>
    -    <param-value>UTF-8</param-value> <!-- The encoding of the template files. -->
    -  </init-param>
    -  <init-param>
    -    <param-name>number_format</param-name>
    -    <param-value>0.##########</param-value>
    -  </init-param>
    -
    -  <load-on-startup>1</load-on-startup>
    -</servlet>
    -
    -<servlet-mapping>
    -  <servlet-name>freemarker</servlet-name>
    -  <url-pattern>*.ftl</url-pattern>
    -</servlet-mapping>
    -
    -...
    -
    -<!--
    -  Prevent the visiting of MVC Views from outside the servlet container.
    -  RequestDispatcher.forward/include should and will still work.
    -  Removing this may open security holes!
    --->
    -<security-constraint>
    -  <web-resource-collection>
    -    <web-resource-name>FreeMarker MVC Views</web-resource-name>
    -    <url-pattern>*.ftl</url-pattern>
    -  </web-resource-collection>
    -  <auth-constraint>
    -    <!-- Nobody is allowed to visit these -->
    -  </auth-constraint>
    -</security-constraint>  
    - - -

    After this, you can use FTL files (*.ftl) - in the same manner as JSP (*.jsp) files. (Of - course you can choose another extension besides - ftl; it is just the convention)

    - -
    -

    Note

    - -

    How does it work? Let's examine how JSP-s work. Many servlet - container handles JSP-s with a servlet that is mapped to the - *.jsp request URL pattern. That servlet will - receive all requests where the request URL ends with - .jsp, find the JSP file based on the request - URL, and internally compiles it to a Servlet, - and then call the generated servlet to generate the page. The - FreemarkerServlet mapped here to the - *.ftl URL pattern does the same, except that - FTL files are not compiled to Servlet-s, but to - Template objects, and then the - process method of Template - will be called to generate the page.

    -
    - - -

    For example, instead - of this JSP file (note that it heavily uses Struts tag-libs to save - designers from embedded Java monsters):

    - -
    -
    -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    -
    -<html>
    -<head><title>Acmee Products International</title>
    -<body>
    -  <h1>Hello <bean:write name="user"/>!</h1>
    -  <p>These are our latest offers:
    -  <ul>
    -    <logic:iterate name="latestProducts" id="prod">
    -      <li><bean:write name="prod" property="name"/>
    -        for <bean:write name="prod" property="price"/> Credits.
    -    </logic:iterate>
    -  </ul>
    -</body>
    -</html>  
    - - -

    you can use this FTL file (use ftl file - extension instead of jsp):

    - -
    -
    -<html>
    -<head><title>Acmee Products International</title>
    -<body>
    -  <h1>Hello ${user}!</h1>
    -  <p>These are our latest offers:
    -  <ul>
    -    <#list latestProducts as prod>
    -      <li>${prod.name} for ${prod.price} Credits.
    -    </#list>
    -  </ul>
    -</body>
    -</html>  
    - - -
    -

    Warning!

    - -

    In FreeMarker <html:form - action="/query">...</html:form> - is just static text, so it is printed to the output as is, like - any other XML or HTML markup. JSP tags are just FreeMarker - directives, nothing special, so you use FreeMarker - syntax for calling them, not JSP syntax: - <@html.form - action="/query">...</@html.form>. - Note that in the FreeMarker syntax you don't use - ${...} in - parameters as in JSP, and you don't quote the - parameter values. So this is - WRONG:

    - -
    -
    -<#-- WRONG: -->
    -<@my.jspTag color="${aVariable}" name="aStringLiteral"
    -            width="100" height=${a+b} />  
    - - -

    and this is good:

    - -
    -
    -<#-- Good: -->
    -<@my.jspTag color=aVariable name="aStringLiteral"
    -            width=100 height=a+b />  
    - -
    - - -

    In both templates, when you refer to user - and latestProduct, it will first try to find a - variable with that name that was created in the template (like - prod; if you master JSP: a page scope attribute). - If that fails, it will try to look up an attribute with that name in - the HttpServletRequest, and if it is not there - then in the HttpSession, and if it still doesn't - find it then in the ServletContext. In the case - of FTL this works because FreemarkerServlet - builds the data-model from the attributes of the mentioned 3 - objects. That is, in this case the root hash is not a - java.util.Map (as it was in some example codes in - this manual), but - ServletContext+HttpSession+HttpServletRequest; - FreeMarker is pretty flexible about what the data-model is. So if - you want to put variable "name" into the - data-model, then you call - servletRequest.setAttribute("name", "Fred"); this - is the logic of Model 2, and FreeMarker adapts itself to it.

    - -

    FreemarkerServlet also puts 3 hashes into - the data-model, by which you can access the attributes of the 3 - objects directly. The hash variables are: - Request, Session, - Application (corresponds to - ServletContext). It also exposes another hash - named RequestParameters that provides access to - the parameters of the HTTP request.

    - -

    FreemarkerServlet has various init-params. - It can be set up to load templates from an arbitrary directory, from - the classpath, or relative to the Web application directory. You can - set the charset used for templates. You can set up what object - wrapper do you want to use. Etc.

    - -

    FreemarkerServlet is easily tailored to - special needs through subclassing. Say, if you need to have - additional variables available in your data-model for all templates, - subclass the servlet and override the - preTemplateProcess() method to shove any - additional data you need into the model before the template gets - processed. Or subclass the servlet, and set these globally available - variables as shared - variables in the Configuration.

    - -

    For more information please read the Java API documentation of - the class.

    - - - - - -

    -Including content from other web application - resources

    - - - - - - - - - - -

    You can use the <@include_page - path="..."/> custom directive provided by the - FreemarkerServlet (since 2.3.15) to include the - contents of another web application resource into the output; this - is often useful to integrate output of JSP pages (living alongside - the FreeMarker templates in the same web server) into the FreeMarker - template output. Using:

    - -
    -
    -<@include_page path="path/to/some.jsp"/>  
    - - -

    is identical to using this tag in JSP:

    - -
    -
    -<jsp:include page="path/to/some.jsp">  
    - - -
    -

    Note

    - -

    <@include_page ...> is not to be - confused with <#include ...>, as the last - is for including FreeMarker templates without involving the - Servlet container. An <#include ...>-ed - template shares the template processing state with the including - template, such as the data-model and the template-language - variables, while <@include_page ...> - starts an independent HTTP request processing.

    -
    - - -
    -

    Note

    - -

    Some Web Application Frameworks provide their own solution - for this, in which case you possibly should use that instead. Also - some Web Application Frameworks don't use - FreemarkerServlet, so - include_page is not available.

    -
    - - -

    The path can be relative or absolute. Relative paths are - interpreted relative to the URL of the current HTTP request (one - that triggered the template processing), while absolute paths are - absolute in the current servlet context (current web application). - You can not include pages from outside the current web application. - Note that you can include any page, not just a JSP page; we just - used page with path ending in .jsp as an - illustration.

    - -

    In addition to the path parameter, you can - also specify an optional parameter named - inherit_params with a boolean value (defaults to - true when not specified) that specifies whether the included page - will see the HTTP request parameters of the current request or - not.

    - -

    Finally, you can specify an optional parameter named - params that specifies new request parameters that - the included page will see. In case inherited parameters are passed - too, the values of specified parameters will get prepended to the - values of inherited parameters of the same name. The value of - params must be a hash, with each value in it - being either a string, or a sequence of strings (if you need - multivalued parameters). Here's a full example:

    - -
    -
    -<@include_page path="path/to/some.jsp" inherit_params=true params={"foo": "99", "bar": ["a", "b"]}/>  
    - - -

    This will include the page - path/to/some.jsp, pass it all request parameters - of the current request, except for "foo" and "bar", which will be - set to "99" and multi-value of "a", "b", respectively. In case the - original request already had values for these parameters, the new - values will be prepended to the existing values. I.e. if "foo" had - values "111" and "123", then it will now have values "99", "111", - "123".

    - -

    It is in fact possible to pass - non-string values for parameter values within - params. Such a value will be converted to a - suitable Java object first (i.e. a Number, a Boolean, a Date, etc.), - and then its Java toString() method will be used - to obtain the string value. It is better to not rely on this - mechanism, though, and instead explicitly ensure that parameter - values that aren't strings are converted to strings on the template - level where you have control over formatting using the - ?string and ?c built-ins. -

    - - - - - -

    -Using JSP custom tags in FTL

    - - - - - - - - -

    FreemarkerServlet puts a hash - JspTaglibs into the data-model, what you can use - to access JSP taglibs. The JSP custom tags will be accessible as - plain user-defined directives. For example, this is a JSP file that - uses some Struts tags:

    - -
    -
    -<%@page contentType="text/html;charset=ISO-8859-2" language="java"%>
    -<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    -<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    -
    -<html>
    -  <body>
    -    <h1><bean:message key="welcome.title"/></h1>
    -    <html:errors/>
    -    <html:form action="/query">
    -      Keyword: <html:text property="keyword"/><br>
    -      Exclude: <html:text property="exclude"/><br>
    -      <html:submit value="Send"/>
    -    </html:form>
    -  </body>
    -</html>  
    - - -

    And this is the (near) equivalent FTL:

    - -
    -
    -<#assign html=JspTaglibs["/WEB-INF/struts-html.tld"]>
    -<#assign bean=JspTaglibs["/WEB-INF/struts-bean.tld"]>
    -
    -<html>
    -  <body>
    -    <h1><@bean.message key="welcome.title"/></h1>
    -    <@html.errors/>
    -    <@html.form action="/query">
    -      Keyword: <@html.text property="keyword"/><br>
    -      Exclude: <@html.text property="exclude"/><br>
    -      <@html.submit value="Send"/>
    -    </@html.form>
    -  </body>
    -</html>  
    - - -

    Since JSP custom tags are written to operate in JSP - environment, they assume that variables (often referred as ``beans'' - in JSP world) are stored in 4 scopes: page scope, request scope, - session scope and application scope. FTL has no such notation (the 4 - scopes), but FreemarkerServlet provides emulated - JSP environment for the custom JSP tags, which maintains - correspondence between the ``beans'' of JSP scopes and FTL - variables. For the custom JSP tags, the request, session and - application scopes are exactly the same as with real JSP: the - attributes of the javax.servlet.ServletContext, - HttpSession and ServletRequest - objects. From the FTL side you see these 3 scopes together as the - data-model, as it was explained earlier. The page scope corresponds - to the FTL global variables (see the global - directive). That is, if you create a variable with the - global directive, it will be visible for the - custom tags as page scope variable through the emulated JSP - environment. Also, if a JSP-tag creates a new page scope variable, - the result will be the same as if you create a variable with the - global directive. Note that the variables in the - data-model are not visible as page-scope attributes for the JSP - tags, despite that they are globally visible, since the data-model - corresponds to the request, session and application scopes, not the - page-scope.

    - -

    On JSP pages you quote all attribute values, it does not mater - if the type of the parameter is string or boolean or number. But - since custom tags are accessible in FTL templates as user-defined - FTL directives, you have to use the FTL syntax rules inside the - custom tags, not the JSP rules. So when you specify the value of an - ``attribute'', then on the right side of the = - there is an FTL expression. - Thus, you must not quote boolean and numerical parameter - values (e.g. <@tiles.insert - page="/layout.ftl" flush=true/>), or they are - interpreted as string values, and this will cause a type mismatch - error when FreeMarker tries to pass the value to the custom tag that - expects non-string value. Also note, that naturally, you can use any - FTL expression as attribute value, such as variables, calculated - values, etc. (e.g. <@tiles.insert page=layoutName - flush=foo && bar/>).

    - -

    FreeMarker does not rely on the JSP support of the servlet - container in which it is run when it uses JSP taglibs since it - implements its own lightweight JSP runtime environment. There is - only one small detail to pay attention to: to enable the FreeMarker - JSP runtime environment to dispatch events to JSP taglibs that - register event listeners in their TLD files, you should add this to - the WEB-INF/web.xml of your Web - application:

    - -
    -
    -<listener>
    -  <listener-class>freemarker.ext.jsp.EventForwarding</listener-class>
    -</listener>  
    - - -

    Note that you can use JSP taglibs with FreeMarker even if the - servlet container has no native JSP support, just make sure that the - javax.servlet.jsp.* packages for JSP 1.2 (or - later) are available to your Web application. If your servlet - container comes with JSP 1.1, then you have to obtain the following - six classes (for example you can extract them from the jar-s of - Tomcat 5.x or Tomcat 4.x), and copy them into your webapp's - WEB-INF/classes/... - directory: javax.servlet.jsp.tagext.IterationTag, - javax.servlet.jsp.tagext.TryCatchFinally, - javax.servlet.ServletContextListener, - javax.servlet.ServletContextAttributeListener, - javax.servlet.http.HttpSessionAttributeListener, - javax.servlet.http.HttpSessionListener. But - beware, since containers that come with JSP 1.1 usually use earlier - Serlvet versions than 2.3, event listeners will not be supported, - and thus JSP 1.2 taglibs that register event listeners will not work - properly.

    - -

    As of this writing, JSP features up to JSP 2.1 are - implemented, except the "tag files" feature of JSP 2 (i.e., custom - JSP tags implemented in JSP language). The tag - files had to be compiled to Java classes to be usable under - FreeMarker.

    - - - - - -

    -Embed FTL into JSP pages

    - - - - -

    There is a taglib that allows you to put FTL fragments into - JSP pages. The embedded FTL fragment can access the attributes - (Beans) of the 4 JSP scopes. You can find a working example and the - taglib in the FreeMarker distribution.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_var.html b/fmpp/docs/freemarker/pgui_misc_var.html deleted file mode 100644 index 64897bb..0000000 --- a/fmpp/docs/freemarker/pgui_misc_var.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - FreeMarker Manual - Variables, scopes - - - - - - - - -
    - - - - - -

    -Variables, scopes

    - - -

    This chapter explains what happens when a template tries to - access a variable, and how the variables are stored.

    When you call Template.process it will - internally create an Environment object that will - be in use until process returns. This object stores - the runtime state of template processing. Among other things, it - stores the variables created by the template with directives like - assign, macro, - local or global. It never tries - to modify the data-model object that you pass to the - process call, nor does it create or replace shared - variables stored in the configuration.

    When you try to read a variable, FreeMarker will seek the - variable in this order, and stops when it finds a variable with the - right name:

      -
    1. -

      In the Environment:

      - -
        -
      1. -

        If you are in a loop, in the set of loop variables. Loop - variables are the variables created by directives like - list.

        -
      2. - -
      3. -

        If you are inside a macro, in the local variable set of - the macro. Local variables can be created with the - local directive. Also, the parameters of - macros are local variables.

        -
      4. - -
      5. -

        In the current namespace. You can put - variables into a namespace with the assign - directive.

        -
      6. - -
      7. -

        In the set of variables created with - global directive. FTL handles these - variables as if they were normal members of the data-model. - That is, they are visible in all namespaces, and you can - access them as if they would be in the data-model.

        -
      8. -
      -
    2. - -
    3. -

      In the data-model object you have passed to the - process method

      -
    4. - -
    5. -

      In the set of shared variables stored in the - Configuration

      -
    6. -

    In practice, from the viewpoint of template authors these 6 - layers are only 4 layers, since from that viewpoint the last 3 layers - (variables created with global, the actual - data-model object, shared variables) together constitute the set of - global variables.

    Note that it is possible to get variables from a specific layer - in FTL with special - variables.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_misc_xml_legacy.html b/fmpp/docs/freemarker/pgui_misc_xml_legacy.html deleted file mode 100644 index 2cf9c98..0000000 --- a/fmpp/docs/freemarker/pgui_misc_xml_legacy.html +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - - - FreeMarker Manual - Legacy XML wrapper implementation - - - - - - - - -
    - - - - - -

    -Legacy XML wrapper implementation

    - - - - -
    -

    Note

    - -

    The legacy XML wrapper is deprecated. - FreeMarker 2.3 has introduced support for a new XML processing - model. To support this, a new XML wrapper package was introduced, - freemarker.ext.dom. For new usage, we encourage - you to use that. It is documented in the part XML Processing Guide.

    -
    -

    The class freemarker.ext.xml.NodeListModel - provides a template model for wrapping XML documents represented as - node trees. Every node list can contain zero or more XML nodes - (documents, elements, texts, processing instructions, comments, entity - references, CDATA sections, etc.). The node list implements the - following template model interfaces with the following - semantics:

    - - - - -

    -TemplateScalarModel

    - - -

    When used as a scalar, the node list will render the XML - fragment that represents its contained nodes. This makes it handy - for use in XML-to-XML transforming templates.

    - - - - - -

    -TemplateCollectionModel

    - - -

    When used as a collection with list - directive, it will simply enumerate its nodes. Every node will be - returned as a new node list consisting of a single node.

    - - - - - -

    -TemplateSequenceModel

    - - -

    When used as a sequence, it will return the i-th node as a new - node list consisting of the single requested node. I.e. to return - the 3rd <chapter> element of the - <book> element, you'd use the following - (note indexes are zero-based):

    - -
    -
    -<#assign 3rdChapter = xmldoc.book.chapter[2]>  
    - - - - - - -

    -TemplateHashModel

    - - -

    When used as a hash, it is basically used to traverse - children. That is, if you have a node list named - book that wraps an element node with several - chapters, then the book.chapter will yield a node - list with all chapter elements of that book element. The at sign is - used to refer to attributes: book.@title yields a - node list with a single attribute node, that is the title attribute - of the book element.

    - -

    It is important to realize the consequence that, for example, - if book has no chapter-s then - book.chapter is an empty sequence, so - xmldoc.book.chapter?? will - not be false, it will be - always true! Similarly, - xmldoc.book.somethingTotallyNonsense?? will not - be false either. To check if there was no - children found, use xmldoc.book.chapter?size == - 0.

    - -

    The hash defines several "magic keys" as well. All these keys - start with an underscore. The most notable is the - _text key which retrieves the text of the node: - ${book.@title._text} will render the value of the - attribute into the template. Similarly, _name - will retrieve the name of the element or attribute. - * or _allChildren returns all - direct children elements of all elements in the node list, while - @* or _allAttributes returns - all attributes of the elements in the node list. There are many more - such keys; here's a detailed summary of all the hash keys:

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Key nameEvaluates to
    * or _childrenall direct element children of current nodes - (non-recursive). Applicable to element and document - nodes.
    @* or - _attributesall attributes of current nodes. Applicable to elements - only.
    @attributeNamenamed attributes of current nodes. Applicable to elements, - doctypes and processing instructions. On doctypes it supports - attributes publicId, - systemId and - elementName. On processing instructions, it - supports attributes target and - data, as well as any other attribute name - specified in data as name="value" pair. The - attribute nodes for doctype and processing instruction are - synthetic, and as such have no parent. Note, however that - @* does NOT operate on doctypes or - processing instructions.
    _ancestorall ancestors up to root element (recursive) of current - nodes. Applicable to same node types as - _parent.
    _ancestorOrSelfall ancestors of current nodes plus current nodes. - Applicable to same node types as - _parent.
    _cnamethe canonical names of current nodes (namespace URI + - local name), one string per node (non-recursive). Applicable - to elements and attributes
    _contentthe complete content of current nodes, including children - elements, text, entity references, and processing instructions - (non-recursive). Applicable to elements and documents.
    _descendantall recursive descendant element children of current - nodes. Applicable to document and element nodes.
    _descendantOrSelfall recursive descendant element children of current nodes - plus current nodes. Applicable to document and element - nodes.
    _documentall documents the current nodes belong to. Applicable to - all nodes except text.
    _doctypedoctypes of the current nodes. Applicable to document - nodes only.
    _filterTypeis a filter-by-type template method model. When called, it - will yield a node list that contains only those current nodes - whose type matches one of types passed as argument. You should - pass arbitrary number of strings to this method containing the - names of types to keep. Valid type names are: "attribute", - "cdata", "comment", "document", "documentType", "element", - "entity", "entityReference", "processingInstruction", - "text".
    _namethe names of current nodes, one string per node - (non-recursive). Applicable to elements and attributes - (returns their local names), entities, processing instructions - (returns its target), doctypes (returns its public ID)
    _nsprefixthe namespace prefixes of current nodes, one string per - node (non-recursive). Applicable to elements and - attributes
    _nsurithe namespace URIs of current nodes, one string per node - (non-recursive). Applicable to elements and attributes
    _parentparent elements of current nodes. Applicable to element, - attribute, comment, entity, processing instruction.
    _qnamethe qualified names of current nodes in - [namespacePrefix:]localName form, one - string per node (non-recursive). Applicable to elements and - attributes
    _registerNamespace(prefix, uri)register a XML namespace with the specified prefix and URI - for the current node list and all node lists that are derived - from the current node list. After registering, you can use the - nodelist["prefix:localname"] or - nodelist["@prefix:localname"] syntaxes to - reach elements and attributes whose names are - namespace-scoped. Note that the namespace prefix need not - match the actual prefix used by the XML document itself since - namespaces are compared solely by their URI.
    _textthe text of current nodes, one string per node - (non-recursive). Applicable to elements, attributes, comments, - processing instructions (returns its data) and CDATA sections. - The reserved XML characters ('<' and '&') are not - escaped.
    _typeReturns a node list containing one string per node - describing the type of the node. Possible node type names are: - "attribute", "cdata", "comment", "document", "documentType", - "element", "entity", "entityReference", - "processingInstruction", "text". If the type of the node is - unknown, returns "unknown".
    _uniquea copy of the current nodes that keeps only the first - occurrence of every node, eliminating duplicates. Duplicates - can occur in the node list by applying uptree-traversals - _parent, _ancestor, - _ancestorOrSelf, and - _document. I.e. - foo._children._parent will return a node - list that has duplicates of nodes in foo - each node will have - the number of occurrences equal to the number of its children. - In these cases, use - foo._children._parent._unique to eliminate - duplicates. Applicable to all node types.
    any other keyelement children of current nodes with name matching the - key. This allows for convenience child traversal in - book.chapter.title style syntax. Note that - nodeset.childname is technically equivalent - to nodeset("childname"), but is both - shorter to write and evaluates faster. Applicable to document - and element nodes.
    -
    - - - - - - -

    -TemplateMethodModel

    - - -

    When used as a method model, it returns a node list that is - the result of evaluating an XPath expression on the current contents - of the node list. For this feature to work, you must have the - Jaxen library in your classpath. For - example:

    - -
    -
    -<#assign firstChapter=xmldoc("//chapter[first()]")>  
    - - - - - - -

    -Namespace handling

    - - -

    For purposes of traversal of children elements that have - namespace-scoped names, you can register namespace prefixes with the - node list. You can do it either in Java, calling the

    - -
    -
    -public void registerNamespace(String prefix, String uri);  
    - - -

    method, or inside a template using the

    - -
    -
    -${nodelist._registerNamespace(prefix, uri)}  
    - - -

    syntax. From there on, you can refer to children elements in - the namespace denoted by the particular URI through the - syntax

    - -
    nodelist["prefix:localName"]
    - - -

    and

    - -
    nodelist["@prefix:localName"]
    - - -

    as well as use these namespace prefixes in XPath expressions. - Namespaces registered with a node list are propagated to all node - lists that are derived from the original node list. Note also that - namespaces are matched by their URI only, so you can safely use a - prefix for a namespace inside your template that differs from the - prefix in the actual XML document - a prefix is just a local alias - for the URI both in the template and in the XML document.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_quickstart.html b/fmpp/docs/freemarker/pgui_quickstart.html deleted file mode 100644 index f42144e..0000000 --- a/fmpp/docs/freemarker/pgui_quickstart.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - FreeMarker Manual - Getting Started - - - - - - - - -
    - - - - - -

    -Chapter 1   Getting Started

    - - - - -

    If you are new to FreeMarker, you should read at least the Template Author's Guide/Getting Started/Template + data-model = output before this chapter.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_quickstart_all.html b/fmpp/docs/freemarker/pgui_quickstart_all.html deleted file mode 100644 index a426d64..0000000 --- a/fmpp/docs/freemarker/pgui_quickstart_all.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - FreeMarker Manual - Putting all together - - - - - - - - -
    - - - - - -

    -Putting all together

    - - -

    This is a working source file assembled from the previous - fragments. Don't forget to put freemarker.jar into - the CLASSPATH.

    -
    -import freemarker.template.*;
    -import java.util.*;
    -import java.io.*;
    -
    -public class Test {
    -
    -    public static void main(String[] args) throws Exception {
    -        
    -        /* ------------------------------------------------------------------------ */    
    -        /* You should do this ONLY ONCE in the whole application life-cycle:        */    
    -    
    -        /* Create and adjust the configuration singleton */
    -        Configuration cfg = new Configuration(Configuration.VERSION_2_3_21);
    -        cfg.setDirectoryForTemplateLoading(new File("/where/you/store/templates"));
    -        cfg.setDefaultEncoding("UTF-8");
    -        cfg.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);
    -
    -        /* ------------------------------------------------------------------------ */    
    -        /* You usually do these for MULTIPLE TIMES in the application life-cycle:   */    
    -
    -        /* Create a data-model */
    -        Map root = new HashMap();
    -        root.put("user", "Big Joe");
    -        Map latest = new HashMap();
    -        root.put("latestProduct", latest);
    -        latest.put("url", "products/greenmouse.html");
    -        latest.put("name", "green mouse");
    -
    -        /* Get the template (uses cache internally) */
    -        Template temp = cfg.getTemplate("test.ftl");
    -
    -        /* Merge data-model with template */
    -        Writer out = new OutputStreamWriter(System.out);
    -        temp.process(root, out);
    -        // Note: Depending on what `out` is, you may need to call `out.close()`.
    -        // This is usually the case for file output, but not for servlet output.
    -    }
    -}  
    -
    -

    Note

    - -

    I have suppressed the exceptions for the sake of simplicity. - Don't do it in real products.

    -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_quickstart_createconfiguration.html b/fmpp/docs/freemarker/pgui_quickstart_createconfiguration.html deleted file mode 100644 index 4a927ce..0000000 --- a/fmpp/docs/freemarker/pgui_quickstart_createconfiguration.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - FreeMarker Manual - Create a configuration instance - - - - - - - - -
    - - - - - -

    -Create a configuration instance

    - - -

    First you have to create a - freemarker.template.Configuration instance and - adjust its settings. A Configuration instance is a - central place to store the application level settings of FreeMarker. - Also, it deals with the creation and caching of - pre-parsed templates (i.e., Template - objects).

    Normally you will do this only once at the - beginning of the application (possibly servlet) life-cycle:

    -
    -// Create your Configuration instance, and specify if up to what FreeMarker
    -// version (here 2.3.21) do you want to apply the fixes that are not 100%
    -// backward-compatible. See the Configuration JavaDoc for details.
    -Configuration cfg = new Configuration(Configuration.VERSION_2_3_21);
    -
    -// Specify the source where the template files come from. Here I set a
    -// plain directory for it, but non-file-system sources are possible too:
    -cfg.setDirectoryForTemplateLoading(new File("/where/you/store/templates"));
    -
    -// Set the preferred charset template files are stored in. UTF-8 is
    -// a good choice in most applications:
    -cfg.setDefaultEncoding("UTF-8");
    -
    -// Sets how errors will appear.
    -// During development TemplateExceptionHandler.HTML_DEBUG_HANDLER is better.
    -cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);  
    -

    From now you should use this single - configuration instance (i.e., its a singleton). Note however that if a - system has multiple independent components that use FreeMarker, then - of course they will use their own private - Configuration instances.

    -

    Warning!

    - -

    Do not needlessly re-create Configuration - instances; it's expensive, among others because you lose the caches. - Configuration instances meant to - application-level singletons.

    -
    -

    When using in multi-threaded applications (like for Web sites), - the settings in the Configuration instance must not - be modified anymore after this point. Then it can be treated as - "effectively immutable" object, so you can continue with - safe publishing techniques (see JSR 133 and - related literature) to make the instance available for the other - threads. Like, publish the instance through a final or volatile filed, - or through a thread-safe IoC container, but not through a plain field. - (Configuration methods that don't deal with - modifying settings are thread-safe.)

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_quickstart_createdatamodel.html b/fmpp/docs/freemarker/pgui_quickstart_createdatamodel.html deleted file mode 100644 index 2b120d4..0000000 --- a/fmpp/docs/freemarker/pgui_quickstart_createdatamodel.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - FreeMarker Manual - Create a data-model - - - - - - - - -
    - - - - - -

    -Create a data-model

    - - -

    In simple cases you can build data-models using - java.lang and java.util classes - and custom Java Beans:

    -
      -
    • -

      Use java.lang.String for strings.

      -
    • - -
    • -

      Use java.lang.Number descents for - numbers.

      -
    • - -
    • -

      Use java.lang.Boolean for boolean - values.

      -
    • - -
    • -

      Use java.util.List or Java arrays for - sequences.

      -
    • - -
    • -

      Use java.util.Map for hashes.

      -
    • - -
    • -

      Use your custom bean class for hashes where the items - correspond to the bean properties. For example the - price property - (getProperty()) of product - can be get as product.price. (The actions of - the beans can be exposed as well; see much later here)

      -
    • -
    -

    For example, let's build the data-model of the first example of the Template Author's - Guide. For convenience, here it is again:

    -
    -(root)
    -  |
    -  +- user = "Big Joe"
    -  |
    -  +- latestProduct
    -      |
    -      +- url = "products/greenmouse.html"
    -      |
    -      +- name = "green mouse"  
    -

    This is the Java code fragment that builds this - data-model:

    -
    -// Create the root hash
    -Map root = new HashMap();
    -// Put string ``user'' into the root
    -root.put("user", "Big Joe");
    -// Create the hash for ``latestProduct''
    -Map latest = new HashMap();
    -// and put it into the root
    -root.put("latestProduct", latest);
    -// put ``url'' and ``name'' into latest
    -latest.put("url", "products/greenmouse.html");
    -latest.put("name", "green mouse");  
    -

    For the latestProduct you might as well use a - Java Bean that has url and name - properties (that is, an object that has public String - getURL() and String getName() methods); - it's the same from viewpoint of the template. Similarly, the root - could be a Java Bean with user and - lastestProduct properties.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_quickstart_gettemplate.html b/fmpp/docs/freemarker/pgui_quickstart_gettemplate.html deleted file mode 100644 index 1ee81cf..0000000 --- a/fmpp/docs/freemarker/pgui_quickstart_gettemplate.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - FreeMarker Manual - Get the template - - - - - - - - -
    - - - - - -

    -Get the template

    - - -

    Templates are represented by - freemarker.template.Template instances. Typically - you obtain a Template instance from the - Configuration instance. Whenever you need a - template instance you can get it with its - getTemplate method. Store the example template in the - test.ftl file of the earlier set - directory, then you can do this:

    -
    -Template temp = cfg.getTemplate("test.ftl");  
    -

    When you call this, it will create a Template - instance corresponds to test.ftl, by reading - /where/you/store/templates/test.ftl - and parsing (compile) it. The Template instance - stores the template in the parsed form, and not as text.

    Configuration caches - Template instances, so when you get - test.ftl again, it probably won't read and parse - the template file again, just returns the same - Template instance as for the first time.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/pgui_quickstart_merge.html b/fmpp/docs/freemarker/pgui_quickstart_merge.html deleted file mode 100644 index 6226ca4..0000000 --- a/fmpp/docs/freemarker/pgui_quickstart_merge.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - FreeMarker Manual - Merging the template with the data-model - - - - - - - - -
    - - - - - -

    -Merging the template with the data-model

    - - -

    As we know, data-model + template = output, and we have a - data-model (root) and a template - (temp), so to get the output we have to merge them. - This is done by the process method of the template. - It takes the data-model root and a Writer as - parameters. It writes the produced output to the - Writer. For the sake of simplicity here I write to - the standard output:

    -
    -Writer out = new OutputStreamWriter(System.out);
    -temp.process(root, out);  
    -

    This will print to your terminal the output what you have seen - in the first example of the - Template Author's Guide.

    Java I/O related notes: Depending on what out - is, you may need to ensure that out.close() is - called. This is typically needed when out writes - into a file that was opened to store the output of the template. In - other times, like in typical Web applications, you must - not close out. FreeMarker - calls out.flush() after a successful template - execution (can be disabled in Configuration), so - you don't need to worry about that.

    Note that once you have obtained a Template - instance, you can merge it with different data-models for unlimited - times (Template instances are stateless). Also, the - test.ftl file is accessed only while the - Template instance is created, not when you call the - process method.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/preface.html b/fmpp/docs/freemarker/preface.html deleted file mode 100644 index 9bebc77..0000000 --- a/fmpp/docs/freemarker/preface.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - FreeMarker Manual - Preface - - - - - - - - -
    - - - - - -

    -Preface

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -What is FreeMarker?

    - - -

    FreeMarker is a template engine: a generic - tool to generate text output (anything from HTML to autogenerated source - code) based on templates. It's a Java package, a class library for Java - programmers. It's not an application for end-users in itself, but - something that programmers can embed into their products.

    - -

    FreeMarker is designed to be practical for the generation of - HTML Web pages, particularly by servlet-based - applications following the MVC (Model View - Controller) pattern. The idea behind using the MVC pattern for - dynamic Web pages is that you separate the designers (HTML authors) from - the programmers. Everybody works on what they are good at. Designers can - change the appearance of a page without programmers having to change or - recompile code, because the application logic (Java programs) and page - design (FreeMarker templates) are separated. Templates do not become - polluted with complex program fragments. This separation is useful even - for projects where the programmer and the HTML page author is the same - person, since it helps to keep the application clear and easily - maintainable.

    - -

    Although FreeMarker has some programming capabilities, it is - not a full-blown programming language like PHP. - Instead, Java programs prepare the data to be displayed (like issue SQL - queries), and FreeMarker just generates textual pages that display the - prepared data using templates.

    - -

    figure

    - - -

    FreeMarker is not a Web application - framework. It is suitable as a component in a Web application framework, - but the FreeMarker engine itself knows nothing about HTTP or servlets. - It simply generates text. As such, it is perfectly usable in non-web - application environments as well. Note, however, that we provide - out-of-the-box solutions for using FreeMarker as the view component of - Model 2 frameworks such as Struts.

    - -

    FreeMarker is Free, - released under the Apache License, Version 2.0. It is OSI Certified Open Source - Software. OSI Certified is a certification mark of the Open - Source Initiative.

    - - - - - -

    -What should I read?

    - - -

    If you are a ...

    - -
    -
    - - - - - - -

    -Document conventions

    - - -

    Variable names, template fragments, Java class names, etc. are - written like this: foo.

    - -

    If something should be replaced with a concrete value then it is - written in italics, as follows: Hello - yourName!.

    - -

    Template examples are written like this:

    - -
    -
    -something  
    - - -

    Data-model examples are written like this:

    - -
    -
    -something  
    - - -

    Output examples are written like this:

    - -
    -
    -something  
    - - -

    Program examples are written like this:

    - -
    -
    -something  
    - - - - -

    In chapters written for both designers and programmers fragments - addressed to programmers are written like this: This is for programmers only.

    - -

    New terms are emphasized like this: some new - term

    - - - - - -

    -Contact

    - - - - - - - - - - -

    For the latest version of FreeMarker and to subscribe to the - mailing lists visit the FreeMarker homepage: http://freemarker.org

    - -

    If you need help or you have - suggestions, use the mailing lists (mail archives - can be searched without subscription) or the Web based forums. If you - want to report a bug, use the Web based bug - tracker, or the mailing lists. To find all of these visit http://freemarker.org. Also, note that - we have a FAQ and index; use them.

    - - - - - -

    -About this document

    - - -

    If you find any mistakes (including - grammatical mistakes, typos, - typographical mistakes) or you find something misleading or - confusing in the documentation, or you have other - suggestions, please let me know! Email: ddekany at - users.sourceforge.net

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref.html b/fmpp/docs/freemarker/ref.html deleted file mode 100644 index 7e23455..0000000 --- a/fmpp/docs/freemarker/ref.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - FreeMarker Manual - Template Language Reference - - - - - - - - - - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins.html b/fmpp/docs/freemarker/ref_builtins.html deleted file mode 100644 index b4da8b4..0000000 --- a/fmpp/docs/freemarker/ref_builtins.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - FreeMarker Manual - Built-in Reference - - - - - - - - -
    - - - - - -

    -Chapter 1   Built-in Reference

    - - - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_alphaidx.html b/fmpp/docs/freemarker/ref_builtins_alphaidx.html deleted file mode 100644 index b4e458a..0000000 --- a/fmpp/docs/freemarker/ref_builtins_alphaidx.html +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - - - FreeMarker Manual - Alphabetical index - - - - - - - - -
    - - - - - -

    -Alphabetical index

    - - -
    -
    -

    See the built-ins filtered by left-hand-value type here.

    If you don't find a built-in here that you have seen in a - working template, probably you will find it here: Deprecated FTL constructs

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_boolean.html b/fmpp/docs/freemarker/ref_builtins_boolean.html deleted file mode 100644 index 05999ca..0000000 --- a/fmpp/docs/freemarker/ref_builtins_boolean.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - FreeMarker Manual - Built-ins for booleans - - - - - - - - -
    - - - - - -

    -Built-ins for booleans

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -c (when used with boolean)

    - - - - - - - - - - -
    -

    Note

    - -

    This built-in exists since FreeMarker 2.3.20.

    -
    - - -

    This built-in converts a boolean to string for a - "computer language" as opposed to for human audience. - The result will be "true" or - "false", regardless of the - boolean_format setting. When generating - JavaScript and such, this should be used, as otherwise changing the - boolean_format can break the generated - computer-language output.

    - -

    Note that this built-in also - works on strings.

    - - - - - -

    -string (when used with a boolean value)

    - - - - - - - - - - - - -

    Converts a boolean to a string. You can use it in two - ways:

    - -
    -
      -
    • -

      As foo?string("yes", "no"): This will - return the first parameter (here: "yes") if - the boolean is true, otherwise the second parameter (here: - "no"). Note that the return value is always a - string; if the parameters were numbers, they would be converted - to strings first.

      -
    • - -
    • -

      foo?string: Deprecated - starting from FreeMarker 2.3.20: use ?c - instead, or set the boolean_format setting to something like - "yes,no" and then the conversion can happen - automatically. If you still need to know about this, - this will convert the boolean to string using the default - strings for representing true and false values. By default, true - is rendered as "true" and false is rendered - as "false". This is mostly useful if you - generate source code with FreeMarker (but use - ?c for that starting from 2.3.20), - since the values are not locale (language, country) sensitive. - To change these default strings, you can use the - boolean_format setting.

      - -

      Note, that in the very rare case - when a value is multi-typed and is both a boolean and a string, - then the string value of the variable will be returned, and so - the boolean_format setting will have no - effect.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_date.html b/fmpp/docs/freemarker/ref_builtins_date.html deleted file mode 100644 index 5c4de34..0000000 --- a/fmpp/docs/freemarker/ref_builtins_date.html +++ /dev/null @@ -1,607 +0,0 @@ - - - - - - - - FreeMarker Manual - Built-ins for date/time/date-time values - - - - - - - - -
    - - - - - -

    -Built-ins for date/time/date-time values

    - - - - - - - - - -

    -date, time, datetime (when used with a date/time/date-time - value)

    - - - - - - - - - - - - -

    These built-ins can be used to specify which parts of the - date-like variable are in use:

    - -
    -
      -
    • -

      date: Date only, no time of the - day.

      -
    • - -
    • -

      time: Only the time of the day, no date - part

      -
    • - -
    • -

      datetime: Both date and time

      -
    • -
    - - -

    Ideally, you do not need to use these built-ins. - Unfortunately, because of the technical limitations of the Java - platform, FreeMarker sometimes can't find out which parts of a - date-like value is a date, a time or a date-time; ask the - programmers which variables has this problem. If FreeMarker has to - execute an operation where this information is needed -- such as - displaying the value as text -- but it does not know which parts are - in use, it will stop with error. This is when you have to use these - built-ins. For example, assume openingTime is a - such problematic variable:

    - -
    -
    -<#assign x = openingTime> <#-- no problem can occur here -->
    -${openingTime?time} <#-- without ?time it would fail -->
    -<#-- For the sake of better understanding, consider this: -->
    -<#assign openingTime = openingTime?time>
    -${openingTime} <#-- this will work now -->  
    - - -

    These built-ins can also be used to convert date-time values - to date or time. For example:

    - -
    -
    -Last updated: ${lastUpdated} <#-- assume that lastUpdated is a date-time value -->
    -Last updated date: ${lastUpdated?date}
    -Last updated time: ${lastUpdated?time}  
    - - -

    will output something like:

    - -
    -
    -Last updated: 04/25/2003 08:00:54 PM
    -Last updated date: 04/25/2003
    -Last updated time: 08:00:54 PM  
    - - -

    If the left side of the ? is string, then - these built-ins convert - strings to date/time/date-time.

    - - - - - -

    -date_if_unknown, time_if_unknown, datetime_if_unknown

    - - -
    -

    Note

    - -

    This built-in exists since FreeMarker 2.3.21.

    -
    - - -

    The date_if_unknown, - time_if_unknown, - datetime_if_unknown built-ins mark a date-like - value with some of the sub-types: date without time, time, or - date-time, respectively. However, if the value already holds this - information, the built-in has no effect. That is, it will never - convert the sub-type of a value, it only adds the sub-type if it was - unknown.

    - - - - - -

    -iso_...

    - - - - - - -
    -

    Note

    - -

    These built-ins are deprecated since - FreeMarker 2.3.21, where the date_format, - time_format and - datetime_format settings understand - "iso" (for ISO 8601:2004 format) and - "xs" (for XML Schema format) in additionally to - the Java SimpleDateFormat patterns. Thus the - default format can be set to ISO 8601, or for one time ISO - formatting you can use myDate?string.iso. See more - here...

    -
    - - -

    These built-ins convert a date, time or date-time value to - string that follows ISO 8601:2004 "extended" format.

    - -

    This built-in has several variations: - iso_utc, iso_local, - iso_utc_nz, iso_local_nz, - iso_utc_m, iso_utc_m_nz, etc. - The name is constructed from the following words in this order, each - separated with a _ from the next:

    - -
      -
    1. -

      iso (required)

      -
    2. - -
    3. -

      Either utc or local - (required (except when it's given with a parameter, but see that - later)): Specifies whether you want to print the - date/time/date-time according to UTC or according the current - time zone. The current time zone is decided by the - time_zone FreeMarker setting and is normally - configured by the programmers outside the templates (but it can - also be set in a template, like <#setting - time_zone="America/New_York"> for example). Note - that if the sql_date_and_time_time_zone - FreeMarker setting is set and non-null, then - for java.sql.Date and - java.sql.Time values (i.e., for date-only and - time-only values that are coming from database via SQL) - local will mean that time zone instead of the - value of the time_zone setting.

      -
    4. - -
    5. -

      Either h or m or - ms (optional): The accuracy of the time part. - When omitted, it defaults to seconds accuracy (like - 12:30:18). h means hours - accuracy (like 12), m - means minutes accuracy (12:30), and - ms means milliseconds accuracy - (12:30:18.25, where we have 250 ms). Note - that when using ms, the milliseconds are - displayed as fraction seconds (following the standard) and will - not have trailing 0-s. Thus, if the the - millisecond part happens to be 0, the whole - fraction second part will be omitted. Also note that the - fraction seconds are always separated with a dot , not with - comma (to follow the Web conventions and XML Schema - time/dateTime canonical format).

      -
    6. - -
    7. -

      nz (optional): nz - (like in ${foo?utc_local_nz}) stands for - "no zone", which means that the time zone offset - (like +02:00 or or -04:30 - or Z) will not be displayed. If this part is - omitted (like in ${foo?utc_local}) the zone - will be displayed, except in two cases:

      - -
      -
        -
      • -

        If the value is a date (no time part) value (again, - ISO 8901 doesn't allow it then)

        -
      • - -
      • -

        If the value is a java.sql.Time and - the incompatible_improvements (often set - via the Java Configuration constructor - parameter) FreeMarker configuration setting is at least - 2.3.21. This is because most databases store time values - that aren't in any time zone, but just store hour, minute, - second, and decimal second field values, so showing the time - zone doesn't make sense.

        -
      • -
      - - -

      Note that since FreeMarker 2.3.19, the offset always - contains the minutes for XML Schema date/time/dateTime format - compliance. (However, if you primarily generate for the XML - Schema format, use the xs format.)

      -
    8. -
    - -

    Example:

    - -
    -
    -<#assign aDateTime = .now>
    -<#assign aDate = aDateTime?date>
    -<#assign aTime = aDateTime?time>
    -
    -Basic formats:
    -${aDate?iso_utc}
    -${aTime?iso_utc}
    -${aDateTime?iso_utc}
    -
    -Different accuracies:
    -${aTime?iso_utc_ms}
    -${aDateTime?iso_utc_m}
    -
    -Local time zone:
    -${aDateTime?iso_local}  
    - - -

    A possible output (depends on current time and time - zone):

    - -
    -
    -Basic formats:
    -2011-05-16
    -21:32:13Z
    -2011-05-16T21:32:13Z
    -
    -Different accuracies:
    -21:32:13.868Z
    -2011-05-16T21:32Z
    -
    -Local time zone:
    -2011-05-16T23:32:13+02:00  
    - - -

    There is yet another group of iso_... - built-in variants, where you omit the local or - utc word from the name and instead specify the - time zone as a parameter to the built-in. Example:

    - -
    -
    -<#assign aDateTime = .now>
    -${aDateTime?iso("UTC")}
    -${aDateTime?iso("GMT-02:30")}
    -${aDateTime?iso("Europe/Rome")}
    -
    -The usual variations are supported:
    -${aDateTime?iso_m("GMT+02")}
    -${aDateTime?iso_m_nz("GMT+02")}
    -${aDateTime?iso_nz("GMT+02")}  
    - - -

    A possible output (depends on current time and time - zone):

    - -
    -
    -2011-05-16T21:43:58Z
    -2011-05-16T19:13:58-02:30
    -2011-05-16T23:43:58+02:00
    -
    -The usual variations are supported:
    -2011-05-16T23:43+02:00
    -2011-05-16T23:43
    -2011-05-16T23:43:58  
    - - -

    If the time zone parameter can't be interpreted, the template - processing will be terminated with error.

    - -

    The parameter can be a - java.util.TimeZone object too (which is possibly - the return value of a Java method, or it's in the data-model), not - just a string.

    - - - - - -

    -string (when used with a date/time/date-time value)

    - - - - - - - - - - - - - - - - - - - - - - - - -

    This built-in converts a date to a string, with the specified - formatting.

    - -
    -

    Note

    - -

    You should need this built-in rarely, as the default format - of date/time/date-time values can be specified globally with the - date_format, time_format and - datetime_format settings of FreeMarker. - Use this built-in only at the places where the desired format - differs from the one normally used. For the other places the - default format should be set properly by the programmers, outside - the templates.

    -
    - - -

    The desired format can be specified like - ?string.format or - ?string["format"](or - the historical equivalent, - ?string("format")). - These are equivalent, except that with the quoted formats you can - include any characters in the - format, like spaces. - The syntax of format - is exactly the same as of the date_format, - time_format and - datetime_format configuration settings; see the documentation of the - possible values there.

    - -

    Example: If the locale of the output is U.S. English, and the - time zone is the U.S. Pacific Time zone, and - openingTime is a - java.sql.Time, nextDiscountDay - is java.sql.Date and - lastUpdated is - java.sql.Timestamp or - java.util.Date then this:

    - -
    -
    -${openingTime?string.short}
    -${openingTime?string.medium}
    -${openingTime?string.long}
    -${openingTime?string.full}
    -${openingTime?string.xs}
    -${openingTime?string.iso}
    -
    -${nextDiscountDay?string.short}
    -${nextDiscountDay?string.medium}
    -${nextDiscountDay?string.long}
    -${nextDiscountDay?string.full}
    -${nextDiscountDay?string.xs}
    -${nextDiscountDay?string.iso}
    -
    -${lastUpdated?string.short}
    -${lastUpdated?string.medium}
    -${lastUpdated?string.long}
    -${lastUpdated?string.full}
    -${lastUpdated?string.medium_short} <#-- medium date, short time -->
    -${lastUpdated?string.xs}
    -${lastUpdated?string.iso}
    -
    -<#-- SimpleDateFormat patterns: -->
    -${lastUpdated?string["dd.MM.yyyy, HH:mm"]}
    -${lastUpdated?string["EEEE, MMMM dd, yyyy, hh:mm a '('zzz')'"]}
    -${lastUpdated?string["EEE, MMM d, ''yy"]}
    -${lastUpdated?string.yyyy} <#-- Same as ${lastUpdated?string["yyyy"]} -->
    -
    -<#-- Advanced ISO 8601-related formats: -->
    -${lastUpdated?string.iso_m_u}
    -${lastUpdated?string.xs_ms_nz}  
    - - -

    will print something like this:

    - -
    -
    -01:45 PM
    -01:45:09 PM
    -01:45:09 PM PST
    -01:45:09 PM PST
    -13:45:09-08:00
    -13:45:09-08:00
    -
    -2/20/07
    -Apr 20, 2007
    -April 20, 2007
    -Friday, April 20, 2007
    -2007-02-20-08:00
    -2007-02-20
    -
    -2/20/07 01:45 PM
    -Feb 20, 2007 01:45:09 PM
    -February 20, 2007 01:45:09 PM PST
    -Friday, February 20, 2007 01:45:09 PM PST
    -Feb 8, 2003 9:24 PM
    -2007-02-20T13:45:09-08:00
    -2007-02-20T13:45:09-08:00
    -
    -08.04.2003 21:24
    -Tuesday, April 08, 2003, 09:24 PM (PDT)
    -Tue, Apr 8, '03
    -2003
    -
    -2007-02-20T21:45Z
    -2007-02-20T13:45:09.000  
    - - -
    -

    Warning!

    - -

    Unfortunately, because of the limitations of the Java - platform, it can happen that you have date-like variables in the - data-model, where FreeMarker can't decide if the variable is a - date (year, month, day), or a time (hour, minute, second, - millisecond) or a date-time. In this case, FreeMarker doesn't know - how to display the value when you write something like - ${lastUpdated?string.short} or - ${lastUpdated?string.xs}, i.e., a format that - doesn't specify the exact fields to display, or if you simply use - ${lastUpdated}. Then it will have to stop with - error. To prevent this, you can help FreeMarker with the ?date, - ?time and ?datetime - built-ins. For example: - ${lastUpdated?datetime?string.short}. Ask the - programmers if certain variables of the data-model have this - problem, or always use ?date, - ?time and ?datetime - built-ins to be on the safe side.

    -
    - - -
    -

    Note

    - -

    You never need to use ?date, - ?time or ?datetime with - format patterns like "yyyy.MM.dd HH:mm", since - with the pattern you tell FreeMarker what parts of the date to - show. However, FreeMarker will trust you blindly, so you can show - "noise" if you display parts that are actually not stored in the - variable. For example, ${openingTime?string["yyyy-MM-dd - hh:mm:ss a"]}, where openingTime - stores only time, will display 1970-01-01 09:24:44 - PM.

    -
    - - -

    To prevent misunderstandings, the format need not be a string - literal, it can be a variable or any other expression, like in - "..."?string[myFormat].

    - -

    See also: the - interpolation of dates

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_expert.html b/fmpp/docs/freemarker/ref_builtins_expert.html deleted file mode 100644 index d9ba8cd..0000000 --- a/fmpp/docs/freemarker/ref_builtins_expert.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - - - - - FreeMarker Manual - Seldom used and expert built-ins - - - - - - - - -
    - - - - - -

    -Seldom used and expert built-ins

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    These are the built-ins that normally you should not use, but in - exceptional situations (debugging, advanced macros) they can be - useful. If you need to use these in your normal page templates, you - may revisit the data-model so you don't need to use these.

    - - - - -

    -byte, double, float, int, long, short

    - - - - - - - - - - - - - - - - - - - - - - -

    Returns a SimpleNumber which contains the - same value as the original variable, but uses - java.lang.Type for the - internal representation of the value. This is useful if a method is - overloaded, or if a TemplateModel unwrapper has - problem with automatically choosing the suitable - java.lang.* type. Note that since version 2.3.9 - the unwrapper has been improved substantially, so you will hardly - ever need to use these built-ins to convert between numerical types, - except for resolving ambiguity in overloaded method - invocation.

    - -

    The long built-in can also be used with - date, time and date-time values to get the value as - java.util.Date.getTime() would return. This is - useful if you have to call a Java methods that expect a timestamp as - a long. This conversion is not automatic.

    - - - - - -

    -eval

    - - - - - - -

    This built-in evaluates a string as an FTL expression. For - example "1+2"?eval returns number 3.

    - - - - - -

    -has_content

    - - - - -

    It is true if the variable exists (and - isn't Java null) and is not ``empty'', otherwise - it is false. The meaning of ``empty'' depends on - the concrete case. This follows intuitive common-sense ideas. The - following are empty: a string with 0 length, sequence or hash with - no subvariables, a collection which has passed the last element. If - the value is not a string or sequence or hash or collection, then it - counts as non-empty if it's a number or a date or a boolean (e.g. - 0 and false are not empty), - otherwise it counts as empty. Note that when your data-model - implements multiple template model interfaces you may get unexpected - results. However, when in doubt you can use always use - expr!?size > 0 or expr!?length > - 0 instead of expr?has_content.

    - -

    This buit-in is exceptional in that you can use the - parentheses trick like with the default value - operator. That is, you can write both - product.color?has_content and - (product.color)?has_content. The first doesn't - handle the case when product is missing, the last - does.

    - - - - - -

    -interpret

    - - - - -

    This built-in interprets a string as a FTL template, and - returns an user-defined directive that - when applied to any block - - executes the template just as if it was included at that point. - Example:

    - -
    -
    -<#assign x=["a", "b", "c"]>
    -<#assign templateSource = r"<#list x as y>${y}</#list>">
    -<#-- Note: That r was needed so that the ${y} is not interpreted above -->
    -<#assign inlineTemplate = templateSource?interpret>
    -<@inlineTemplate />  
    - - -

    The output:

    - -
    -
    -abc  
    - - -

    As you can see, inlineTemplate is a - user-defined directive that, when executed, runs the template that - was generated on-the-fly using the - interpret.

    - -

    You can also apply this built-in to a two-element sequence. In - this case the first element of the sequence is the template source, - and the second element is a name for the inline template. It can be - useful to give an explicit name to the inline template for debugging - purposes. So, you could have written:

    - -
    -
    -<#assign inlineTemplate = [templateSource, "myInlineTemplate"]?interpret>  
    - - -

    as well in the above template. Note that giving the inline - template a name has no immediate effect - it is only useful as an - extra bit of information if you get an error report.

    - - - - - -

    -is_...

    - - - - - - -

    These built-ins check the type of a variable, and returns - true or false depending on the - type. The list of - is_... - built-ins:

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Built-inReturns true if the value is a ...
    is_stringstring
    is_numbernumber
    is_booleanboolean
    is_dateDon't use it! Same as is_date_like, use - that instead. Later may changes meaning to - date_only.
    is_date_likedate-like, means either date, time or date-time, or - date-like with unknown precise type (since FreeMarker - 2.3.21)
    is_date_onlydate (no time of the day part) (since FreeMarker - 2.3.21)
    is_timetime (no year-month-day part) (since FreeMarker - 2.3.21)
    is_datetimedate-time (contains both year-month-day and time of the - day)
    is_unknown_date_likedate-like where we don't know if it's a date or a time or - a date-time
    is_methodmethod
    is_transformtransform
    is_macromacro or function (yes, also for function; a historical - glitch)
    is_hashhash
    is_hash_exextended hash (i.e. supports ?keys and - ?values)
    is_sequencesequence
    is_collectioncollection
    is_enumerablesequence or collection
    is_indexablesequence
    is_directiveWhatever kind of directive (for example a macro, or - TemplateDirectiveModel, - TemplateTransformModel, etc.), or - function (a historical glitch)
    is_nodenode
    -
    - - - - - - -

    -namespace

    - - - - -

    This built-in returns the namespace (i.e. the ``gate'' hash to - the namespace) associated with a macro or function variable. You can - use it with macros and functions only.

    - - - - - -

    -new

    - - - - - - -

    This is to create a variable of a certain - TemplateModel implementation.

    - -

    On the left side of ? you specify a string, - the full-qualified class name of a TemplateModel - implementation. The result is a method variable that calls the - constructor, and returns the new variable.

    - -

    Example:

    - -
    -
    -<#-- Creates an user-defined directive be calling the parameterless constructor of the class -->
    -<#assign word_wrapp = "com.acmee.freemarker.WordWrapperDirective"?new()>
    -<#-- Creates an user-defined directive be calling the constructor with one numerical argument -->
    -<#assign word_wrapp_narrow = "com.acmee.freemarker.WordWrapperDirective"?new(40)>  
    - - -

    For more information about how the constructor parameters are - unwrapped and how overloaded constructor is chosen, read: Programmer's Guide/Miscellaneous/Bean wrapper

    - -

    This built-in can be a security concern because the template - author can create arbitrary Java objects and then use them, as far - as they implement TemplateModel. Also the - template author can trigger static initialization for classes that - don't even implement TemplateModel. You can - (since 2.3.17) restrict the classes accessible with this built-in - using - Configuration.setNewBuiltinClassResolver(TemplateClassResolver) - or the new_builtin_class_resolver setting. See - the Java API docs for more information. If you are allowing - not-so-much-trusted users to upload templates then you should - definitely look into this topic.

    - - - - - -

    -number_to_date, number_to_time, number_to_datetime

    - - - - - - - - - - - - - - - - -

    These are used to convert a number (usually a Java - long) to a date, time or date-time, respectively. - This does them same as new java.util.Date(long) - in Java, that is, the number is interpreted as the milliseconds - passed since the epoch. The number can be anything and of any type - as far as its value fits into a long. If the - number isn't a whole number, it will be rounded to whole with - half-up rule. This conversion is not automatic.

    - -

    Example:

    - -
    -
    -${1305575275540?number_to_datetime}
    -${1305575275540?number_to_date}
    -${1305575275540?number_to_time}  
    - - -

    The output will be something like this (depending on the - current locale and time zone):

    - -
    -
    -May 16, 2011 3:47:55 PM
    -May 16, 2011
    -3:47:55 PM  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_hash.html b/fmpp/docs/freemarker/ref_builtins_hash.html deleted file mode 100644 index cfa630d..0000000 --- a/fmpp/docs/freemarker/ref_builtins_hash.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - FreeMarker Manual - Built-ins for hashes - - - - - - - - -
    - - - - - -

    -Built-ins for hashes

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -keys

    - - - - -

    A sequence that contains all the lookup keys in the hash. Note - that not all hashes support this (ask the programmer if a certain - hash allows this or not).

    - -
    -
    -<#assign h = {"name":"mouse", "price":50}>
    -<#assign keys = h?keys>
    -<#list keys as key>${key} = ${h[key]}; </#list>  
    - - -

    Output:

    - -
    -
    -name = mouse; price = 50;  
    - - -

    Since hashes do not define an order for their subvariables in - general, the order in which key names are returned can be arbitrary. - However, some hashes maintain a meaningful order (ask the programmer - if a certain hash does that or not). For example, hashes created - with the above {...} - syntax preserve the same order as you have specified the - subvariables.

    - - - - - -

    -values

    - - - - -

    A sequence that contains all the variables in the hash. Note - that not all hashes support this (ask the programmer if a certain - hash allows this or not).

    - -

    As of the order in which the values are returned, the same - applies as with the keys built-in; see - there.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_node.html b/fmpp/docs/freemarker/ref_builtins_node.html deleted file mode 100644 index aee323a..0000000 --- a/fmpp/docs/freemarker/ref_builtins_node.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - FreeMarker Manual - Built-ins for nodes (for XML) - - - - - - - - -
    - - - - - -

    -Built-ins for nodes (for XML)

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Note that the variables returned by these built-ins are - generated by the node variable implementation it is used with. This - means that the returned variables can have extra features in - additional to what it stated here, for example, with the XML DOM nodes the sequence retuned by - the children built-in also can be used as hash and - maybe as string, as it is described in the part - about XML processing.

    - - - - -

    -ancestors

    - - - - -

    A sequence that contains all the node's ancestors, starting - with the immediate parent and ending with the root node. The result - of this built-in is also a method, by which you can filter the - result with the full-qualified name of the - node. For example as node?ancestors("section") to - get the sequence of all ancestors with name - section.

    - - - - - -

    -children

    - - - - -

    A sequence that contains all of this node's child nodes (i.e. - immediate descendant nodes).

    - -

    XML: This is almost the same as special hash key - *, except that it returns all nodes, not only - elements. So the possible children are element nodes, text nodes, - comment nodes, processing instruction nodes, etc. but - not attribute nodes. Attribute nodes are - excluded from the sequence.

    - - - - - -

    -node_name

    - - - - -

    Returns the string that is used to determine what user-defined - directive to invoke to handle this node when it is ``visited''. See: - the visit and recurse directives.

    - -

    XML: If the node is an element or attribute, then the string - will be the local (prefix free) name of the element or attribute. - Otherwise the name usually starts with @ followed - by the node type. See this - table. Note that this node name is not the same as the node - name returned in the DOM API; the goal of FreeMarker node names is - to give the name of the used-defined directive that will process the - node.

    - - - - - -

    -node_namespace

    - - - - -

    Returns the namespace string of the node. FreeMarker does not - define the exact meaning of node namespace; it depends on what your - node variables are modeling. It's possible that a node doesn't have - any node namespace defined. In this case, the built-in should - evaluate to undefined variable (i.e. - node?node_namespace?? - is false), so you can't use the returned - value.

    - -

    XML: In the case of XML, it's the XML namespace URI (such as - "http://www.w3.org/1999/xhtml"). If an element or - attribute node does not use XML namespace, then this built-in - evaluates to an empty string. For other XML nodes this built-in - always return undefined variable.

    - - - - - -

    -node_type

    - - - - -

    A string that describes the type of node this is. FreeMarker - does not define the exact meaning of node type; it depends on what - your variables are modeling. It's possible that a node doesn't - support node type at all. In this case, the built-in evaluates to an - undefined value, so you can't use the returned value. (You can still - check if a node supports the type property with - node?node_type??.)

    - -

    XML: The possible values are: "attribute", - "text", "comment", - "document_fragment", - "document", "document_type", - "element", "entity", - "entity_reference", - "notation", "pi". Note that a - there is no "cdata" type, because CDATA is - considered as plain text node.

    - - - - - -

    -parent

    - - - - -

    The node that is this node's immediate parent in the node - tree. The root node has no parent node, so for the root node, the - expression - node?parent?? - evaluates to false.

    - -

    XML: Note that the value returned by this built-in is also a - sequence (same as the result of XPath expression - .., when you write - someNode[".."]). Also note that for attribute - nodes, it returns the element the attribute belongs to, despite that - attribute nodes are not counted as children of the element.

    - - - - - -

    -root

    - - - - -

    The node that is the root of the tree of nodes to which this - node belongs.

    - -

    XML: According to W3C, the root of an XML document is not the - topmost element node, but the document itself, which is the parent - of the topmost element. For example, if you want to get the topmost - element of the XML (the so called ``document - element''; do not mix it with the ``document''), which is called - foo, then you have to write - someNode?root.foo. If you write just - someNode?root, then you get the document itself, - and not the document element.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_number.html b/fmpp/docs/freemarker/ref_builtins_number.html deleted file mode 100644 index 7478d13..0000000 --- a/fmpp/docs/freemarker/ref_builtins_number.html +++ /dev/null @@ -1,531 +0,0 @@ - - - - - - - - FreeMarker Manual - Built-ins for numbers - - - - - - - - -
    - - - - - -

    -Built-ins for numbers

    - - - - -

    Related FAQs: Do you have things like 1,000,000 or 1 000 000 - instead of 1000000, or something like 3.14 instead of 3,14 or vice - versa? See this and this FAQ entry, also note - the c built-in above.

    - - - - -

    -abs

    - - - - - - -
    -

    Note

    - -

    This built-in exists since FreeMarker 2.3.20.

    -
    - - -

    Gives the absolute value of a number. For example - x?abs , if x is -5, will - evaluate to 5.

    - - - - - -

    -c (when used with numerical value)

    - - - - - - - - - - -
    -

    Note

    - -

    This built-in exists since FreeMarker 2.3.3.

    -
    - - -

    This built-in converts a number to string for a - "computer language" as opposed to for human audience. - That is, it formats with the rules that programming languages used - to use, which is independent of all the locale and number format - settings of FreeMarker. It always uses dot as decimal separator, and - it never uses grouping separators (like 3,000,000), nor exponential - form (like 5E20), nor superfluous leading or trailing 0-s (like 03 - or 1.0), nor + sign (like +1). It will print at most 16 digits after - the decimal dot, and thus numbers whose absolute value is less than - 1E-16 will be shown as 0. This built-in is crucial because be - default (like with ${x}) numbers are converted to - strings with the locale (language, country) specific number - formatting, which is for human readers (like 3000000 is possibly - printed as 3,000,000). When the number is printed not for human - audience (e.g., for a database record ID used as the part of an URL, - or as invisible field value in a HTML form, or for printing - CSS/JavaScript numerical literals) this built-in must be used to - print the number (i.e., use ${x?c} instead of - ${x}), or else the output will be possibly broken - depending on the current number formatting settings and locale (like - the decimal point is not dot, but comma in many countries) and the - value of the number (like big numbers are possibly ``damaged'' by - grouping separators).

    - -

    If the incompatible_imporvements FreeMarker - configuration setting is set to 2.3.21 (or higher), this built-in - will return "INF", "-INF" and - "NaN" for positive/negative infinity and IEEE - floating point Not-a-Number, respectively. These are the XML Schema - compatible representations of these special values. (Earlier it has - returned what java.text.DecimalFormat did with US - locale, none of which is understood by any (common) computer - language.)

    - -

    Note that this built-in also works on - booleans.

    - - - - - -

    -is_infinite

    - - - - - - -
    -

    Note

    - -

    This built-in exists since FreeMarker 2.3.20.

    -
    - - -

    Tells if a number is floating point infinite (according to - IEEE 754). For example, someNumber?is_infinite - evaluates to true or false - depending on if the value of someNumber is - infinite or not. Of course, if the underlying number is not of - floating point type, this will always return - false.

    - - - - - -

    -is_nan

    - - - - - - -
    -

    Note

    - -

    This built-in exists since FreeMarker 2.3.20.

    -
    - - -

    Tells if a number is floating point NaN (according to IEEE - 754). For example, someNumber?is_nan evaluates to - true or false depending on if - the value of someNumber is NaN or not. Of course, - if the underlying number is not of floating point type, this will - always return false.

    - - - - - -

    -round, floor, ceiling

    - - - - - - - - - - -
    -

    Note

    - -

    The rounding built-ins exist since FreeMarker 2.3.13.

    -
    - - -

    Converts a number to a whole number using the specified - rounding rule:

    - -
    -
      -
    • -

      round: Rounds to the nearest whole - number. If the number ends with .5, then it rounds upwards - (i.e., towards positive infinity)

      -
    • - -
    • -

      floor: Rounds the number downwards - (i.e., towards neagative infinity)

      -
    • - -
    • -

      ceiling: Rounds the number upwards - (i.e., towards positive infinity)

      -
    • -
    - - -

    Example:

    - -
    -
    -<#assign testlist=[
    -  0, 1, -1, 0.5, 1.5, -0.5,
    -  -1.5, 0.25, -0.25, 1.75, -1.75]>
    -<#list testlist as result>
    -    ${result} ?floor=${result?floor} ?ceiling=${result?ceiling} ?round=${result?round}
    -</#list>  
    - - -

    Prints:

    - -
    -
    -    0 ?floor=0 ?ceiling=0 ?round=0            
    -    1 ?floor=1 ?ceiling=1 ?round=1        
    -    -1 ?floor=-1 ?ceiling=-1 ?round=-1      
    -    0.5 ?floor=0 ?ceiling=1 ?round=1      
    -    1.5 ?floor=1 ?ceiling=2 ?round=2      
    -    -0.5 ?floor=-1 ?ceiling=0 ?round=0     
    -    -1.5 ?floor=-2 ?ceiling=-1 ?round=-1    
    -    0.25 ?floor=0 ?ceiling=1 ?round=0     
    -    -0.25 ?floor=-1 ?ceiling=0 ?round=0    
    -    1.75 ?floor=1 ?ceiling=2 ?round=2     
    -    -1.75 ?floor=-2 ?ceiling=-1 ?round=-2  
    - - -

    These built-ins may be useful in pagination operations and - like. If you just want to display numbers in - rounded form, then you should rather use the string - built-in or the number_format - setting.

    - - - - - -

    -string (when used with a numerical value)

    - - - - - - - - - - -

    Converts a number to a string. It uses the default format that - the programmer has specified via the - number_format and the locale - settings. You can also specify a number format explicitly with this - built-in, as it will be shown later.

    - -

    There are four predefined number formats: - computer, currency, - number, and percent. The exact - meaning of these is locale (nationality) specific, and is controlled - by the Java platform installation, rather than by FreeMarker, except - for computer, which uses the same formatting as - the c - built-in. You can use these predefined formats like - this:

    - -
    -
    -<#assign x=42>
    -${x}
    -${x?string}  <#-- the same as ${x} -->
    -${x?string.number}
    -${x?string.currency}
    -${x?string.percent}
    -${x?string.computer}  
    - - -

    If your locale is US English, this will print:

    - -
    -
    -42
    -42
    -42
    -$42.00
    -4,200%
    -42  
    - - -

    The output of first three expressions is identical because the - first two expressions use the default format, which is "number" - here. You can change this default using a setting:

    - -
    -
    -<#setting number_format="currency">
    -<#assign x=42>
    -${x}
    -${x?string}  <#-- the same as ${x} -->
    -${x?string.number}
    -${x?string.currency}
    -${x?string.percent}  
    - - -

    Will now output:

    - -
    -
    -$42.00
    -$42.00
    -42
    -$42.00
    -4,200%  
    - - -

    since the default number format was set to "currency".

    - -

    Beside the three predefined formats, you can use arbitrary - number format patterns written in Java - decimal number format syntax:

    - -
    -
    -<#assign x = 1.234>
    -${x?string["0"]}
    -${x?string["0.#"]}
    -${x?string["0.##"]}
    -${x?string["0.###"]}
    -${x?string["0.####"]}
    -
    -${1?string["000.00"]}
    -${12.1?string["000.00"]}
    -${123.456?string["000.00"]}
    -
    -${1.2?string["0"]}
    -${1.8?string["0"]}
    -${1.5?string["0"]} <-- 1.5, rounded towards even neighbor
    -${2.5?string["0"]} <-- 2.5, rounded towards even neighbor
    -
    -${12345?string["0.##E0"]}  
    - - -

    outputs this:

    - -
    -
    -1
    -1.2
    -1.23
    -1.234
    -1.234
    -
    -001.00
    -012.10
    -123.46
    -
    -1
    -2
    -2 <-- 1.5, rounded towards even neighbor
    -2 <-- 2.5, rounded towards even neighbor
    -
    -1.23E4  
    - - -

    Note that as in FreeMarker foo.bar is - equivalent with foo["bar"], you could also write - x?string.currency as - x?string["currency"], but of course that wouldn't - be practical. But in the above examples we have to use the square - bracket syntax, because the characters involved (numbers, dot, - #) aren't allowed syntactically after the dot - operator.

    - -

    For historical reasons, you could also write things like - x?string("0.#"), which does exactly the same as - x?string["0.#"].

    - -

    Following the financial and statistics practice, the rounding - goes according the so called half-even rule, which means rounding - towards the nearest ``neighbor'', unless both neighbors are - equidistant, in which case, it rounds towards the even neighbor. - This was visible in the above example if you look at the rounding of - 1.5 and of 2.5, as both were rounded to 2, since 2 is even, but 1 - and 3 are odds.

    - -

    As it was shown for the predefined formats earlier, the - default formatting of the numbers can be set in the template:

    - -
    -
    -<#setting number_format="0.##">
    -${1.234}  
    - - -

    outputs this:

    - -
    -
    -1.23  
    - - -

    Note that as number formatting is locale sensitive, the locale - setting also plays role in the formatting:

    - -
    -
    -<#setting number_format=",##0.00">
    -<#setting locale="en_US">
    -US people write:     ${12345678}
    -<#setting locale="hu">
    -German people write: ${12345678}  
    - - -

    outputs this:

    - -
    -
    -US people write:     12,345,678.00
    -German people write: 12.345.678,00  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_sequence.html b/fmpp/docs/freemarker/ref_builtins_sequence.html deleted file mode 100644 index 8e643bd..0000000 --- a/fmpp/docs/freemarker/ref_builtins_sequence.html +++ /dev/null @@ -1,685 +0,0 @@ - - - - - - - - FreeMarker Manual - Built-ins for sequences - - - - - - - - -
    - - - - - -

    -Built-ins for sequences

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -chunk

    - - - - - - - - -
    -

    Note

    - -

    This built-in exists since FreeMarker 2.3.3.

    -
    - - -

    This built-in splits a sequence into multiple sequences of the - size given with the 1st parameter to the built-in (like - mySeq?chunk(3)). The result is the sequence of - these sequences. The last sequence is possibly shorter than the - given size, unless the 2nd parameter is given (like - mySeq?chunk(3, '-')), that is the item used to - make up the size of the last sequence to the given size. - Example:

    - -
    -
    -<#assign seq = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']>
    -
    -<#list seq?chunk(4) as row>
    -  <#list row as cell>${cell} </#list>
    -</#list>
    -
    -<#list seq?chunk(4, '-') as row>
    -  <#list row as cell>${cell} </#list>
    -</#list>  
    - - -

    The output will be:

    - -
    -
    -
    -  a b c d 
    -  e f g h 
    -  i j 
    -
    -  a b c d 
    -  e f g h 
    -  i j - - 
    -   
    - - -

    This built in is mostly for outputting sequnces in - tabular/columnar format. When used with HTML tables, the 2nd - parameter is often "\xA0" (that is the code of - the no-break space character, also known as ``nbsp''), so the border - of the empty TD-s will not be missing.

    - -

    The 1st parameter must be a number that is at least 1. If the - number is not integer, it will be silently rounded down to integer - (i.e. both 3.1 and 3.9 will be rounded to 3). The 2nd parameter can - be of any type and value.

    - - - - - -

    -first

    - - - - -

    The first subvariable of the sequence. Template processing - will die with error if the sequence is empty.

    - - - - - -

    -join

    - - - - -

    Concatenates the items of a sequence to a single string, with - the given separator. For example:

    - -
    -
    -<#assign colors = ["red", "green", "blue"]>
    -${colors?join(", ")}  
    - - -

    will output:

    - -
    -
    -red, green, blue  
    - - -

    Sequence items that are not strings will be converted to - string with the same conversion rules as of - ${...} (except, of - course, no automatic escaping is applied at this stage).

    - -

    ?join(...) can - have up to 3 parameters:

    - -
      -
    1. -

      Separator, required: The string that is inserted between - items

      -
    2. - -
    3. -

      Empty value, defaults to "" (empty - string): The value used if the sequence contains 0 value.

      -
    4. - -
    5. -

      List ending, defaults to "" (empty - string): The value printed after the last value, if the list - sequence wasn't empty.

      -
    6. -
    - -

    So this (where [] means an empty - sequence):

    - -
    -
    -${colors?join(", ", "-")}
    -${[]?join(", ", "-")}
    -
    -${colors?join(", ", "-", ".")}
    -${[]?join(", ", "-", ".")}  
    - - -

    will output:

    - -
    -
    -red, green, blue
    --
    -
    -red, green, blue.
    --  
    - - -

    Sequences coming from Java might contain - null values. Those values will be ignored by this - built-in, exactly like if they were removed from the list.

    - - - - - -

    -last

    - - - - -

    The last subvariable of the sequence. Template processing will - die with error if the sequence is empty.

    - - - - - -

    -reverse

    - - - - -

    The sequence with reversed order.

    - - - - - -

    -seq_contains

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.1. It - doesn't exist in 2.3.

    -
    - - -
    -

    Note

    - -

    The seq_ prefix is required in the - built-in name to differentiate it from the contains - built-in that searches a substring in a string (since a - variable can be both string and sequence on the same time).

    -
    - - -

    Tells if the sequence contains the specified value. It has 1 - parameter, the value to find. Example:

    - -
    -
    -<#assign x = ["red", 16, "blue", "cyan"]>
    -"blue": ${x?seq_contains("blue")?string("yes", "no")}
    -"yellow": ${x?seq_contains("yellow")?string("yes", "no")}
    -16: ${x?seq_contains(16)?string("yes", "no")}
    -"16": ${x?seq_contains("16")?string("yes", "no")}  
    - - -

    The output will be:

    - -
    -
    -"blue": yes
    -"yellow": no
    -16: yes
    -"16": no  
    - - -

    To find the value the built-in uses FreeMarker's comparison - rules (as if you was using == - operator), except that comparing two values of different - types or of types for which FreeMarker doesn't support comparison - will not cause error, just will be evaluated as the two values are - not equal. Thus, you can use it only to find scalar values (i.e. - string, number, boolean or date/time values). For other types the - result will be always false.

    - -

    For fault tolerance, this built-in also works with - collections.

    - - - - - -

    -seq_index_of

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.1. It - doesn't exist in 2.3.

    -
    - - -
    -

    Note

    - -

    The seq_ prefix is required in the - built-in name to differentiate it from the index_of - built-in that searches a substring in a string (since a - variable can be both string and sequence on the same time).

    -
    - - -

    Returns the index of the first occurrence of a value in the - sequence, or -1 if the sequence doesn't contain - the specified value. The value to find is specified as the first - parameter. For example this template:

    - -
    -
    -<#assign colors = ["red", "green", "blue"]>
    -${colors?seq_index_of("blue")}
    -${colors?seq_index_of("red")}
    -${colors?seq_index_of("purple")}  
    - - -

    will output this:

    - -
    -
    -2
    -0
    --1  
    - - -

    To find the value the built-in uses FreeMarker's comparison - rules (as if you was using == - operator), except that comparing two values of different - types or of types for which FreeMarker doesn't support comparison - will not cause error, just will be evaluated as the two values are - not equal. Thus, you can use it only to find scalar values (i.e. - string, number, boolean or date/time values). For other types the - result will be always -1.

    - -

    The index where the searching is started can be optionally - given as the 2nd parameter. This may be useful if the same item can - occur for multiple times in the same sequence. There is no - restriction on the numerical value of the second parameter: if it is - negative, it has the same effect as if it were zero, and if it is - greater than the length of the sequence, it has the same effect as - if it were equal to the length of the sequence. Decimal values will - be truncated to integers. For example:

    - -
    -
    -<#assign names = ["Joe", "Fred", "Joe", "Susan"]>
    -No 2nd param: ${names?seq_index_of("Joe")}
    --2: ${names?seq_index_of("Joe", -2)}
    --1: ${names?seq_index_of("Joe", -1)}
    - 0: ${names?seq_index_of("Joe", 0)}
    - 1: ${names?seq_index_of("Joe", 1)}
    - 2: ${names?seq_index_of("Joe", 2)}
    - 3: ${names?seq_index_of("Joe", 3)}
    - 4: ${names?seq_index_of("Joe", 4)}  
    - - -

    will output this:

    - -
    -
    -No 2nd param: 0
    --2: 0
    --1: 0
    - 0: 0
    - 1: 2
    - 2: 2
    - 3: -1
    - 4: -1  
    - - - - - - -

    -seq_last_index_of

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.1. It - doesn't exist in 2.3.

    -
    - - -
    -

    Note

    - -

    The seq_ prefix is required in the - built-in name to differentiate it from the last_index_of - built-in that searches a substring in a string (since a - variable can be both string and sequence on the same time).

    -
    - - -

    Returns the index of the last occurrence of a value in the - sequence, or -1 if the sequence doesn't contain - the specified value. That is, it is the same as seq_index_of, - just it searches backward starting from the last item of the - sequence. It also supports the optional 2nd parameter that specifies - the index where the searching is started. For example:

    - -
    -
    -<#assign names = ["Joe", "Fred", "Joe", "Susan"]>
    -No 2nd param: ${names?seq_last_index_of("Joe")}
    --2: ${names?seq_last_index_of("Joe", -2)}
    --1: ${names?seq_last_index_of("Joe", -1)}
    - 0: ${names?seq_last_index_of("Joe", 0)}
    - 1: ${names?seq_last_index_of("Joe", 1)}
    - 2: ${names?seq_last_index_of("Joe", 2)}
    - 3: ${names?seq_last_index_of("Joe", 3)}
    - 4: ${names?seq_last_index_of("Joe", 4)}  
    - - -

    will output this:

    - -
    -
    -No 2nd param: 2
    --2: -1
    --1: -1
    - 0: 0
    - 1: 0
    - 2: 2
    - 3: 2
    - 4: 2  
    - - - - - - -

    -size

    - - - - -

    The number of subvariables in sequence (as a numerical value). - The highest possible index in sequence s is - s?size - 1 (since the index of the first - subvariable is 0) assuming that the sequence has at least one - subvariable.

    - - - - - -

    -sort

    - - - - - - -

    Returns the sequence sorted in ascending order. (For - descending order use this and then the reverse built - in.) This will work only if all subvariables are strings, or - if all subvariables are numbers, or if all subvariables are date - values (date, time, or date+time), or if all subvariables are - booleans (since 2.3.17). If the subvariables are strings, it uses - locale (language) specific lexical sorting (which is usually not - case sensitive). For example:

    - -
    -
    -<#assign ls = ["whale", "Barbara", "zeppelin", "aardvark", "beetroot"]?sort>
    -<#list ls as i>${i} </#list>  
    - - -

    will print (with US locale at least):

    - -
    -
    -aardvark Barbara beetroot whale zeppelin  
    - - - - - - -

    -sort_by

    - - - - - - -

    Returns the sequence of hashes sorted by the given hash - subvariable in ascending order. (For descending order use this and - then the reverse built - in.) The rules are the same as with the sort built-in, - except that the subvariables of the sequence must be hashes, and you - have to give the name of a hash subvariable that will decide the - order. For example:

    - -
    -
    -<#assign ls = [
    -  {"name":"whale", "weight":2000},
    -  {"name":"Barbara", "weight":53},
    -  {"name":"zeppelin", "weight":-200},
    -  {"name":"aardvark", "weight":30},
    -  {"name":"beetroot", "weight":0.3}
    -]>
    -Order by name:
    -<#list ls?sort_by("name") as i>
    -- ${i.name}: ${i.weight}
    -</#list>
    -
    -Order by weight:
    -<#list ls?sort_by("weight") as i>
    -- ${i.name}: ${i.weight}
    -</#list>  
    - - -

    will print (with US locale at least):

    - -
    -
    -Order by name:
    -- aardvark: 30
    -- Barbara: 53
    -- beetroot: 0.3
    -- whale: 2000
    -- zeppelin: -200
    -
    -Order by weight:
    -- zeppelin: -200
    -- beetroot: 0.3
    -- aardvark: 30
    -- Barbara: 53
    -- whale: 2000  
    - - -

    If the subvariable that you want to use for the sorting is on - a deeper level (that is, if it is a subvariable of a subvariable and - so on), then you can use a sequence as parameter, that specifies the - names of the subvariables that lead down to the desired subvariable. - For example:

    - -
    -
    -<#assign members = [
    -    {"name": {"first": "Joe", "last": "Smith"}, "age": 40},
    -    {"name": {"first": "Fred", "last": "Crooger"}, "age": 35},
    -    {"name": {"first": "Amanda", "last": "Fox"}, "age": 25}]>
    -Sorted by name.last: 
    -<#list members?sort_by(['name', 'last']) as m>
    -- ${m.name.last}, ${m.name.first}: ${m.age} years old
    -</#list>  
    - - -

    will print (with US locale at least):

    - -
    -
    -Sorted by name.last: 
    -- Crooger, Fred: 35 years old
    -- Fox, Amanda: 25 years old
    -- Smith, Joe: 40 years old  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_builtins_string.html b/fmpp/docs/freemarker/ref_builtins_string.html deleted file mode 100644 index 73dacd9..0000000 --- a/fmpp/docs/freemarker/ref_builtins_string.html +++ /dev/null @@ -1,2177 +0,0 @@ - - - - - - - - FreeMarker Manual - Built-ins for strings - - - - - - - - -
    - - - - - -

    -Built-ins for strings

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    These built-ins act on a string left-value. However, if the - left-value is number or date/time/date-time or boolean (since 2.3.20), - it will automatically converted to string according the current - number-, date/time/date-time- and boolean-format settings (which are - the same formatters that are applied when inserting such values with - ${...}).

    - - - - -

    -boolean

    - - - - - - - - - - - - - - -

    The string converted to boolean value. The string must be - true or false (case - sensitive!), or must be in the format specified by the - boolean_format setting.

    - -

    If the string is not in the appropriate format, an error will - abort template processing when you try to access this - built-in.

    - - - - - -

    -cap_first

    - - - - -

    The string with the very first word of the string capitalized. - For the precise meaning of ``word'' see the word_list built-in. - Example:

    - -
    -
    -${"  green mouse"?cap_first}
    -${"GreEN mouse"?cap_first}
    -${"- green mouse"?cap_first}  
    - - -

    The output:

    - -
    -
    -  Green mouse
    -GreEN mouse
    -- green mouse  
    - - -

    In the case of "- green mouse", the first - word is the -.

    - - - - - -

    -capitalize

    - - - - -

    The string with all words capitalized. For the precise meaning - of ``word'' see the word_list - built-in. Example:

    - -
    -
    -${"  green  mouse"?capitalize}
    -${"GreEN mouse"?capitalize}  
    - - -

    The output:

    - -
    -
    -  Green Mouse
    -Green Mouse  
    - - - - - - -

    -chop_linebreak

    - - - - -

    The string without the line-break at its very end if there - was a line-break, otherwise the unchanged string.

    - - - - - -

    -contains

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.1. It - doesn't exist in 2.3.

    -
    - - -

    Returns if the substring specified as the parameter to this - built-in occurrs in the string. For example:

    - -
    -
    -<#if "piceous"?contains("ice")>It contains "ice"</#if>  
    - - -

    This will output:

    - -
    -
    -It contains "ice"  
    - - - - - - -

    -date, time, datetime

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    The string value converted to a date, time, or date-time - value. It will expect the format specified by the date_format, - time_format and - datetime_format settings. If the string is - not in the appropriate format, an error will abort template - processing when you try to access this built-in.

    - -
    -
    -<#-- The date_format, time_format and datetime_format settings must match this format! -->
    -<#assign someDate = "Oct 25, 1995"?date>
    -<#assign someTime = "3:05:30 PM"?time>
    -<#assign someDatetime = "Oct 25, 1995 03:05:00 PM"?datetime>
    -
    -<#-- Changing the setting value changes the expected format: -->
    -<#setting datetime_format="iso">
    -<#assign someDatetime = "1995-10-25T15:05"?datetime>  
    - - -

    You can also specify the format explicitly like - ?datetime.format or - ?datetime["format"] - (or - ?datetime("format") - for historical reasons), and the same with ?date - and ?time. For the syntax and meaning of format - values see the possible values of the date_format, - time_format and - datetime_format settings. Example:

    - -
    -
    -<#-- Parsing XML Schema xs:date, xs:time and xs:dateTime values: -->
    -<#assign someDate = "1995-10-25"?date.xs>
    -<#assign someTime = "15:05:30"?time.xs>
    -<#assign someDatetime = "1995-10-25T15:05:00"?datetime.xs>
    -
    -<#-- Parsing ISO 8601 (both extended and basic formats): -->
    -<#assign someDatetime = "1995-10-25T15:05"?datetime.iso>
    -<#assign someDatetime = "19951025T1505"?datetime.iso>
    -
    -<#-- Parsing with SimpleDateFormat patterns: -->
    -<#assign someDate = "10/25/1995"?date("MM/dd/yyyy")>
    -<#assign someTime = "15:05:30"?time("HH:mm:ss")>
    -<#assign someDatetime = "1995-10-25 03:05 PM"?datetime("yyyy-MM-dd hh:mm a")>  
    - - -

    To prevent misunderstandings, the left-hand value need not be - a string literal. For example, when you read data from XML DOM (from - where all values come as unparsed strings), you may do things like - order.confirmDate?date.xs to convert the string - value to a real date.

    - -

    Of course, the format also can be a variable, like in - "..."?datetime[myFormat].

    - - - - - -

    -ends_with

    - - - - -

    Returns whether this string ends with the substring specified - in the parameter. For example - "ahead"?ends_with("head") returns boolean - true. Also, - "head"?ends_with("head") will return - true.

    - - - - - -

    -ensure_ends_with

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.21.

    -
    - - -

    If the string doesn't end with the substring specified as the - 1st parameter, it adds it after the string, otherwise it returns the - original string. For example, both - "foo"?ensure_ends_with("/") and - "foo/"?ensure_ends_with("/") returns - "foo/".

    - - - - - -

    -ensure_starts_with

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.21.

    -
    - - -

    If the string doesn't start with the substring specified as - the 1st parameter, it adds it before the string, otherwise it - returns the original string. For example, both - "foo"?ensure_starts_with("/") and - "/foo"?ensure_starts_with("/") returns - "/foo".

    - -

    If you specify two parameters, then the 1st parameter is - interpreted as a Java regular expression, and if it doesn't match - the beginning of the string, then the string specified as the 2nd - parameter is added before the string. For example - someURL?ensure_starts_with("[a-zA-Z]+://", - "http://") will check if the string starts with something - that matches "[a-zA-Z]+://" (note that no - ^ is needed), and if it doesn't, it prepends - "http://".

    - -

    This method also accepts a 3rd flags parameter. As - calling with 2 parameters implies "r" there - (i.e., regular expression mode), you rarely need this. One notable - case is when you don't want the 1st parameter to be interpreted as a - regular expression, only as plain text, but you want the comparison - to be case-insensitive, in which case you would use - "i" as the 3rd parameter.

    - - - - - -

    -groups

    - - - - -

    This is used only with the result of the - matches built-in. See there...

    - - - - - -

    -html

    - - - - - - -

    The string as HTML markup. That is, the string with - all:

    - -
    -
      -
    • - < replaced with - &lt; -
    • - -
    • - > replaced with - &gt; -
    • - -
    • - & replaced with - &amp; -
    • - -
    • - " replaced with - &quot; -
    • - -
    • - if FreeMarker was configured by the programmers so (by - setting the incompatible_improvements setting - to 2.3.20 or higher; more here), - ' is replaced with - &#39; -
    • -
    - - -

    Note that if you want to insert an attribute value securely, - you must quote the attribute value in the HTML template with - quotation mark (with ", not with - '):

    - -
    -
    -<input type=text name=user value="${user?html}" 
    - - -

    Note that in HTML pages usually you want to use this built-in - for all interpolations. So you can spare a lot of typing and lessen - the chances of accidental mistakes by using the escape - directive.

    - - - - - -

    -index_of

    - - - - -

    Returns the index within this string of the first occurrence - of the specified substring. For example, - "abcabc"?index_of("bc") will return 1 (don't - forget that the index of the first character is 0). Also, you can - specify the index to start the search from: - "abcabc"?index_of("bc", 2) will return 4. There - is no restriction on the numerical value of the second parameter: if - it is negative, it has the same effect as if it were zero, and if it - is greater than the length of this string, it has the same effect as - if it were equal to the length of this string. Decimal values will - be truncated to integers.

    - -

    If the 1st parameter does not occur as a substring in this - string (starting from the given index, if you use the second - parameter), then it returns -1.

    - - - - - -

    -j_string

    - - - - -

    Escapes the string with the escaping rules of Java language - string literals, so it's safe to insert the value into a string - literal. Note that it will not add quotation - marks around the inserted value; you meant to use this - inside the string literal.

    - -

    All characters under UCS code - point 0x20 will be escaped. When they have no dedicated escape - sequence in the Java language (like \n, - \t, etc.), they will be replaced with a UNICODE - escape - (\uXXXX).

    - -

    Example:

    - -
    -
    -<#assign beanName = 'The "foo" bean.'>
    -String BEAN_NAME = "${beanName?j_string}";  
    - - -

    will output:

    - -
    -
    -String BEAN_NAME = "The \"foo\" bean.";  
    - - - - - - -

    -js_string

    - - - - -

    Escapes the string with the escaping rules of JavaScript - language string literals, so it's safe to insert the value into a - string literal. Note that it will not add - quotation marks around the inserted value; you meant to use this - inside the string literal.

    - -

    Both quotation mark (") and - apostrophe-quoate (') are escaped. Starting from - FreeMarker 2.3.1, it also escapes > as - \> (to avoid - </script>).

    - -

    All characters under UCS code - point 0x20 will be escaped. When they have no dedicated escape - sequence in JavaScript (like \n, - \t, etc.), they will be replaced with a UNICODE - escape - (\uXXXX).

    - -

    Example:

    - -
    -
    -<#assign user = "Big Joe's \"right hand\"">
    -<script>
    -  alert("Welcome ${user?js_string}!");
    -</script>  
    - - -

    will output:

    - -
    -
    -<script>
    -  alert("Welcome Big Joe\'s \"right hand\"!");
    -</script>  
    - - - - - - -

    -json_string

    - - - - -

    Escapes the string with the escaping rules of JSON language - string literals, so it's safe to insert the value into a string - literal. Note that it will not add quotation - marks around the inserted value; you meant to use this - inside the string literal.

    - -

    This will not escape ' characters, since - JSON strings must be quoted with ". It will, - however escape the / (slash) characters as - \/ where they occur directly after a - <, to avoid </script> - and such. It will also escape the > characters - as \u003E where they occur directly after - ]], to avoid exiting an XML - CDATA section.

    - -

    All characters under UCS code - point 0x20 will be escaped. When they have no dedicated escape - sequence in JSON (like \n, \t, - etc.), they will be replaced with a UNICODE escape - (\uXXXX).

    - - - - - -

    -keep_after

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.21.

    -
    - - -

    Removes the part of the string that is not after the first - occurrence of the given substring. For example:

    - -
    -
    -${"abcdefgh"?keep_after("de")}  
    - - -

    will print

    - -
    -
    -fgh  
    - - -

    If the parameter string is not found, it will return an empty - string. If the parameter string is a 0-length string, it will return - the original string unchanged.

    - -

    This method accepts an optional flags parameter, as its - 2nd parameter:

    - -
    -
    -${"foo : bar"?keep_after(r"\s*:\s*", "r")}  
    - - -

    will print

    - -
    -
    -bar  
    - - - - - - -

    -keep_before

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.21.

    -
    - - -

    Removes the part of the string that starts with the given - substring. For example:

    - -
    -
    -${"abcdef"?keep_before("de")}  
    - - -

    will print

    - -
    -
    -abc  
    - - -

    If the parameter string is not found, it will return the - original string unchanged. If the parameter string is a 0-length - string, it will return an empty string.

    - -

    This method accepts an optional flags parameter, as its - 2nd parameter:

    - -
    -
    -${"foo : bar"?keep_before(r"\s*:\s*", "r")}  
    - - -

    will print

    - -
    -
    -foo  
    - - - - - - -

    -last_index_of

    - - - - -

    Returns the index within this string of the last (rightmost) - occurrence of the specified substring. It returns the index of the - first (leftmost) character of the substring. For example: - "abcabc"?last_index_of("ab") will return 3. Also, - you can specify the index to start the search from. For example, - "abcabc"?last_index_of("ab", 2) will return 0. - Note that the second parameter indicates the maximum index of the - start of the substring. There is no restriction on the numerical - value of the second parameter: if it is negative, it has the same - effect as if it were zero, and if it is greater than the length of - this string, it has the same effect as if it were equal to the - length of this string. Decimal values will be truncated to - inegers.

    - -

    If the 1st parameter does not occur as a substring in this - string (before the given index, if you use the second parameter), - then it returns -1.

    - - - - - -

    -left_pad

    - - - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.1.

    -
    - - -

    If it's used with 1 parameter, then it inserts spaces on the - beginning of the string until it reaches the length that is - specified as the parameter. If the string is already as long or - longer than the specified length, then it does nothing. For example, - this:

    - -
    -
    -[${""?left_pad(5)}]
    -[${"a"?left_pad(5)}]
    -[${"ab"?left_pad(5)}]
    -[${"abc"?left_pad(5)}]
    -[${"abcd"?left_pad(5)}]
    -[${"abcde"?left_pad(5)}]
    -[${"abcdef"?left_pad(5)}]
    -[${"abcdefg"?left_pad(5)}]
    -[${"abcdefgh"?left_pad(5)}]  
    - - -

    will output this:

    - -
    -
    -[     ]
    -[    a]
    -[   ab]
    -[  abc]
    -[ abcd]
    -[abcde]
    -[abcdef]
    -[abcdefg]
    -[abcdefgh]  
    - - -

    If it's used with 2 parameters, then the 1st parameter means - the same as if you were using the built-in with only 1 parameter, - and the second parameter specifies what to insert instead of space - characters. For example:

    - -
    -
    -[${""?left_pad(5, "-")}]
    -[${"a"?left_pad(5, "-")}]
    -[${"ab"?left_pad(5, "-")}]
    -[${"abc"?left_pad(5, "-")}]
    -[${"abcd"?left_pad(5, "-")}]
    -[${"abcde"?left_pad(5, "-")}]  
    - - -

    will output this:

    - -
    -
    -[-----]
    -[----a]
    -[---ab]
    -[--abc]
    -[-abcd]
    -[abcde]  
    - - -

    The 2nd parameter can be a string whose length is greater than - 1. Then the string will be inserted periodically, for - example:

    - -
    -
    -[${""?left_pad(8, ".oO")}]
    -[${"a"?left_pad(8, ".oO")}]
    -[${"ab"?left_pad(8, ".oO")}]
    -[${"abc"?left_pad(8, ".oO")}]
    -[${"abcd"?left_pad(8, ".oO")}]  
    - - -

    will output this:

    - -
    -
    -[.oO.oO.o]
    -[.oO.oO.a]
    -[.oO.oOab]
    -[.oO.oabc]
    -[.oO.abcd]  
    - - -

    The 2nd parameter must be a string value, and it must be at - least 1 character long.

    - - - - - -

    -length

    - - - - -

    The number of characters in the string.

    - - - - - -

    -lower_case

    - - - - -

    The lower case version of the string. For example - "GrEeN MoUsE"?lower_case will be "green - mouse".

    - - - - - -

    -matches

    - - - - -

    This is a ``power user'' built-in. Ignore it if you don't know - regular - expressions.

    - -

    This built-in determines if the string exactly matches the - pattern. Also, it returns the list of matching sub-strings. The - return value is a multi-type value:

    - -
    -
      -
    • -

      Boolean: true, if it the entire string - matches the pattern, otherwise false. For - example, "fooo"?matches('fo*') is - true, but - "fooo bar"?matches('fo*') is - false.

      -
    • - -
    • -

      Sequence: the list of matched substrings of the string. - Possibly a 0 length sequence.

      -
    • -
    - - -

    For example:

    - -
    -
    -<#if "fxo"?matches("f.?o")>Matches.<#else>Does not match.</#if>
    -
    -<#assign res = "foo bar fyo"?matches("f.?o")>
    -<#if res>Matches.<#else>Does not match.</#if>
    -Matching sub-strings:
    -<#list res as m>
    -- ${m}
    -</#list>  
    - - -

    will print:

    - -
    -
    -Matches.
    -
    -Does not match.
    -Matching sub-strings:
    -- foo
    -- fyo  
    - - -

    If the regular expression contains groups (parentheses), then - you can access them with the groups - built-in:

    - -
    -
    -<#-- Entire input match -->
    -<#assign res = "John Doe"?matches(r"(\w+) (\w+)")>
    -<#if res> <#-- Must not try to access groups if there was no match! -->
    -  First name: ${res?groups[1]}
    -  Second name: ${res?groups[2]}
    -</#if>
    -
    -<#-- Subtring matches -->
    -<#assign res = "aa/rx; ab/r;"?matches("(.+?)/*(.+?);")>
    -<#list res as m>
    -  - "${m}" is "${m?groups[1]}" per "${m?groups[2]}"
    -</#list>  
    - - -

    This will print:

    - -
    -
    -  First name: John
    -  Second name: Doe
    -
    -  - "aa/rx;" is "a" per "a/rx"
    -  - " ab/r;" is " " per "ab/r"  
    - - -

    Note above that groups has worked both with - substring matches and with the result of entire string - matching.

    - -

    matches accepts an optional 2nd parameter, - the flags. Note that - it doesn't support flag f, and ignores the - r flag.

    - - - - - -

    -number

    - - - - - - - - - - - - - - -

    The string converted to numerical value. The number must be in - "computer language" format. That is, it must be in the - locale independent form, where the decimal separator is dot, and - there's no grouping.

    - -

    This built-in recognizes numbers in the format that the - FreeMarker template language uses. In additionally, it recognizes - scientific notation (e.g. "1.23E6", - "1.5e-8"). Since FreeMarker 2.3.21, it also - recognizes all XML Schema number formats, like - NaN, INF, - -INF, plus the Java-native formats - Infinity and -Infinity.

    - -

    If the string is not in the appropriate format, an error will - abort template processing when you try to access this - built-in.

    - -

    In fact, the string is parsed by - the toNumber method of the current - arithmetic_engine, which is configuration - setting. However, that method should behave similarly as described - above.

    - - - - - -

    -replace

    - - - - -

    It is used to replace all occurrences of a string in the - original string with another string. It does not deal with word - boundaries. For example:

    - -
    -
    -${"this is a car acarus"?replace("car", "bulldozer")}  
    - - -

    will print:

    - -
    -
    -this is a bulldozer abulldozerus  
    - - -

    The replacing occurs in left-to-right order. This means that - this:

    - -
    -
    -${"aaaaa"?replace("aaa", "X")}  
    - - -

    will print:

    - -
    -
    -Xaa  
    - - -

    If the 1st parameter is an empty string, then all occurrences - of the empty string will be replaced, like - "foo"?replace("","|") will evaluate to - "|f|o|o|".

    - -

    replace accepts an optional flags parameter, as its - 3rd parameter.

    - - - - - -

    -right_pad

    - - - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.1. It - doesn't exist in 2.3.

    -
    - - -

    This is the same as left_pad, - but it inserts the characters at the end of the string instead of - the beginning of the string.

    - -

    Example:

    - -
    -
    -[${""?right_pad(5)}]
    -[${"a"?right_pad(5)}]
    -[${"ab"?right_pad(5)}]
    -[${"abc"?right_pad(5)}]
    -[${"abcd"?right_pad(5)}]
    -[${"abcde"?right_pad(5)}]
    -[${"abcdef"?right_pad(5)}]
    -[${"abcdefg"?right_pad(5)}]
    -[${"abcdefgh"?right_pad(5)}]
    -
    -[${""?right_pad(8, ".oO")}]
    -[${"a"?right_pad(8, ".oO")}]
    -[${"ab"?right_pad(8, ".oO")}]
    -[${"abc"?right_pad(8, ".oO")}]
    -[${"abcd"?right_pad(8, ".oO")}]  
    - - -

    This will output this:

    - -
    -
    -[     ]
    -[a    ]
    -[ab   ]
    -[abc  ]
    -[abcd ]
    -[abcde]
    -[abcdef]
    -[abcdefg]
    -[abcdefgh]
    -
    -[.oO.oO.o]
    -[aoO.oO.o]
    -[abO.oO.o]
    -[abc.oO.o]
    -[abcdoO.o]  
    - - - - - - -

    -remove_beginning

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.21.

    -
    - - -

    Removes the parameter substring from the beginning of the - string, or returns the original string if it doesn't start with the - parameter substring. For example:

    - -
    -
    -${"abcdef"?remove_beginning("abc")}
    -${"foobar"?remove_beginning("abc")}  
    - - -

    will print:

    - -
    -
    -def
    -foobar  
    - - - - - - -

    -remove_ending

    - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.21.

    -
    - - -

    Removes the parameter substring from the beginning of the - string, or returns the original string if it doesn't start with the - parameter substring. For example:

    - -
    -
    -${"abcdef"?remove_ending("def")}
    -${"foobar"?remove_ending("def")}  
    - - -

    will print:

    - -
    -
    -abc
    -foobar  
    - - - - - - -

    -rtf

    - - - - - - -

    The string as Rich text (RTF text). That is, the string with - all:

    - -
    -
      -
    • -

      \ replaced with - \\

      -
    • - -
    • -

      { replaced with - \{

      -
    • - -
    • -

      } replaced with - \}

      -
    • -
    - - - - - - -

    -split

    - - - - -

    It is used to split a string into a sequence of strings along - the occurrences of another string. For example:

    - -
    -
    -<#list "someMOOtestMOOtext"?split("MOO") as x>
    -- ${x}
    -</#list>  
    - - -

    will print:

    - -
    -
    -- some
    -- test
    -- text  
    - - -

    Note that it is assumed that all occurrences of the separator - is before a new item (except with "r" flag - see - later), thus:

    - -
    -
    -<#list "some,,test,text,"?split(",") as x>
    -- "${x}"
    -</#list>  
    - - -

    will print:

    - -
    -
    -- "some"
    -- ""
    -- "test"
    -- "text"
    -- ""  
    - - -

    split accepts an optional flags parameter, as its - 2nd parameter. There's a historical glitch with the - r (regular expression) flag; it removes the empty - elements from the end of the resulting list, so with - ?split(",", "r") in the last example the last - "" would be missing from the output.

    - -
    -

    Note

    - -

    To check if a strings ends with something and append it - otherwise, use the - ensure_ends_with built-in.

    -
    - - - - - - -

    -starts_with

    - - - - -

    Returns if this string starts with the specified substring. - For example "redirect"?starts_with("red") returns - boolean true. Also, - "red"?starts_with("red") will return - true.

    - -
    -

    Note

    - -

    To check if a strings starts with something and prepend it - otherwise, use the - ensure_starts_with built-in.

    -
    - - - - - - -

    -string (when used with a string value)

    - - -

    Does nothing, just returns the string as-is. The exception is - that if the value is a multi-type value (e.g. it is both string and - sequence at the same time), then the resulting value will be only a - simple string, not a multi-type value. This can be utilized to - prevent the artifacts of multi-typing.

    - - - - - -

    -substring

    - - - - - - -
    -

    Note

    - -

    This built-in is deprecated since FreeMarker 2.3.21 by - slicing expressions: - exp[from..<toExclusive] - and - exp[from..].

    - -

    A warning if you are processing XML: Since slicing - expressions work both for sequences and strings, and since XML - nodes are typically both sequences and strings at the same time, - there the equivalent expression is - someXmlNode?string[from..<toExclusive] - and - exp?string[from..], - as without ?string it would slice the node - sequence instead of the text value of the node.

    -
    - - -

    Synopsis: - exp?substring(from, - toExclusive), also callable as - exp?substring(from)

    - -

    A substring of the string. - from is the index of - the first character. It must be a number that is at least 0 and less - than or equal with - toExclusive, or else - an error will abort the template processing. The - toExclusive is the - index of the character position after the last character of the - substring, or with other words, it is one greater than the index of - the last character. It must be a number that is at least 0 and less - than or equal to the length of the string, or else an error will - abort the template processing. If the - toExclusive is - omitted, then it defaults to the length of the string. If a - parameter is a number that is not an integer, only the integer part - of the number will be used.

    - -

    Example:

    - -
    -
    -- ${'abc'?substring(0)}
    -- ${'abc'?substring(1)}
    -- ${'abc'?substring(2)}
    -- ${'abc'?substring(3)}
    -
    -- ${'abc'?substring(0, 0)}
    -- ${'abc'?substring(0, 1)}
    -- ${'abc'?substring(0, 2)}
    -- ${'abc'?substring(0, 3)}
    -
    -- ${'abc'?substring(0, 1)}
    -- ${'abc'?substring(1, 2)}
    -- ${'abc'?substring(2, 3)}  
    - - -

    The output:

    - -
    -
    -- abc
    -- bc
    -- c
    --
    -
    --
    -- a
    -- ab
    -- abc
    -
    -- a
    -- b
    -- c  
    - - - - - - -

    -trim

    - - - - -

    The string without leading and trailing white-space. - Example:

    - -
    -
    -(${"  green mouse  "?trim})  
    - - -

    The output:

    - -
    -
    -(green mouse)  
    - - - - - - -

    -uncap_first

    - - - - -

    The opposite of cap_first. - The string with the very first word of the string - un-capitalized.

    - - - - - -

    -upper_case

    - - - - -

    The upper case version of the string. For example - "GrEeN MoUsE" will be "GREEN - MOUSE".

    - - - - - -

    -url

    - - - - - - - - - - - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.1. It - doesn't exist in 2.3.

    -
    - - -

    The string after URL escaping. This means that all - non-US-ASCII and reserved URL characters will be escaped with - %XX. For - example:

    - -
    -
    -<#assign x = 'a/b c'>
    -${x?url}  
    - - -

    The output will be (assuming that the charset used for the - escaping is an US-ASCII compatible charset):

    - -
    -
    -a%2Fb%20c  
    - - -

    Note that it escapes all reserved URL - characters (/, =, - &, ...etc), so this encoding can be used for - encoding query parameter values, for example:

    - -
    -
    -<a href="foo.cgi?x=${x?url}&y=${y?url}">Click here...</a>  
    - - -
    -

    Note

    - -

    Above no HTML encoding (?html) was - needed, because URL escaping escapes all reserved HTML characters - anyway. But watch: always quote the attribute value, and always - with normal quotation mark ("), never with - apostrophe quotation mark ('), because - apostrophe quotation mark is not escaped by the URL - escaping.

    -
    - - -

    To do URL escaping a charset must be chosen that will be - used for calculating the escaped parts - (%XX). If you are HTML - page author and you don't really understand this, don't worry: the - programmers should configure FreeMarker so that it uses the proper - charset by default (programmers: see - more below...). If you are a more technical minded user, - then you may want to know that the charset used is specified by the - url_escaping_charset setting, that can be set in - template execution time (or, preferably, earlier by the - programmers). For example:

    - -
    -
    -<#--
    -  This will use the charset specified by the programmers
    -  before the template execution has started.
    --->
    -<a href="foo.cgi?x=${x?url}">foo</a>
    -
    -<#-- Use UTF-8 charset for URL escaping from now: -->
    -<#setting url_escaping_charset="UTF-8">
    -
    -<#-- This will surely use UTF-8 charset -->
    -<a href="bar.cgi?x=${x?url}">bar</a>  
    - - -

    Furthermore, you can explicitly specify a charset for a single - URL escaping as the parameter to the built-in:

    - -
    -
    -<a href="foo.cgi?x=${x?url('ISO-8895-2')}">foo</a>  
    - - -

    If the url built-in has no - parameter, then it will use the charset specified as the value of - the url_escaping_charset setting. This setting - should be set by the software that encloses FreeMarker (e.g. a Web - application framework), because it is not set - (null) by default. If it is not set, then - FreeMarker falls back using the value of the - output_encoding setting, which is also not set by - default, so it is again the task of the enclosing software. If the - output_encoding setting is not set either, then - the parameterless url built-in can't be executed, - and it will cause execution time error. Of course, the - url built-in with parameter always - works.

    - -

    It's possible to set - url_escaping_charset in the template with the - setting directive, but it is bad practice, at - least in true MVC applications. The - output_encoding setting can't be set with the - setting directive, so that's surely the task of - the enclosing software. You may find more information regarding this - here...

    - - - - - -

    -url_path

    - - - - - - - - - - - - -
    -

    Note

    - -

    This built-in is available since FreeMarker 2.3.21.

    -
    - - -

    This is the same as the - url built-in, except that it doesn't - escape slash (/) characters. This meant to be - used for converting paths (like paths coming from the OS or some - content repository) that use slash (not backslash!) to a path the - can be inserted into an URL. The most common reason why this - conversion is needed is that folder names or file names might - contain non-US-ASCII letters ("national" - characters).

    - -
    -

    Note

    - -

    Just like with the - url built-in, the desired URL escaping - charset (or as a fall back, the output encoding) must be set in - the FreeMarker configuration settings, or else the built-in will - give error. Or, you you have to specify the charset like - somePath?url_path('utf-8').

    -
    - - - - - - -

    -word_list

    - - - - -

    A sequence that contains all words of the string in the order - as they appear in the string. Words are continual character - sequences that contain any character but white-space. Example:

    - -
    -
    -<#assign words = "   a bcd, .   1-2-3"?word_list>
    -<#list words as word>[${word}]</#list>  
    - - -

    will output:

    - -
    -
    -[a][bcd,][.][1-2-3]  
    - - - - - - -

    -xhtml

    - - - - - - -

    The string as XHTML text. That is, the string with all:

    - -
    -
      -
    • - < replaced with - &lt; -
    • - -
    • - > replaced with - &gt; -
    • - -
    • - & replaced with - &amp; -
    • - -
    • - " replaced with - &quot; -
    • - -
    • - ' replaced with - &#39; -
    • -
    - - -

    The only difference between this built-in and the - xml built-in is that the xhtml - built-in escapes ' as - &#39; instead of as - &apos;, because some older browsers don't - interpret &apos; correctly.

    - - - - - -

    -xml

    - - - - - - -

    The string as XML text. That is, the string with all:

    - -
    -
      -
    • - < replaced with - &lt; -
    • - -
    • - > replaced with - &gt; -
    • - -
    • - & replaced with - &amp; -
    • - -
    • - " replaced with - &quot; -
    • - -
    • - ' replaced with - &apos; -
    • -
    - - - - - - -

    -Common flags

    - - -

    Many string built-ins accept an optional string parameter, the - so called ``flags''. In this string, each letter influences a - certain aspect of the behavior of the built-in. For example, letter - i means that the built-in should not - differentiate the lower and upper-case variation of the same letter. - The order of the letters in the flags string is not - significant.

    - -

    This is the complete list of letters (flags):

    - -
    -
      -
    • -

      i: Case insensitive: do not - differentiate the lower and upper-case variation of the same - letter.

      -
    • - -
    • -

      f: First only. That is, - replace/find/etc. only the first occurrence of something.

      -
    • - -
    • -

      r: The substring to find is a - regular - expression. FreeMarker uses the variation of regular - expressions described at http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html - (note that the presence of some pattern features depends on the - Java version used).

      -
    • - -
    • -

      m: Multi-line mode for regular - expressions. In multi-line mode the expressions - ^ and $ match just after - or just before, respectively, a line terminator or the end of - the string. By default these expressions only match at the - beginning and the end of the entire string. Note that - ^ and $ doesn't match the - line-break character itself.

      -
    • - -
    • -

      s: Enables dot-all mode for regular - expressions (same as Perl singe-line mode). In dot-all mode, the - expression . matches any character, including - a line terminator. By default this expression does not match - line terminators.

      -
    • - -
    • -

      c: Permits whitespace and comments in - regular expressions.

      -
    • -
    - - -

    Example:

    - -
    -
    -<#assign s = 'foo bAr baar'>
    -${s?replace('ba', 'XY')}
    -i: ${s?replace('ba', 'XY', 'i')}
    -if: ${s?replace('ba', 'XY', 'if')}
    -r: ${s?replace('ba*', 'XY', 'r')}
    -ri: ${s?replace('ba*', 'XY', 'ri')}
    -rif: ${s?replace('ba*', 'XY', 'rif')}  
    - - -

    This outputs this:

    - -
    -
    -foo bAr XYar
    -i: foo XYr XYar
    -if: foo XYr baar
    -r: foo XYAr XYr
    -ri: foo XYr XYr
    -rif: foo XYr baar  
    - - -

    This is the table of built-ins that use these common flags, - and which supports which flags:

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Built-ini (ignore case)r (reg. exp.)m (multi-line mode)s (dot-all mode)c (whitesp. and comments)f (first only)
    replaceYesYesOnly with rOnly with rOnly with rYes
    splitYesYesOnly with rOnly with rOnly with rNo
    matchesYesIgnoredYesYesYesNo
    -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_depr_builtin.html b/fmpp/docs/freemarker/ref_depr_builtin.html deleted file mode 100644 index 4cc234c..0000000 --- a/fmpp/docs/freemarker/ref_depr_builtin.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - FreeMarker Manual - List of deprecated built-ins - - - - - - - - -
    - - - - - -

    -List of deprecated built-ins

    - - -

    The following built-ins are deprecated, but still - working:

    -
      -
    • -

      default: This was deprecated - with the introduction of the default value - operator. - exp1?default(exp2) - is near equivalent with - exp1!exp2, - and - (exp1)?default(exp2) - is near equivalent with with - (exp1)!exp2. - The only difference is that prior to FreeMarker 2.4, the - default built-in has always evaluated - exp2, while the - default value operator only evaluates it when the default value is - really needed. Starting from FreeMarker 2.4, however, the - default built-in was improved, and behaves - exactly like the default value operator.

      -
    • - -
    • -

      exists: This was deprecated with - the introduction of the missing value test - operator. - exp1?exists is - equivalent with - exp1??, also - (exp1)?exists is - equivalent with with - (exp1)??.

      -
    • - -
    • -

      if_exists: This was deprecated - with the introduction of the default value - operator. - exp1?if_exists is - similar to exp1!, - and (exp1)?if_exists - is similar to - (exp1)!. The - difference is that the default value with - if_exists is not only empty string, empty - sequence and empty hashs at the same time, but also boolean - false and a transform that does nothing and - ignores all parameters.

      -
    • - -
    • -

      web_safe: the same as html

      -
    • -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_depr_directive.html b/fmpp/docs/freemarker/ref_depr_directive.html deleted file mode 100644 index 1c4acbb..0000000 --- a/fmpp/docs/freemarker/ref_depr_directive.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - FreeMarker Manual - List of deprecated directives - - - - - - - - -
    - - - - - -

    -List of deprecated directives

    - - -

    The following directives are deprecated, but still - working:

    -
      -
    • -

      call: use - user-defined directive - call instead

      -
    • - -
    • -

      comment: This is the old format of - <#--...-->. - Anything between the <#comment> and - </#comment> will be ignored.

      -
    • - -
    • -

      foreach: it is a synonym of the - list directive with slightly different - parameter syntax. The syntax is <#foreach - item in - sequence> that is - equivalent with <#list - sequence as - item>.

      -
    • - -
    • -

      transform: - use user-defined - directive call instead

      -
    • -
    -

    The following directives are not working anymore:

    -
      -
    • -

      Legacy function: Originally - function was used to define macros, and was - deprecated in favor of the macro directive. As - of FreeMarker 2.3, this directive is reintroduced with different - meaning: it is used to define methods.

      -
    • -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_depr_numerical_interpolation.html b/fmpp/docs/freemarker/ref_depr_numerical_interpolation.html deleted file mode 100644 index 5304bb1..0000000 --- a/fmpp/docs/freemarker/ref_depr_numerical_interpolation.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - FreeMarker Manual - #{...}: Numerical interpolation - - - - - - - - -
    - - - - - -

    -#{...}: Numerical interpolation

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Deprecated: Use the number_format - setting and the - string built-in instead. For formatting for - computer audience (i.e., no localized formatting) use the c built-in (like - number?c).

    - - - - -

    -Synopsis

    - - -
    #{expression}
    -or
    -#{expression; format}
    - - -

    Where:

    - -
    -
      -
    • - expression: - expression that can be evaluated as a number. -
    • - -
    • - format: - optional format specifier. -
    • -
    - - - - - - -

    -Description

    - - -

    The numerical interpolation is used to output a number value. - If the expression doesn't evaluate to a number, the evaluation ends - with an error.

    - -

    The optional format specifier specifies the minimum and the - maximum number of displayed fractional digits using syntax - mminMmax. - For example, m2M5 means "at least two, at most - five fractional digits". The minimum or the maximum specifier part - can be omitted. If only the minimum is specified, the maximum is - equal to the minimum. If only maximum is specified, the minimum is - 0.

    - -

    The decimal separator character of the output is - internationalized (according the current locale setting), which - means that it is not necessarily a dot.

    - -

    Unlike ${...}, #{...} - ignores the number_format - setting. This is actually a backward compatibility quirk, but - it can be useful when you print numbers in situations like - <a href="quertyDatabase?id=#{id}">, where - you surely don't want grouping separators or something fancy like - that. However, starting from FreeMarker 2.3.3 rather use the ?c built-in for - this purpose, like <a - href="quertyDatabase?id=${id?c}">.

    - -

    Examples. Assume that x is - 2.582 and y is - 4:

    - -
    -
    -           <#-- If the language is US English the output is: -->
    -#{x}       <#-- 2.582 -->
    -#{y}       <#-- 4 -->
    -#{x; M2}   <#-- 2.58 -->
    -#{y; M2}   <#-- 4    -->
    -#{x; m1}   <#-- 2.6 -->
    -#{y; m1}   <#-- 4.0 -->
    -#{x; m1M2} <#-- 2.58 -->
    -#{y; m1M2} <#-- 4.0  -->  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_depr_oldmacro.html b/fmpp/docs/freemarker/ref_depr_oldmacro.html deleted file mode 100644 index 3ef67b4..0000000 --- a/fmpp/docs/freemarker/ref_depr_oldmacro.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - FreeMarker Manual - Old-style macro and call directives - - - - - - - - -
    - - - - - -

    -Old-style macro and call directives

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    <#macro name(argName1, argName2, ... argNameN)>
    -  ...
    -</#macro>
    - 
    -<#call name(argValue1, argValue2, ... argValueN)>
    - - -

    Where:

    - -
    -
      -
    • - name: name - of the macro (not expression) -
    • - -
    • - argName1, - argName2, ...etc.: - the name of the local - variables store the parameter values (not - expression) -
    • - -
    • - argValue1, - argValue2, - ...etc.: expressions, the value of the parameters -
    • -
    - - - - - - -

    -Description

    - - -
    -

    Note

    - -

    This is the documentation of FreeMarker 2.1 macro and macro - related directives. These are still working, but deprecated. You - may want to read the FreeMarker 2.2+ references: macro, return, user-defined directive - call

    -
    - - -

    A macro is a template fragment with an associated name. You - can use that named fragment on multiple places in your template, so - it helps in repetitive tasks. A macro can have parameters that - influence the output generated when you use the macro.

    - -

    You define a macro with the macro - directive, and then you can use the defined macro in the whole - template. The macro directive itself does not - write anything to the output, it just defines the macro. For example - this will define a macro called warning:

    - -
    -
    -<#macro warning(message)>
    -  <div align=center>
    -  <table border=1 bgcolor=yellow width="80%"><tr><td align=center>
    -    <b>Warning!</b>
    -    <p>${message}
    -  </td></tr></table>
    -  </div>
    -</#macro>  
    - - -

    The macro definition body (the section between the macro - start-tag and end-tag) will be processed whenever you use the - call directive with the name of the macro. For - example this calls the macro called - warning:

    - -
    -
    -<#call warning("Unplug the machine before opening the cover!")>  
    - - -

    and will write this to the output:

    - -
    -
    -  <div align=center>
    -  <table border=1 bgcolor=yellow width="80%"><tr><td align=center>
    -    <b>Warning!</b>
    -    <p>Unplug the machine before opening the cover!
    -  </td></tr></table>
    -  </div>
    -    
    - - -

    The parameters passed in as parameters to the - call directive will be accessible in the macro - definition body as local - variables.

    - -

    When you call a macro, you must specify the same number of - parameters as were specified in the macro definition. For example if - this is the macro definition:

    - -
    -
    -<#macro test(a, b, c)>Nothing...</#macro>  
    - - -

    then these are valid macro calls:

    - -
    -
    -<#call test(1, 2, 3)>
    -<#call test("one", 2 + x, [1234, 2341, 3412, 4123])>  
    - - -

    If a macro has no parameters, then you can omit the - parentheses:

    - -
    -
    -<#macro test>mooo</#macro>
    -<#call test>  
    - - -

    When you define a macro it will be available in the template, - where you have defined it only. But probably you want to use the - same macros in more templates. In this case you can store your macro - definitions in a common file, and then include that file in all - templates where you need those macros.

    - -

    It's fine to call a macro that's defined further down in the - template (since macros are defined at - parse time, not in process time). However, if the macro - definitions are inserted with include directive, - they will not be available until FreeMarker has executed the - include directive.

    - -

    You can leave a macro definition body before the - </#macro> tag with the - return directive.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_depr_oldsyntax.html b/fmpp/docs/freemarker/ref_depr_oldsyntax.html deleted file mode 100644 index 2b83a38..0000000 --- a/fmpp/docs/freemarker/ref_depr_oldsyntax.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - FreeMarker Manual - Old FTL syntax - - - - - - - - -
    - - - - - -

    -Old FTL syntax

    - - -

    With the old FTL syntax the # was not - required (prior 2.1 not even allowed) in the FTL tags. For example, - you could write this:

    -
    -<html>
    -<head>
    -  <title>Welcome!</title>
    -</head>
    -<body>
    -  <h1>Welcome ${user}!</h1>
    -  <p>We have there animals:
    -  <ul>
    -  <list animals as animal>
    -    <li>${animal.name} for ${animal.price} Euros
    -  </list>
    -  </ul>
    -  <include "common_footer.html">
    -</body>
    -</html>  
    -

    While the #-less syntax was more natural for - HTML authors, it had too many drawbacks, so finally we have decided to - deprecate it. With the newer syntax (a.k.a ``strict syntax''), the - # is strictly required. That is, things like - <include "common_footer.html"> will go to the - output as is, since they are not considered as FTL tags. Note that - user-defined directives use @ instead - of #.

    However, to give users time to prepare for this change, in - FreeMarker 2.1 and 2.2 the usage of # is optional, - unless the programmer enables strict syntax mode in the FreeMarker - configuration by calling setStrictSyntaxMode(true) - on Configuration. In fact, we strongly recommend - this to programmers. Starting from some later release this setting - will be initially set to true. Also, you can - specify if you want to use strict syntax or old syntax in the template - files with the ftl - directive.

    The advantages of ``strict syntax'' over the legacy FTL syntax - are:

    -
      -
    • -

      Since all - <#...> and - </#...> are - reserved for FTL:

      - -
      -
        -
      • -

        We can introduce new directives without breaking - backward compatibility.

        -
      • - -
      • -

        We can detect if you made a typo, i.e. - <#inculde - ...> is treated as - parse-time error, rather than silently treated as simple - text.

        -
      • - -
      • -

        It is easier for third-party tools to handle templates - (e.g. do syntax highlighting), especially since they don't - have to know about the new directives introduced with new - releases.

        -
      • - -
      • -

        Templates are more readable, since it is easier to spot - <#...> tags embedded into HTML or - other markup.

        -
      • -
      - -
    • - -
    • -

      <# and </# is - illegal XML (except in CDATA sections), and illegal in almost all - other SGML applications, so they can't interfere with the tags - used in the static text parts (e.g. if you have - include element in the generated XML).

      -
    • -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_depr_transform.html b/fmpp/docs/freemarker/ref_depr_transform.html deleted file mode 100644 index fead475..0000000 --- a/fmpp/docs/freemarker/ref_depr_transform.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - FreeMarker Manual - Transform directive - - - - - - - - -
    - - - - - -

    -Transform directive

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<transform transVar>
    -  ...
    -</transform>
    -or
    -<transform transVar name1=value1 name2=value2 ... nameN=valueN>
    -  ...
    -</transform>
    -
    - - -

    Where:

    - -
    -
      -
    • - transVar: - Expression evaluates to a transform -
    • - -
    • - name1, - name2, ... - nameN: Name of - parameters. Literal value, not expression. -
    • - -
    • - value1, - value2, ... - valueN: - Expressions evaluate to the values of parameters -
    • -
    - - - - - - -

    -Description

    - - -
    -

    Note

    - -

    This directive is still working, but deprecated. You may - want to read about user-defined directive - calls to see the replacement.

    -
    - - -

    Captures the output generated inside its body (i.e. between - its start-tag and end-tag), and let the given transform modify it - before it is written to the final output.

    - -

    Example:

    - -
    -
    -<p>A very simple HTML file:
    -<pre>
    -<transform html_escape>
    -<html>
    -  <body>
    -    <p>Hello word!
    -  </body>
    -</html>
    -</transform>
    -</pre>  
    - - -

    the output will be:

    - -
    -
    -<p>A very simple HTML file:
    -<pre>
    -&lt;html&gt;
    -  &lt;body&gt;
    -    &lt;p&gt;Hello word!
    -  &lt;/body&gt;
    -&lt;/html&gt;
    -</pre>  
    - - -

    Some transforms may take parameters. The name and meaning of - parameters depends on the transform in question. For example here we - give a parameter called ``var'':

    - -
    -
    -<#-- This transform stores the output in the variable x,
    -     rather than sending it to the output -->
    -<transform capture_output var="x">
    -some test
    -</transform>  
    - - -

    It is the task of the programmers to put the necessary - transforms into the data-model. For the name and usage of accessible - transforms ask the programmers. Initially there is a shared variable for - most transforms in the - freemarker.template.utility package. For more - information see: Programmer's Guide/The Configuration/Shared variables

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_deprecated.html b/fmpp/docs/freemarker/ref_deprecated.html deleted file mode 100644 index 3fa51b7..0000000 --- a/fmpp/docs/freemarker/ref_deprecated.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - FreeMarker Manual - Deprecated FTL constructs - - - - - - - - -
    - - - - - -

    -Chapter 5   Deprecated FTL constructs

    - - - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_alphaidx.html b/fmpp/docs/freemarker/ref_directive_alphaidx.html deleted file mode 100644 index ed1c596..0000000 --- a/fmpp/docs/freemarker/ref_directive_alphaidx.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - FreeMarker Manual - Alphabetical index - - - - - - - - -
    - - - - - -

    -Alphabetical index

    - - -
    -
    -

    If you don't find a directive here that you have seen in a - working template, probably you will find it in: Deprecated FTL constructs

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_assign.html b/fmpp/docs/freemarker/ref_directive_assign.html deleted file mode 100644 index a26c288..0000000 --- a/fmpp/docs/freemarker/ref_directive_assign.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - FreeMarker Manual - assign - - - - - - - - -
    - - - - - -

    -assign

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#assign name=value>
    -or
    -<#assign name1=value1 name2=value2 ... nameN=valueN>
    -or
    -<#assign same as above... in namespacehash>
    -or
    -<#assign name>
    -  capture this
    -</#assign>
    -or
    -<#assign name in namespacehash>
    -  capture this
    -</#assign>
    -
    - - -

    Where:

    - -
    -
      -
    • - name: name - of the variable. It is not expression. However, it can be - written as a string literal, which is useful if the variable - name contains reserved characters, for example - <#assign "foo-bar" = 1>. Note that this - string literal does not expand interpolations (as - "${foo}"). -
    • - -
    • - value: the - value to store. Expression. -
    • - -
    • - namespacehash: - a hash that was created for a namespace (by import). - Expression. -
    • -
    - - - - - - -

    -Description

    - - -

    With this you can create a new variable, or replace an - existing variable. Note that only top-level variables can be - created/replaced (i.e. you can't create/replace - some_hash.subvar, but - some_hash).

    - -

    For more information about variables, read this: Template Author's Guide/Miscellaneous/Defining variables in the template

    - -

    Example: variable seasons will store a - sequence:

    - -
    -
    -<#assign seasons = ["winter", "spring", "summer", "autumn"]>  
    - - -

    Example: Increments the numerical value stored in variable - test:

    - -
    -
    -<#assign test = test + 1>  
    - - -

    As a convenience feature, you can do more assignments with one - assign tag. For example this will do the same as - the two previous examples:

    - -
    -
    -<#assign
    -  seasons = ["winter", "spring", "summer", "autumn"]
    -  test = test + 1
    ->  
    - - -

    If you know what namespaces are: assign - directive creates variables in namespaces. Normally it creates the - variable in the current namespace (i.e. in the namespace associated - with the template where the tag is). However, if you use in - namespacehash then you can - create/replace a variable of another namespace than the current - namespace. For example, here you create/replace variable - bgColor of the namespace used for - /mylib.ftl:

    - -
    -
    -<#import "/mylib.ftl" as my>
    -<#assign bgColor="red" in my>  
    - - -

    An extreme usage of assign is when it - captures the output generated between its start-tag and end-tag. - That is, things that are printed between the tags will not be shown - on the page, but will be stored in the variable. For example:

    - -
    -
    -<#macro myMacro>foo</#macro>
    -<#assign x>
    -  <#list 1..3 as n>
    -    ${n} <@myMacro />
    -  </#list>
    -</#assign>
    -Number of words: ${x?word_list?size}
    -${x}  
    - - -

    will print:

    - -
    -
    -Number of words: 6
    -    1 foo
    -    2 foo
    -    3 foo
    -   
    - - -

    Please note that you should not to use this to insert - variables into strings:

    - -
    -
    -<#assign x>Hello ${user}!</#assign> <#-- BAD PRACTICE! -->  
    - - -

    You should simply write:

    - -
    -
    -<#assign x="Hello ${user}!">  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_attempt.html b/fmpp/docs/freemarker/ref_directive_attempt.html deleted file mode 100644 index fa726fb..0000000 --- a/fmpp/docs/freemarker/ref_directive_attempt.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - - FreeMarker Manual - attempt, recover - - - - - - - - -
    - - - - - -

    -attempt, recover

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#attempt>
    -  attempt block
    -<#recover>
    -  recover block
    -</#attempt>
    -
    -
    - - -

    Where:

    - -
    -
      -
    • - attempt - block: Template block with any content. - This will be always executed, but if an error occurs during - that, all output from this block is rolled back, and the - recover block will - be executed. -
    • - -
    • - recover - block: Template block with any content. - This will be executed only if there was an error during the - execution of the attempt - block. You may print an error messages - here and such. -
    • -
    - - -

    The recover is - mandatory. attempt/recover can - be nested freely into other attempt - blocks or recover - blocks.

    - -
    -

    Note

    - -

    The format shown here is supported starting from 2.3.3; - earlier it was - <#attempt>...<#recover>...</#recover>, - which is still supported for backward compatibility. Furthermore, - these directives were introduced with FreeMarker 2.3.1, so they - aren't exist in 2.3.

    -
    - - - - - - -

    -Description

    - - -

    These directives are used if you want the page successfully - outputted even if the outputting of a certain part of the page - fails. If an error occurs during the execution of the - attempt block, then - the template execution is not aborted, but the - recover block is - executed instead of the attempt - block. If no error occurs during the - execution of the attempt - block, then the - recover block is - ignored. A simple example:

    - -
    -
    -Primary content
    -<#attempt>
    -  Optional content: ${thisMayFails}
    -<#recover>
    -  Ops! The optional content is not available.
    -</#attempt>
    -Primary content continued  
    - - -

    If the thisMayFails variable doesn't exist, - then the output is:

    - -
    -
    -Primary content
    -  Ops! The optional content is not available.
    -Primary content continued  
    - - -

    If the thisMayFails variable exists and - it's value is 123, then the output is:

    - -
    -
    -Primary content
    -  Optional content: 123
    -Primary content continued  
    - - -

    The attempt - block has an all-or-none semantic: either - the entire content of the attempt - block is output (when there was no error), - or no output at all results from the execution of the - attempt block (when - there was an error). For example, above, the failure happens after - ``Optional content: '' was printed, still it is not there in the - output before the ``Ops!''. (This is - implemented with the aggressive buffering of the output inside the - attempt block. Not - even the flush directive will send the output to - the client.)

    - -

    To prevent misunderstandings coming from the above example: - attempt/recover is not (only) - for handling undefined variables (for that use missing value handler - operators). It can handle all kind of errors that occurs when - the block is executed (i.e. not syntactical errors, which are - detected earlier). And it's meant to enclose bigger template - fragments, where error can occur at various points. For example, you - have a part in your template that deals with printing - advertisements, but that's not the primary content of the page, so - you don't want your whole page be down just because some error - occurs with the printing of the advertisements (say, because of a - temporal database server faliure). So you put the whole - advertisement printing into an attempt - block.

    - -

    In some environments programmers configure FreeMarker so that - it doesn't abort template execution for certain errors, but - continues execution, possibly after printing some error indicator to - the output (see more here...). The - attempt directive doesn't consider such - suppressed errors as errors.

    - -

    Inside a recover - block the error message of the error is - available with the error special variable. Don't forget that - references to special variable are started with dot (for example: - ${.error}).

    - -

    Errors occurring during template - execution are always logged, even if they occur inside - an attempt - block.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_compress.html b/fmpp/docs/freemarker/ref_directive_compress.html deleted file mode 100644 index aa5ab9c..0000000 --- a/fmpp/docs/freemarker/ref_directive_compress.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - FreeMarker Manual - compress - - - - - - - - -
    - - - - - -

    -compress

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#compress>
    -  ...
    -</#compress>
    -
    - - - - - - -

    -Description

    - - -

    The compress directive is useful for removing superfluous - white-space when you use a - white-space insensitive format (e.g. HTML or XML). It captures the - output generated inside its body (i.e. between its start-tag and - end-tag), and reduces all unbroken white-space sequences to a single - white-space character. The inserted character will be a line break if the replaced sequence - contains line breaks, or a space otherwise. The very first and very - last unbroken white-space sequences will be completely - removed.

    - -
    -
    -<#assign x = "    moo  \n\n   ">
    -(<#compress>
    -  1 2  3   4    5
    -  ${moo}
    -  test only
    -
    -  I said, test only
    -
    -</#compress>)  
    - - -

    will output:

    - -
    -
    -(1 2 3 4 5
    -moo
    -test only
    -I said, test only)  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_escape.html b/fmpp/docs/freemarker/ref_directive_escape.html deleted file mode 100644 index ffa703d..0000000 --- a/fmpp/docs/freemarker/ref_directive_escape.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - FreeMarker Manual - escape, noescape - - - - - - - - -
    - - - - - -

    -escape, noescape

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#escape identifier as expression>
    -  ...
    -  <#noescape>...</#noescape>
    -  ...
    -</#escape>
    -
    - - - - - - -

    -Description

    - - -

    When you surround a part of the template with an escape - directive, interpolations - (${...}) that occur - inside the block are combined with the escaping expression - automatically. This is a convenience method for avoiding writing - similar expressions all over. It does not affect interpolations in - string literals (as in <#assign x = - "Hello ${user}!">). Also, it does not affect numerical - interpolations - (#{...}).

    - -

    Example:

    - -
    -
    -<#escape x as x?html>
    -  First name: ${firstName}
    -  Last name: ${lastName}
    -  Maiden name: ${maidenName}
    -</#escape>  
    - - -

    is actually equivalent to:

    - -
    -
    -  First name: ${firstName?html}
    -  Last name: ${lastName?html}
    -  Maiden name: ${maidenName?html 
    - - -

    Note that it is irrelevant what identifier you use in the - directive - it just serves as a formal parameter to the escaping - expression.

    - -

    When you are calling macros or the include - directive, it is important to understand that escape has effect only - on interpolations that occur between the <#escape - ...> and - </#escape> in the template - text. That is, it will not escape anything that is before - <#escape ...> in - the text, or after the </#escape> in the - text, not even if that part is called from inside the - escape-d section.

    - -
    -
    -<#assign x = "<test>">
    -<#macro m1>
    -  m1: ${x}
    -</#macro>
    -<#escape x as x?html>
    -  <#macro m2>m2: ${x}</#macro>
    -  ${x}
    -  <@m1/>
    -</#escape>
    -${x}
    -<@m2/>  
    - - -

    the output will be:

    - -
    -
    -  &lt;test&gt;
    -  m1: <test>
    -<test>
    -m2: &lt;test&gt;  
    - - -

    More technically, the effects of - escape directive are applied at template parsing - time rather than at template processing time. This means that if you - call a macro or include another template from within an escape - block, it won't affect the interpolations in the macro/included - template, since macro calls and template includes are evaluated at - template processing time. On the other hand, if you surround one or - more macro declarations (which are evaluated at template parsing - time, as opposed to macro calls) with an escape block, the - interpolations in those macros will be combined with the escaping - expression.

    - -

    Sometimes there is a need to temporarily turn off escaping for - one or two interpolations in an escape block. You can achieve this - by closing and later reopening the escape block, but then you have - to write the escaping expression twice. You can instead use the - noescape directive:

    - -
    -
    -<#escape x as x?html>
    -  From: ${mailMessage.From}
    -  Subject: ${mailMessage.Subject}
    -  <#noescape>Message: ${mailMessage.htmlFormattedBody}</#noescape>
    -  ...
    -</#escape>  
    - - -

    is equivalent to:

    - -
    -
    -  From: ${mailMessage.From?html}
    -  Subject: ${mailMessage.Subject?html}
    -  Message: ${mailMessage.htmlFormattedBody}
    -  ...  
    - - -

    Escapes can be nested (although you will do it only in rare - circumstances). Therefore, you can write something like the below - code (the example is admittedly a bit stretched, as you'd probably - place item codes in a sequence and use list to - iterate over them, but we're now doing it this way just to - illustrate the point):

    - -
    -
    -<#escape x as x?html>
    -  Customer Name: ${customerName}
    -  Items to ship:
    -  <#escape x as itemCodeToNameMap[x]>
    -    ${itemCode1}
    -    ${itemCode2}
    -    ${itemCode3}
    -    ${itemCode4}
    -  </#escape>
    -</#escape>  
    - - -

    is actually equivalent to:

    - -
    -
    -  Customer Name: ${customerName?html}
    -  Items to ship:
    -    ${itemCodeToNameMap[itemCode1]?html}
    -    ${itemCodeToNameMap[itemCode2]?html}
    -    ${itemCodeToNameMap[itemCode3]?html}
    -    ${itemCodeToNameMap[itemCode4]?html}  
    - - -

    When you use the noescape directive in a nested escape block, - it undoes only a single level of escaping. Therefore, to completely - turn off escaping in a two-level deep escaped block, you need to use - two nested noescape directives as well.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_flush.html b/fmpp/docs/freemarker/ref_directive_flush.html deleted file mode 100644 index 36b77f6..0000000 --- a/fmpp/docs/freemarker/ref_directive_flush.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - FreeMarker Manual - flush - - - - - - - - -
    - - - - - -

    -flush

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#flush>
    -
    - - - - - - -

    -Description

    - - -

    When FreeMarker generates the output it typically stockpiles - the generated output and send it to the client in one or in a few - big pieces. This act of sending is called flushing (as flushing the - toilet). Although flushing happens automatically, sometimes you want - to force it on certain points of the template processing, and this - is what flush directive does. If it is needed, - then the programmer could tell it to you; typically you should not - use this directive. The mechanism of automatic flushing and the - precise effect of flush directive are under the - control of the programmer.

    - -

    Flush simply calls the flush - method of the currently used java.io.Writer instance. The whole - buffering and flushing mechanism is implemented in the writer (what - you have passed as the parameter of the - Template.process method); FreeMarker does not - deal with it.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_ftl.html b/fmpp/docs/freemarker/ref_directive_ftl.html deleted file mode 100644 index 74f6b30..0000000 --- a/fmpp/docs/freemarker/ref_directive_ftl.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - FreeMarker Manual - ftl - - - - - - - - -
    - - - - - -

    -ftl

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#ftl param1=value1 param2=value2 ... paramN=valueN>
    -
    - - -

    Where:

    - -
    -
      -
    • - param1, - param2, ...etc.: - Name of the parameter. Not an expression. Allowed parameters - are: encoding, - strip_whitespace, - strip_text, ...etc. See below. -
    • - -
    • - value1, - value2, ...etc.: - The value of parameter. This must be a constant expression (as - true, or "ISO-8859-5", or - {x:1, y:2}). It can't use variables. -
    • -
    - - - - - - -

    -Description

    - - -

    Tells information about the template for FreeMarker and for - other tools, also helps programs to automatically detect if a text - file is an FTL file. This directive, if present, must be the very - first thing in the template. Any white-space before this directive - will be ignored. The old-syntax (#-less) format - of this directive is not supported.

    - -

    The settings (encoding, white-space stripping, etc.) given - here has the highest precedence, that is, they will be used for the - template regardless of any FreeMarker configuration settings.

    - -

    Parameters:

    - -
    -
      -
    • -

      encoding: With this you can specify the - encoding (charset) of the template in the template file itself. - (That is, this will be the - encoding setting of the newly created - Template, and not even the - encoding parameter to - Configuration.getTemplate can override - it). Note however, that FreeMarker will try to find and - interpret the ftl directive first with the - automatically guessed encoding (which depends on the FreeMarker - configuration set by the programmers), and only then realizes if - the ftl directive dictates something - different, and re-read the template with the new encoding. Thus, - the template must be valid FTL until the end of - ftl tag with the encoding tried first. The - valid values of this parameter are MIME-preferred charset names - from the IANA Charset Registry, like ISO-8859-5, UTF-8 or - Shift_JIS.

      -
    • - -
    • -

      strip_whitespace: This enables/disables - white-space - stripping. Valid values are the boolean constants - true and false. (And for - backward compatibility, strings "yes", - "no", "true", - "false"). The default value (i.e. when you - don't use this parameter) depends on the FreeMarker - configuration set by the programmers, but it should be - true for new projects.

      -
    • - -
    • -

      strip_text: When enabled, all top-level - text in a template is removed when the template is parsed. This - does not affect text within macros, directives, or - interpolations. Valid values are the boolean constants - true and false. (And for - backward compatibility, strings "yes", - "no", "true", - "false"). The default value (i.e. when you - don't use this parameter) is false.

      -
    • - -
    • -

      strict_syntax: This turns on/off - ``strict syntax''. Valid values are the boolean constants - true and false. (And for - backward compatibility, strings "yes", - "no", "true", - "false"). The default value (i.e. when you - don't use this parameter) depends on the FreeMarker - configuration set by the programmers, but it should be - true for new projects. (Programmers: you must set explicitly this - setting to true for this: - config.setStrictSyntaxMode(true);) - For more information read: Deprecated FTL constructs/Old FTL syntax

      -
    • - -
    • -

      ns_prefixes: This is a hash that - associates prefixes with node namespaces. For example: - {"e":"http://example.com/ebook", - "vg":"http://example.com/vektorGraphics"}. This is - mostly used with XML processing where the prefixes can be used - in XML queries, but it also influences the working of directives - visit and recurse. - Only one prefix can be registered for the same node namespace - (otherwise an error will occur), so there is one-to-one relation - between prefixes and node namespaces. Prefixes - D and N are reserved. If - you register prefix D, then other than you - associate the node namespace with prefix D, - you also set the default node namespace. Prefix - N can't be registered; it is used to denote - nodes with no node namespace in certain places, when (and only - when) prefix D is registered. (To see the - usage of default node namespace, N, and - prefixes in general, see the part about XML - processing and visit and - recurse in the reference.) The effect - of ns_prefixes is limited to a single FTL namespace, namely, to - the FTL namespace that was created for the template. This also - means that ns_prefixes has effect only when - an FTL namespace is created for the template that contains it, - otherwise the ns_prefixes parameter has no - effect. An FTL namespace is made for a template when: (a) the - template is the ``main'' template, that is, it is not invoked as - a result of an <#include ...>, but it - is directly invoked (with the - process Java method of class - Template or - Environment); (b) the template is - invoked directly with <#import - ...>.

      -
    • - -
    • -

      attributes: This is a hash that - associates arbitrary attributes (name-value pairs) to the - template. The values of the attributes can be of any type - (string, number, sequence... etc.). FreeMarker doesn't try to - understand the meaning of the attributes. It's up to the - application that encapsulates FreeMarker (as a Web application - framework). Thus, the set of allowed attributes and their - semantic is application (Web application framework) dependent. - Programmers: you can get the - attributes associated with a Template object - with its getCustomAttributeNames and - getCustomAttribute methods (inherited from - freemarker.core.Configurable). As the - template attributes are associated with the - Template object when the template is parsed, - the attributes can be read anytime, the template need not be - executed. The methods mentioned return the attribute values - unwrapped, that is, with FreeMarker independent type as - java.util.List.

      -
    • -
    - - -

    This directive also determines if the template uses angle - bracket syntax (e.g. <#include 'foo.ftl'>) - or square bracket - syntax (e.g. [#include 'foo.ftl']). - Simply, the syntax used for this directive will be the syntax used - for the whole template, regardless of the FreeMarker configuration - settings.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_function.html b/fmpp/docs/freemarker/ref_directive_function.html deleted file mode 100644 index 94c9543..0000000 --- a/fmpp/docs/freemarker/ref_directive_function.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - FreeMarker Manual - function, return - - - - - - - - -
    - - - - - -

    -function, return

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#function name param1 param2 ... paramN>
    -  ...
    -  <#return returnValue>
    -  ...
    -</#function>
    -
    - - -

    Where:

    - -
    -
      -
    • - name: name - of method variable (not expression) -
    • - -
    • - param1, - param2, ...etc.: - the name of the local - variables store the parameter values (not expression), - optionally followed by = and the default - value (that's an expression). -
    • - -
    • - paramN, the - last parameter, may optionally include a trailing ellipsis - (...), which indicates the macro takes a - variable number of parameters. Local variable - paramN will be a - sequence of the extra parameters. -
    • - -
    • - returnValue: - the expression that calculates the value of the method - call. -
    • -
    - - -

    The return directive can be used anywhere - and for any times between the <#function - ...> and - </#function>.

    - -

    Parameters without default value must precede parameters with - default value - (paramName=defaultValue).

    - - - - - -

    -Description

    - - -

    Creates a method variable (in the current namespace, if you - know namespace feature). This directive works in the same way as the - macro - directive, except that return directive - must have a parameter that specifies the return - value of the method, and that attempts to write to the output will - be ignored. If the </#function> is reached - (i.e. there was no return - returnValue), then the return - value of the method is an undefined variable.

    - -

    Example 1: Creating a method that calculates the average of - two numbers:

    - -
    -
    -<#function avg x y>
    -  <#return (x + y) / 2>
    -</#function>
    -${avg(10, 20)}  
    - - -

    will print:

    - -
    -
    -15  
    - - -

    Example 2: Creating a method that calculates the average of - multiple numbers:

    - -
    -
    -<#function avg nums...>
    -  <#local sum = 0>
    -  <#list nums as num>
    -    <#local sum = sum + num>
    -  </#list>
    -  <#if nums?size != 0>
    -    <#return sum / nums?size>
    -  </#if>
    -</#function>
    -${avg(10, 20)}
    -${avg(10, 20, 30, 40)}
    -${avg()!"N/A"}  
    - - -

    will print:

    - -
    -
    -15
    -25
    -N/A  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_global.html b/fmpp/docs/freemarker/ref_directive_global.html deleted file mode 100644 index 654bb5b..0000000 --- a/fmpp/docs/freemarker/ref_directive_global.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - FreeMarker Manual - global - - - - - - - - -
    - - - - - -

    -global

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#global name=value>
    -or
    -<#global name1=value1 name2=value2 ... nameN=valueN>
    -or
    -<#global name>
    -  capture this
    -</#global>
    -
    - - -

    Where:

    - -
    -
      -
    • - name: name - of the variable. It is not expression. However, it can be - written as a string literal, which is useful if the variable - name contains reserved characters, for example - <#global "foo-bar" = 1>. Note that this - string literal does not expand interpolations (as - "${foo}"). -
    • - -
    • - value: the - value to store. Expression. -
    • -
    - - - - - - -

    -Description

    - - -

    This directive is similar to assign, but - the variable created will be visible in all namespaces, and will not be - inside any namespace. Exactly as if you would create (or replace) a - variable of the data-model. Hence, the variable is global. If a - variable with the same name already exists in the data-model, it - will be hidden by the variable created with this directive. If a - variable with the same name already exists in the current namespace, - that will hide the variable created with global - directive.

    - -

    For example, with <#global x = 1> you - create a variable that is visible as x in all - namespaces, unless another variable called x - hides it (for example a variable what you have created as - <#assign x = 2>). In this case, you can use - special - variable globals, like - ${.globals.x}. Note that with - globals you see all globally accessible - variables; not only the variables that were created with - global directive, but also the variables of the - data-model.

    - -

    Note for custom JSP tag users: The set of variables created - with this directive corresponds to the JSP page-scope. This means, - that if a custom JSP tag wants to get a page-scope attribute - (page-scope bean), a variable with the same name in the current - namespace will not hide it from the viewpoint of the JSP tag.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_if.html b/fmpp/docs/freemarker/ref_directive_if.html deleted file mode 100644 index 1063616..0000000 --- a/fmpp/docs/freemarker/ref_directive_if.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - FreeMarker Manual - if, else, elseif - - - - - - - - -
    - - - - - -

    -if, else, elseif

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#if condition>
    -  ...
    -<#elseif condition2>
    -  ...
    -<#elseif condition3>
    -  ...
    -...
    -<#else>
    -  ...
    -</#if>
    -
    - - -

    Where:

    - -
    -
      -
    • - condition, - condition2, - ...etc.: Expression evaluates to a boolean value. -
    • -
    - - - - - - -

    -Description

    - - -

    You can use if, elseif - and else directives to conditionally skip a - section of the template. The - condition-s must - evaluate to a boolean value, or else an error will abort template - processing. The elseif-s and - else-s must occur inside if - (that is, between the if start-tag and end-tag). - The if can contain any number of - elseif-s (including 0) and at the end optionally - one else. Examples:

    - -

    if with 0 elseif and no - else:

    - -
    -
    -<#if x == 1>
    -  x is 1
    -</#if>  
    - - -

    if with 0 elseif and - else:

    - -
    -
    -<#if x == 1>
    -  x is 1
    -<#else>
    -  x is not 1
    -</#if>  
    - - -

    if with 2 elseif and no - else:

    - -
    -
    -<#if x == 1>
    -  x is 1
    -<#elseif x == 2>
    -  x is 2
    -<#elseif x == 3>
    -  x is 3
    -</#if>  
    - - -

    if with 3 elseif and - else:

    - -
    -
    -<#if x == 1>
    -  x is 1
    -<#elseif x == 2>
    -  x is 2
    -<#elseif x == 3>
    -  x is 3
    -<#elseif x == 4>
    -  x is 4
    -<#else>
    -  x is not 1 nor 2 nor 3 nor 4
    -</#if>  
    - - -

    To see more about boolean expressions, see: Template Author's Guide/The Template/Expressions.

    - -

    You can nest if directives (of - course):

    - -
    -
    -<#if x == 1>
    -  x is 1
    -  <#if y == 1>
    -    and y is 1 too
    -  <#else>
    -    but y is not
    -  </#if>
    -<#else>
    -  x is not 1
    -  <#if y < 0>
    -    and y is less than 0
    -  </#if>
    -</#if>  
    - - -
    -

    Note

    - -

    When you want to test if x > 0 or - x >= 0, writing <#if x > - 0> and <#if x >= 0> is - WRONG, as the first > will close the - #if tag. To work that around, write - <#if x gt 0> or <#if gte - 0>. Also note that if the comparison occurs inside - parentheses, you will have no such problem, like <#if - foo.bar(x > 0)> works as expected.

    -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_import.html b/fmpp/docs/freemarker/ref_directive_import.html deleted file mode 100644 index d1ca6f2..0000000 --- a/fmpp/docs/freemarker/ref_directive_import.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - FreeMarker Manual - import - - - - - - - - -
    - - - - - -

    -import

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#import path as hash>
    -
    - - -

    Where:

    - -
    -
      -
    • - path: The - path of a template. This is an expression that evaluates to a - string. (With other words, it doesn't have to be a fixed string, - it can also be something like, for example, - profile.baseDir + "/menu.ftl".) -
    • - -
    • - hash: The - unquoted name of hash variable by which you can access the - namespace. Not an expression. -
    • -
    - - - - - - -

    -Description

    - - -

    Imports a library. That is, it creates a new empty namespace, - and then executes the template given with - path parameter in that - namespace so the template populates the namespace with variables - (macros, functions, ...etc.). Then it makes the newly created - namespace available to the caller with a hash variable. The hash - variable will be created as a plain variable in the namespace used - by the caller of import (as if you would create - it with assign directive), with the name given - with the hash - parameter.

    - -

    If you call import with the same - path for multiple - times, it will create the namespace and run the template for the - very first call of import only. The later calls - will just create a hash by which you can access the - same namespace.

    - -

    The output printed by the imported template will be ignored - (will not be inserted at the place of importing). The template is - executed to populate the namespace with variables, and not to write - to the output.

    - -

    Example:

    - -
    -
    -<#import "/libs/mylib.ftl" as my>
    -
    -<@my.copyright date="1999-2002"/>  
    - - -

    The path - parameter can be a relative path like "foo.ftl" - and "../foo.ftl", or an absolute like - "/foo.ftl". Relative paths are relative to the - directory of the template that uses the import - directive. Absolute paths are relative to a base (often referred as - the ''root directory of the templates'') that the programmer defines - when he configures FreeMarker.

    - -

    Always use / (slash) to separate path - components, never \ (backslash). If you are - loading templates from your local file system and it uses - backslashes (like under. Windows), FreeMarker will convert them - automatically.

    - -

    Like with the include directive, acquisition and - localized - lookup may be used for resolving the path.

    - -

    Note, that it is possible to - automatically do the commonly used imports for all templates, with - the "auto imports" setting of - Configuration.

    - -

    If you are new to namespaces, you should read: Template Author's Guide/Miscellaneous/Namespaces

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_include.html b/fmpp/docs/freemarker/ref_directive_include.html deleted file mode 100644 index b4c3f6a..0000000 --- a/fmpp/docs/freemarker/ref_directive_include.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - - - - - FreeMarker Manual - include - - - - - - - - -
    - - - - - -

    -include

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#include path>
    -or
    -<#include path options>
    -
    - - -

    Where:

    - -
    -
      -
    • - path: The - path of the file to include; an expression that evaluates to a - string. (With other words, it doesn't have to be a fixed string, - it can also be something like, for example, - profile.baseDir + "/menu.ftl".) -
    • - -
    • - options: One - or more of these: - encoding=encoding, - parse=parse - -
      -
        -
      • - encoding: - Expression evaluates to string -
      • - -
      • - parse: - Expression evaluates to boolean (also accepts a few string - values for backward compatibility) -
      • - -
      • - ignore_missing: - Expression evaluates to boolean -
      • -
      - -
    • -
    - - - - - - -

    -Description

    - - -

    You can use it to insert another FreeMarker template file - (specified by the path - parameter) into your template. The output from the included template - is inserted at the point where the include tag - occurs. The included file shares the variables with the including - template, similarly like if it was copy-pasted into it. The - include directive is not really replaced by the - content of the included file, instead it processes the included file - each time when FreeMarker reaches the include - directive in the course of template processing. So for example if - the include is inside a list - loop, you can specify different file names in each cycle.

    - -
    -

    Note

    - -

    This directive is not be confused with the JSP (Servlet) - include, as it doesn't involve the Servlet container at all, just - processes another FreeMarker template, without "leaving" - FreeMarker. Regarding how to do a "JSP include" read this...

    -
    - - -

    The path - parameter can be a relative path like "foo.ftl" - and "../foo.ftl", or an absolute like - "/foo.ftl". Relative paths are relative to the - directory of the template that contains the - import directive. Absolute paths are relative to - a base (often referred as the 'root directory of the templates') - that the programmer defines when he configures FreeMarker.

    - -
    -

    Note

    - -

    This is different than the way it worked prior FreeMarker - 2.1, where the path was always absolute. To preserve the old - behavior, enable the classic compatible mode in the - Configuration object.

    -
    - - -

    Always use / (slash) to separate path - components, never \ (backslash). Even if you are - loading templates from your local file system and it uses - backslashes (like under. Windows), use /.

    - -

    Example:

    - -

    Assume /common/copyright.ftl contains:

    - -
    -
    -Copyright 2001-2002 ${me}<br>
    -All rights reserved.  
    - - -

    Then this:

    - -
    -
    -<#assign me = "Juila Smith">
    -<h1>Some test</h1>
    -<p>Yeah.
    -<hr>
    -<#include "/common/copyright.ftl">  
    - - -

    will output this:

    - -
    -
    -<h1>Some test</h1>
    -<p>Yeah.
    -<hr>
    -Copyright 2001-2002 Juila Smith
    -All rights reserved.  
    - - -

    The supported - options are:

    - -
    -
      -
    • -

      parse: If it is - true, then the included file will be parsed - as FTL, otherwise the whole file will be considered as simple - text (i.e, no FreeMarker constructs will be searched in it). If - you omit this option, then it defaults to - true.

      -
    • - -
    • -

      encoding: The included file inherits - the encoding (the charset) of the top-level template, unless you - specify an encoding with this option. Examples of valid names: - UTF-8, ISO-8859-1, ISO-8859-2, Shift_JIS, Big5, EUC-KR, GB2312. - Encoding names are the same as the - ones supported be java.io.InputStreamReader (as of Java API 1.3: - MIME-preferred charset names from the IANA Charset - Registry)

      -
    • - -
    • -

      ignore_missing: When - true, suppresses the error when the template - to include is missing, instead <#include - ...> will print nothing. When - false, the template processing will stop with - error if the template is missing. If you omit this option, then - it defaults to false.

      -
    • -
    - - -

    Example:

    - -
    -
    -<#include "/common/navbar.html" parse=false encoding="Shift_JIS">  
    - - -

    Note, that it is possible to - automatically do the commonly used inclusions for all templates, - with the "auto includes" setting of - Configuration.

    - - - - - - -

    -Using acquisition

    - - - - -

    There's a special path component represented by an asterisk - (*). It is interpreted as "this directory or - any of its parents". Therefore, if the template located in - /foo/bar/template.ftl has the following - line:

    - -
    -
    -<#include "*/footer.ftl">  
    - - -

    then the engine will look for the template in following - locations, in this order:

    - -
    -
      -
    • - /foo/bar/footer.ftl -
    • - -
    • - /foo/footer.ftl -
    • - -
    • - /footer.ftl -
    • -
    - - -

    This mechanism is called acquisition and allows the designers to - place commonly included files in a parent directory, and redefine - them on a per-subdirectory basis as needed. We say that the - including template acquires the template to include from the first - parent directory that has it. Note that you can specify not only a - template name to the right of the asterisk, but a subpath as well. - I.e. if the previous template instead read:

    - -
    -
    -<#include "*/commons/footer.ftl">  
    - - -

    then the engine would look for the template in following - locations, in this order:

    - -
    -
      -
    • - /foo/bar/commons/footer.ftl -
    • - -
    • - /foo/commons/footer.ftl -
    • - -
    • - /commons/footer.ftl -
    • -
    - - -

    Finally, the asterisk needn't be the first element of the - path:

    - -
    -
    -<#include "commons/*/footer.ftl">  
    - - -

    would cause the engine to look for the template in following - locations, in this order:

    - -
    -
      -
    • - /foo/bar/commons/footer.ftl -
    • - -
    • - /foo/bar/footer.ftl -
    • - -
    • - /foo/footer.ftl -
    • - -
    • - /footer.ftl -
    • -
    - - -

    However, there can be at most one asterisk in the path. If - you specifying more asterisks, the template won't be found.

    - - - - - - - -

    -Localized lookup

    - - - - -

    Whenever a template is loaded, it is assigned a locale. A - locale is a language and an optional country or dialect - identifier. A template is typically loaded by some code that the - programmer wrote and he chooses a locale for the template based on - some aspect. For example, when the - FreemarkerServlet loads templates, it always - requests the template with locale matching the language preference - of the browser that requested the web page.

    - -

    When a template includes another template, it attempts to - load a template with the same locale. Suppose your template was - loaded with locale en_US, which means U.S. - English. When you include another template:

    - -
    -
    -<include "footer.ftl">  
    - - -

    the engine will in fact look for several templates, in this - order:

    - -
    -
      -
    • - footer_en_US.ftl, -
    • - -
    • - footer_en.ftl, and finally -
    • - -
    • - footer.ftl -
    • -
    - - -

    Note that you can disable - localized lookup feature with the - setLocalizedLookup method of - Configuration.

    - -

    When you use both acquisition and localized template lookup, - the template with more specific locale in a parent directory takes - precedence over template with less specific locale in a child - directory. Suppose you use the following include from - /foo/bar/template.ftl:

    - -
    -
    -<#include "*/footer.ftl">  
    - - -

    the engine will look for these templates, in this - order:

    - -
    -
      -
    • - /foo/bar/footer_en_US.ftl -
    • - -
    • - /foo/footer_en_US.ftl -
    • - -
    • - /footer_en_US.ftl -
    • - -
    • - /foo/bar/footer_en.ftl -
    • - -
    • - /foo/footer_en.ftl -
    • - -
    • - /footer_en.ftl -
    • - -
    • - /foo/bar/footer.ftl -
    • - -
    • - /foo/footer.ftl -
    • - -
    • - /footer.ftl -
    • -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_list.html b/fmpp/docs/freemarker/ref_directive_list.html deleted file mode 100644 index 6c7b59d..0000000 --- a/fmpp/docs/freemarker/ref_directive_list.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - FreeMarker Manual - list, break - - - - - - - - -
    - - - - - -

    -list, break

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#list sequence as item>
    -    ...
    -</#list>
    -
    - - -

    Where:

    - -
    -
      -
    • - sequence: - Expressions evaluates to a sequence or collection -
    • - -
    • - item: Name - of the loop variable (not - an expression) -
    • -
    - - - - - - -

    -Description

    - - -

    You can use the list directive to process a - section of template for each variable contained within a sequence. - The code between the start-tag and end-tag will be processed for the - 1st subvariable, then for the 2nd subvariable, then for the 3rd - subvariable, etc until it passes the last one. For each such - iteration the loop variable will contain the current - subvariable.

    - -

    There are two special loop variables available inside the list - loop:

    - -
    -
      -
    • -

      item_index: - The index (0-based number) of the current item in the - loop.

      -
    • - -
    • -

      item_has_next: - Boolean value that tells if the current item is the last in the - sequence or not.

      -
    • -
    - - -

    Example 1:

    - -
    -
    -<#assign seq = ["winter", "spring", "summer", "autumn"]>
    -<#list seq as x>
    -  ${x_index + 1}. ${x}<#if x_has_next>,</#if>
    -</#list>  
    - - -

    will output:

    - -
    -
    -  1. winter,
    -  2. spring,
    -  3. summer,
    -  4. autumn  
    - - -

    Example 2: You can use list to count - between two numbers, using a numerical range sequence - expression:

    - -
    -
    -<#assign x=3>
    -<#list 1..x as i>
    -  ${i}
    -</#list>  
    - - -

    The output will be:

    - -
    -
    -  1
    -  2
    -  3
    -   
    - - -

    Note that the above example will not work as you may expected - if x is 0, as then it will print 0 and -1.

    - - - -

    You can leave the list loop before it - passes the last subvariable of the sequence with the - break directive. For example this will print - ``winter'' and ``spring'' only:

    - -
    -
    -<#list seq as x>
    -  ${x}
    -  <#if x = "spring"><#break></#if>
    -</#list>  
    - - -

    Note that if you turn on the - classic compatible mode, then the list accepts a - scalar as well and treats it as a single-element - sequence.

    - -

    In general, it is best to avoid - using collection that wraps an Iterator as - parameters to list and use collection that wraps - java.util.Collection or sequence whenever - possible. There are situations however, when you only have an - Iterator at your disposal. Note that if you pass - an collection that wraps an Iterator to the - list, you can iterate over its elements only once - since Iterators are by their nature one-off - objects. When you try to list a such collection variable for the - second time, an error will abort template - processing.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_local.html b/fmpp/docs/freemarker/ref_directive_local.html deleted file mode 100644 index 3cc6b7f..0000000 --- a/fmpp/docs/freemarker/ref_directive_local.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - FreeMarker Manual - local - - - - - - - - -
    - - - - - -

    -local

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#local name=value>
    -or
    -<#local name1=value1 name2=value2 ... nameN=valueN>
    -or
    -<#local name>
    -  capture this
    -</#local>
    -
    -
    - - -

    Where:

    - -
    -
      -
    • - name: the - name of the local object in the root. It is not an expression. - However, it can be written as a string literal, which is useful - if the variable name contains reserved characters, for example - <#local "foo-bar" = 1>. Note that this - string literal does not expand interpolations (as - "${foo}"). -
    • - -
    • - value: the - value to store. Expression. -
    • -
    - - - - - - -

    -Description

    - - -

    It is similar to assign - directive, but it creates or replaces local variables. This - only works inside macro definitions and function definitons.

    - -

    For more information about variables, read this: Template Author's Guide/Miscellaneous/Defining variables in the template

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_macro.html b/fmpp/docs/freemarker/ref_directive_macro.html deleted file mode 100644 index 737fb5e..0000000 --- a/fmpp/docs/freemarker/ref_directive_macro.html +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - - - FreeMarker Manual - macro, nested, return - - - - - - - - -
    - - - - - -

    -macro, nested, return

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#macro name param1 param2 ... paramN>
    -  ...
    -  <#nested loopvar1, loopvar2, ..., loopvarN>
    -  ...
    -  <#return>
    -  ...
    -</#macro>
    -
    - - -

    Where:

    - -
    -
      -
    • - name: name - of macro variable. It's not an expression. However, it can be - written as a string literal, which is useful if the macro name - contains reserved characters, for example <#macro - "foo-bar">.... Note that - this string literal does not expand interpolations (as - "${foo}"). -
    • - -
    • - param1, - param2, ...etc.: - the name of the local - variables store the parameter values (not expression), - optionally followed by = and the default - value (that's an expression). The default value can even be - another parameter, for example <#macro section title - label=title>. -
    • - -
    • - paramN, the - last parameter, may optionally include a trailing ellipsis - (...), which indicates the macro takes a - variable number of parameters. If called using named parameters, - paramN will be a - hash containing all of the undeclared key/value pairs passed to - the macro. If called using positional parameters, - paramN will be a - sequence of the extra parameters. -
    • - -
    • - loopvar1, - loopvar2, ...etc.: - Optional. The values of loop - variables that the nested directive - wants to create for the nested content. These are - expressions. -
    • -
    - - -

    The return and nested - directives are optional and can be used anywhere and for any times - between the <#macro - ...> and - </#macro>.

    - -

    Parameters without default value must precede parameters with - default value - (paramName=defaultValue).

    - - - - - -

    -Description

    - - -

    Creates a macro variable (in the current namespace, if you - know namespace feature). If you are new to macros and user-defined - directives you should read the the tutorial about user-defined - directives.

    - -

    Macro variable stores a template fragment (called macro - definition body) that can be used as user-defined directive. - The variable also stores the name of allowed parameters to the - user-defined directive. You must give value for all of those - parameters when you use the variable as directive, except for - parameters that has a default value. The default value will be used - if and only if you don't give value for the parameter when you call - the macro.

    - -

    The variable will be created at the beginning of the template; - it does not mater where the macro directive is - placed in the template. Thus, this will work:

    - -
    -
    -<#-- call the macro; the macro variable is already created: -->
    -<@test/>
    -...
    -
    -<#-- create the macro variable: -->
    -<#macro test>
    -  Test text
    -</#macro>  
    - - -

    However, if the macro definitions are inserted with - include directive, they will not be available - until FreeMarker has executed the include - directive.

    - -

    Example: Macro without parameters:

    - -
    -
    -<#macro test>
    -  Test text
    -</#macro>
    -<#-- call the macro: -->
    -<@test/>  
    - - -

    Output:

    - -
    -
    -  Test text
    -   
    - - -

    Example: Macro with parameters:

    - -
    -
    -<#macro test foo bar baaz>
    -  Test text, and the params: ${foo}, ${bar}, ${baaz}
    -</#macro>
    -<#-- call the macro: -->
    -<@test foo="a" bar="b" baaz=5*5-2/>  
    - - -

    Output:

    - -
    -
    -  Test text, and the params: a, b, 23
    -     
    - - -

    Example: Macro with parameters and default parameter - values:

    - -
    -
    -<#macro test foo bar="Bar" baaz=-1>
    -  Test text, and the params: ${foo}, ${bar}, ${baaz}
    -</#macro>
    -<@test foo="a" bar="b" baaz=5*5-2/>
    -<@test foo="a" bar="b"/>
    -<@test foo="a" baaz=5*5-2/>
    -<@test foo="a"/>  
    - - -

    Output:

    - -
    -
    -  Test text, and the params: a, b, 23
    -  Test text, and the params: a, b, -1
    -  Test text, and the params: a, Bar, 23
    -  Test text, and the params: a, Bar, -1
    -   
    - - -

    Example: A more complex macro.

    - -
    -
    -<#macro list title items>
    -  <p>${title?cap_first}:
    -  <ul>
    -    <#list items as x>
    -      <li>${x?cap_first}
    -    </#list>
    -  </ul>
    -</#macro>
    -<@list items=["mouse", "elephant", "python"] title="Animals"/>  
    - - -

    Output:

    - -
    -
    -  <p>Animals:
    -  <ul>
    -      <li>Mouse
    -      <li>Elephant
    -      <li>Python
    -  </ul>
    -   
    - - -

    Example: A macro with support for a variable number of named - parameters:

    - -
    -
    -<#macro img src extra...>
    -  <img src="/context${src?html}" 
    -  <#list extra?keys as attr>
    -    ${attr}="${extra[attr]?html}"
    -  </#list>
    -  >
    -</#macro>
    -<@img src="/images/test.png" width=100 height=50 alt="Test"/>  
    - - -

    Output:

    - -
    -
    -  <img src="/context/images/test.png"
    -    alt="Test"
    -    height="50"
    -    width="100"
    -  >  
    - - - - - - - -

    -nested

    - - - - -

    The nested directive executes the - template fragment between the start-tag and end-tags of the - user-defined directive. The nested part can contain anything what - is valid in templates; interpolations, directives, ...etc. It is - executed in the context where the macro was called from, rather - than in the context of the macro definition body. Thus, for - example, you don't see the local variables of the macro in the - nested part. If you don't call the nested - directive, the part between the start-tag and end-tags of the - user-defined directive will be ignored.

    - -

    Example:

    - -
    -
    -<#macro do_twice>
    -  1. <#nested>
    -  2. <#nested>
    -</#macro>
    -<@do_twice>something</@do_twice>  
    - - -

    Output:

    - -
    -
    -  1. something
    -  2. something
    -   
    - - -

    The nested directive can create loop variables for the - nested content. For example:

    - -
    -
    -<#macro do_thrice>
    -  <#nested 1>
    -  <#nested 2>
    -  <#nested 3>
    -</#macro>
    -<@do_thrice ; x>
    -  ${x} Anything.
    -</@do_thrice>  
    - - -

    This will print:

    - -
    -
    -  1 Anything.
    -  2 Anything.
    -  3 Anything.
    -   
    - - -

    A more complex example:

    - -
    -
    -<#macro repeat count>
    -  <#list 1..count as x>
    -    <#nested x, x/2, x==count>
    -  </#list>
    -</#macro>
    -<@repeat count=4 ; c, halfc, last>
    -  ${c}. ${halfc}<#if last> Last!</#if>
    -</@repeat>  
    - - -

    The output will be:

    - -
    -
    -  1. 0.5
    -  2. 1
    -  3. 1.5
    -  4. 2 Last!
    -   
    - - - - - - - - -

    -return

    - - - - -

    With the return directive, you can leave - a macro or function definition body anywhere. Example:

    - -
    -
    -<#macro test>
    -  Test text
    -  <#return>
    -  Will not be printed.
    -</#macro>
    -<@test/>  
    - - -

    Output:

    - -
    -
    -  Test text
    -    
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_noparse.html b/fmpp/docs/freemarker/ref_directive_noparse.html deleted file mode 100644 index 6c665e3..0000000 --- a/fmpp/docs/freemarker/ref_directive_noparse.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - FreeMarker Manual - noparse - - - - - - - - -
    - - - - - -

    -noparse

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#noparse>
    -  ...
    -</#noparse>
    -
    - - - - - - -

    -Description

    - - -

    FreeMarker will not search FTL tags and interpolations and - other special character sequences in the body of this directive, - except the noparse end-tag.

    - -

    Example:

    - -
    -
    -Example:
    ---------
    -
    -<#noparse>
    -  <#list animals as animal>
    -  <tr><td>${animal.name}<td>${animal.price} Euros
    -  </#list>
    -</#noparse>  
    - - -

    will output:

    - -
    -
    -Example:
    ---------
    -
    -  <#list animals as animal>
    -  <tr><td>${animal.name}<td>${animal.price} Euros
    -  </#list>
    -   
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_nt.html b/fmpp/docs/freemarker/ref_directive_nt.html deleted file mode 100644 index c48342c..0000000 --- a/fmpp/docs/freemarker/ref_directive_nt.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - FreeMarker Manual - nt - - - - - - - - -
    - - - - - -

    -nt

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#nt>
    -
    - - - - - - -

    -Description

    - - -

    ``No Trim''. This directive disables white-space - stripping in the line where it occurs. It also disables the - effect of other trim directives occuring in the same line (the - effect of t, rt, - lt).

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_setting.html b/fmpp/docs/freemarker/ref_directive_setting.html deleted file mode 100644 index 2ea29fa..0000000 --- a/fmpp/docs/freemarker/ref_directive_setting.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - - FreeMarker Manual - setting - - - - - - - - -
    - - - - - -

    -setting

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#setting name=value>
    -
    - - -

    Where:

    - -
    -
      -
    • - name: name - of the setting. It is not expression! -
    • - -
    • - value: New - value of the setting. Expression -
    • -
    - - - - - - -

    -Description

    - - -

    Sets a setting for the further part of processing. Settings - are values that influence the behavior of FreeMarker. The new value - will be present only in the template processing where it was set, - and does not touch the template itself. The initial value of - settings is set by the programmer (see: Programmer's Guide/The Configuration/Settings).

    - -

    The supported settings are:

    - -
    -
      -
    • -

      locale: The locale (language) - of the output. It can influence the presentation format of - numbers, dates, etc. The value is a string which consist of a - language code (lowercase two-letter ISO-639 code) plus optional - county code (uppercase two-letter ISO-3166 code) separated from - the language code with underscore, and if we have specified the - country then an optional variant code (not standardized) - separated from the country with underscore. Examples of valid - values: en, en_US, - en_US_MAC. FreeMarker will try to use the - most specific available locale, so if you specify - en_US_MAC but that is not known, then it will - try en_US, and then en, - and then the default locale of the computer (which is may set by - the programmer).

      -
    • - -
    • -

      number_format: The number - format that is used to convert numbers to strings when no - explicit format is specified. Can be one of predefined values - number (the default), - computer, currency, or - percent. Additionally, arbitrary format - pattern written in Java - decimal number format syntax can also be specified. More - information about format patterns:string - built-in.

      -
    • - -
    • -

      boolean_format: The - comma-separated pair of strings for representing true and false - values respectively that is used to convert booleans to strings - when no explicit format is specified. Default value is - "true,false". See also:string - built-in.

      -
    • - -
    • -

      date_format, - time_format, - datetime_format: The format used to convert - date/time/date-time values (Java - java.util.Date-s and its subclasses) to - strings when no explicit format is specified via the string - built-in (or otherwise), as in the case of - ${someDate}. The - date_format setting only effects the - formatting of date values that store no time part, - time_format only effects the formatting of - times that store no date part, and - datetime_format only effects formatting of - date-time values. These settings also effects what format do - ?time, - ?date, and - ?datetime expect when it's applied on - a string value.

      - -

      The possible setting values are (the quotation marks - aren't part of the value itself):

      - -
      -
        -
      • -

        Patterns accepted - by Java's SimpleDateFormat, for - example "dd.MM.yyyy HH:mm:ss" (where - "HH" means 0-23 hours) or - "MM/dd/yyyy hh:mm:ss a" (where - "a" prints AM or PM, if the current - language is English).

        -
      • - -
      • -

        "xs" for XML Schema format, or - "iso" for ISO 8601:2004 format. These - formats allow various additional options, separated with - space, like in "iso m nz" (or with - _, like in "iso_m_nz"; - this is useful in a case like - lastModified?string.iso_m_nz). The - options and their meanings are:

        - -
        -
          -
        • -

          Accuracy options:

          - -
          -
            -
          • - ms: Milliseconds, always - shown with all 3 digits, even if it's all 0-s. - Example: 13:45:05.800 -
          • - -
          • - s: Seconds (fraction - seconds are dropped even if non-0), like - 13:45:05 -
          • - -
          • - m: Minutes, like - 13:45. This isn't allowed for - "xs". -
          • - -
          • - h: Hours, like - 13. This isn't allowed for - "xs". -
          • - -
          • - Neither: Up to millisecond accuracy, but - trailing millisecond 0-s are removed, also the whole - milliseconds part if it would be 0 otherwise. - Example: 13:45:05.8 -
          • -
          - -
        • - -
        • -

          Time zone offset visibility options:

          - -
          -
            -
          • - fz: "Force - Zone", always show time zone offset (even for - for java.sql.Date and - java.sql.Time values). But, - because ISO 8601 doesn't allow for dates (means date - without time of the day) to show the zone offset, - this option will have no effect in the case of - "iso" with dates. -
          • - -
          • - nz: "No Zone", - never show time zone offset -
          • - -
          • - Neither: Always show time zone offset, except - for java.sql.Date and - java.sql.Time, and for - "iso" date values. -
          • -
          - -
        • - -
        • -

          Time zone options:

          - -
          -
            -
          • - u: Use UTC instead of what - the time_zone setting suggests. - However, java.sql.Date and - java.sql.Time aren't affected by - this (see - sql_date_and_time_time_zone to - understand why) -
          • - -
          • - fu: "Force - UTC", that is, use UTC instead of what the - time_zone or the - sql_date_and_time_time_zone - setting suggests. This also effects - java.sql.Date and - java.sql.Time values -
          • - -
          • - Neither: Use the time zone suggested by the - time_zone or the - sql_date_and_time_time_zone - configuration setting -
          • -
          - -
        • -
        - - -

        Options from the same category are mutually exclusive, - like using m and s - together is an error.

        - -

        The options can be specified in any order.

        - -

        The accuracy and time zone offset visibility options - don't influence parsing, only formatting. For example, even - if you use "iso m nz", - "2012-01-01T15:30:05.125+01" will be - parsed successfully and with milliseconds accuracy. The time - zone options (like "u") influence what - time zone is chosen only when parsing a string that doesn't - contain time zone offset.

        - -

        Parsing with "iso" understands both - "extend format" and "basic - format", like 20141225T235018. It - doesn't, however, support the parsing of all kind of ISO - 8601 strings: if there's a date part, it must use year, - month and day of the month values (not week of the year), - and the day can't be omitted.

        - -

        The output of "iso" is deliberately - so that it's also a good representation of the value with - XML Schema format, except for 0 and negative years, where - it's impossible. Also note that the time zone offset is - omitted for date values in the "iso" - format, while it's preserved for the "xs" - format.

        -
      • - -
      • -

        "short", - "medium", "long", or - "full", which has locale-dependent - meaning defined by the Java platform (see in the documentation - of java.text.DateFormat). For - date-time values, you can specify the length of the date and - time part independently, be separating them with - _, like - "short_medium". - ("medium" means - "medium_medium" for date-time - values.)

        -
      • -
      - -
    • - -
    • -

      time_zone: The name of the time - zone used to format times for display. By default, the default - time zone of the JVM is used. Can be any value that is accepted - by Java - TimeZone API, or "JVM default" (since - FreeMarker 2.3.21) to use the JVM default time zone. Examples: - "GMT", "GMT+2", - "GMT-1:30", "CET", - "PST", - "America/Los_Angeles".

      - -
      -

      Warning!

      - -

      If you change this setting from its default value, you - should certainly also set - sql_date_and_time_time_zone to "JVM - default". See more in the Java - API documentation of - Configurable.setSQLDateAndTimeTimeZone(TimeZone).

      -
      - -
    • - -
    • -

      sql_date_and_time_time_zone - (since FreeMarker 2.3.21): This handles a highly technical - issue, so it should usually be set from the Java code by the - programmers. For programmers: If - this is set to non-null, for date-only and - time-only values coming from SQL database (more precisely, for - java.sql.Date and - java.sql.Time objects) FreeMarker will use - this time zone instead of the time zone specified by the - time_zone FreeMarker setting. See more in the - Java API documentation of - Configurable.setSQLDateAndTimeTimeZone(TimeZone).

      -
    • - -
    • -

      url_escaping_charset: The - charset used for URL escaping (e.g. for - ${foo?url}) to calculate the escaped - (%XX) parts. - Usually the framework that encloses FreeMarker should set it, so - you hardly ever should set this setting in templates. (Programmers can read more about this - here...)

      -
    • - -
    • -

      output_encoding: Tells - FreeMarker what the charset of the output is. As FreeMarker - outputs a stream of UNICODE characters (it writes into a - java.io.Writer), it's not affected - by the output encoding, but some macros/functions and built-ins - may want to used this information.

      -
    • - -
    • -

      classic_compatible: This is for - experts. Its value should be a boolean. See the documentation of - freemarker.template.Configurable for more - information.

      -
    • -
    - - -

    Example: Assume that the initial locale of template is de_DE - (German). Then this:

    - -
    -
    -${1.2}
    -<#setting locale="en_US">
    -${1.2}  
    - - -

    will output this:

    - -
    -
    -1,2
    -1.2  
    - - -

    because German people use the comma as their decimal - separator, while US people use the dot.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_stop.html b/fmpp/docs/freemarker/ref_directive_stop.html deleted file mode 100644 index 805541b..0000000 --- a/fmpp/docs/freemarker/ref_directive_stop.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - FreeMarker Manual - stop - - - - - - - - -
    - - - - - -

    -stop

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#stop>
    -or
    -<#stop reason>
    -
    - - -

    Where:

    - -
    -
      -
    • - reason: - Informative message about the reason of termination. Expression - evaluates to string. -
    • -
    - - - - - - -

    -Description

    - - -

    Aborts the processing of template. This is something like an - emergency brake: don't use it in normal situations. Aborting happens by throwing a - StopException, and the - StopException will hold the value of reason - parameter.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_switch.html b/fmpp/docs/freemarker/ref_directive_switch.html deleted file mode 100644 index f4b82fa..0000000 --- a/fmpp/docs/freemarker/ref_directive_switch.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - FreeMarker Manual - switch, case, default, break - - - - - - - - -
    - - - - - -

    -switch, case, default, break

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#switch value>
    -  <#case refValue1>
    -    ...
    -    <#break>
    -  <#case refValue2>
    -    ...
    -    <#break>
    -  ...
    -  <#case refValueN>
    -    ...
    -    <#break>
    -  <#default>
    -    ...
    -</#switch>
    -
    -
    - - -

    Where:

    - -
    -
      -
    • - value, - refValue1, etc.: - Expressions evaluates to scalars of the same type. -
    • -
    - - - - - - -

    -Description

    - - -

    The usage of this directive is not recommended, as it is - error-prone because of the fall-through behavior. Use elseif-s - instead unless you want to exploit the fall-through behavior.

    - -

    Switch is used to choose a fragment of template depending on - the value of an expression:

    - -
    -
    -<#switch animal.size>
    -  <#case "small">
    -     This will be processed if it is small
    -     <#break>
    -  <#case "medium">
    -     This will be processed if it is medium
    -     <#break>
    -  <#case "large">
    -     This will be processed if it is large
    -     <#break>
    -  <#default>
    -     This will be processed if it is neither
    -</#switch>  
    - - -

    Inside the switch must be one or more - <#case value>, - and after all such case tags optionally one - <#default>. When FM reaches the - switch directive, it chooses a - case directive where - refValue equals with - value and continues - the processing of the template there. If there is no - case directive with appropriate value then it - continues processing at the default directive if - that exists, otherwise it continues the processing after the end-tag - of switch. And now comes the confusing thing: - when it has chosen a case directive, it will - continue the processing there, and will go ahead until it reaches a - break directive. That is, it will not - automatically leave the switch directive when it - reaches another case directive or the - <#default> tag. Example:

    - -
    -
    -<#switch x>
    -  <#case 1>
    -    1
    -  <#case 2>
    -    2
    -  <#default>
    -    d
    -</#switch>  
    - - -

    If x is 1, then it will print 1 2 d; if - x is 2 then it will print 2 d; if - x is 3 then it will print d. This is the - mentioned fall-through behavior. The break tag - instructs FM to immediately skip past the switch - end-tag.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_t.html b/fmpp/docs/freemarker/ref_directive_t.html deleted file mode 100644 index 9d4bf04..0000000 --- a/fmpp/docs/freemarker/ref_directive_t.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - FreeMarker Manual - t, lt, rt - - - - - - - - -
    - - - - - -

    -t, lt, rt

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<#t>
    -
    -<#lt>
    -
    -<#rt>
    - - - - - - -

    -Description

    - - -

    These directives, instruct FreeMarker to ignore certain - white-space in the line of the tag:

    - -
    -
      -
    • -

      t (for trim): Ignore all leading and - trailing white-space in this line.

      -
    • - -
    • -

      lt (for left trim): Ignore all leading - white-space in this line.

      -
    • - -
    • -

      rt (for right trim): Ignore all - trailing white-space in this line.

      -
    • -
    - - -

    where:

    - -
    -
      -
    • -

      ``leading white-space'' means all space and tab (and other - character that are white-space according to UNICODE, except line breaks) before the first - non-white-space character of the line.

      -
    • - -
    • -

      ``trailing white-space'' means all space and tab (and - other character that are white-space according to UNICODE, except line breaks) - after the last non-white-space character of the line, - and the line break at the end of the - line.

      -
    • -
    - - -

    It is important to understand that these directives examine - the template itself, and not the output what - the template generates when you merge it with the data-model. - (That is, the white-space removal - happens on parse time.)

    - -

    For example this:

    - -
    -
    ---
    -  1 <#t>
    -  2<#t>
    -  3<#lt>
    -  4
    -  5<#rt>
    -  6
    ---  
    - - -

    will output this:

    - -
    -
    ---
    -1 23
    -  4
    -  5  6
    ---  
    - - -

    The placement of these directives inside the line has no - importance. That is, the effect will be the same regardless if you - put the directive at the beginning of the line, or at the end of the - line, or in the middle of the line.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_userDefined.html b/fmpp/docs/freemarker/ref_directive_userDefined.html deleted file mode 100644 index e2b23ee..0000000 --- a/fmpp/docs/freemarker/ref_directive_userDefined.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - FreeMarker Manual - User-defined directive (<@...>) - - - - - - - - -
    - - - - - -

    -User-defined directive (<@...>)

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    -<@user_def_dir_exp param1=val1 param2=val2 ... paramN=valN/>
    -(Note the XML-style / before the >)  
    -or if you need loop variables (more details...)
    -<@user_def_dir_exp param1=val1 param2=val2 ... paramN=valN ; lv1, lv2, ..., lvN/>
    -
    -Or the same as the above two but with end-tag (more details...):
    -
    -<@user_def_dir_exp ...>
    -  ...
    -</@user_def_dir_exp>
    -or
    -<@user_def_dir_exp ...>
    -  ...
    -</@>
    -
    -Or all above but with positional parameter passing (more details...):
    -
    -<@user val1, val2, ..., valN/>
    -...etc.
    -
    - - -

    Where:

    - -
    -
      -
    • - user_def_dir_exp: - Expression evaluates to an user-defined directive (for example a - macro), that will be called. -
    • - -
    • - param1, - param2, ...etc.: - The name of parameters. They are not - expressions. -
    • - -
    • - val1, - val2, ...etc.: The - value of parameters. They are - expressions. -
    • - -
    • - lv1, - lv2, ...etc.: The - name of loop variables. - They are not expressions. -
    • -
    - - -

    The number of parameters can be 0 (i.e. no parameters).

    - -

    The order of parameters is not significant (unless you use - positional parameter passing). The name of parameters must be - unique. Lower- and uppercase letters are considered as different - letters in parameter names (i.e. Color and - color is not the same).

    - - - - - -

    -Description

    - - -

    This will call an user-defined directive, for example a macro. - The meaning of parameters, and the set of supported and required - parameters depend on the concrete user-defined directive.

    - -

    You may read the tutorial - about user-defined directives.

    - -

    Example 1: Calls the directive that is stored in the variable - html_escape:

    - -
    -
    -<@html_escape>
    -  a < b
    -  Romeo & Juliet
    -</@html_escape>  
    - - -

    Output:

    - -
    -
    -  a &lt; b
    -  Romeo &amp; Juliet  
    - - -

    Example 2: Calls a macro with parameters:

    - -
    -
    -<@list items=["mouse", "elephant", "python"] title="Animals"/>
    -...
    -<#macro list title items>
    -  <p>${title?cap_first}:
    -  <ul>
    -    <#list items as x>
    -      <li>${x?cap_first}
    -    </#list>
    -  </ul>
    -</#macro>  
    - - -

    Output:

    - -
    -
    -  <p>Animals:
    -  <ul>
    -      <li>Mouse
    -      <li>Elephant
    -      <li>Python
    -  </ul>
    -  
    -...  
    - - - - - - - -

    -End-tag

    - - -

    You can omit the - user_def_dir_exp in - the end-tag. That is, you can - always write </@> instead of - </@anything>. - This rule is mostly useful when the - user_def_dir_exp - expression is too complex, because you don't have to repeat the - expression in the end-tag. Furthermore, if the expression contains - other than simple variable names and dots, you are not allowed to - repeat the expression. For example, - <@a_hash[a_method()]>...</@a_hash[a_method()]> - is an error; you must write - <@a_hash[a_method()]>...</@>. - But - <@a_hash.foo>...</@a_hash.foo> - is OK.

    - - - - - - - -

    -Loop variables

    - - -

    Some user-defined directives create loop variables - (similarly to list directive). As with the - predefined directives (as list) the - name of loop variables is given when you call - the directive (as foo in <#list - foos as - foo>...</#list>), - while the value of the variable is set by the - directive itself. In the case of user-defined directives the - syntax is that the name of loop variables is given after a - semicolon. For example:

    - -
    -
    -<@myRepeatMacro count=4 ; x, last>
    -  ${x}. Something... <#if last> This was the last!</#if>
    -</@myRepeatMacro>  
    - - -

    Note that the number of loop variable created by the - user-defined directive and the number of loop variables specified - after the semicolon need not match. Say, if you are not interested - if the repetition is the last, you can simply write:

    - -
    -
    -<@myRepeatMacro count=4 ; x>
    -  ${x}. Something...
    -</@myRepeatMacro>  
    - - -

    or you can even:

    - -
    -
    -<@myRepeatMacro count=4>
    -  Something...
    -</@myRepeatMacro>  
    - - -

    Furthermore, it does not cause error if you specify more - loop variables after the semicolon than the user-defined directive - creates, just the last few loop variables will not be created - (i.e. those will be undefined in the nested content). Trying to - use the undefined loop variables, however, will cause error - (unless you use built-ins like ?default), since - you try to access a non-existing variable.

    - -

    See the the tutorial - about user-defined directives for more explanation.

    - - - - - - - -

    -Positional parameter passing

    - - - - -

    Positional parameter passing (as <@heading - "Preface", 1/>) is a shorthand form of normal named - parameter passing (as <@heading title="Preface" - level=1/>), where you omit the parameter name. This - shorthand form should be used if a user-defined directive has only - one parameter, or if it is easy to remember the order of - parameters for a frequently used user-defined directive. To use - this form, you have to know the order in which the named - parameters are declared (trivial if the directive has only one - parameter). Say, if heading was created as - <#macro heading title - level>..., then - <@heading "Preface", 1/> is equivalent - with <@heading title="Preface" level=1/> - (or <@heading level=1 title="Preface"/>; - if you use parameter names, the order is not important). Note that - positional parameter passing is currently only supported for - macros.

    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directive_visit.html b/fmpp/docs/freemarker/ref_directive_visit.html deleted file mode 100644 index 04caa7a..0000000 --- a/fmpp/docs/freemarker/ref_directive_visit.html +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - - - FreeMarker Manual - visit, recurse, fallback - - - - - - - - -
    - - - - - -

    -visit, recurse, fallback

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Synopsis

    - - -
    <#visit node using namespace>
    -or
    -<#visit node>
    - - -
    <#recurse node using namespace>
    -or
    -<#recurse node>
    -or
    -<#recurse using namespace>
    -or
    -<#recurse>
    - - -
    <#fallback>
    - - -

    Where:

    - -
    -
      -
    • - node: - Expression evaluates to a node - variable. -
    • - -
    • - namespace: A - namespace, or a - sequence of namespaces. A namespace can be given with the - namespace hash (a.k.a. gate hash), or with a string literal that - store the path of template that could be imported. Instead of - namespace hashes, you can use plain hashes as well. -
    • -
    - - - - - - -

    -Description

    - - -

    The visit and recurse - directives are used for the recursive processing of trees. In - practice, this will mostly be used for processing XML.

    - - - - - - -

    -Visit

    - - -

    When you call <#visit - node>, it looks for a - user-defined directive (like a macro) to invoke that has the name - deducted from the node's name - (node?node_name) and - namespace - (node?node_namesoace). - The rules of name deduction:

    - -
    -
      -
    • -

      If the node doesn't support node namespaces (as text - nodes in XML), then the directive name is simply the name of - the node - (node?node_name). - A node does not support node - namespaces if the getNodeNamespace method - returns null.

      -
    • - -
    • -

      If the node does support node namespaces (as element - nodes in XML), then a prefix deduced from the node namespace - maybe appended before the node name with a colon used as - separator (e.g. e:book). The prefix, and if - there is a prefix used at all, depends on what prefixes has - been registered with the ns_prefixes - parameter of the ftl directive in the FTL namespace where - visit looks for the handler directive - (which is not necessary the same as the FTL namespace where - visit was called from, as you will see - later). Concretely, if there was no default namespace - registered with ns_prefixes then for nodes - that does not belong to any namespace (when getNodeNamespace - returns "") no prefix is used. If - there was a default namespace registered with - ns_prefixes then for nodes that does not - belong to any namespace prefix N is used, - and for nodes that belong to the default node namespace no - prefix is used. Otherwise, in both case, the prefix associated - to the node namespace with the ns_prefixes - is used. If there is not prefix associated to the node - namespace of the node, then visit simply - behave as if there was no directive found with the proper - name.

      -
    • -
    - - -

    The node for which the user-defined directive was invoked is - available for it as special variable .node. - Example:

    - -
    -
    -<#-- Assume that nodeWithNameX?node_name is "x" -->
    -<#visit nodeWithNameX>
    -Done.
    -<#macro x>
    -   Now I'm handling a node that has the name "x".
    -   Just to show how to access this node: this node has ${.node?children?size} children.
    -</#macro>  
    - - -

    The output will be something like:

    - -
    -
    -   Now I'm handling a node that has the name "x".
    -   Just to show how to access this node: this node has 3 children.
    -Done.  
    - - -

    If one or more namespaces is specified using the optional - using clause, then visit - will look for the directives in those namespaces only, with the - earlier specified namespaces in the list getting priority. If no - using clause is specified, the namespace or - sequence of namespaces specified with the using - clause of the last uncompleted visit call is - reused. If there is no such pending visit call, - then the current namespace is used. For example, if you execute - this template:

    - -
    -
    -<#import "n1.ftl" as n1>
    -<#import "n2.ftl" as n2>
    -
    -<#-- This will call n2.x (because there is no n1.x): -->
    -<#visit nodeWithNameX using [n1, n2]>
    -
    -<#-- This will call the x of the current namespace: -->
    -<#visit nodeWithNameX>
    -
    -<#macro x>
    -  Simply x
    -</#macro>  
    - - -

    and this is n1.ftl:

    - -
    -
    -<#macro y>
    -  n1.y
    -</#macro>  
    - - -

    and this is n2.ftl:

    - -
    -
    -<#macro x>
    -  n2.x
    -  <#-- This callc n1.y as it inherits the "using [n1, n2]" from the pending visit call: -->
    -  <#visit nodeWithNameY>
    -  <#-- This will call n2.y: -->
    -  <#visit nodeWithNameY using .namespace>
    -</#macro>
    -
    -<#macro y>
    -  n2.y
    -</#macro>  
    - - -

    then this will print:

    - -
    -
    -
    -  n2.x
    -  n1.y
    -  n2.y
    -
    -  Simply x
    -   
    - - -

    If visit doesn't find a user-defined - directive in either FTL namespaces with the name identical to the - name deduced with the rules described earlier, then it tries to - find an user-defined directive with name - @node_type, or if - the node does not support node type property (i.e. - node?node_type - returns undefined variable), then with name - @default. For the lookup, it uses the same - mechanism as was explained earlier. If it still doesn't find an - user-defined directive to handle the node, then - visit stops template processing with error. - Some XML specific node types have special handling in this regard; - see: XML Processing Guide/Declarative XML processing/Details. Example:

    - -
    -
    -<#-- Assume that nodeWithNameX?node_name is "x" -->
    -<#visit nodeWithNameX>
    -
    -<#-- Assume that nodeWithNameY?node_type is "foo" -->
    -<#visit nodeWithNameY>
    -
    -<#macro x>
    -Handling node x
    -</#macro>
    -
    -<#macro @foo>
    -There was no specific handler for node ${node?node_name}
    -</#macro>  
    - - -

    This would print:

    - -
    -
    -Handling node x
    -  
    -There was no specific handler for node y
    -
    -   
    - - - - - - - - -

    -Recurse

    - - - - -

    The <#recurse> directive is really - syntactic sugar. It visits all children nodes of the node (and not - the node itself). So, to write:

    - -
    -
    -<#recurse someNode using someLib 
    - - -

    is equivalent to writing:

    - -
    -
    -<#list someNode?children as child><#visit child using someLib></#list>  
    - - -

    However, target node is optional in the - recurse directive. If the target node is - unspecified, it simply uses the .node. Thus, - the terse instruction <#recurse> is - equivalent to:

    - -
    -
    -<#list .node?children as child><#visit child></#list>  
    - - -

    As a side comment for those who are familiar with XSLT, - <#recurse> is pretty much exactly - analogous to the <xsl:apply-templates/> - instruction in XSLT.

    - - - - - - - -

    -Fallback

    - - - - -

    As you could learn earlier, in the documentation of the - visit directive, the user-defined directive - that handles the node is maybe searched in multiple FTL - name-spaces. The fallback directive can be used - in a user-defined directive that was invoked to handle a node. It - directs FreeMarker to continue the searching for the user-defined - directive in the further name-spaces (that is, in the name-spaces - that are after the name-space of the currently invoked - user-defined directive in the list of name-spaces). If a handler - for the node is found then it is invoked, otherwise - fallback does nothing.

    - -

    A typical usage of this to write customization layer over a - handler library, that sometimes passes the handling to the - customized library:

    - -
    -
    -<#import "/lib/docbook.ftl" as docbook>
    -
    -<#--
    -  We use the docbook library, but we override some handlers
    -  in this namespace.
    --->
    -<#visit document using [.namespace, docbook]>
    -
    -<#--
    -  Override the "programlisting" handler, but only in the case if
    -  its "role" attribute is "java"
    --->
    -<#macro programlisting>
    -  <#if .node.@role[0]!"" == "java">
    -    <#-- Do something special here... -->
    -    ...
    -  <#else>
    -    <#-- Just use the original (overidden) handler -->
    -    <#fallback>
    -  </#if>
    -</#macro>  
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_directives.html b/fmpp/docs/freemarker/ref_directives.html deleted file mode 100644 index ff23665..0000000 --- a/fmpp/docs/freemarker/ref_directives.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - FreeMarker Manual - Directive Reference - - - - - - - - -
    - - - - - -

    -Chapter 2   Directive Reference

    - -
    -

    - - Chapter Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_reservednames.html b/fmpp/docs/freemarker/ref_reservednames.html deleted file mode 100644 index e2b7633..0000000 --- a/fmpp/docs/freemarker/ref_reservednames.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - FreeMarker Manual - Reserved names in FTL - - - - - - - - -
    - - - - - -

    -Chapter 4   Reserved names in FTL

    - - -

    The following names cannot be used for top-level variables without - square-bracket syntax (as .vars["in"]), since they - are keywords in FTL:

    -
      -
    • - true: boolean value ``true'' -
    • - -
    • - false: boolean value ``false'' -
    • - -
    • - gt: comparison operator ``greater - than'' -
    • - -
    • - gte: comparison operator ``greater than or - equivalent'' -
    • - -
    • - lt: comparison operator ``less - than'' -
    • - -
    • - lte: comparison operator ``less than or - equivalent'' -
    • - -
    • - as: used by a few directives -
    • - -
    • - in: used by a few directives -
    • - -
    • - using: used by a few directives -
    • -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/ref_specvar.html b/fmpp/docs/freemarker/ref_specvar.html deleted file mode 100644 index f6aa831..0000000 --- a/fmpp/docs/freemarker/ref_specvar.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - FreeMarker Manual - Special Variable Reference - - - - - - - - -
    - - - - - -

    -Chapter 3   Special Variable Reference

    - - -

    Special variables are variables defined by the FreeMarker engine - itself. To access them, you use the - .variable_name syntax. For - example, you can't write simply version; you have to - write .version.

    The supported special variables are:

    -
      -
    • - data_model: A hash that you can use to - access the data-model directly. That is, variables you did with - global directive are not visible here. -
    • - -
    • - error (available since FreeMarker - 2.3.1): This variable accessible in the body of the recover - directive, where it stores the error message of the error we - recover from. -
    • - -
    • - globals: A hash that you can use to access - the globally accessible variables: the data-model and the variables - created with global directive. Note that - variables created with assign or - macro are not globals, thus they never hide the - variables when you use globals. -
    • - -
    • - lang: Returns the language part of - the current value of the locale setting. For example if - .locale is en_US, then - .lang is en. -
    • - -
    • - locale: Returns the current value - of the locale setting. This is a string, for example - en_US. For more information about locale strings - see the - setting directive. -
    • - -
    • - locale_object (available since - FreeMarker 2.3.21): Returns the current value of the locale setting - as a java.util.Locale object, rather than as a - string. This meant to be used instead of .locale - when you want to pass it as a java.util.Locale - object to a Java method. (The Locale object will - be wrapped according the object_wrapper setting - value. Whether you can actually pass this value to a Java methods as - a Locale object depends on the object wrapper, - but an object wrapper that let you call Java methods directly is - very unlikely to not support that.) -
    • - -
    • - locals: A hash that you can use to access - the local variables (the variables created with the - local directive, and the parameters of - macro). -
    • - -
    • - main: A hash that you can use to access the - main namespace. Note that - global variables like the variables of data-model are - not visible through this hash. -
    • - -
    • - namespace: A hash that you can use to - access the current namespace. Note that global - variables like the variables of data-model are - not visible through this hash. -
    • - -
    • - node (alias current_node - for historical reasons): The node you are currently processing with - the visitor pattern (i.e. with the visit, - recurse, ...etc. directives). Also, it - initially stores the root node when you use the FreeMarker XML Ant task. -
    • - -
    • - now: Returns the current date-time. - Usage examples: "Page generated: ${.now}", - "Today is ${.now?date}", "The current - time is ${.now?time}". -
    • - -
    • - output_encoding (available since - FreeMarker 2.3.1): Returns the name of the current output charset. - This special variable is not existent if the framework that - encapsulates FreeMarker doesn't specify the output charset for - FreeMarker. (Programmers can read more - about charset issues here...) -
    • - -
    • - template_name: The name of the current - template (available since FreeMarker 2.3.14). -
    • - -
    • - url_escaping_charset (available - since FreeMarker 2.3.1): If exists, it stores the name of the - charset that should be used for URL escaping. If this variable - doesn't exist that means that nobody has specified what charset - should be used for URL encoding yet. In this case the url built-in - uses the charset specified by the output_encoding - special variable for URL encoding; custom mechanism may follow the - same logic. (Programmers can read more - about charset issues here...) -
    • - -
    • - vars: Expression - .vars.foo returns the same variable as expression - foo. It's useful if for some reasons you have to - use square bracket syntax, since that works only for hash - subvariables, so you need an artificial parent hash. For example, to - read a top-level variable that has a strange name that would confuse - FreeMarker, you can write - .vars["A strange name!"]. Or, to access a - top-level variable with dynamic name given with variable - varName you can write - .vars[varName]. Note that the hash returned by - .vars does not support ?keys - and ?values. -
    • - -
    • - version: Returns the FreeMarker - version number as string, for example 2.2.8. This - can be used to check which FreeMarker version does your application - use, but note that this special variable does not exist prior to the - 2.3.0 or 2.2.8 versions. The version number of non-final releases - contains dash and further info after the numbers, like in - 2.3.21-nightly_20140726T151800Z. -
    • -
    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_0.html b/fmpp/docs/freemarker/versions_2_0.html deleted file mode 100644 index 716956c..0000000 --- a/fmpp/docs/freemarker/versions_2_0.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.0 - - - - - - - - -
    - - - - - -

    -2.0

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    FreeMarker 2.0 final was released on 18 April 2002. The changes - with respect to the previous release, 2.0 RC3 are fairly minor.

    - - - - -

    -Bugfixes

    - - -
    -
      -
    • -

      There were a couple of bugs in handling null values, where - Lazarus did not do the same thing as FreeMarker Classic. - Traditionally, in FreeMarker, nulls were treated as being - equivalent to an empty string in the appropriate context. At - this point, to the best of our knowledge, there is backward - compatibility with FreeMarker Classic in this respect.

      -
    • - -
    • -

      Literal strings can now include line breaks. This was a - backward compatibility issue with FreeMarker Classic that has - been fixed.

      -
    • -
    - - - - - - -

    -Changes to the Template language

    - - -
    -
      -
    • -

      You can use the extra built-in of - myString?web_safe to convert a string to its - "web-safe" equivalent, where problematic characters such as - '<' are converted to &lt;.

      -
    • - -
    • -

      In displaying numbers with a fractional part, the - rendering apparatus now respects the decimal separator of the - template's locale, so that, for example, in continental Europe, - you would see 1,1 and in the U.S. locale, 1.1.

      -
    • -
    - - - - - - -

    -Changes to the API

    - - -
    -
      -
    • -

      The getAsString() method in the - TemplateScalarModel interface now takes a - java.util.Locale as a parameter. For the most - part, this is a hook for later use. In the default - implementation, SimpleScalar, this parameter - is unused. If you are implementing this interface yourself, your - implementation may ignore the parameter. However, it will be - appealing for certain implementations.

      -
    • - -
    • -

      The constructors of FileTemplateCache - have changed. If you are using an absolute directory on the file - system as the location of your templates, you need to pass in an - instance of java.io.File to indicate the - location. If you use the constructors that take a string, this - is taken to mean relative to the classloader classpath.

      -
    • -
    - - - - - - -

    -Miscellany

    - - -

    The ant build script build.xml now contains a target that - builds a .war file containing the Hello, World and Guestbook - examples. It builds a fmexamples.war. For example, if you are using - Tomcat in its out-of-the-box configuration, you would place this - under <TOMCAT_HOME>/webapps and then you would use - http://localhost:8080/fmexamples/servlet/hello and - http://localhost:8080/fmexamples/servlet/guestbook for the Hello, - World and Guestbook examples respectively.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_01.html b/fmpp/docs/freemarker/versions_2_01.html deleted file mode 100644 index 79425f0..0000000 --- a/fmpp/docs/freemarker/versions_2_01.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.01 - - - - - - - - -
    - - - - - -

    -2.01

    - - -

    The main improvement is in error reporting. Now exceptions are - much more informative since they come with complete line number and - column information.

    The only API change between 2.0 and 2.01 was the elimination of - the CacheListener/CacheEvent API. Now, if the updating of a template - file fails, the exception is thrown back to the caller to handle. If - you want logging to occur when a template file is updated - successfully, you can override the logFileUpdate() method in - FileTemplateCache.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_0RC1.html b/fmpp/docs/freemarker/versions_2_0RC1.html deleted file mode 100644 index f52d69e..0000000 --- a/fmpp/docs/freemarker/versions_2_0RC1.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.0 RC1 - - - - - - - - -
    - - - - - -

    -2.0 RC1

    - - - - -

    The first public release of FreeMarker 2.0 was on 18 March 2002. - Here is a summary of the changes in the Lazarus release, with respect - to the last stable release of FreeMarker Classic.

    NOTA BENE:

    Despite the changes delineated above, the Lazarus release is - almost entirely backward-compatible with FreeMarker Classic. We - believe that most existing code and templates - that work under FreeMarker Classic will continue working under - Lazarus, with at most minimal changes. In practice, the most common - cases where legacy template code is broken will be where assumptions - were made about numbers and strings being equivalent. Note that in - FreeMarker 2, 2 + 2 does not result in "22". The String "1" and the - number 1 are entirely different animals and thus, any code will be - broken if it relies on the boolean expression ("1"==1) being true. - There is a "classic compatibility mode" that can be set via: - Template.setClassCompatibility() that can be set so - that Lazarus emulates some of the quirky behavior of FreeMarker - Classic. However, any code that relied on the above "features" of - FreeMarker classic really should be reworked. You are less likely to - run into the other incompatibilities that are listed above. If you - come across any other anomalies, please do tell us about them.

    - - - - -

    -Support for Numerical operations, both arithmetic and - boolean, as well as numerical ranges.

    - - -
    -
      -
    • -

      Scalars can now be either strings or numbers. (In - FreeMarker Classic all scalars were strings.) The basic - operations allowed are addition, subtraction, multiplication, - division, and modulus using the +, - -, *, - /, and % operators - respectively. Arbitrary-precision arithmetic with integers and - floating point numbers are provided. Though our goal is - definitely to follow the principle of least surprise, for - backward compatibility, the + operator still - is used for string concatenation. If either the left hand side - or the right hand side of lhs + rhs is - non-numerical, we revert to interpreting this as string - concatenation. Thus, in FreeMarker 2, 2+2 evaluates to the - number 4, while any of "2"+2 or 2+"2" or "2"+"2" evaluate to the - string "22". In FreeMarker Classic, rather embarrassingly, all - of the above, including 2+2, evaluated to the string "22". An - attempt to use any other arithmetic operator besides the - + with non-numerical operands will cause an - exception to be thrown.

      -
    • - -
    • -

      Output of a numerical expression can be made explicit via - the alternative #{....} syntax. If the - expression within the curly parentheses does not evaluate to a - numerical value, an exception is thrown. The older ${....} - syntax can evaluate to either a number or a string. In general, - if, for logical reasons, the output must be - numerical, it is preferable to use the #{...} syntax, since it - adds an extra sanity check. Note that if, by some miracle, the - character sequence "#{" occurs in your template, you will have - to use a workaround to prevent problems. (The <noparse> - directive is one possibility.)

      -
    • - -
    • -

      In this release, there is a facility for specifying the - number of digits to show after the decimal point. The following - code specifies to show at least 3 digits after the decimal point - but not more than 6. This is optional. This option is only - available if you use the #{...} syntax.

      - -
      -
      -#{foo + bar ; m3M6}    
      - - -

      (Note that the above is something of a stopgap measure. - Future releases will move toward supporting fully - internationalization and localization of number and currency - formatting.

      -
    • - -
    • -

      Numerical expressions can be used in boolean expressions - via the comparison operators: lt, - gt, lte, and - gte. In the web space, where FreeMarker is - most used in practice, using the more natural operators such as - < and > would tend to confuse HTML-oriented editors. An - attempt to compare non-numerical expressions using these - operators leads to a TemplateException being - thrown. If, by some coincidence, you have variables named "lt", - "gt", "lte", or "gte", you will have to change their names, - since they are now keywords in the language.

      -
    • - -
    • -

      Numerical ranges are supported.

      - -
      -
      -<#list 1990..2001 as year>
      -  blah blah in the year ${year} blah
      -</#list>   
      - - -

      The left hand and right hand sides of the - .. operator must be numerical, or an - exception is thrown. They also need not be literal numbers, but - can be more complex expressions that evaluate to a numerical - scalar value. Note that it is also possible to write a range - that descends in value:

      - -
      -
      -<#list 2001..1990 as year>
      -  blah blah in the year ${year} blah blah
      -</#list>    
      - -
    • -
    - - - - - - -

    -API Changes

    - - -
    -
      -
    • -

      The TemplateNumberModel interface and - the SimpleNumber implementation were added to - support exposing numerical values.

      -
    • - -
    • -

      The TemplateListModel API in FreeMarker - Classic had some design problems -- particularly in terms of - supporting thread-safe code. It has been deprecated in favor of - the following API's: TemplateCollectionModel - and TemplateSequenceModel. The - SimpleList class was refactored to implement - the above interfaces (and paradoxically, does not implement the - TemplateListModel interface.) Code that uses the deprecated - TemplateListModel should be - refactored.

      -
    • - -
    • -

      The Expose Package by Attila Szegedi has been made an - integral part of the FreeMarker distribution and is now under - the freemarker.ext.* hierarchy. This package provides advanced - models for representing arbitrary Java objects as template - models, for representing XML documents as template models, as - well as classes to facilitate the integration of FreeMarker with - servlets and Ant.

      -
    • - -
    • -

      In FreeMarker Classic, there were some utility classes - such as freemarker.template.utility.Addition - etcetera that existed as workarounds for the lack of numerical - operations in FreeMarker. Those have been removed and will - probably not be missed.

      -
    • - -
    • -

      In FreeMarker Classic, the SimpleScalar - object was mutable, it had a setValue method. - This was fairly obviously a design mistake. Any code that relied - on this must be refactored. Note that in this release, both - SimpleScalar and the newly introduced - SimpleNumber are both immutable and - final.

      -
    • -
    - - - - - - -

    -Syntactical Miscellany

    - - -
    -
      -
    • -

      The if-elseif-else syntax was introduced. FreeMarker - classic only had if-else. This construct should probably (in the - opinion of the author of this document -- Revusky) be used in - preference to switch-case since the switch-case with - fall-through is a notoriously error-prone construct for most - mortal men.

      -
    • - -
    • -

      You can now do a multiple assignment in one - <assign...> directive. For example: <assign x - = 1, y = price*items, message="foo">

      -
    • - -
    • -

      A scalar will no longer be interpreted as a one-item list - in a <list...> or <#foreach...> block. If you have - code that relied on this feature, there is an easy workaround, - since you can simply define a list literal with exactly one - item.

      - -
      -
      - <assign y=[x]>
      - and then...
      - <list y as item>...</list>   
      - -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_0RC2.html b/fmpp/docs/freemarker/versions_2_0RC2.html deleted file mode 100644 index caca49d..0000000 --- a/fmpp/docs/freemarker/versions_2_0RC2.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.0 RC2 - - - - - - - - -
    - - - - - -

    -2.0 RC2

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    FreeMarker 2.0 RC 2 was released on 4 April 2002. Here is a - summary of changes wrt to the first release.

    - - - - -

    -Changes to Template Language

    - - -
    -
      -
    • -

      Certain built-in functionality is provided via a new - operator, '?'. Thus, myList?size provides the - number of elements in a list. Similarly, - myString?length provides the length of a - string, myString?upper_case puts the string - all in capital letters, and myHash?keys - provides a sequence containing the keys in the hash. See Template Language Reference/Built-in Reference for list of all available - built-ins.

      -
    • - -
    • -

      Numerical comparisons can now be made using the "natural" - operators < and > but there are also "web-safe" - alternatives, such as \lt and - \gt, since the use of these characters may - confuse HTML editors and parsers. Note that these changed - between rc1 and rc2, they now start with a backslash. A little - asymmetry is the fact that if you use the natural greater-than - or greater-than-or-equals operators (i.e. > or >=) the - expression must be in parentheses. With any other operator, the - parentheses are optional.

      -
    • - -
    • -

      Within an iteration loop -- i.e. a - foreach or a list block -- - the current count in the loop is available as the special - variable - index_count. where - index is the name of the variable in - the iteration. A boolean variable called - index_has_next is - also defined that indicates whether there are any more items in - the iteration after this one. Note that the index starts at - zero, so you will often be adding one to it in practice.

      -
    • - -
    • -

      The <#break> directive can now be - used to break out of a <#foreach...> or - a <list...> loop. (Prior to this - version, it only worked within a switch-case block.) There is a - new directive called <#stop> that, when - encountered, simply halts processing of the template. This can - be useful for debugging purposes.

      -
    • - -
    • -

      When invoking java methods that have been exposed to the - page, using the code in freemarker.ext.*, there are built-ins - that allow you to indicate the numerical type that you wish to - pass as the value. For instance, if you had two methods, one - that takes an int and another that takes a long, and you wanted - to pass in a value, you would have to specify which method. - myMethod(1?int) or - myMethod(1?long). This is unnecessary if - there is only one method of the given name.

      -
    • - -
    • -

      Ranges can be used to get the sublist from a list or the - substring of a string. For example: - myList[0..3] will return items 0 through 3 of - the list in question. Or, for example, you could get all the - elements of the list except for the first and last ones via: - myList[1..(myList?size-2)]

      -
    • - -
    • -

      Or we could get the first 6 characters of a string via - myString[0..5]

      -
    • - -
    • -

      Lists can be concatenated using the '+' operator. - Previously, this overloading of '+' only applied to - strings.

      -
    • - -
    • -

      An attempt to compare a number to a string now throws an - exception, since it is indicative of a coding error. Note that - there is a backward compatibility mode that can be set (see - below) that loosens this up in order to be able to process - legacy templates.

      -
    • -
    - - - - - - -

    -API Changes

    - - -
    -
      -
    • -

      The TemplateSequenceModel interface now - has a size() method for getting the number of - elements in the sequence in question.

      -
    • - -
    • -

      The TemplateModelIterator interface now - has a hasNext() method.

      -
    • - -
    • -

      The default sequence and hash implementations, - freemarker.template.SimpleSequence and - freemarker.template.SimpleHash are now - unsynchronized. If you need the methods to be synchronized, you - can get a synchronized wrapper via the - synchronizedWrapper() in either class.

      -
    • - -
    • -

      The freemarker.utility.ExtendedList and - freemarker.utility.ExtendedHash classes were - removed, since all of the extra keys that it defined are now - available using the appropriate '?' built-in operation, i.e. - myHash?keys or myList?size - or myList?last.

      -
    • - -
    • -

      There is a method in - java.freemarker.Configuration named - setDebugMode() which allows you to decide - whether stack traces are simply output to the web client (the - best situation in development) or thrown back to the caller to - be handled more gracefully (the best situation in - production).

      -
    • - -
    • -

      There is a flag that can be set to turn on a processing - mode that is more backward-compatible with FreeMarker Classic. - This is off by default, but you can set it via - Template.setClassicCompatibility(true). What - this does is that it allows scalars to be treated as a - single-item list in a list directive. Also, it allows somewhat - more looseness about types. In FreeMarker 1.x, <#if - x=="1"> and <#if x==1> - were in fact equivalent. This meant that legacy templates might - tend to be slack about this. If classic compatibility is not - set, an attempt to compare the string "1" with the number 1 will - result in an exception being thrown. (Note that it is preferable - to get your templates working without the backward compatibility - flag, since it usually will require only minor changes. However, - for people with a lot of templates and no time to check over - them, this flag may be of use.)

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_0RC3.html b/fmpp/docs/freemarker/versions_2_0RC3.html deleted file mode 100644 index 633649e..0000000 --- a/fmpp/docs/freemarker/versions_2_0RC3.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.0 RC3 - - - - - - - - -
    - - - - - -

    -2.0 RC3

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    FreeMarker 2.0 RC3 was released on 11 April 2002. This release - was primarily devoted to fixing bugs that were reported in RC2.

    - - - - -

    -Bug Fixes

    - - -
    -
      -
    • -

      Variables defined in an <include...> were not - available in the enclosing page. This has been fixed.

      -
    • - -
    • -

      The JavaCC parser was not configured to handle Unicode - input correctly. Now, Unicode support is working.

      -
    • - -
    • -

      There was a bug when comparing a number with null. It - should have returned false, but threw an exception instead. This - has been fixed.

      -
    • -
    - - - - - - -

    -Changes to the Template Language

    - - -
    -
      -
    • -

      The syntax of the include directive has changed. To - indicate an unparsed include file, you do as follows:

      - -
      -
      -<include "included.html" ; parsed="n" >  
      - - -

      You can also indicate the encoding of the included file - this way:

      - -
      -
      - <include "included.html" ; encoding="ISO-8859-5">  
      - -
    • - -
    • -

      The built-in myString?trim was added for trimming the - leading and trailing white-space from strings.

      -
    • -
    - - - - - - -

    -API changes

    - - -
    -
      -
    • -

      The TemplateEventAdapter machinery was taken out. This was - never set up in a very useful manner and we anticipate that - version 2.1 will have more complete support for logging - events.

      -
    • - -
    • -

      The template caching mechanism was streamlined and - simplified.

      -
    • - -
    • -

      The FileTemplateCache can now be configured to load files - relative to a class loader, using the Class.getResource() call. - This allows templates to be bundled up in .jar files or in a - .war file for easy deployment of web-based apps.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_1.html b/fmpp/docs/freemarker/versions_2_1.html deleted file mode 100644 index 3ecf732..0000000 --- a/fmpp/docs/freemarker/versions_2_1.html +++ /dev/null @@ -1,618 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.1 - - - - - - - - -
    - - - - - -

    -2.1

    - - - - -

    Date of release: 2002-10-17

    Templates and the Java API are not fully - compatible with 2.0 releases. You will need to revisit existing code - and templates, or use 2.1 for new projects only. Sorry for this - inconvenience; FreeMarker has undergone some revolutionary changes - since the 1.x series. We hope things will soon be sufficiently mature - for us to offer (almost) backward-compatible releases. Note that there - is a backward-compatibility flag that can be set via - Configuration.setClassicCompatible(true) that - causes the new FreeMarker to emulate most of FreeMarker 1.x's - quirks.

    - - - - -

    -Changes in FTL (FreeMarker Template Language)

    - - -
    -
      -
    • -

      More strict, reveals accidental mistakes in the templates, - prevents showing incorrect information when something went - wrong:

      - -
      -
        -
      • -

        An attempt to access an undefined variable causes an - error and aborts template processing (by default at least; - see later). In earlier versions undefined variables were - silently treated as empty (zero-length) strings. However, - you can handle undefined variables in the template with some - new built-ins. For example, - ${foo?if_exists} is equivalent with the - ${foo} of earlier versions. Another way - of looking at this is that null values no longer exist from - the viewpoint of a template designer. Anything referenced - must be a defined variable.

        - -

        Note however that the programmer can configure - FreeMarker so that it ignores certain errors (say, undefined - variables), and continues template processing by skipping - the problematic part. This ``loose'' policy should be used - only for sites that don't show critical information.

        -
      • - -
      • -

        New variable type: boolean. Conditions in - if/elseif and operands - of logical operators (&&, - ||, !) must be - booleans. Empty strings are no longer treated as a logical - false.

        -
      • -
      - -
    • - -
    • -

      Local and global variables. More info: Template Author's Guide/Miscellaneous/Defining variables in the template

      - -
      -
        -
      • -

        Local variables for macros. You can create/replace - local variables in macro definition bodies with the local - directive

        -
      • - -
      • -

        You can create/replace global (non-local) variables - with the global - directive

        -
      • -
      - -
    • - -
    • -

      The include - directive now by default treats the passed filename as being - relative to the including template's path. To specify absolute - template paths, you now have to prepend them with a - slash.

      -
    • - -
    • -

      The include - directive can now use the acquisition - algorithm (familiar from the Zope system) to look up - the template to include. Basically, if a template is not found - where it is looked up first, it is looked up in parent - directories. This is however not a default behavior, rather it - is triggered by a new syntactic element.

      -
    • - -
    • -

      Strict syntax mode: Allows you to generate arbitrary SGML - (XML) without worrying about clashes with FreeMarker directives. - For more information read: Template Language Reference/Deprecated FTL constructs/Old FTL syntax

      -
    • - -
    • -

      Terse comments: you can use <#-- - ... --> instead of - <comment>...</comment>

      -
    • - -
    • -

      Directive that you can use to change the locale (and other - settings) inside the template: setting

      -
    • - -
    • -

      Directive to explicitly flush the output buffer: flush

      -
    • - -
    • -

      The top-level (root) hash is available via the variable - root, which is now a reserved name.

      -
    • - -
    • -

      The misnamed function directive has - been renamed to macro.

      -
    • - -
    • -

      String literals support various new escape sequences, - including UNICODE escapes - (\xCODE)

      -
    • - -
    • -

      The compress - directive is now more conservative in removing line - breaks.

      -
    • - -
    • -

      Built-in to capitalize the first word: cap_first

      -
    • - -
    • -

      Built-in to generate on-the-fly templates: interpret

      -
    • - -
    • -

      stop - directive has an optional parameter to describe the reason of - termination

      -
    • - -
    • -

      Better error messages.

      -
    • - -
    • -

      New variable type: date. Date support is - experimental. It can change substantially in the future. Keep - this in mind if you use it.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      ObjectWrapper: You can put - non-TemplateModel objects directly into - hashes, sequences and collections, and they will be - automatically wrapped with the appropriate - TemplateModel implementation. The API of - objects that are exposed to templates - (SimpleXXX) has - been changed according to this, for example in - SimpleHash the old put(String key, - TemplateModel value) is now put(String key, - Object object). Also, you can pass any kind of object - as data-model to Template.process. The - alternative reflection based ObjectWrapper - can expose the members of any Java object automatically for the - designer. More information: Object wrapping, - Bean wrapper, Jython wrapper.

      -
    • - -
    • -

      The Configuration object was introduced - as a central point to hold all your FreeMarker-related global - settings, as well as commonly used variables that you want to - have available from any template. Also it encapsulates the - template cache and can be used to load templates. For more - information read Programmer's Guide/The Configuration.

      -
    • - -
    • -

      TemplateLoader: pluggable template - loader, separates caching from template loading

      -
    • - -
    • -

      TemplateNumberModel-s do not control - their formatting anymore. They just store the data (i.e. a - number). Number formatting is done by the FreeMarker core based - on the locale and - number_format settings. This logic applies to - the new experimental date type as well.

      -
    • - -
    • -

      TemplateBooleanModel introduced: Only - objects that implements this interface can be used as a boolean - in true/false conditions. More info: Programmer's Guide/The Data Model/Scalars

      -
    • - -
    • -

      TemplateDateModel introduced: objects - that implements this interface are recognized as dates and can - be locale-sensitively formatted. Date support is - experimental in FreeMarker 2.1. It can change substantially in - the future. Keep this in mind if you use it.

      -
    • - -
    • -

      The TemplateModelRoot interface was - deprecated. As of FreeMarker 2.1, you can simply use any - instance of TemplateHashModel instead. This - actually is due to a significant architectural change. Variables - set or defined in a template are stored in a separate - Environment object that only exists while the - template is being rendered. Thus, the template doesn't modify - the root hash.

      -
    • - -
    • -

      Changes to transformations

      - -
      -
        -
      • -

        Completely rewritten - TemplateTransformModel interface. More - flexible, and does not impose output holding. More - information: Programmer's Guide/The Data Model/Directives

        -
      • - -
      • -

        The transform directive now takes - an optional set of key/value pairs. <transform - myTransform; - key1=value1, - key2=value2 - ...>. More - information: transform - directive

        -
      • - -
      • -

        The transforms that ship with the FreeMarker core are - now available by default to all templates - i.e. - <transform html_escape> will invoke - the - freemarker.template.utility.HtmlEscape - transform. More information: Programmer's Guide/The Configuration/Shared variables

        -
      • -
      - -
    • - -
    • -

      User-defined TemplateModel objects now - can access the runtime environment (read and set variables, get - the current locale, etc.) using an - Environment instance, which can be obtained - by the static - Environment.getCurrentEnvironment() method. - As a result, TemplateScalarModel.getAsString - has been changed: it has no locale parameter.

      -
    • - -
    • -

      TemplateExceptionHandler-s make it - possible to define your own rules on what to do when a runtime - error occurs (e.g. accessing a non existing variable) during - template processing. For example, you can abort template - processing (recommended for most sites), or skip the problematic - statement and continue template processing (similar to old - behavior). DebugMode has been removed, use - TemplateExceptionHandler.DEBUG_HANDLER or - HTML_DEBUG_HANDLER instead.

      -
    • - -
    • -

      Logging: FreeMarker logs certain events (runtime errors - for example). For more information read Programmer's Guide/Miscellaneous/Logging.

      -
    • - -
    • -

      SimpleIterator was removed, but we - provide a TemplateCollectionModel - implementation: SimpleCollection.

      -
    • - -
    • -

      Arithmetic engine is pluggable - (Configuration.setArithmeticEngine). The core - distribution comes with two engines: - ArithmeticEngine.BIGDECIMAL_ENGINE (the - default) that converts all numbers to - BigDecimal and then operates on them, and - ArithmeticEngine.CONSERVATIVE_ENGINE that - uses (more-or-less) the widening conversions of Java language, - instead of converting everything to - BigDecimal.

      -
    • - -
    • -

      Changes to freemarker.ext.beans - package: The JavaBeans adapter layer has suffered several major - changes. First, BeansWrapper is no longer a - static utility class - you can now create instances of it, and - every instance can have its own instance caching policy and - security settings. These security settings are also new - you - can now create JavaBeans wrappers that hide methods that are - considered unsafe or inappropriate in a templating environment. - By default, you can no longer call methods like - System.exit() from the template (although you - can manually turn off these safeguards). The - StaticModel and - StaticModels classes are gone; their - functionality is now replaced with the - BeansWrapper.getStaticModels() method.

      -
    • - -
    • -

      freemarker.ext.jython package: - FreeMarker can now directly use Jython objects as data-models - using the Jython - wrapper.

      -
    • - -
    • -

      Changes to freemarker.ext.jdom package: - The package now uses the Jaxen package - instead of its predecessor, the - werken.xpath package to evaluate XPath - expressions. Since Jaxen is a successor to - werken.xpath, this can be considered to be - an upgrade. As a consequence, namespace prefixes are now - recognized in XPath expressions and the overall XPath - conformance is better.

      -
    • - -
    • -

      Better error reporting: If the processing of a template is - aborted by a TemplateException being thrown, - or using a <#stop> directive, - FreeMarker will now output an execution trace with line and - column numbers relative to the template source.

      -
    • - -
    • -

      The output is written to a simple - Writer; no more - PrintWriter. This redesign causes FreeMarker - to no longer swallow IOExceptions during - template processing.

      -
    • - -
    • -

      Various API cleanups, primarily the removing of - superfluous constructor and method overloads.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Documentation has been rewritten from scratch

      -
    • -
    - - - - - - -

    -Differences between the RC1 and final release

    - - -
    -
      -
    • -

      Added the support for date models and locale-sensitive - date formatting. Date support is experimental in - FreeMarker 2.1. It can change substantially in the future. Keep - this in mind if you use it.

      -
    • - -
    • -

      Added the default built-in which makes - it possible to specify default values for undefined - expressions.

      -
    • - -
    • -

      SimpleIterator has been removed, - SimpleCollection has been introduced

      -
    • - -
    • -

      Arithmetic engine is pluggable. The core now contains two - arithmetic engines: - ArithmeticEngine.BIGDECIMAL_ENGINE and - ArithmeticEngine.CONSERVATIVE_ENGINE.

      -
    • - -
    • -

      BeansWrapper supports a new exposure - level: EXPOSE_NOTHING

      -
    • - -
    • -

      Constants interface was removed. - ..._WRAPPER - constants have been moved from Constants to - ObjectWrapper, - EMPTY_STRING constant was moved to - TemplateScalarModel, - NOTHING constant was moved to - TemplateModel, TRUE and - FALSE constants were moved to - TemplateBooleanModel.

      -
    • - -
    • -

      JAVABEANS_WRAPPER was renamed to - BEANS_WRAPPER

      -
    • - -
    • -

      Configuration.get and - put, putAll were renamed - to getSharedVariable and - setSharedVariable, - setAllSharedVariables

      -
    • - -
    • -

      Configuration.getClassicCompatibility, - setClassicCompatibility were renamed to - isClassicCompatible, - setClassicCompatible

      -
    • - -
    • -

      Template.process method overloads with - useReflection parameter was removed. But now - we have setObjectWrapper method in the - Configuration, so you can set the preferred - root-object wrapper there.

      -
    • - -
    • -

      Some superfluous method overloads were removed; these - changes are backward compatible with RC1

      -
    • - -
    • -

      Various minor JavaDoc and Manual improvements

      -
    • - -
    • -

      Bugfix: include directive has - calculated the base path of relative paths wrongly

      -
    • - -
    • -

      Bugfix: We have accidentally used a J2SE 1.3 class, but - FreeMarker 2.1 must able to run on J2SE 1.2

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_1_1.html b/fmpp/docs/freemarker/versions_2_1_1.html deleted file mode 100644 index 284ad04..0000000 --- a/fmpp/docs/freemarker/versions_2_1_1.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.1.1 - - - - - - - - -
    - - - - - -

    -2.1.1

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2002-11-04

    - - - - -

    -Changes in FTL (FreeMarker Template Language)

    - - -
    -
      -
    • -

      Multi-type variables that are both string and number or - string and date are now output using their number or date value - instead of the string value when used in the - ${...} interpolation. This practically makes - the string part of a string/number or a string/date variables - useless.

      -
    • - -
    • -

      Bugfix: operator ``or'' (||) worked - wrongly when its left operand was a composite expression (e.g. - the second || in false || true || - false; this was evaluated to false, - but it should be true)

      -
    • - -
    • -

      Bugfix: Less-than sign inside comments confused the FTL - parser (e.g. <#-- blah < blah -->); - it commented out everything after the problematic - comment.

      -
    • - -
    • -

      Bugfix: Comparing two numerical constants (e.g. 3 - == 3) caused internal error in the FTL parser, and - aborted template processing with error.

      -
    • - -
    • -

      Experimental date/time type support was removed, since it - seems that this initial implementation was misguided. FreeMarker - 2.2 will certainly support data/time.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: Numbers wrapped with - BEANS_WRAPPER was displayed with the - toString() method of wrapped object. Now they - are rendered according to the number_format - setting, because multi-type variables that are both string and - number are now output using their number value instead of the - string value.

      -
    • - -
    • -

      Experimental date/time type support was removed, since it - seems that this initial implementation was misguided. FreeMarker - 2.2 will certainly support data/time.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_1_2.html b/fmpp/docs/freemarker/versions_2_1_2.html deleted file mode 100644 index eaf21b8..0000000 --- a/fmpp/docs/freemarker/versions_2_1_2.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.1.2 - - - - - - - - -
    - - - - - -

    -2.1.2

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2002-11-28

    - - - - -

    -Changes in FTL (FreeMarker Template Language)

    - - -
    -
      -
    • -

      FreeMarkerServlet now has a setting for - the Content-Type header of the response, - defaulting to text/html. Previously it set no - content type, which made it not play nicely when integrated with - software that expected it (i.e. OpenSymphony SiteMesh).

      -
    • - -
    • -

      FreeMarkerServlet now works correctly - when mapped to an URL extension instead of URL path - prefix.

      -
    • - -
    • -

      You can emulate include directive call - within Java code by calling - Environment.include(templateName, - charset, - parse).

      -
    • -
    - - -
    -
      -
    • -

      Bugfix: When Template.process() was - called from another template processing, it set - currentEnvironment to null when it returned, - thus crashed the parent template processing.

      -
    • - -
    • -

      Bugfix: the _descendant key in JDOM - support incorrectly left the document root element out of the - result when applied to a Document node.

      -
    • - -
    • -

      Bugfix: because we incorrectly assumed certain behavior of - JDK 1.4 Beans introspector, calls to public interface methods on - non-public classes that implement the interface were causing - exceptions on JDK 1.4

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Various minor supplements to the manual.

      -
    • - -
    • -

      Documentation HTML pages don't try to load the SourceForge - logo from the Internet anymore.

      -
    • - -
    • -

      The default ant target is jar, not - dist.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_1_3.html b/fmpp/docs/freemarker/versions_2_1_3.html deleted file mode 100644 index 4679edf..0000000 --- a/fmpp/docs/freemarker/versions_2_1_3.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.1.3 - - - - - - - - -
    - - - - - -

    -2.1.3

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2002-12-09

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Bugfix: cap_first built-in did what - double built-in does.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      The official extension of FreeMarker template files is - ftl from now, not fm. - (This is the name of the template language; FTL, for FreeMarker - Template Language.) Of course you can use any extensions, since - FreeMarker does not deal with the file extension. But we - recommend ftl extension as default.

      -
    • - -
    • -

      Web application examples got tweaked again, as under JDK - 1.4 a class in an explicit (named) package can no longer import - classes from the default (unnamed) package. Our webapp example - was using classes in the default package, they are now moved - into named packages.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_1_4.html b/fmpp/docs/freemarker/versions_2_1_4.html deleted file mode 100644 index 8743fdc..0000000 --- a/fmpp/docs/freemarker/versions_2_1_4.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.1.4 - - - - - - - - -
    - - - - - -

    -2.1.4

    - - -

    Date of release: 2002-12-26

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: Log4J is now found when automatically discovering - the logging library to use.

      -
    • - -
    • -

      Bugfix: An exception is no longer thrown in the static - initializer of the Configuration if the - directory specified in the "user.dir" system - property is not readable.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_1_5.html b/fmpp/docs/freemarker/versions_2_1_5.html deleted file mode 100644 index 09aaf98..0000000 --- a/fmpp/docs/freemarker/versions_2_1_5.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.1.5 - - - - - - - - -
    - - - - - -

    -2.1.5

    - - -

    Date of release: 2003-02-08

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: Fixed a bug that forced the cache to frequently - reload templates accessed through URL and multi template - loaders: Templates loaded with - URLTemplateLoader subclasses and - MultiTemplateLoader was removed from the - template cache after the template update delay has elapsed (5 - seconds by default) even if the template file was unchanged. - This can cause lot of extra load for a high-traffic server if - you have many templates or if the template update delay was set - to 0 second.)

      -
    • - -
    • -

      Bugfix: Many anomalies in the - JythonWrapper were resolved, making the - integration with Jython much smoother: Jython wrapper can now - wrap arbitrary Java objects, not only - PyObject-s. If an object is passed to the - wrapper that is neither a TemplateModel, nor - a PyObject, it is first coerced into a - PyObject using Jython's own wrapping - machinery, and then wrapped into a - TemplateModel as any other - PyObject.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2.html b/fmpp/docs/freemarker/versions_2_2.html deleted file mode 100644 index f07289e..0000000 --- a/fmpp/docs/freemarker/versions_2_2.html +++ /dev/null @@ -1,1221 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2 - - - - - - - - -
    - - - - - -

    -2.2

    - - - - -

    Date of release: 2003-03-27

    This release introduces some really important new features. - Unfortunately, evolution was painful again; we have a few non-backward - compatible changes (see below). Also, for those of you awaiting - desired native date/time type, sorry, it is still not here (because of - some internal chaos in the team... stand by, it's coming).

    - - - - -

    -Non backward-compatible changes!

    - - -
    -
      -
    • -

      Macros are now plain variables. This means that if you are - unlucky and you have both a macro and another variable with the - same name, now the variable will overwrite the macro, so your - old template will malfunction. If you have a collection of - common macros, you should use the new namespace feature to - prevent accidental clashes with the variables used in the - templates.

      -
    • - -
    • -

      With the introduction of the new namespace support, - global and assign - directives are no longer synonyms. assign - creates a variable in the current namespace, - while global creates variable that is visible - from all namespaces (as if the variable would be in the - data-model). Thus, the variable created with - assign is more specific, and hides the - variable of the same name created with - global. As a result, if you use both - global and assign mixed - for the same variable in your templates, now they will - malfunction. The solution is to search-and-replace all - globals in your old templates with - assign.

      -
    • - -
    • -

      The reserved hash root no longer exists - as a predefined variable (we no longer have reserved variables). - Use special - variable expressions to achieve similar effects. However, - we have no equivalent replacement for root - because of the changes in the variable scopes caused by the - introduction of namespaces. You may should use - .globals or - .namespace.

      -
    • - -
    • -

      The BeansWrapper no longer exposes - native Java arrays, booleans, numbers, enumerations, iterators, - and resource bundles as TemplateScalarModel. - This way, number objects wrapped through - BeansWrapper are subject to FreeMarker's - number formatting machinery. Also, booleans can be formatted - using the ?string built-in.

      -
    • - -
    • -

      The signature of - Configuration.setServletContextForTemplateLoading - has been changed: the first parameter is now - Object instead of - javax.servlet.ServletContext. Thus, you have - to recompile your classes that call this method. The change was - required to prevent class-loading failure when - javax.servlet classes are not available and - you would not call this method.

      -
    • - -
    • -

      This release introduces a parse-time white-space - remover that strips some of the typical superfluous - white-space around FreeMarker tags and comments. This - feature is on by default! Most probably this will not - cause problems if you generate white-space neutral output like - HTML. But if it does cause undesirable reformatting in output - you generate, you can disable it with - config.setWhitespaceStripping(false). Also, - you can enable/disable it on a per-template basis with the new - ftl - directive.

      -
    • - -
    • -

      Some new directives were introduced: - nested, import, - escape, noescape, - t, rt, - lt. This means that if you are unlucky and - the text of your template contains something like - <nested>, then that will be - misinterpreted as a directive. To prevent this kind of problem - in the future, we recommend everybody to switch from the old - syntax to the new syntax (``strict syntax''). The strict syntax - will be the the default syntax starting from some of the later - releases anyway. We plan to release a conversion tool for - converting old templates. For more information please read: - Template Language Reference/Deprecated FTL constructs/Old FTL syntax

      -
    • - -
    • -

      The data-model created by the - FreemarkerServlet now uses automatic scope - discovery, so writing - Application.attrName, - Session.attrName, - Request.attrName - is no longer mandatory; it's enough to write - attrName (for more - information read - this). This may break an old template if that rely on the - non-existence of certain top-level variables.

      -
    • - -
    • -

      FreemarkerServlet now uses the encoding - of the template file for the output, unless you specify the - encoding in the ContentType init-param, such - as text/html; charset=UTF-8.

      -
    • - -
    • -

      The format of template paths is now more restricted than - before. The path must not use /, - ./ and ../ and - :// with other meaning as they have in URL - paths (or in UN*X paths). The characters * - and ? are reserved. Also, the template loader - must not want paths starting with /. For more - information please read: Programmer's Guide/The Configuration/Template loading

      -
    • - -
    • -

      Till now - TemplateTransformModel.getWriter has received - null as parameter map if the transform was called without - parameters. From now, it will receive an empty Map instead. Note - that the previous API documentation didn't state that it always - receives null if there are no parameters, so hopelessly only - very few classes exploit this design mistake.

      -
    • -
    - - - - - - -

    -Changes in FTL (FreeMarker Template Language)

    - - -
    -
      -
    • -

      User-defined directives: Transform and macro call syntax - has been unified; they can be called in the same way, as - user-defined directives. This also means that macros support - named parameters and nested content (like the -- now deprecated - -- transform directive did). For example, if - you have a macro called sect, you may call it - via <@sect title="Blah" style="modern">Blah - blah...</@sect>. For more information read: - Template Author's Guide/Miscellaneous/Defining your own directives

      -
    • - -
    • -

      Macros are now plain variables. This significantly - simplifies FreeMarker semantics, while providing more - flexibility; for example you can pass macros as parameters to - other macros and transforms. As for the problem of clashing - commonly-used-macro and variable names, we provide a more - powerful solution: namespaces.

      -
    • - -
    • -

      Namespaces: Names-spaces are invaluable if you want to - assemble collections (``libraries'') of macros and transforms - (and other variables), and then use them in any template without - worrying about accidental name clashes with the application - specific and temporary variables, or with the variables of other - collections you want to use in the same template. This is - extremely important if FreeMarker users want to share their - macro/transform collections. For more information read: Template Author's Guide/Miscellaneous/Namespaces

      -
    • - -
    • -

      With the introduction of namespaces our variable related - terminology changed. As a result, assign is - no longer synonymous with global. The - assign directive has been undeprecated, and - should be used instead of global almost - everywhere. In the new approach assign - creates variables in the current namespace, while - global creates a variable that is visible - from all namespaces (as if the variable were in the root of the - data-model). A variable created with assign - in the current namespace hides the variable of the same name - that was created with global.

      -
    • - -
    • -

      ftl directive: With this directive you - can give information about the template for FreeMarker, like the - encoding (charset) of the template, the used FTL syntax variant, - etc. Also, this directive helps you to write templates that are - less dependent on FreeMarker configuration settings, also it - helps third-party tools to identify and correctly parse - FreeMarker templates. For more information see: ftl - directive

      -
    • - -
    • -

      White-space stripping: FreeMarker now automatically - removes some of the typical superfluous white-spaces around - FreeMarker tags and comments, like the indentation spaces - before- and line-break after <#if ...> - tags. For more information read: Template Author's Guide/Miscellaneous/White-space handling/White-space stripping

      -
    • - -
    • -

      New directive to apply a common ("escaping") expression to - all interpolations in a block: escape. - The name comes from the common usage of this directive for - automatic HTML-escaping of interpolations.

      -
    • - -
    • -

      The new and preferred way of number formatting with - string built-in is - foo?string(format), instead of the less - natural foo?string[format].

      -
    • - -
    • -

      The string built-in works for boolean - values. For example: ${spamFilter?string("enabled", - "disabled")}. For more information read the - reference.

      -
    • - -
    • -

      The default strings for outputting boolean value using the - string built-in can be set using the - boolean_format setting.

      -
    • - -
    • -

      Comments can be placed inside FTL tags and interpolations. - For example: <#assign <#-- a comment --> x = - 3>

      -
    • - -
    • -

      All letters and numbers are enabled in variable names, - also $ is allowed (as in Java programming - language). Thus you can use accents, Arabic letters, Chinese - letters, etc.

      -
    • - -
    • -

      String literals can be quoted with apostrophe-quote. - "foo" and 'foo' are - equivalent.

      -
    • - -
    • -

      New string - built-ins: index_of, - last_index_of, - starts_with, ends_with, - replace, split, - chop_linebreak, - uncap_first.

      -
    • - -
    • -

      New sequence - built-ins: sort, - sort_by.

      -
    • - -
    • -

      New built-ins for experts to check the type of a variable. - See: is_... - built-ins

      -
    • - -
    • -

      New built-in for experts to create a variable of certain - Java TemplateModel implementation. See: new - built-in

      -
    • - -
    • -

      New built-in, namespace, - to get the namespace of a macro.

      -
    • - -
    • -

      New expression type: special variable expression. To - prevent backward compatibility problems when we introduce new - predefined variables, from now special variable - expressions are used to access them.

      -
    • - -
    • -

      New directives: t, - rt and lt directives allow - you to do explicit white-space removal in extreme FTL - applications. For more information read the reference.

      -
    • - -
    • -

      assign, local and - global now can capture the output generated - be the nested template fragment into the variable. This - deprecates capture_output transform. More - information: assign - directive reference

      -
    • - -
    • -

      Bulk assignments (as <#assign x=1, y=2, - z=3>) no longer need colon to separate the - assignments (as <#assign x=1 y=2 z=3>), - although it is still allowed to preserve backward - compatibility.

      -
    • - -
    • -

      Path that contains //: is considered as - absolute path.

      -
    • - -
    • -

      include and - transform directives no longer need a - semicolon to separate the template or transform name from the - parameter list, although it is still allowed to preserve - backward compatibility.

      -
    • - -
    • -

      #-less tag syntax is deprecated (but - still working). That is, you should write - <#directive - ...> instead of - <directive - ...>, and - </#directive - ...> instead of - </directive - ...>. For more info read: Template Language Reference/Deprecated FTL constructs/Old FTL syntax

      -
    • - -
    • -

      foreach is depreciated (but still - working). Use list - instead.

      -
    • - -
    • -

      Bugfix: Undefined variables in hash and sequence - constructors (as [a, b, c]) didn't caused - errors.

      -
    • - -
    • -

      Bugfix: String concatenation had performance problem if - there was multiple concatenations chained, as: - "a"+x+"a"+x+"a"+x+"a"+x+"a"+x.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Arbitrary JSP custom tags can be used as FreeMarker - transforms in FreemarkerServlet-driven - templates. More information: Programmer's Guide/Miscellaneous/Using FreeMarker with servlets

      -
    • - -
    • -

      Various improvements for - BeansWrapper:

      - -
      -
        -
      • -

        The BeansWrapper no longer exposes - arbitrary objects as - TemplateScalarModels, only - java.lang.String and - Character objects. This way, number - objects wrapped through BeansWrapper are - subject to FreeMarker's number formatting machinery. As a - side effect, non-string and non-number objects that were - previously accepted in equality and inequality operations - (because they had a string representation) will now cause - the engine to throw exception on comparison attempt.

        -
      • - -
      • -

        java.lang.Character objects are - exposed as scalars through - BeansWrapper.

        -
      • - -
      • -

        Experimental feature: With the - setSimpleMapWrapper method of - BeansWrapper you can configure it to wrap - java.util.Map-s as - TemplateHashModelEx-s, and do not expose - the methods of the object.

        -
      • -
      - -
    • - -
    • -

      TransformControl interface (was - experimental earlier): If the Writer returned - by TemplateTransformModel.getWriter - implements this interface, it can instruct the engine to skip or - to repeat evaluation of the nested content, and gets notified - about exceptions that are thrown during the nested content - evaluation. Note that the onStart and - afterBody methods now are allowed to throw - IOException. For more information please read - the API documentation.

      -
    • - -
    • -

      Localized lookup can be disabled with the new - Configuration methods: - set/getLocalizedLookup, - clearTemplateCache

      -
    • - -
    • -

      The new interface - freemarker.cache.CacheStorage allows users to - plug custom template caching strategies with the - cache_storage setting. The core package now - ships with two implementations: - SoftCacheStorage and - StrongCacheStorage. For more information - read: Programmer's Guide/The Configuration/Template loading

      -
    • - -
    • -

      You can set settings with string name and string value - with the new setSetting(String key, String - value) method of Configurable - super-classes (as Configuration). Also you - can load settings from .properties file with - the setSettings method.

      -
    • - -
    • -

      Other new Configuration methods: - clearTemplateCache, - clearSharedVariables, - getTemplateLoader, and - clone.

      -
    • - -
    • -

      Changes to TemplateTransformModel - interface: getWriter can throw - IOException, and can return - null if the transform does not support body - content.

      -
    • - -
    • -

      Till now - TemplateTransformModel.getWriter has received - null as parameter map if the transform was called without - parameters. From now, it will receive an empty Map instead. Note - that the previous API documentation didn't state that it always - receives null if there are no parameters, so hopelessly only - very few classes exploit this design mistake.

      -
    • - -
    • -

      Various improvements for - FreemarkerServlet:

      - -
      -
        -
      • -

        The data-model now uses automatic scope discovery, so - writing - Application.attrName, - Session.attrName, - Request.attrName - is no longer mandatory; it's enough to write - attrName. For - more information read this.

        -
      • - -
      • -

        FreemarkerServlet now uses the - encoding of the template file for the output, unless you - specify the encoding in the ContentType - init-param, such as text/html; - charset=UTF-8.

        -
      • - -
      • -

        All Configuration level settings - can by set with Servlet init-params - (template_exception_handler, - locale, number_format, - etc.).

        -
      • - -
      • -

        The object wrapper the servlet internally uses is now - set as the default object wrapper for its - Configuration instance.

        -
      • - -
      • -

        It no longer forces session creation for requests that - don't belong to an existing session, improving - scalability.

        -
      • -
      - -
    • - -
    • -

      JDOM independent XML-wrapping: - freemarker.ext.xml.NodeListModel is a - re-implementation of - freemarker.ext.jdom.NodeListModel that does - not rely on JDOM; you don't need JDOM .jar anymore. The new - NodeListModel automatically uses W3C DOM, - dom4j, or JDOM, depending on which library is available (that - is, depending on what object do you pass to its - constructor).

      -
    • - -
    • -

      Bugfix: WebappTemplateLoader: Template - updating didn't worked correctly with Tomcat due the caching of - resources. Now WebappTemplateLoader tries to - access the resources directly as File, if it - is possible, thus bypasses the caching.

      -
    • - -
    • -

      Various bug-fixes for - FreemarkerServlet:

      - -
      -
        -
      • -

        The servlet now loads the correct template if it was - called through - RequestDispatcher.include.

        -
      • - -
      • -

        The caching of HttpServletRequest - objects is now compliant with the servlet - specification.

        -
      • - -
      • -

        TemplateExceptions was suppressed - in certain situations resulting in half-rendered pages - without error message.

        -
      • -
      - -
    • - -
    • -

      Bugfix: FreeMarker didn't work if the - javax.servlet classes was not available, - because Configuration explicitly referred to - javax.servlet.ServletContext.

      -
    • - -
    • -

      Bugfix: classes may were not found if they was available - only in the WEB-INF, and FreeMarker tried to - load the class dynamically.

      -
    • - -
    • -

      Bugfix: the Template constructor (and - thus Configuration.getTemplate) sometimes - threw TokenMgrError (a non-checked exception) - instead of ParseException.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      The Web application related examples has been - replaced.

      -
    • -
    - - - - - - -

    -The history of the releases before the final version

    - - - - - - - -

    -Differences between the final and RC2 releases

    - - -
    -
      -
    • -

      You can load settings from - .properties file with the - setSettings method of - Configuration and other - Configurable subclasses.

      -
    • - -
    • -

      New string built-in: - uncap_first

      -
    • - -
    • -

      Bugfix: When exposing an XML document to a template and - accessing it with XPath using Jaxen a - ClassCastException has occurred.

      -
    • - -
    • -

      Bugfix: The template cache has loaded templates with bad - Configuration instance in certain - situations if you use not the static default - Configuration instance.

      -
    • -
    - - - - - - - - -

    -Differences between the RC2 and RC1 releases

    - - -
    -
      -
    • -

      Non backward compatible change!: - FreemarkerServlet now uses the encoding of - the template file for the output, unless you specify the - encoding in the ContentType init-param, - such as text/html; charset=UTF-8.

      -
    • - -
    • -

      Non backward compatible change compared to RC1!: The - capture_output transform creates variable - in the current namespace (as assign - directive) with the var parameter, not a - global variable.

      -
    • - -
    • -

      The new and preferred way of number formatting with - string built-in is - foo?string(format), instead of the less - natural foo?string[format].

      -
    • - -
    • -

      The string built-in works for boolean - values. For example: ${spamFilter?string("enabled", - "disabled")}. For more information read the - reference.

      -
    • - -
    • -

      The default strings for outputting boolean value using - the string built-in can be set using the - boolean_format setting.

      -
    • - -
    • -

      String literals can be quoted with apostrophe-quote. - "foo" and 'foo' are - equivalent.

      -
    • - -
    • -

      The new interface - freemarker.cache.CacheStorage allows users - to plug custom template caching strategies with the - cache_storage setting. The core package now - ships with two implementations: - SoftCacheStorage and - StrongCacheStorage. For more information - read: Programmer's Guide/The Configuration/Template loading

      -
    • - -
    • -

      You can set settings with string name and string value - with the new setSetting(String key, String - value) method of Configurable - super-classes (as Configuration).

      -
    • - -
    • -

      Other new Configuration methods: - getTemplateLoader, - clone.

      -
    • - -
    • -

      assign, local and - global now can capture the output generated - be the nested template fragment into the variable. This - deprecates capture_output transform. More - information: assign - directive reference

      -
    • - -
    • -

      Other new Configuration methods: - getTemplateLoader, - clone.

      -
    • - -
    • -

      Changes to TemplateTransformModel - interface: getWriter can throw - IOException, and can return - null if the transform does not support body - content.

      -
    • - -
    • -

      Till now - TemplateTransformModel.getWriter has - received null as parameter map if the transform was called - without parameters. From now, it will receive an empty Map - instead. Note that the previous API documentation didn't state - that it always receives null if there are no parameters, so - hopelessly only very few classes exploit this design - mistake.

      -
    • - -
    • -

      Changes to TemplateControl interface: - onStart and afterBody - methods are now allowed to throw - IOException.

      -
    • - -
    • -

      Path that contains //: is considered - as absolute path.

      -
    • - -
    • -

      New string - built-ins: index_of, - last_index_of, - starts_with, ends_with, - replace, split, - chop_linebreak.

      -
    • - -
    • -

      New sequence - built-ins: sort, - sort_by.

      -
    • - -
    • -

      All Configuration level settings can - by set with Servlet init-params - (template_exception_handler, - locale, number_format, - etc.).

      -
    • - -
    • -

      Bugfix: classes may were not found if they was available - only in the WEB-INF, and FreeMarker tried - to load the class dynamically.

      -
    • - -
    • -

      Bugfix: setLocalizedLookup(false) of - Configuration was overridden when you have - called setTemplateLoader.

      -
    • - -
    • -

      Bugfix: String concatenation had performance problem if - there was multiple concatenations chained, as: - "a"+x+"a"+x+"a"+x+"a"+x+"a"+x.

      -
    • - -
    • -

      Bugfix: white-space stripping was not worked with tags - spanning over multiple lines.

      -
    • - -
    • -

      Bugfix: Removing several dependencies on JDK 1.3, so - FreeMarker can be build for JDK 1.2.2.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 2 and RC1 releases

    - - -
    -
      -
    • -

      ftl is now stricter, and does not - allow custom parameters. To associate custom attributes to - templates, we may add a new directive later, if there is a - demand for it.

      -
    • - -
    • -

      escape directive does not affect - numerical interpolations - (#{...}) - anymore, as it has caused errors with string escapes as - ?html.

      -
    • - -
    • -

      The normalizeName method of - freemarker.cache.TemplateLoader has been - removed, because it has caused too many complications. - Instead, normalization happens on a single point in the - TempateCache. In consequence, FreeMarker is - now stricter about the format of template paths, as things - like /../ are interpreted by the - core.

      -
    • - -
    • -

      Experimental feature: With the - setSimpleMapWrapper method of - BeansWrapper you can configure it to wrap - java.util.Map-s as - TemplateHashModelEx-s, and do not expose - the methods of the object.

      -
    • - -
    • -

      New Configuration methods: - set/getLocalizedLookup, - clearTemplateCache, - clearSharedVariables.

      -
    • - -
    • -

      More cleanups in the Environment - API.

      -
    • - -
    • -

      Better JSP standard compliance: JSP page-scope variables - are the global variables that were created in the template - (not the variables of the data-model).

      -
    • - -
    • -

      JDOM independent XML-wrapping: - freemarker.ext.xml.NodeListModel is a - re-implementation of - freemarker.ext.jdom.NodeListModel that does - not rely on JDOM; you don't need JDOM .jar anymore. The new - NodeListModel automatically uses W3C DOM, - dom4j, or JDOM, depending on which library is available (that - is, depending on what object do you pass to its - constructor).

      -
    • - -
    • -

      Bugfix: WebappTemplateLoader: - Template updating didn't worked correctly with Tomcat due the - caching of resources. Now - WebappTemplateLoader tries to access the - resources directly as File, if it is - possible, thus bypasses the caching.

      -
    • - -
    • -

      Bugfix: Templates loaded with - MultiTemplateLoader subclasses was removed - from the template cache after the template update delay has - elapsed (5 seconds by default) even if the template file was - unchanged. This can cause lot of extra load for a high-traffic - server if you have many templates or if the template update - delay was set to 0 second.

      -
    • - -
    • -

      Bugfix: Undefined variables in hash and sequence - constructors (as [a, b, c]) didn't caused - errors.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 1 and Preview 2 - releases

    - - -
    -
      -
    • -

      All 16-bit Unicode letters and numbers are allowed in - identifiers, as well as the $ character (as - in Java programming language). Thus you can use accented - letters, Arabic letters, Chinese letters, etc. as identifiers - in templates

      -
    • - -
    • -

      Macros now can create loop variables for the nested - content. For more information read - this.

      -
    • - -
    • -

      New directives: t, - rt and lt directives - allow you to do explicit white-space removal in extreme FTL - applications. For more information read the reference.

      -
    • - -
    • -

      The syntax of assignment-with-namespace has changed from - <#assign foo=123 namespace=myLib>) to - <#assign foo=123 in myLib>, since the - previous syntax was confusing because its similarity to a - bulk-assignment.

      -
    • - -
    • -

      Bulk assignments (as <#assign x=1, y=2, - z=3>) no longer need colon to separate the - assignments (as <#assign x=1 y=2 - z=3>), although it is still allowed to preserve - backward compatibility.

      -
    • - -
    • -

      Positional parameter passing is supported for macro - calls as shorthand form of normal named parameter passing. For - more details read read the - reference.

      -
    • - -
    • -

      New built-in, namespace, to get the - namespace of the currently executing macro.

      -
    • - -
    • -

      TransformControl interface (was - experimental earlier): If the Writer - returned by - TemplateTransformModel.getWriter implements - this interface, it can instruct the engine to skip or to - repeat evaluation of the nested content, and gets notified - about exceptions that are thrown during the nested content - evaluation. For more information please read the API - documentation.

      -
    • - -
    • -

      Jython wrapper can now wrap arbitrary Java objects, not - only PyObject-s. If an object is passed to - the wrapper that is neither a - TemplateModel, nor a - PyObject, it is first coerced into a - PyObject using Jython's own wrapping - machinery, and then wrapped into a - TemplateModel as any other - PyObject.

      -
    • - -
    • -

      Some cleanups in the Environment - API.

      -
    • - -
    • -

      The Web application related examples has been - replaced.

      -
    • - -
    • -

      Bugfix: Templates loaded with - URLTemplateLoader subclasses was removed - from the template cache after the template update delay has - elapsed (5 seconds by default) even if the template file was - unchanged. This can cause lot of extra load for a high-traffic - server if you have many templates or if the template update - delay was set to 0 second.

      -
    • - -
    • -

      Bugfix: FreeMarkerServlet has thrown - ServletException even if a debug - TemplateException handler was in use (so - you may got Error 500 page instead of debug - information).

      -
    • -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2_1.html b/fmpp/docs/freemarker/versions_2_2_1.html deleted file mode 100644 index d2a5758..0000000 --- a/fmpp/docs/freemarker/versions_2_2_1.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2.1 - - - - - - - - -
    - - - - - -

    -2.2.1

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2003-04-11

    This version introduces important new features, such as the - native FTL date/time type, and the auto-include and auto-import - settings.

    The date/time support is experimental, but we hope it will not - substantially change. We would like to label it as final ASAP, so we - urge everybody to send feedback on this topic to the mailing - lists.

    - - - - -

    -Changes on the FTL side

    - - - - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      New TemplateModel subinterface: - TemplateDateModel. For more information read - Programmer's Guide/The Data Model/Scalars

      -
    • - -
    • -

      auto-include and auto-import: With these new configuration - level settings, you can include and import commonly used - templates (usually collection of macro definitions) at the top - of all templates, without actually typing <#include - ...> or - <#import - ...> into the templates - again and again. For more information please read the Java API - documentation of Configuration

      -
    • - -
    • -

      New template method: - createProcessingEnvironment. This method - makes it possible for you to do some special initialization on - the Environment - before template processing, or to read the environment after - template processing. For more information please read the Java - API documentation.

      -
    • - -
    • -

      Changes to freemarker.ext.beans - package: BeanModel, - MapModel, and - ResourceModel now implement - TemplateHashModelEx.

      -
    • - -
    • -

      Bugfix: - Configurable.setSettings(Properties) didn't - removed redundant spaces/tabs at the end of property - values.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2_2.html b/fmpp/docs/freemarker/versions_2_2_2.html deleted file mode 100644 index c2f8f5e..0000000 --- a/fmpp/docs/freemarker/versions_2_2_2.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2.2 - - - - - - - - -
    - - - - - -

    -2.2.2

    - - -

    Date of release: 2003-05-02

    Bugfix release.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: The _text key of the - freemarker.ext.xml.NodeListModel was not - returning the text of the element when used with W3C DOM - trees.

      -
    • - -
    • -

      The classes are now built against JDK 1.2.2 classes, - ensuring the binary compatibility of FreeMarker distribution - with JDK 1.2.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2_3.html b/fmpp/docs/freemarker/versions_2_2_3.html deleted file mode 100644 index df7756b..0000000 --- a/fmpp/docs/freemarker/versions_2_2_3.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2.3 - - - - - - - - -
    - - - - - -

    -2.2.3

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2003-07-19

    Bugfix release.

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Added the is_date built-in.

      -
    • - -
    • -

      Bugfix: Various is_xxx built-ins were - returning false when applied to undefined - expressions. Now they correctly fail on them.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: The JSP taglib support can now read JSP 1.2 - compliant TLD XML files.

      -
    • - -
    • -

      Bugfix: The JSP taglib support now emits more helpful - exception messages when the specified TLD XML file is not found - (previously it threw a - NullPointerException).

      -
    • - -
    • -

      Bugfix: The JSP taglib support now initializes a custom - tag after its parent and page context is set as some tags expect - them to be set when attribute setters are called.

      -
    • - -
    • -

      Bugfix: The BeansWrapper could fail to - analyze classes under very rare circumstances due to a premature - storage optimization.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2_4.html b/fmpp/docs/freemarker/versions_2_2_4.html deleted file mode 100644 index e2f3737..0000000 --- a/fmpp/docs/freemarker/versions_2_2_4.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2.4 - - - - - - - - -
    - - - - - -

    -2.2.4

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2003-09-03

    Maintenance and bugfix release.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Improvements to JSP taglib support. If some third party - taglib didn't work for you with FreeMarker, maybe now it - will.

      - -
      -
        -
      • -

        The JSP PageContext now implements - forward and include - methods.

        -
      • - -
      • -

        Accepting EVAL_PAGE as an alias to - SKIP_BODY in return values from - doStartTag. It's a common bug in some - widespread tag libraries, and now FreeMarker is less strict - and accepts it.

        -
      • -
      - -
    • - -
    • -

      Fixes for some rare problems regarding namespaces of - macros.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Minor improvements to the documentation.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2_5.html b/fmpp/docs/freemarker/versions_2_2_5.html deleted file mode 100644 index 3027b02..0000000 --- a/fmpp/docs/freemarker/versions_2_2_5.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2.5 - - - - - - - - -
    - - - - - -

    -2.2.5

    - - -

    Date of release: 2003-09-19

    Maintenance and bugfix release.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Creating a Configuration instance using - the default constructor no longer fails if the current directory - is unreadable due to I/O problems, lack of security permissions, - or any other exception.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2_6.html b/fmpp/docs/freemarker/versions_2_2_6.html deleted file mode 100644 index 8087a43..0000000 --- a/fmpp/docs/freemarker/versions_2_2_6.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2.6 - - - - - - - - -
    - - - - - -

    -2.2.6

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2004-March-13

    Maintenance and bugfix release. Some of improvements are - back-portings from FreeMarker 2.3rc1.

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      New special variable: - .vars. This is useful to read top-level - variables with square bracket syntax, for example - .vars["name-with-hyphens"] and - .vars[dynamicName].

      -
    • - -
    • -

      New built-ins for Java and JavaScript string escaping: - j_string and js_string

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: The template cache didn't reload the template when - it was replaced with an older version.

      -
    • - -
    • -

      Bugfix: - freemarker.template.utility.DeepUnwrap - unwrapped sequences to empty - ArrayList-s.

      -
    • - -
    • -

      Bugfix: In error messages, when the quoted FTL directive - had nested content, that was quoted as well, so the quotation - could be very long and expose nested lines needlessly.

      -
    • - -
    • -

      freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER - now prints more HTML-context-proof messages.

      -
    • - -
    • -

      You can query the FreeMarker version number with static - method Configuration.getVersionNumber(). - Also, the Manifest.mf included in - freemarker.jar now contains the FreeMarker - version number, furthermore, executing it with java - -jar freemarker.jar will print the version number to - the stdout.

      -
    • - -
    • -

      Date support is now labeled as final. (It was experimental - earlier.) There was no change since FreeMarker 2.2.1.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Fixes and improvements in the Manual and in the API - JavaDoc. The documentation now works with the Eclipse help - plugin (accessible in the ``Editor/IDE plugins'' section of the - FreeMarker Web page).

      -
    • - -
    • -

      Minor site improvements.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2_7.html b/fmpp/docs/freemarker/versions_2_2_7.html deleted file mode 100644 index e55f9e3..0000000 --- a/fmpp/docs/freemarker/versions_2_2_7.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2.7 - - - - - - - - -
    - - - - - -

    -2.2.7

    - - -

    Date of release: 2004-March-17

    Important bugfix release.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: Fixing a fatal bug in the template cache that was - introduced with the latest cache ``bugfix''. The template cache - has always reloaded the unchanged template when the update delay - has been elapsed, until the template has been actually changed, - in which case it has never reloaded the template anymore.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_2_8.html b/fmpp/docs/freemarker/versions_2_2_8.html deleted file mode 100644 index a3b4edf..0000000 --- a/fmpp/docs/freemarker/versions_2_2_8.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.2.8 - - - - - - - - -
    - - - - - -

    -2.2.8

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2004-June-15

    Bugfix and maintenance release.

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Added a new special variable to print the FreeMarker - version number: version. See more in the reference...

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      The BeansWrapper has been improved to - prevent some security exceptions when introspecting.

      -
    • - -
    • -

      Bugfix: The FileTemplateLoader is now - more robust when it receives paths that are malformed according - the native file system. In the earlier version such paths - sometimes caused unexpected IOException that - aborted the searching for the template in further - FileTemplateLoader-s when you use the - MultiTemplateLoader.

      -
    • - -
    • -

      Some parts of the FreeMarker code has been marked as - privileged code section, so you can grant extra privileges to - FreeMarker when you use a security manager (this is a - backporting from 2.3). See more here...

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Minor documentation fixes and improvements.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3.html b/fmpp/docs/freemarker/versions_2_3.html deleted file mode 100644 index cf1813c..0000000 --- a/fmpp/docs/freemarker/versions_2_3.html +++ /dev/null @@ -1,1856 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3 - - - - - - - - -
    - - - - - -

    -2.3

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2004-June-15

    FreeMarker 2.3 introduces numerous little new features and - quality improvements compared to the 2.2.x series. The most notable - improvements are the ability to define functions (methods) in - templates, the ability to interpolate variables in string literals, - the support for a variable number of macro parameters, and the more - intelligent default object wrapper. Although none of the improvements - is a drastic change, the 2.3.x series is not backward compatible with - the 2.2.x series (see the list below), so you may choose to use it for - new projects only.

    Probably the most ``loudly promoted'' new feature is the totally - redesigned XML wrapper. With the new XML wrapper FreeMarker targets a - new application domain, which is similar to the application domain of - XSLT: transforming complex XML to whatever textual output. Although - this subproject is young, it is definitely usable in practice. See the - XML Processing Guide for more - details.

    - - - - -

    -Non backward-compatible changes!

    - - -
    -
      -
    • -

      Since interpolations (${...} and - #{...}) now work inside string literals, the - character sequence ${ and - #{ in string literals are reserved for that. - So if you have something like <#set x = - "${foo}">, then you have to replace it with - <#set x = r"${foo}"> -- beware, escapes - such as \n will not work in raw - (r) strings.

      -
    • - -
    • -

      The default (initial) value of the - strict_syntax setting has been changed from - false to true. When - strict_syntax is true, - tags with old syntax as <include - "foo.ftl"> will be considered as static text (so - they go to the output as-is, like HTML tags do), and not as FTL - tags. Such tags have to be rewritten to <#include - "foo.ftl">, since only parts that starts with - <#, </#, - <@, or </@ count as - FTL tags. Or, to recover the old transitional behavior, where - both legacy and new tag syntax was recognized, you have to - explicitly set strict_syntax to - false: - cfg.setStrictSyntaxMode(false). Also, for - individual templates you can force the old behavior by starting - the template with <#ftl - strict_syntax=false>. (For more information about - why strict syntax is better than old syntax read this...)

      -
    • - -
    • -

      Several classes were moved from the - freemarker.template package, to the new - freemarker.core package:

      - -
      -
        -
      • - "Normal" classes: ArithmeticEngine, - Configurable, - Environment -
      • - -
      • - Exceptions: - InvalidReferenceException, - NonBooleanException, - NonNumericalException, - NonStringException, - ParseException, - StopException -
      • - -
      • - Errors: TokenMgrError -
      • -
      - - -

      The main reason of the splitting of - freemarker.template package was that the - amount of "expert" public classes and interfaces grows too much, - as we introduce API-s for third-party tools, such as debugging - API.

      -
    • - -
    • -

      freemarker.template.TemplateMethodModel.exec - now returns Object instead of - TemplateModel.

      -
    • - -
    • -

      White-space stripping is now more aggressive as before: it - always removes leading and trailing white-space if the line only - contains FTL tags. (Earlier the white-space was not removed if - the tag was <#include - ...> or user-defined - directive tag with empty directive syntax as - <@myMacro/> (or its equivalents: - <@myMacro></@myMacro> and - <@myMacro></@>). Now white-space - is removed in these cases as well.) Also, white-space sandwiched - between two non-outputting elements, such as macro definitions, - assignments, imports, or property settings, is now ignored. More - information: Template Author's Guide/Miscellaneous/White-space handling/White-space stripping

      -
    • - -
    • -

      The function directive is now used for - defining methods. You should replace function - with macro in your old templates. Note, - however, that old function-s will still work - if you don't use the return directive in - them, and you invoke them with the deprecated the - call directive.

      -
    • - -
    • -

      The expressions as, - in, and using are now - keywords in the template language and cannot be used as - top-level variable names without square-bracket syntax. If, by - some chance, you have top-level variables that use one of these - names, you will have to rename them, or use the square-bracket - syntax with the .vars special variable: - .vars["in"].

      -
    • - -
    • -

      The ?new built-in, as it was - implemented, was a security hole. Now, it only allows you to - instantiate a java object that implements the - freemarker.template.TemplateModel interface. - If you want the functionality of the ?new - built-in as it existed in prior versions, make available an - instance of the - freemarker.template.utility.ObjectConstructor - class to your template. (For example: - myDataModel.put("objConstructor", new - ObjectConstructor());, and then in the template you - can do this: <#assign aList = - objConstructor("java.util.ArrayList", 100)>)

      -
    • - -
    • -

      Changes to the - FreemarkerServlet:

      - -
      -
        -
      • -

        The FreemarkerServlet uses - ObjectWrapper.DEFAULT_WRAPPER by default - instead of ObjectWrapper.BEANS_WRAPPER. - What this means is that, by default, objects of type - java.lang.String, - java.lang.Number, - java.util.List, and - java.util.Map will be wrapped as - TemplateModels via the classes - SimpleScalar, - SimpleNumber, - SimpleSequence, and - SimpleHash respectively. Thus, the java - methods on those objects will not be available. The default - wrapper implementation in FreeMarker 2.3 automatically knows - how to wrap Jython objects, and also wraps - org.w3c.dom.Node objects into instances - of freemarker.ext.dom.NodeModel.

        -
      • - -
      • -

        The FreemarkerServlet base - implementation no longer deduces the locale used for - templates with HttpRequest.getLocale(). - Rather, it simply delegates to the new protected method, - deduceLocale. The default implementation - of this method simply returns the value of configuration the - locale setting.

        -
      • -
      - -
    • -
    - - - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Interpolation in string literals. For convenience, - interpolations are now supported in string literals. For - example: <@message "Hello ${user}!" /> - is the same as <@message "Hello " + user + "!" - />

      -
    • - -
    • -

      Raw string literals: In string literals prefixed with - r, interpolations and escape sequences will - not be interpreted as special tokens. For example: - r"\n${x}" will be simply interpreted as the - character sequence '\', - 'n', '$', - '{', 'x', - '}', and not as line-feed and the value of - the x variable.

      -
    • - -
    • -

      Method variables can be defined in FTL, with the function - directive.

      -
    • - -
    • -

      Support for a variable number of macro parameters. If the - last parameter in a macro declaration ends with - ..., all extra parameters passed to the macro - will be available via that parameter. For macros called with - positional parameters, the parameter will be a sequence. For - named parameters, the parameter will be a hash. Note that it all - works with the new function directive as - well.

      -
    • - -
    • -

      A new header parameter, strip_text, - that removes all top-level text from a template. This is useful - for ``include files'' to suppress newlines that separate the - macro definitions. See ftl - directive

      -
    • - -
    • -

      New special variable: - .vars. This is useful to read top-level - variables with square bracket syntax, for example - .vars["name-with-hyphens"] and - .vars[dynamicName].

      -
    • - -
    • -

      macro and assignment directives now - accept arbitrary destination variable name with quoted syntax. - For example: <#macro - "name-with-hyphens">... - or <#assign "foo bar" = 123>.

      -
    • - -
    • -

      The ?keys and - ?values hash built-ins now return sequences. - In practical terms this means you can access their sizes or - retrieve their subvariables by index, and use all of the sequence built-ins. (Note - for the programmers: The TemplateHashModelEx - interface has not been changed. Your old code will work. See the - API documentation to see why.)

      -
    • - -
    • -

      Existence built-ins (?default, - ?exists, etc.) are now working with sequence - subvariables as well. Read the documentation of the - default built-in for more information.

      -
    • - -
    • -

      White-space stripping is now more aggressive as before: it - always removes leading and trailing white-space if the line only - contains FTL tags. (Earlier the white-space was not removed if - the tag was <#include - ...> or user-defined - directive tag with empty directive syntax as - <@myMacro/> (or its equivalents: - <@myMacro></@myMacro> and - <@myMacro></@>). Now white-space - is removed in these cases as well.) Also, top-level white-space - that separates macro definitions and/or assignments is now - ignored. More information: Template Author's Guide/Miscellaneous/White-space handling/White-space stripping

      -
    • - -
    • -

      White-space stripping can be disabled for a single line - with the nt - directive (for No Trim).

      -
    • - -
    • -

      Hashes can be concatenated using the + - operator. The keys in the hash on the right-hand side take - precedence.

      -
    • - -
    • -

      New built-ins for Java and JavaScript string escaping: - j_string and js_string

      -
    • - -
    • -

      The replace and - split built-ins now support case-insensitive - comparsion and regular expressions (J2SE 1.4+ only), and some - other new options. More information can be found here.

      -
    • - -
    • -

      New built-in for regular expression matching (J2SE 1.4+ - only): matches

      -
    • - -
    • -

      New built-in, eval, to evaluate a - string as FTL expression. For example - "1+2"?eval returns the number 3.

      -
    • - -
    • -

      New built-ins for Java and JavaScript string escaping: - j_string and js_string

      -
    • - -
    • -

      New special variables to read the value of the locale - setting: locale, lang. See - more in the - reference...

      -
    • - -
    • -

      New special variable to read the FreeMarker version - number: version. See more in the reference...

      -
    • - -
    • -

      Tree new directives, recurse, - visit and fallback, were - introduced to support declarative node-tree processing. These - are meant to be used typically (though not exclusively) for - processing XML input. Together with this, a new variable type - has been introduced, the node type. See the chapter on declarative XML - processing for more details.

      -
    • - -
    • -

      The ?new built-in, as it was - implemented, was a security hole. Now, it only allows you to - instantiate a java object that implements the - freemarker.template.TemplateModel interface. - If you want the functionality of - the ?new built-in as it existed in prior - versions, make available an instance of the - freemarker.template.utility.ObjectConstructor - class to your template. (For example: - myDataModel.put("objConstructor", new - ObjectConstructor());, and then in the template you - can do this: <#assign aList = - objConstructor("java.util.ArrayList", - 100)>)

      -
    • - -
    • -

      Variable names can contain @ anywhere - (without using quote-bracket syntax). For example: - <#assign x@@@ = 123> is valid.

      -
    • - -
    • -

      The expressions as, - in, and using are now - keywords in the template language and cannot be used as - top-level variable names without square-bracket syntax (as - .vars["in"]).

      -
    • - -
    • -

      New parameter to the ftl - directive: attributes. The value of - this attribute is a hash that associates arbitrary attributes - (name-value pairs) to the template. The values of the attributes - can be of any type (string, number, sequence... etc.). - FreeMarker doesn't try to understand the meaning of the - attributes. It's up to the application that encapsulates - FreeMarker (as a Web application framework). Thus, the set of - allowed attributes and their semantic is application (Web - application framework) dependent.

      -
    • - -
    • -

      Other minor quality improvements...

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Smarter default object wrapping: The default object - wrapper is now - freemarker.template.DefaultObjectWrapper, - which falls back on wrapping arbitrary objects as beans using - the freemarker.ext.beans.BeansWrapper. Also, - it will wrap org.w3c.dom.Node objects with - the new DOM wrapper. Also, it is aware of Jython objects, and - will use freemarker.ext.jython.JythonWrapper - if the object passed in is a Jython object. (We count it as a - backward compatible change, since this new object wrapper wraps - differently only those objects that the old wrapper was not able - to wrap, so it has thrown exception.)

      -
    • - -
    • -

      freemarker.template.TemplateMethodModel.exec - now returns Object instead of - TemplateModel.

      -
    • - -
    • -

      The default (initial) value of the - strict_syntax setting has been changed from - false to true. When - strict_syntax is true, - tags with old syntax as <include - "foo.ftl"> will be considered as static text (so - they go to the output as-is, like HTML tags do), and not as FTL - tags. Such tags have to be rewritten to <#include - "foo.ftl">, since only parts that starts with - <#, </#, - <@, or </@ count as - FTL tags. Or, to recover the old transitional behavior, where - both legacy and new tag syntax was recognized, you have to - explicitly set strict_syntax to - false: - cfg.setStrictSyntaxMode(false). Also, for - individual templates you can force the old behavior by starting - the template with <#ftl - strict_syntax=false>. (For more information about - why strict syntax is better than old syntax read this...)

      -
    • - -
    • -

      New CacheStorage implementation: - freemarker.cache.MruCacheStorage. This cache - storage implements a two-level Most Recently Used cache. In the - first level, items are strongly referenced up to the specified - maximum. When the maximum is exceeded, the least recently used - item is moved into the second level cache, where they are softly - referenced, up to another specified maximum. - freemarker.cache.SoftCachseStorage and - StrongCachseStorage are deprected, - MruCachseStorage is used everywhere instead. - The default cache storage is now an - MruCachseStorage object with 0 strong size, - and infinite soft size. - Configuration.setSetting for - cache_storage now understands string values - as "strong:200, soft:2000".

      -
    • - -
    • -

      For BeansWrapper generated models, you - can now use the ${obj.method(args)} syntax to - invoke methods whose return type is void. - void methods now return - TemplateModel.NOTHING as their return - value.

      -
    • - -
    • -

      freemarker.template.SimpleHash now can - wrap read-only Map-s, such as the map of HTTP - request parameters in Servlet API.

      -
    • - -
    • -

      The TemplateNodeModel interface was - introduced to support recursive processing of trees of nodes. - Typically, this will be used in relation to XML.

      -
    • - -
    • -

      New package: freemarker.ext.dom. This - contains the new XML wrapper, that supports the processing of - XML documents using the visitor pattern (i.e. with - <#visit ...> - and similar directives), and to provide more convenient XML - traversing as the legacy wrapper. See the XML processing guide for more - details.

      -
    • - -
    • -

      New package: freemarker.core. Classes - used by mostly power-users was moved here from the - freemarker.template package. The main reason - of the splitting of freemarker.template - package was that the amount of "expert" public classes and - interfaces grows too much, as we introduce API-s for third-party - tools, such as debugging API.

      -
    • - -
    • -

      New package: freemarker.debug. This - provides a debugging API, by which you can debug executing - templates through network (RMI). You have to write the front-end - (client), as the API is just the server side. For more - information please read the JavaDoc of the - freemarker.debug package.

      -
    • - -
    • -

      You can query the FreeMarker version number with static - method Configuration.getVersionNumber(). - Also, the Manifest.mf included in - freemarker.jar now contains the FreeMarker - version number, furthermore, executing it with java - -jar freemarker.jar will print the version number to - the stdout.

      -
    • - -
    • -

      Added a new protected FreemarkerServlet - method: Configuration - getConfiguration().

      -
    • - -
    • -

      Date support is now labeled as final. (It was experimental - earlier.)

      -
    • - -
    • -

      The BeansWrapper has been improved to - prevent some security exceptions when introspecting.

      -
    • - -
    • -

      Other minor quality improvements and extensions...

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Fixes and improvements in the Manual and in the API - JavaDoc.

      -
    • -
    - - - - - - -

    -The history of the releases before the final version

    - - - - - - - -

    -Differences between the final release and Release Candidate - 4

    - - -
    -
      -
    • -

      Added a new special variable to print the FreeMarker - version number: version. See more in the reference...

      -
    • - -
    • -

      Minor documentation fixes and improvements.

      -
    • -
    - - - - - - - - -

    -Differences between the Release Candidate 4 and Release - Candidate 3

    - - -
    -
      -
    • -

      The BeansWrapper has been improved to - prevent some security exceptions when introspecting.

      -
    • - -
    • -

      The FreemarkerXmlTask has two new - sub-tasks that can be used to prepare template execution with - Jython scripts: prepareModel and - prepareEnvironment. The - jython sub-task is now deprecated, and does - the same as prepareEnvironment. See the - Java API documentation for more details.

      -
    • - -
    • -

      New special variable to read the FreeMarker version - number: version. See more in the reference...

      -
    • - -
    • -

      Bugfix: Greater-than sign doesn't confuse the - eval built-in anymore.

      -
    • - -
    • -

      Bugfix: The BeansWrapper now wrapps - the null return values of methods - appropriately.

      -
    • - -
    • -

      Bugfix: The FreemarkerXmlTask doesn't - need Jython classes anymore, unless you really use Jython - scripts. Several other bugfixes in the Jython related - features.

      -
    • - -
    • -

      Bugfix: If the template exception handler has ignored - the exception, errors occurring in interpolations inside FTL - tags (e.g. <#if "foo${badVar}" != - "foobar">) were handled in the same way as errors - occuring in interpolations outside FTL tags. Thus, the - directive call was not skipped, and the problematic - interpolation was replaced with an empty string. (This was - inconsistent with the behavior of <#if - "foo"+badVar != "foobar">, which should be 100% - equivalent with the previous example.)

      -
    • - -
    • -

      Bugfix: The FileTemplateLoader is now - more robust when it receives paths that are malformed - according the native file system. In the earlier version such - paths sometimes caused unexpected - IOException that aborted the searching for - the template in further - FileTemplateLoader-s when you use the - MultiTemplateLoader.

      -
    • -
    - - - - - - - - -

    -Differences between the Release Candidate 3 and Release - Candidate 2

    - - -
    -
      -
    • -

      Bugfix: Fixing a fatal bug in the template cache that - was introduced with the latest cache ``bugfix''. The template - cache has always reloaded the unchanged template when the - update delay has been elapsed, until the template has been - actually changed, in which case it has never reloaded the - template anymore.

      -
    • -
    - - - - - - - - -

    -Differences between the Release Candidate 2 and Release - Candidate 1

    - - -
    -
      -
    • -

      Bugfix: The template cache didn't reload the template - when it was replaced with an older version.

      -
    • - -
    • -

      API JavaDoc fix: date/time related classes/interfaces - were marked as experimental. They are not experimental.

      -
    • - -
    • -

      Minor site improvements.

      -
    • -
    - - - - - - - - -

    -Differences between the Release Candidate 1 and Preview 16 - releases

    - - -
    -
      -
    • -

      Warning! Non-backward-compatible - change! The default (initial) value of the - strict_syntax setting has been changed from - false to true. When - strict_syntax is true, - tags with old syntax as <include - "foo.ftl"> will be considered as static text (so - they go to the output as-is, like HTML tags do), and not as - FTL tags. Such tags have to be rewritten to - <#include "foo.ftl">, since only - parts that starts with <#, - </#, <@, or - </@ count as FTL tags. Or, to recover - the old transitional behavior, where both legacy and new tag - syntax was recognized, you have to explicitly set - strict_syntax to false: - cfg.setStrictSyntaxMode(false). Also, for - individual templates you can force the old behavior by - starting the template with <#ftl - strict_syntax=false>. (For more information about - why strict syntax is better than old syntax read this...)

      -
    • - -
    • -

      New parameter to the ftl - directive: attributes. The value of - this attribute is a hash that associates arbitrary attributes - (name-value pairs) to the template. The values of the - attributes can be of any type (string, number, sequence... - etc.). FreeMarker doesn't try to understand the meaning of the - attributes. It's up to the application that encapsulates - FreeMarker (as a Web application framework). Thus, the set of - allowed attributes and their semantic is application (Web - application framework) dependent.

      -
    • - -
    • -

      Bugfix: - freemarker.template.utility.DeepUnwrap - unwrapped sequences to empty - ArrayList-s.

      -
    • - -
    • -

      Bugfix: If you included/imported a template with - */ in path (acquisition), and that template - in turn itself included/imported another template with - */ in path, it may failed.

      -
    • - -
    • -

      New methods to the - freemarker.core.Environment: - importLib(Template loadedTemplate, java.lang.String - namespace), - getTemplateForImporting(...), - getTemplateForInclusion(...).

      -
    • - -
    • -

      Improvements in the - java.io.IOException related error messages - of the include and - import directives.

      -
    • - -
    • -

      Minor improvements in the documentation.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 16 and Preview 15 - releases

    - - -
    -
      -
    • -

      New package: freemarker.debug. This - provides a debugging API, by which you can debug executing - templates through network (RMI). You have to write the - front-end (client), as the API is just the server side. For - more information please read the JavaDoc of the - freemarker.debug package. (The debugging - API is present for a while, just I forgot to announce it in - the version history. Sorry for that.)

      -
    • - -
    • -

      Bugfix: With the new XML wrapper, - @@markup and similar special keys:

      - -
      -
        -
      • -

        have returned - <foo></foo> for empty - elements instead of <foo />. - Other than it was needlessly verbose, it has confused - browsers if you generate HTML.

        -
      • - -
      • -

        have showed the attributes that have no explicitly - given value in the original document, just a default value - coming form the DTD.

        -
      • - -
      • -

        have forgot to put space before the system - identifier in the <!DOCTYPE - ...>.

        -
      • -
      - -
    • - -
    • -

      Bugfix: XPath with Jaxen has died with - NullPointerException if the context was an - empty node set.

      -
    • - -
    • -

      A bit more intelligent Xalan XPath error - messages.

      -
    • - -
    • -

      Revoked fallback-to-classloader logic from the template - cache.

      -
    • - -
    • -

      From now, if no XPath engine is available, and the hash - key in an ``XML query'' can't be interpreted without XPath, an - error will tell this clearly, rather than silently returning - undefined variable (null).

      -
    • - -
    • -

      Bugfix: Some templates have caused the parser to - die.

      -
    • - -
    • -

      Some other minor improvements here and there...

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 15 and Preview 14 - releases

    - - -
    -
      -
    • -

      Bugfix: The new default template cache storage - (MruCacheStorage) has started to - continually fail with NullPointerException - from a random point of time, usually when the memory usage was - high in the JVM.

      -
    • - -
    • -

      Bugfix: In error messages, when the quoted FTL directive - had nested content, that was quoted as well, so the quotation - could be very long and expose nested lines needlessly.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 14 and Preview 13 - releases

    - - -
    -
      -
    • -

      freemarker.template.TemplateMethodModel.exec - now returns Object instead of - TemplateModel.

      -
    • - -
    • -

      Fixes and improvements for XPath with Jaxen (not Xalan). - Non-node-set XPath expressions are now working. FreeMarker - variables are accessible in XPath expressions with XPath - variable references (e.g. - doc["book/chapter[title=$currentTitle]"]).

      -
    • - -
    • -

      freemarker.cache.SoftCachseStorage - and StrongCachseStorage is deprected. The - more flexible MruCachseStorage is used - instead everywhere. The default cache storage is now an - MruCachseStorage object with 0 strong size, - and infinite soft size. - Configuration.setSetting for - cache_storage now understands string values - as "strong:200, soft:2000".

      -
    • - -
    • -

      Bugfix: - freemarker.cache.MruCachseStorage has died - with ClassCastException sometimes.

      -
    • - -
    • -

      New built-ins for Java and JavaScript string escaping: - j_string and js_string

      -
    • - -
    • -

      freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER - now prints more HTML-context-proof messages.

      -
    • - -
    • -

      You can query the FreeMarker version number with static - method Configuration.getVersionNumber(). - Also, the Manifest.mf included in - freemarker.jar now contains the FreeMarker - version number, furthermore, executing it with java - -jar freemarker.jar will print the version number to - the stdout.

      -
    • - -
    • -

      Added a new protected - FreemarkerServlet method: - Configuration getConfiguration().

      -
    • - -
    • -

      Bugfix: FreeMarker has frozen on empty conditional - blocks in certain contexts.

      -
    • - -
    • -

      Bugfix: Methods called twice on an object using the - list directive, as - parent.getChildren() with - <#list parent.children as child> - ...</#list>

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 13 and Preview 12 - releases

    - - -
    -
      -
    • -

      White-space stripping is now more aggressive as before: - it always removes leading and trailing white-space if the line - only contains FTL tags. (Earlier the white-space was not - removed if the tag was <#include - ...> or user-defined - directive tag with empty directive syntax as - <@myMacro/> (or its equivalents: - <@myMacro></@myMacro> and - <@myMacro></@>). Now - white-space is removed in these cases as well.) Also, - top-level white-space that separates macro definitions and/or - assignments is now ignored. More information: Template Author's Guide/Miscellaneous/White-space handling/White-space stripping

      -
    • - -
    • -

      White-space stripping can be disabled for a single line - with the nt - directive (for No Trim).

      -
    • - -
    • -

      A new directive for the declarative XML processing: - fallback

      -
    • - -
    • -

      freemarker.template.SimpleHash now - can wrap read-only Map-s, such as the map - of HTTP request parameters in Servlet API.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 12 and Preview 11 - releases

    - - -

    The only change between this and the previous preview - release is that Preview 11 had a bug where DOM trees would - never be garbage-collected.

    - - - - - - - -

    -Differences between the Preview 11 and Preview 10 - releases

    - - -
    -
      -
    • -

      Many XML related changes. Some of them are incompatible - with the previous preview releases! For a more detailed - explanation of how XML related features now work, see: XML Processing Guide

      - -
      -
        -
      • -

        Attention! Attribute queries such as - foo.@bar now return sequences - (similarly to child element queries and XPath queries), - not single nodes. Because of the rule with node sequences - of size 1, it is still good to write - ${foo.@bar}, but built-ins such as - ?exists, ?if_exists - or ?default don't work as before. For - example, instead of - foo.@bar?default('black'), you now have - to write foo.@bar[0]?default('black'). - So if you have used existence built-ins with attributes, - you have to find those occurrences in the templates and - add that [0].

        -
      • - -
      • -

        Attention! XML name-space handling has been totally - reworked and is absolutely incompatible with pre 10. Don't - worry about this if none of your XML input documents use - you use xmlns attributes. Worry, - though, if you have utilized the ``loose mode'', where - only the local name of elements were compared, because - that's now gone. Sorry...

        -
      • - -
      • -

        Attention! Special-keys @@ and - @* now return a sequence of attribute - nodes instead of the hash of them.

        -
      • - -
      • -

        Several hash keys are now working for node sequences - that store multiple nodes. For example, to get the list of - all para elements of all - chapter-s, just write - doc.book.chapter.para. Or, to get list - of title attributes of all chapter-s - write doc.book.chapter.@title.

        -
      • - -
      • -

        New special hash keys: **, - @@start_tag, - @@end_tag, - @@attribute_markup, - @@text, - @@qname.

        -
      • - -
      • -

        ?parent for attribute nodes now - returns the element node the attribute node belongs - to.

        -
      • - -
      • -

        You can use Jaxen instead of Xalan for XPath - expressions, if you call the static - freemarker.ext.dom.NodeModel.useJaxenXPathSupport() - method once. We plan to use Jaxen automatically instead of - Xalan if it is available, just the Jaxen support is not - fully functional yet.

        -
      • -
      - -
    • - -
    • -

      New special variable: .vars. This is - useful to read top-level variables with square bracket syntax, - for example .vars["name-with-hyphens"] and - .vars[dynamicName].

      -
    • - -
    • -

      New built-in, eval, to evaluate a - string as FTL expression. For example - "1+2"?eval returns the number 3.

      -
    • - -
    • -

      FreemarkerServlet now uses the - configuration's locale setting, rather than - Locale.getDefault(), to set the locale of - the templates. Also, the signature of the - deduceLocale method has been - changed.

      -
    • - -
    • -

      We have a new (beta status) - CacheStorage implementation: - freemarker.cache.MruCacheStorage. This - cache storage implements a two-level Most Recently Used cache. - In the first level, items are strongly referenced up to the - specified maximum. When the maximum is exceeded, the least - recently used item is moved into the second level cache, where - they are softly referenced, up to another specified maximum. - You can plug to try it with cfg.setCacheStorage(new - freemarker.cache.MruCacheStorage(maxStrongSize, - maxSoftSize)).

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 10 and Preview 9 - releases

    - - -
    -
      -
    • -

      The special key @@xmlns was removed - in favor of a new FTL directive for the same purpose, - <#xmlns...>.

      -
    • - -
    • -

      By default, the system is stricter about the use of - namespace prefixes. In general, you must use a prefix to - qualify subelements that are associated with an XML - nampespace. You can do this with the new - <#xmlns...> directive, but prefixes - declared in the input XML doc will actually work with no - declaration.

      -
    • - -
    • -

      Introduced a new special key called - @@text that returns all the text nodes - contained (recursively) in an element all concatenated - together.

      -
    • - -
    • -

      Either Jaxen or Xalan can be used to provide XPath - functionality. Prior versions only worked with Xalan.

      -
    • - -
    • -

      The FreemarkerServlet uses - ObjectWrapper.DEFAULT_WRAPPER by default - instead of ObjectWrapper.BEANS_WRAPPER. - What this means is that, by default, objects of type - java.lang.String, - java.lang.Number, - java.util.List, and - java.util.Map will be wrapped as - TemplateModels via the classes - SimpleScalar, - SimpleNumber, - SimpleSequence, and - SimpleHash respectively. Thus, the java - methods on those objects will not be available. The default - wrapper implementation in FreeMarker 2.3 automatically knows - how to wrap Jython objects, and also wraps - org.w3c.dom.Node objects into instances of - freemarker.ext.dom.NodeModel.

      -
    • - -
    • -

      The FreemarkerServlet base - implementation no longer deduces the locale to use from the - HttpRequest.getLocale() hook. Rather, it simply delegates to a - deduceLocale() hook that is overridable in - subclasses. The base implementation simply uses - Locale.getDefault()

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 9 and Preview 8 - releases

    - - -
    -
      -
    • -

      Fixed bugs introduced with Preview 8: XPath, - @@markup and - @@nested_markup now works with the document - node.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 8 and Preview 7 - releases

    - - -
    -
      -
    • -

      macro and assignment directives now - accept arbitrary destination variable name with quoted syntax. - For example: <#macro - "foo-bar">... or - <#assign "this+that" = 123>. This is - important, because XML element names can contain hyphen, and - it was not possible to define a handler macro for those - elements, till now.

      -
    • - -
    • -

      Special key @@content was renamed to - @@nested_markup.

      -
    • - -
    • -

      Fixed outdated XML related Manual parts (that were - outdated even in Preview 7).

      -
    • - -
    • -

      Better parse-error messages.

      -
    • - -
    • -

      Minor bugfixes here and there...

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 7 and Preview 6 - releases

    - - -
    -
      -
    • -

      Caching of XPath queries should lead to significant - performance improvements for XML processing, at least when - XPath is heavily used.

      -
    • - -
    • -

      Refinements in handling of XML namespaces in the XML - processing functionality. The new - strict_namespace_handling setting - introduced in 2.3pre6 was removed. A general-purpose solution - was arrived at that should make that configuration setting - unnecessary.

      -
    • - -
    • -

      Special key @xmlns was renamed to - @@xmlns. Reserved namespace prefix default - was renamed to @@default.

      -
    • - -
    • -

      The ftl directive now accepts - non-string types.

      -
    • - -
    • -

      New special keys were introduced for XML node wrappers - in the freemarker.ext.dom package. The - @@markup key returns the literal markup - that make up that element and the @@content - key returns all the element's markup excluding the opening and - closing tags.

      -
    • - -
    • -

      Minor bugfixes here and there...

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 6 and Preview 5 - releases

    - - -
    -
      -
    • -

      Existence built-ins (?default, - ?exists, etc.) now work with sequence - subvariables as well. Read the documentation of the - default built-in for more - information.

      -
    • - -
    • -

      The matches built-in now returns a - sequence instead of a collection.

      -
    • - -
    • -

      Refinements in handling of XML namespaces in the XML - processing functionality. A new setting, - strict_namespace_handling was introduced. - If this is set (it is off by default) any node-handling macro - used in with the visit/recurse machinery must be from a macro - library that declares in its ftl header that it handles the - namespace in question.

      -
    • - -
    • -

      Minor bugfixes here and there...

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 5 and Preview 4 - releases

    - - -
    -
      -
    • -

      The replace and - split built-ins now support - case-insensitive comparison and regular expressions (J2SE 1.4+ - only), and some other new options. More information can be - found here.

      -
    • - -
    • -

      New butilt-in for regular expression matching (J2SE 1.4+ - only): matches

      -
    • - -
    • -

      Minor bugfixes here and there...

      -
    • - -
    • -

      Manual: More browser-safe HTML-s. More updated - content.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 4 and Preview 3 - releases

    - - -
    -
      -
    • -

      Bugfix: with multi-type variables, + - operator overload for hash type had higher precedence than the - precedence of some older overloads.

      -
    • - -
    • -

      The API documentation was missing from the distribution - tar.gz.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 3 and Preview 2 - releases

    - - -
    -
      -
    • -

      XML processing: Many various bugfixes, especially with - the declarative processing.

      -
    • - -
    • -

      XML processing: the namespace_uri - built-in, the xmlnsuri header parameter, - and the TemplateNodeModel.getNodeNamespace - method were renamed to node_namespace and - getNodeNamespace respectively.

      -
    • - -
    • -

      XML processing: Better documentation. Especially, note: - XML Processing Guide

      -
    • - -
    • -

      A new header parameter, strip_text, - that removes all top-level text from a template. See ftl - directive

      -
    • - -
    • -

      Support for a variable number of macro parameters. If - the last parameter in a macro declaration ends with - ..., all extra parameters passed to the - macro will be available via that parameter. For macros called - with positional parameters, the parameter will be a sequence. - For named parameters, the parameter will be a hash.

      -
    • - -
    • -

      For BeansWrapper generated models, - you can now use the ${obj.method(args)} - syntax to invoke methods whose return type is - void. void methods now - return TemplateModel.NOTHING as their - return value.

      -
    • -
    - - - - - - - - -

    -Differences between the Preview 2 and Preview 1 - releases

    - - -
    -
      -
    • -

      The freemarker.ext.dom.NodeModel API - changed slightly. The setDocumentBuilder() - method was changed to - setDocumentBuilderFactory() because the - older scheme was not thread-safe. The - stripComments and - stripPIs methods are renamed to The - removeComments and - removePIs, and are fixed now. A new method, - simplify has been added.

      -
    • - -
    • -

      The expressions as, - in, and using are now - keywords in the template language and cannot be used as - top-level variable names without square-bracket syntax (as - .vars["in"]). If, by some chance, you have - top-level variables that use one of these names, you will have - to rename them (or use the square-bracket syntax). Sorry for - the inconvenience.

      -
    • - -
    • -

      The ?new built-in, as it was - implemented, was a security hole. Now, it only allows you to - instantiate a java object that implements the - freemarker.template.TemplateModel - interface. If you want the functionality of the - ?new built-in as it existed in prior - versions, make available an instance of the new - freemarker.template.utility.ObjectConstructor - class to your template.

      -
    • - -
    • -

      The <#recurse> directive was - broken. It did not work with a using - clause. This is now fixed.

      -
    • -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_1.html b/fmpp/docs/freemarker/versions_2_3_1.html deleted file mode 100644 index 33d6e66..0000000 --- a/fmpp/docs/freemarker/versions_2_3_1.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.1 - - - - - - - - -
    - - - - - -

    -2.3.1

    - - - - -

    Date of release: 2005-01-04

    Maintenance (with some important new features) and bugfix - release.

    - - - - -

    -Possible backward compatibility issue

    - - -

    There is a bugfix that may affect the behavior of you Web - application if you use JSP tags in FreeMarker templates: - FreeMarker's implementation of - javax.servlet.jsp.PageContext.getSession() was - incorrect. The getSession() method is a - convenience method by which the custom tag can get the current - HttpSession object (possibly - null if there is no session). Till now, if the - session didn't existed then it has created it automatically, so it - never returned null. This was a bug, so starting - from 2.3.1 it never creates the session, just returns - null if it doesn't exist. The old incorrect - behavior could cause page rendering to fail if the method is called - after the page is partially flushed. But beware, the old behavior - has possibly hidden some bugs of the Web application, where it - forgot to create the session, so with the new correct behavior you - may face malfunction caused by previously cloaked bugs of the Web - application. (It's the task of the MVC Controller to create the - session, except if the JSP tag that needs a session is written so it - creates it automatically, but then it doesn't expects that - getSession() will do it.)

    - - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      New built-in: url. This - built-in can be used for URL escaping. Note, however, that to - use this built-in conveniently, the software that encapsulates - FreeMarker has to be 2.3.1 aware (programmers will find more - info bellow...).

      -
    • - -
    • -

      New special variables: - output_encoding and - url_escaping_charset. Note, however, that to - use these, the software that encapsulates FreeMarker has to be - 2.3.1 aware (programmers will find more info bellow...).

      -
    • - -
    • -

      New built-ins for sequences: seq_contains, - seq_index_of, - seq_last_index_of.

      -
    • - -
    • -

      New built-ins for strings: left_pad, - right_pad - and contains.

      -
    • - -
    • -

      New directive: attempt/recover

      -
    • - -
    • -

      The js_string - built-in now escapes > as - \> (to avoid - </script>).

      -
    • - -
    • -

      The sort and sort_by - built-ins now can sort by date values. Also, - sort_by built-in now can sort by the - subvarible of a subvariable of a subvariable... etc. for any - level depth. (Details...)

      -
    • - -
    • -

      freemarker.template.TemplateExceptionHandler.HTML_DEBUG_HANDLER - now prints more HTML-context-proof messages.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      New setting: output_encoding. This - setting is used for informing FreeMarker about the charset that - the enclosing software (as a Web application framework) uses for - the output of FreeMarker. It's undefined by default, and - although it is not strictly required to set it, the enclosing - software should do so. This setting must be set if templates - want to use the new output_encoding special - variable, and possibly if they want to use the new - url built-in. Note that the FreeMarker API - allows you to set settings for each template execution - individually (look at - Template.createProcessingEnvironment(...)).

      -
    • - -
    • -

      New setting: url_escaping_charset. This - is the charset used for calculating the escaped parts - (%XX) when you do - URL escaping with the new url built-in. If it - is not set, then the url built-in uses the - value of the output_encoding setting, and if - that's not set either, then the parameterless version of - url built-in (${foo?url}) - can't be used.

      -
    • - -
    • -

      Using the singleton (static) - Configuration instance is clearly a bad - practice, so related methods are now deprecated, and the Manual - was adjusted, and the FreemarkerXmlTask was - updated as well.

      -
    • - -
    • -

      The - freemarker.template.utility.Constants class - was added that contains various static final fields that store - frequently used constant TemplateModel - values, as EMPTY_SEQUENCE, - ZERO, ...etc.

      -
    • - -
    • -

      When using SecurityManager with - FreeMarker, accessing system properties may caused - AccessControlException. Now such exceptions are catched and - logged with warning level, and the default value of the property - is returned.

      -
    • - -
    • -

      The needles InvocationTargetException - is now removed from the exception cause trace in certain - cases.

      -
    • - -
    • -

      Added a dirty hack that prints - ServletException root cause in - TemplateException's stack trace if that's the - direct cause exception of the - TemplateException, despite the poorly written - ServletException class.

      -
    • - -
    • -

      Bugfix: FreeMarker's implementation of - javax.servlet.jsp.PageContext.getSession() - was incorrect. The getSession() method is a - convenience method by which the custom tag can get the current - HttpSession object (possibly - null if there is no session). Till now, if - the session didn't existed then it has created it automatically, - so it never returned null. This was a bug, so - starting from 2.3.1 it never creates the session, just returns - null if it doesn't exist. The old incorrect - behavior could cause page rendering to fail if the method is - called after the page is partially flushed. But beware, the old - behavior has possibly hidden some bugs of the Web application, - where it forgot to create the session, so with the new correct - behavior you may face malfunction caused by previously cloaked - bugs of the Web application. (It's the task of the MVC - Controller to create the session, except if the JSP tag that - needs a session is written so it creates it automatically, but - then it doesn't expects that getSession() - will do it.)

      -
    • - -
    • -

      Bugfix: The BeansWrapper didn't always - handled properly the case of a Java class having both a public - static field and a public static method with the same - name.

      -
    • - -
    • -

      Bugfix: SimpleMethodModel had - incorrectly propagate exceptions sometimes, causing null pointer - exception.

      -
    • - -
    • -

      Bugfix: The template execution may used outdated cached - values when you have processed the same - Environment for multiple times, and changed - settings between the two processings. Note that this could - happen only in single-thread environment, where such setting - modifications are allowed.

      -
    • - -
    • -

      Bugfix: Some of the string built-ins has died with - IndexOutOfBounds exception if the template - author has forgotten to specify required parameters. Now they - die with more helpful error messages.

      -
    • - -
    • -

      Bugfix: - freemarker.ext.dom.NodeModel.equals(...) has - died with null pointer exception if its argument was - null.

      -
    • - -
    • -

      Bugfix: The cause exception of - TemplateException-s was sometimes printed - twice in stack traces with J2SE 1.4 or later.

      -
    • - -
    • -

      Bugfix: The - StringUtil.FTLStringLiteralEnc(String) method - was finished.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Fixes and improvements in the Manual and in the API - JavaDoc.

      -
    • -
    - - - - - - -

    -The history of the releases before the final version

    - - - - - - - -

    -Differences between the preview release and final - release

    - - -
    -
      -
    • -

      Added a dirty hack that prints - ServletException root cause in - TemplateException's stack trace if that's - the direct cause exception of the - TemplateException, despite the poorly - written ServletException class.

      -
    • - -
    • -

      Bugfix: - freemarker.ext.dom.NodeModel.equals(...) - has died with null pointer exception if its argument was - null.

      -
    • - -
    • -

      Bugfix: The cause exception of - TemplateException-s was sometimes printed - twice in stack traces with J2SE 1.4 or later.

      -
    • - -
    • -

      More minor improvements in the Manual.

      -
    • -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_10.html b/fmpp/docs/freemarker/versions_2_3_10.html deleted file mode 100644 index c6be1fa..0000000 --- a/fmpp/docs/freemarker/versions_2_3_10.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.10 - - - - - - - - -
    - - - - - -

    -2.3.10

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2007-04-20

    This release contains several important bugfixes.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      [1589245] MultiTemplateLoader clears - its internal cached data (used for optimizing subsequent lookups - of the same template) when - Configuration.clearTemplateCache() is - invoked.

      -
    • - -
    • -

      [1619257] A bug that caused an exception when - strict_bean_model was used in a FreeMarker - configuration Properties object or in the - <#setting .../> directive has been - fixed.

      -
    • - -
    • -

      [1685176] A bug that caused - StackOverflowError in certain interactions of - garbage collector with MRU cache under Sun's Java 6 JVM has been - fixed.

      -
    • - -
    • -

      [1686955] When ResourceBundleModel - constructs MessageFormat objects, it passes - them its own locale. More - info...

      -
    • - -
    • -

      [1691432] A bug that caused - BeansWrapper.EXPOSE_SAFE to be no safer than - BeansWrapper.EXPOSE_ALL has been - fixed.

      -
    • -
    - - - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      [1628550] You can now use - dateExp?string.full for formatting dates - using Java built-in format - java.util.Date.FULL More info...

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_11.html b/fmpp/docs/freemarker/versions_2_3_11.html deleted file mode 100644 index 46f8b93..0000000 --- a/fmpp/docs/freemarker/versions_2_3_11.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.11 - - - - - - - - -
    - - - - - -

    -2.3.11

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2007-12-04

    This release contains several performance and usability - improvements.

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Bug fixed: [1687248] - Warning! This bugfix may breaks some - templates! Fixed the bugs of the c built-in - (?c) that sometimes caused whole numbers to - be formatted with ``.0'' at the end (like: 1.0), and caused - numbers sometimes formatted to exponential form (like 4E-20). - From now whole numbers will never use decimal dot (not even if - the wrapped number is a double; remember, the - template language knows only a single numerical type), and - exponential form will never be used either. Also, the maximum - number of digits after the decimal dot was limited to 16, so - numbers smaller than 1E-16 will be shown as 0.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      FreeMarker now has much better JSP 2.0 and JSP 2.1 - compliance. Most notably, the JSP 2.0 - SimpleTag interface is now supported. - Additionally, even when run in an environment that doesn't have - its own JSP implementation, the FreeMarker JSP runtime will make - available its own implementation of - JspFactory and - JspEngineInfo to tags when JSP 2.0 API JAR is - available in classpath, as well as an implementation of - JspApplicationContext when JSP 2.1 API JAR is - available in classpath.

      -
    • - -
    • -

      A new model interface, - TemplateDirectiveModel provides an easier - paradigm for implementing user-defined directives than - TemplateTransformModel did previously. - TemplateTransformModel will be - deprecated.

      -
    • - -
    • -

      FreeMarker now finds the Xalan-based XPath support - included in Sun JRE/JDK 5 and 6, so no separate Xalan jar is - required for the XPath support to work. (However, we recommend - Jaxen over Xalan, as the FreeMarker XPath support is more - complete with that. Of course for that the Jaxen jar is still - needed.)

      -
    • - -
    • -

      Wrapping performance of BeansWrapper - has been significantly improved by eliminating repetitive - execution of various class tests.

      - -

      Note for - BeansWrapper customizers: - subclasses of BeansWrapper that previously - overrode getInstance(Object, ModelFactory) - method should now instead override - getModelFactory(Class) to take advantage of - this improvement. Overriding the old method still works, but it - will not take advantage of the performance improvement.

      -
    • - -
    • -

      Memory footprint of a wrapper created by - BeansWrapper has been reduced (by a size of - one default-sized HashMap) until methods or - indexed properties are accessed on it (simple properties can be - accessed without increasing memory footprint).

      -
    • - -
    • -

      Rhino objects can be used in templates as scalars, - numbers, and booleans, following the JavaScript conversion - semantics for these types.

      -
    • - -
    • -

      .data_model is now a - TemplatHashModelEx when possible. This means - that the list of the data-model variable names usually can be - get with .data_model?keys.

      -
    • - -
    • -

      FileTemplateLoader can now optionally - allow following symlinks that point out of the base directory. - It is disabled by default for backward compatibility.

      -
    • - -
    • -

      Bug fixed: [1670887] - TaglibFactory taglib matching did not follow - JSP 1.2 FCS.

      -
    • - -
    • -

      Bug fixed: [1754320] - Bug in setXPathSupportClass prevented - plugging in a user-supplied XPathSupport - implementation.

      -
    • - -
    • -

      Bug fixed: [1803298] - Parser error while parsing macro with loop variables

      -
    • - -
    • -

      Bug fixed: [1824122] - Loading templates from JAR files could lead to leaking of file - handles (due to a bug in the Java API implementation of - Sun).

      -
    • - -
    • -

      Bug fixed: Cached template is now removed from the cache - if the re-loading of the modified template file fails, so no - staled template is served.

      -
    • -
    - - - - - - -

    -Documentation changes

    - - -
    -
      -
    • -

      Substantial reworkings in the Template Authors's Guide - (which was previously called Designer's Guide), especially in - the Getting Started section.

      -
    • - -
    • -

      #{...} is documented as deprected - construct from now.

      -
    • - -
    • -

      The "transform" term is now removed from the - documentation. Instead the more general "user-defined directive" - term is used, which encompasses macros, - TemplateTransformModel-s and the new - TemplateDirectiveModel-s, which are just - different ways of implementing user-defined directives.

      -
    • - -
    • -

      Some more minor improvements in the Manual.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_12.html b/fmpp/docs/freemarker/versions_2_3_12.html deleted file mode 100644 index 5597dc9..0000000 --- a/fmpp/docs/freemarker/versions_2_3_12.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.12 - - - - - - - - -
    - - - - - -

    -2.3.12

    - - -

    Date of release: 2008-02-03

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bug fixed: [1857161] - JSP SimpleTag support was broken in - 2.3.11.

      -
    • - -
    • -

      In the templates, now you can conveniently call Java - methods that use the Java 5 varargs feature (variable-length - argument lists). Also the overloaded-method chooser logic now - considers vararg methods more intelligently.

      -
    • - -
    • -

      Enum constants are now identified by their - name() instead of by their - toString() (because the latter can be - overridden in subclasses). This doesn't affect the way enum - constants are printed; of course that still uses - toString().

      -
    • - -
    • -

      Messages in parser exceptions now display the name of the - template.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_13.html b/fmpp/docs/freemarker/versions_2_3_13.html deleted file mode 100644 index faf35be..0000000 --- a/fmpp/docs/freemarker/versions_2_3_13.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.13 - - - - - - - - -
    - - - - - -

    -2.3.13

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2008-05-05

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      New built-ins for rounding numbers: - round, floor, - ceiling. See more here...

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      [1898300], - [1818742], - [1780882]: - Reworked template caching mechanism for radically improved - concurrent performance, with help from Azul Systems engineers. - (Achieved 20x speedup with Struts2 webapps on a 128-CPU Azul - device compared to 2.3.12.) Also, template loading (including - parsing) errors are now cached, improving performance in - applications that often try to get missing templates.

      -
    • - -
    • -

      [1892546] - Allow for custom TemplateLoader in - FreemarkerServlet.

      -
    • - -
    • -

      Bug fixed: [1725107] - Using the FreeMarker JSP taglib support with Servlet 2.4 may - generates XML validation warnings.

      -
    • - -
    • -

      Bug fixed: [1939742] - ConcurrentModificationException on accessing - nonexistent SimpleHash entries in a - loop

      -
    • - -
    • -

      Bug fixed: [1902012] - IteratorModel eats exception causes

      -
    • - -
    • -

      Bug fixed: <#assign - x></#assign> (empty nested content) has - caused NullPointerException

      -
    • - -
    • -

      Bug fixed: [1926150] - CachedTemplate should be serializable

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_14.html b/fmpp/docs/freemarker/versions_2_3_14.html deleted file mode 100644 index 5c2f246..0000000 --- a/fmpp/docs/freemarker/versions_2_3_14.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.14 - - - - - - - - -
    - - - - - -

    -2.3.14

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2008-09-01

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      New built-in: xhtml. See more here...

      -
    • - -
    • -

      New special variable: template_name. - See more here...

      -
    • - -
    • -

      Now you can use the values of parameters as the defaults - of other parameters, for example <#macro section - title label=title>. In earlier versions it worked - unreliably. There are no restriction regarding the order of - parameters, like <#macro section label=title - title> works too.

      -
    • - -
    • -

      Added a new number format - specifier, computer. This uses the - same formatting as - exp?c.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      The constructor to - freemarker.ext.servlet.AllHttpScopesHashModel - is now public, allowing it to be reused in 3rd party web - frameworks.

      -
    • - -
    • -

      Bugfix: - freemarker.ext.beans.SimpleMapModel (unlike - either freemarker.ext.beans.MapModel or - freemarker.template.SimpleHash) didn't allow - lookup by java.lang.Character key when passed - a single-character string as a key.

      -
    • - -
    • -

      Bugfix: permissive unwrapping in - freemarker.template.utility.DeepUnwrap class - was not recursively permissive with elements of sequences and - hashes.

      -
    • - -
    • -

      Bugfix: freemarker.ext.beans.MapModel - returns BeansWrapper.wrap(null) instead of - null for null values - explicitly bound into the map.

      -
    • - -
    • -

      Bugfix: Fixed a subtle bug with property getters of - classes implementing a type-parametrized interface.

      -
    • - -
    • -

      Bug fixed: A further corner case of [1939742].

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_15.html b/fmpp/docs/freemarker/versions_2_3_15.html deleted file mode 100644 index b14121c..0000000 --- a/fmpp/docs/freemarker/versions_2_3_15.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.15 - - - - - - - - -
    - - - - - -

    -2.3.15

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2008-12-16

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Bug fixed: Hash concatenation (like hash1 + - hash2) shuffled the order of keys/values even if both - hashes were ordered.

      -
    • - -
    • -

      In web pages that are based on the - FreemarkerServlet, you can now use - <@include_page path="..."/> to use - servlet includes. See more here...

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      The BeansWrapper can automatically - detect that classes were reloaded by JavaRebel.

      -
    • - -
    • -

      Fixed a bug that caused null to be - returned from - Environment.getCurrentEnvironment() while - processing autoincludes and autoimports. (See - bug report)

      -
    • - -
    • -

      Fixed a bug that caused - getObject(Object) method on POJOs to not be - recognized as a general get method.

      -
    • - -
    • -

      Substantially improved performance of the - <#break> directive.

      -
    • - -
    • -

      DeepUnwrap now unwraps custom null - model of the current object wrapper into a Java - null.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_16.html b/fmpp/docs/freemarker/versions_2_3_16.html deleted file mode 100644 index d31e3fa..0000000 --- a/fmpp/docs/freemarker/versions_2_3_16.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.16 - - - - - - - - -
    - - - - - -

    -2.3.16

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2009-12-07

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Fixed a bug that caused incorrect unwrapping of sequences - to Java arrays (See - bug report)

      -
    • - -
    • -

      Fixed a bug that caused rounding of float and double - values (See - bug report)

      -
    • - -
    • -

      Created a new - freemarker.runtime.attempt category and - exceptions caught in <#attempt> blocks - are logged into it at a DEBUG severity.

      -
    • - -
    • -

      Fixing the (ages old) problem of - RhinoWrapper not working with all versions of - Rhino because of binary incompatible change of Rhino's - Undefined.instance.

      -
    • - -
    • -

      Fixed bug where TextUtil.XMLEncNQG - didn't escape ]]> as - ]]&gt;.

      -
    • - -
    • -

      Fixed bug where the root directory couldn't be used as the - template base directory, as - FileTemplateLoader believed that the template - is outside the base directory.

      -
    • - -
    • -

      Macro names can no longer be changed through the - API.

      -
    • - -
    • -

      FreemarkerServlet now cooperates with Session Fixation - Attack Protection in Spring Security, see - forum discussion for details.

      -
    • - -
    • -

      Substantially improved performance of the - <#return> directive.

      -
    • -
    - - - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Fixed bug where - anXMLNode.@@markup - and @@nested_markup didn't escape - ]]> as - ]]&gt;.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_17.html b/fmpp/docs/freemarker/versions_2_3_17.html deleted file mode 100644 index e3b60b0..0000000 --- a/fmpp/docs/freemarker/versions_2_3_17.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.17 - - - - - - - - -
    - - - - - -

    -2.3.17

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2011-05-17

    It's possibly urgent to update to this version because of a - security fix!

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      ?seq_index_of and - ?seq_last_index_of now works on collections - (freemarker.template.TemplateCollectionModel-s) - too, not only on sequences - (freemarker.template.TemplateSequenceModel-s).

      -
    • - -
    • -

      ?long now works for date, date-time or - time values, and returns the milliseconds since the epoch (as - java.util.Date.getTime()).

      -
    • - -
    • -

      To convert numbers (usually Java - long-s) to date or date-time and time values, - ?number_to_date, - ?number_to_time, - ?number_to_datetime was added. See more here... - (Unfortunately, ?date and like can't be - extended to support this due to backward compatibility - issues.)

      -
    • - -
    • -

      New built-ins to format numbers with ISO 8601 "extended" - format regardless of the current date/time formatting settings, - and even regardless of the current time zone setting. For - example ${myTimeStamp?iso_utc} will print - something like 2010-05-16T23:05:45Z. See more here...

      -
    • - -
    • -

      New special variable, - now. This returns the current date-time. - Usage examples: "Page generated: ${.now}", - "Today is ${.now?date}", "The - current time is ${.now?time}".

      -
    • - -
    • -

      ?sort and ?sort_by - now supports sorting boolean values.

      -
    • - -
    • -

      When using unsupported or unknown string built-in flags, - FreeMarker will now log - warnings (maximum 25 times per class-loader, to prevent flooding - the log). It's certain that starting from FreeMarker 2.4 these - will count as errors.

      -
    • - -
    • -

      Bug fixed [3047201]: - Using regular expressions (like with ?match) - could cause lockup in multi-threaded environment, also memory - leakage when using dynamically generated regular - expressions.

      -
    • - -
    • -

      Bug fixed: ?seq_contains, - ?seq_index_of and - ?seq_last_index_of has failed with - non-java.util.List - java.util.Collection-s that are wrapped with - pure BeansWrapper (not the - DefaultObjectWrapper) as - TemplateSequenceModel. (See also: - getSupportsIndexedAccess() below)

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Security fix: - Using carefully crafted template names (template paths) that - contain code point 0 ('\u0000'), it was - possible to load files from outside the template root directory - like if they were FreeMarker templates. The root of the problem - is that the underlying native C/C++ part (which belongs to the - Java platform or to the OS) interprets the 0 as the end of the - string, while Java (and hence FreeMarker and the Servlet - container) doesn't. Thus a path that looked safe for FreeMarker - become unsafe on the lower level. The problem is present with - all ways of loading templates by name - (Configuration.getTemplate(...), - <#include - ...>, - <#import - ...>).

      - -

      You are not affected if you don't allow users to upload - templates and also at least one of these stands:

      - -
      -
        -
      • -

        In your system users can't provide arbitrary strings - as template names (template paths). For example, if users - are only allowed to visit the URL-s that belong to the MVC - Controller (like they can't visit *.ftl) - then they can't suggest arbitrary template names.

        -
      • - -
      • -

        The template names are part of the path in the Web - page URL, and your webserver or Servlet container disallows - URL-s that contain %00, or terminate the - URL at it before passing it to the servlets.

        -
      • - -
      • -

        You are using FileTemplateLoader - and linking is not allowed in it (by default it isn't - allowed).

        -
      • -
      - -
    • - -
    • -

      FreeMarker now can log its messages directly using SLF4J - or Apache Commons Logging. However, it will not use these logger - libraries automatically, until 2.4; see more here... But it's - recommended to switch to SLF4J now.

      -
    • - -
    • -

      New setting: "auto_flush", - Configurable.setAutoFlush(boolean). Sets - whether the output Writer is automatically - flushed at the end of Template.process(Object, - Writer) (and its overloads). The default is - true, which corresponds to the earlier - behavior. Using false is needed for example - when a Web page is composed from several boxes (like portlets, - GUI panels, etc.) that aren't inserted with - #include (or with similar directives) into a - master FreeMarker template, rather they are all processed with a - separate - Template.process(...) - call. In a such scenario the automatic flushes would commit the - HTTP response after each box, hence interfering with full-page - buffering, and also possibly decreasing performance with too - frequent and too early response buffer flushes.

      -
    • - -
    • -

      Added new setting: - Configuration.setNewBuiltinClassResolver(TemplateClassResolver), - or new_builtin_class_resolver property. This - allows you to specify how the new built-in - (like in "com.example.SomeClass"?new()) - resolves classes and which classes are accessible at all. If you - are allowing not-so-much-trusted users to upload templates, you - should be definitely interested; see the Java API docs of - freemarker.core.Configurable.setSetting and - freemareker.template.Configuration.setNewBuiltinClassResolver. - Otherwise it's still recommended to set this to - TemplateClassResolver.SAFER_RESOLVER (or - safer if you are using properties), although - that's not 100% backward compatible (see Java API docs) .

      -
    • - -
    • -

      Added - freemarker.cache.NullCacheStorage: Setting - this as the cache storage in Configuration - disables caching.

      -
    • - -
    • -

      Added getSupportsIndexedAccess() to - freemarker.ext.beans.CollectionModel, so one - can check if TemplateSequenceModel.get(int) - will work with a particular CollectionModel - instance or not.

      -
    • - -
    • -

      Bug fixed [2992265]: - JSP FreeMarkerPageContext.include behaved - incorrectly.

      -
    • - -
    • -

      Bug fixed: When using FreeMarker's JSP support with JSP - tags that use - javax.servlet.jsp.PageContext.pushBody (like - some Stripes tags), "ArrayIndexOutOfBoundsException: - -1" occurred inside - freemarker.ext.jsp.FreeMarkerPageContext.popWriter.

      -
    • - -
    • -

      Bug fixed [3033015]: - AllHttpScopesHashModel used - WrappingTemplateModel.getDefaultObjectWrapper() - for wrapping variables in the page scope, while used the - user-specified ObjectWrapper for all other - scopes (request, session, etc.). Now it uses the user-specified - wrapper in the page scope as well.

      -
    • - -
    • -

      Bug fixed [3128073]: - HashAdapther.containsKey(...) returned - true for a key that doesn't exist when - unwrapping the key has failed. As a side effect of the fix, - BeansWrapper.CAN_NOT_UNWRAP is now private; - earlier it was public by mistake.

      -
    • - -
    • -

      Big fixed [3151085]: - freemarker.jsp.TaglibFactory didn't locate - tld files properly. This fix gives better compliance with JSP - specification for resolving and loading tld files.

      -
    • - -
    • -

      Bug fixed: Unwrapping null with a - BeansWrapper that had a custom null-model - didn't result in null. Now both unwrapping - null and the custom null-model gives - null.

      -
    • - -
    • -

      Log messages doesn't contain line-breaks (CR or LF) - anymore and quote paths and other arbitrary text with Java - string literal syntax that also escapes < - characters as \u003C. These address security - concerns related to poor quality log appenders and buggy log - readers. This change is mostly noticeable on template processing - error entries, which will now quote the exception message. Note - that how stack traces (the Throwable objects) - are logged is still up to the logging framework you are - using.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      The DTD-s and XSD-s that are included in - freemarker.jar under - freemarker/ext/jsp are now under Apache - Software License, Version 2. This is also clarified in the - LICENSE.txt. Earlier these files had no clear - license terms.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_18.html b/fmpp/docs/freemarker/versions_2_3_18.html deleted file mode 100644 index ce709da..0000000 --- a/fmpp/docs/freemarker/versions_2_3_18.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.18 - - - - - - - - -
    - - - - - -

    -2.3.18

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2011-05-21

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix [3304568]: - 2.3.17 didn't find TLD-s in WEB-INF\lib\*.jar - unless they were explicitly pointed in the - web.xml with a taglib - element. This bug was introduced in 2.3.17.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Added LICENSE.txt and - NOTICE.txt to - freemarker.jar under - META-INF.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_19.html b/fmpp/docs/freemarker/versions_2_3_19.html deleted file mode 100644 index 7e36441..0000000 --- a/fmpp/docs/freemarker/versions_2_3_19.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.19 - - - - - - - - -
    - - - - - -

    -2.3.19

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2012-02-29

    Don't miss the security related - changes, they may affect your application!

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Attention: The output of ISO 8601 date/time formatting - built-ins, introduced in 2.3.17, was slightly changed. - From now on, the time zone offset, when it's displayed and it - isn't Z, always includes the minutes. For - example, 15:30:15+02 becomes to - 15:30:15+02:00 in the template output. Both - formats are valid according to ISO 8601 (so anything that - expects ISO 8601 date/times should continue working), but only - the last format complies with the XML Schema date/time formats, - hence this change.

      -
    • - -
    • -

      New built-in for escaping inside JSON string literals: - json_string.

      -
    • - -
    • -

      Bugfix: Wrong # tags were printed as - static text instead of causing parsing error if there was no - correct # tag earlier in the same template. - Since fixing this would not be 100% backward compatible, the old - behavior has remained, unless you set the - incompatible_enhancements setting - (Configuration.setIncompatibleEnhancements(String)) - to "2.3.19" or higher.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Attention: This - release contains two important security workarounds that - unavoidably make it obvious how some applications can be - exploited. FreeMarker can't solve these issues on all - configurations, so please read the details instead of just - updating FreeMarker! Also, these changes are not 100% - backward compatible in theory, however it's not probable that - they will break anything. The two changes are:

      - -
      -
        -
      • -

        The character with character code 0 - (\u0000) is not allowed in template paths - anymore. When a path contains it, FreeMarker behaves as if - the template was not found.

        - -

        This is to fix the security problem where a template - path like "secret.txt\u0000.ftl" is used - to bypass extension filtering in an application. FreeMarker - itself doesn't care about the extension, but some - applications decide based on the extension if they will - delegate a path to FreeMarker. When they do with such a - path, the C/C++ implementation behind the storage mechanism - may sees the path as "secret.txt" as the - 0 terminates the string in C/C++, and thus load a non-FTL - file as a template, returning the file contents to the - attacker.

        - -

        Note that some HTTP servers, notably Tomcat and the - Apache HTTP Server blocks URL-s where the URL contains 0 - (%00) outside the query string, thus this - wasn't exploitable there through such Web URL-s. Some other - HTTP servers however, like Jetty, doesn't block such - URL-s.

        -
      • - -
      • -

        ClassTemplateLoader, when it's - created with base path "/" (like with - new ClassTemplateLoader(someClass, "/")), - will not allow template paths that contain colon earlier - than any /, and will act like if the - template was not found in such case.

        - -

        This is to fix the security problem where a template - path like "file:/etc/secret" or - "http://example.com/malware.ftl" is - interpreted as a full URL by a - java.net.URLClassLoader in the - class-loader hierarchy, and thus allow loading files from - these URL-s as templates. This is a quirk (or bug) of - java.net.URLClassLoader, thus this - problem only exists on systems that use such - class-loaders.

        - -

        Beware, some frameworks use their own - TemplateLoader implementations, and if - those are vulnerable, they will remain so after updating - FreeMarker too! Note that this exploit only works if the - class-loader hierarchy contains an - URLClassLoader and the class-loader is - used to load templates without adding any prefix before the - template path (other than "/").

        -
      • -
      - - -

      These security issues mostly only affect applications - where the user (the visitor) can supply arbitrary - template paths to the application. This is not the - case with properly built MVC applications, as there only the MVC - Controller can be addressed directly, and it's the Controller - that specifies the template paths. But legacy MVC applications - based on JSP - Model-2 often expose the MVC Views as public URL-s ending - with .ftl, thus allowing the user to give - arbitrary paths to FreeMarker. Such applications should be - secured with a security-constratint in - web.xml as shown in the related Manual - section. This should be done regardless of the current - security fixes.

      - -

      In general, you should not allow users to specify - arbitrary template paths, or if you do allow that, you should be - extra careful with the TemplateLoader - used.

      -
    • - -
    • -

      Configuration has new methods: - removeTemplateFromCache(...). This will - remove the given template for the given locale from the cache, - so it will be re-loaded regardless of the template update delay - when it's next time requested.

      -
    • - -
    • -

      BeansWrapper ignores setter methods - from now when introspecting classes. They weren't used anyway, - so they unnecessarily caused - "java.beans.IntrospectionException: type - mismatch between read and write methods" errors.

      -
    • - -
    • -

      TemplateClassResolver.SAFER_RESOLVER - now disallows creating - freemarker.template.utility.JythonRuntime and - freemarker.template.utility.Execute. This - change affects the behavior of the new built-in - if FreeMarker was configured to use - SAFER_RESOLVER, which is not the default - until 2.4 and is hence improbable.

      -
    • - -
    • -

      Bug fixed: Calling varargs methods now indeed works. - (Earlier it only worked for overloaded methods.)

      -
    • - -
    • -

      Bug fixed [1837697] - [2831150] - [3039096] - [3165425]: - Jython support now works with Jython 2.2 and 2.5.

      -
    • - -
    • -

      Bug fixed [3325103]: - TemplateException-s and - ParseException-s are now serializable.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_2.html b/fmpp/docs/freemarker/versions_2_3_2.html deleted file mode 100644 index 6192e68..0000000 --- a/fmpp/docs/freemarker/versions_2_3_2.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.2 - - - - - - - - -
    - - - - - -

    -2.3.2

    - - -

    Date of release: 2005-01-22

    Bugfix release.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: If you use JSP taglibs in FreeMarker templates, - FreeMarker possibly tried to get DTD-s from the Sun Web site - because of a bug introduced with FreeMarker 2.3.1. This was a - serious problem since if your server is offline or the Sun Web - site becomes temporarily inaccessible the templates that are - using JSP taglibs will possibly die with error.

      -
    • - -
    • -

      Bugfix: The DefaultObjectWrapper has - ignored the value of the nullModel property. - (Note that it's discouraged to use a ``null model''.)

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_20.html b/fmpp/docs/freemarker/versions_2_3_20.html deleted file mode 100644 index a69ab5d..0000000 --- a/fmpp/docs/freemarker/versions_2_3_20.html +++ /dev/null @@ -1,774 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.20 - - - - - - - - -
    - - - - - -

    -2.3.20

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2013-06-27

    If you are IDE/tools author, note these changes.

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Error message quality improvements:

      - -
      -
        -
      • -

        Many error messages are now more helpful, especially - for users who are not experienced with FreeMarker. For - example, some of the most common user mistakes are - recognized and tips are shown to fix them, reducing support - costs or the time employees spend to figure them out.

        -
      • - -
      • -

        It's now ensured that the error location in the - template is included in the message returned by - TemplateException.getMessage(). The stack - trace always showed this information anyway, but some users - only see the "message", not the stack trace, - and that often didn't contained the location.

        -
      • - -
      • -

        The template language part of the stack trace is now - more detailed, and easier to understand. This is especially - helpful in applications that use a complex library of macros - and functions.

        -
      • - -
      • -

        Several smaller bugs were fixed that made the error - information wrong or lacking.

        -
      • - -
      • -

        The layout of the error messages is now more - consistent, and generally easier to read.

        -
      • -
      - -
    • - -
    • -

      Changes regarding boolean to string conversions and - formatting:

      - -
      -
        -
      • -

        ?c (computer-language formatting) - now works with booleans too, always giving - "true" or "false" - regardless of the boolean_format. This - way it's safe for generating JavaScript in a context where - human-readable text is also rendered.

        -
      • - -
      • -

        If the boolean_format setting is - set to anything but the default - "true,false" value, boolean values will - be automatically converted to string where a string value is - expected by the template language, instead of giving an - error. This helps you spare - those?string-s after boolean values. This - is the same logic as with numbers and dates, which were - always automatically converted to string, according the - corresponding format setting. Except, the provided default - boolean format is useless for automatic conversion (but it's - still there for ?string, for backward - compatibility), hence it must be set manually. (We certainly - couldn't come up with a sensible default anyway, as for - booleans it depends too much on the application, not to - mention the localisation issues.)

        - -

        Exactly like with numbers and dates, automatic - conversion doesn't happen in these cases:

        - -
        -
          -
        • -

          Comparisons, i.e., someBoolean == - 'true' is still an error

          -
        • - -
        • -

          Method calls where the declared type of the - parameter is String but the actual - value is a boolean; still an error

          -
        • - -
        • -

          When the boolean value is used as key in - expr[key], - it's still an error (there was no automatic conversion - there for other types either, as numerical and string - keys have different meaning)

          -
        • - -
        • -

          The opposite direction, i.e., string to boolean - conversion; won't happen

          -
        • -
        - -
      • -
      - -
    • - -
    • -

      New built-ins for numbers: abs, is_nan, - is_infinite. - Like n?abs will give the absolute value of - n.

      -
    • - -
    • -

      New built-in for sequences: join. Like - [1, 2, 3]?join(", ") will give the string - "1, 2, 3".

      -
    • - -
    • -

      If you set the - incompatible_improvements setting (see here) - to 2.3.20 or higher, ?html - will escape apostrophe-quotes just like - ?xhtml does. Utilizing this is highly - recommended, because otherwise if interpolations are used inside - attribute values that use apostrophe-quotation (<foo - bar='${val}'>) instead of plain quotation mark - (<foo bar="${val}">), they might - produce HTML/XML that's not well-formed. Note that - ?html didn't do this because long ago there - was no cross-browser way of doing this, but it's not a real - concern anymore. Also note that this will be the default - behavior starting from 2.4.

      -
    • - -
    • -

      Bug fix [390] - (and other improvements): ?js_string and - ?json_string didn't escape the - u2028-u2029 line - terminators (problem for JavaScript) and the - u007F-u009F control - characters (maybe a problem in JSON, depending on - implementation). Furthermore, the escaping of - \, <, and - > become safer in that now they are - escaped whenever it can't be guaranteed that they won't be part - of <!, ]]> or - </. Earlier they were only escaped when it - was known that they are part of these patterns, thus it was - possible to assemble these patterns from two adjacent - interpolations. Additionally, from now on - <? and --> also - count as dangerous patterns, and will trigger - < and > - escaping.

      -
    • - -
    • -

      Bug fixed: The following string built-ins didn't coerce - the numerical, date (and now the boolean) left-values to string, - instead they threw a type error: contains, - index_of, last_index_of, - left_pad, right_pad, - matches, replace, - split, new. The other - string built-ins already did this conversion for a long time; - this was an accidental inconsistency.

      -
    • - -
    • -

      Bug fixed: With the default arithmetic engine, it's now - supported to compare infinite (positive or negative) with 0, to - decide its sign.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      BeansWrapper introspection cache - improvements:

      - -
      -
        -
      • -

        Added public API to BeansWrapper - for clearing the class cache: - clearClassIntrospecitonCache(), - removeFromClassIntrospectionCache(Class)

        -
      • - -
      • -

        Significantly improved multi-core performance:

        - -
        -
          -
        • -

          Uses ConcurrentHashMap when - running on Java 5 or later.

          -
        • - -
        • -

          The cache won't block readers while introspecting - a class after a cache miss

          -
        • - -
        • -

          If multiple threads need to introspect the same - class that's not in the cache yet, only one of them will - do it, the others will wait for its results.

          -
        • -
        - -
      • - -
      • -

        Bug fix [361]: - There was a small chance of deadlock when class-reloading - was detected. Locking was redesigned to prevent such - oversights in the future.

        -
      • - -
      • -

        The internal package-visible - freemarker.ext.beans API was slightly - changed as the result of internal cleanup. Nobody but the - FreeMarker developers should define classes in that package, - so it shouldn't break anything. But if somebody did some - in-house hacks there, re-compile to see if it still - works.

        -
      • -
      - -
    • - -
    • -

      Nameless templates (those directly created with - new Template(null, - ...) instead of loaded - through Configuration) couldn't include or - import other templates, and thrown a - NullPointerException when they tried to. Now - they resolve relative paths as if they were in the template root - directory.

      -
    • - -
    • -

      Bug fix: Regular expression built-ins and some logger - libraries (most importantly Log4J) were unavailable on the - Google App Engine platform. This fix is only present in the - GAE-compatible build, 2.3.20-gae.

      -
    • - -
    • -

      Added new method to Configuration: - CacheStorage getCacheStorage()

      -
    • - -
    • -

      Added new methods to Environment to - make comparisons among TemplateModel-s - according the rules of the template language operators: - applyEqualsOperator, - applyEqualsOperatorLenient, - applyLessThanOperator, - applyLessThanOrEqualsOperator, - applyGreaterThanOperator, - applyWithGreaterThanOrEqualsOperator

      -
    • - -
    • -

      Added new method, - Environment.isInAttemptBlock() to check if we - are within an #attempt block. This can be - useful for TemplateExceptionHandler-s, as - then they don't need to print the error to the output since - #attempt will roll it back anyway. This is - already utilized by the built-in - TemplateExceptionHandler-s - (DEBUG_HANDLER and - HTML_DEBUG_HANDLER).

      -
    • - -
    • -

      Added convenience constructor Template(String - name, String sourceCode, Configuration cfg).

      -
    • - -
    • -

      TemplateException-s and - TemplateModelExcepton-s now can have - Throwable cause, not just - Exception (it was an old oversight that - somehow wasn't fixed so far).

      -
    • - -
    • -

      Parsing error messages under the JBoss Tools FreeMarker - IDE now doesn't contain the usual location line, so that the - actual error description is immediately visible in the Eclipse - "Problems" view. (It's a "hack" in - FreeMarler itself; it tries to detect if it runs under the - plugin and then changes its behavior.)

      -
    • - -
    • -

      Mostly concerning tool (like IDE plugin) authors:

      - -
      -
        -
      • -

        The error message formats (what - Throwable.getMessage() returns) were - heavily changed for TemplateException-s, - and somewhat for ParseException-s. It's - unlikely that anybody depends on these, but if you tried to - parse these messages, be aware of this.

        -
      • - -
      • -

        Fixed bug where ParseException has - contained 0 as line and column number for lexical errors. - Now it contains the correct information.

        -
      • - -
      • -

        Added - ParseException.getEditorMessage(): As in - IDE-s the error markers show the error location to the user - already, the location should not be repeated in the error - message. So in IDE-s you should use this method instead of - getMessage(). (Under JBoss Tools: - FreeMarker now tries to detect that it - runs under the plugin, and then it already does this, except - that it still shows the column number as that's missing from - the error marker location.)

        -
      • - -
      • -

        Added - ParseException.getTemplateName()

        -
      • - -
      • -

        Added - Configuration.getSupportedBuiltInNames(). - As new built-ins - (expr?builtin_name) - are very often added to new FreeMarker versions, - auto-completion or syntax highlighting should use this set - instead of a fixed set of a names.

        -
      • - -
      • -

        The format returned by - TemplateElement.getDescription() was - heavily changed. It's what FTL stack traces and maybe some - outline views (tree-views) show. It was always for human - reading (and till now was too inconsistent for anything - else), so it's unlikely that this breaks anything.

        -
      • - -
      • -

        There were some smaller changes in - freemarker.debug, and it's expected that - there will be more, so it was marked as experimental. As far - as we know, nobody used it, so it shouldn't break - anything.

        -
      • -
      - -
    • - -
    • -

      In experimental status only, but - freemarker.jar is now an OSGi bundle (see - freemarker.jar/META-INF/MANIFEST.MF). - Depending on user feedback, the bundle description may change in - the future. So please give feedback, especially if you are an - OSGi expert!

      -
    • - -
    • -

      Improved the HTML generated by - HTML_DEBUG_HANDLER (the - red-on-yellow-background error message). Most importantly, now - it will word-wrap. Other changes are minor, like now it can - break out of CDATA sections, or now it has less intense - colors.

      -
    • - -
    • -

      New Template method, - getActualTagSyntax(): Tells if the template - is using traditional or square-bracket syntax. As the syntax can - be overridden in the template, also it's possibly decided by - auto-detection, it wasn't trivial to it tell till now.

      -
    • - -
    • -

      Added some utility methods that are useful for generating - error messages in custom directives: - ClassUtil.getFTLTypeDescription(TemplateModel), - getShortClassName, - getShortClassNameOfObject

      -
    • - -
    • -

      Bug fix [364]: - freemarker.template.EmptyMap (which is passed - to TemplateDirectiveModel-s if there are no - parameters) now allows remove(key), - clear() and - putAll(anyEmptyMap) as these do nothing - anyway.

      -
    • - -
    • -

      Bug fix [375]: - NullPointerException on IBM J9 VM (not on the - Sun/Oracle implementation) in BeansWrapper - when the Java implementation legally returns - null for some BeanInfo - getters.

      -
    • - -
    • -

      Bug fix: Cloning a Configuration didn't - deep-clone the data structures storing the - auto_imports and - auto_includes settings, hence possibly - leading to aliasing problems.

      -
    • - -
    • -

      Bug fix [377]: - After a failed method call the exception handler could fail in - the rare occasion when - targetObject.toString() fails, raising a - runtime exception that not even the attempt - directive will catch.

      -
    • - -
    • -

      Bug fix [391]: - If a template name has contained * that was - not the only character in the path step, it threw - NegativeArraySizeException instead of - FileNotFoundException.

      -
    • - -
    • -

      With the default arithmetic engine, performance - optimizations of comparison operations when some of the numbers - is 0, and when the sign of the numbers differ.

      -
    • - -
    • -

      Some smaller fixes in - TemplateElement.getCanonicalForm(), also some - quality improvements there.

      -
    • - -
    • -

      Bug fixes in classic_compatible mode - (this mode is to help migrating from FreeMarker 1), thanks to - Information Mosaic:

      - -
      -
        -
      • -

        When a macro was called with a - null/missing parameter value, it has - caused error like in FreeMarker 2.3

        -
      • - -
      • -

        When a hash literal contained reference to a - null/missing variable, like in { - 'a': missingVar }, it has caused an error like in - 2.3

        -
      • - -
      • -

        When a sequence literal contained reference to a - null/missing variable, like in - [1, missingVar], it has caused an error - like in 2.3

        -
      • - -
      • -

        When a the left-side of the . (dot) - or [key] - operator was null or missing variable, - like in missingVar.subVar, it has caused - an error like in 2.3

        -
      • - -
      • -

        When BeanModel-s are tried to be - treated as strings, for most subclasses it has failed with - type error, like in 2.3. In FreeMarker 1 all - BeanModel-s were - TemplateScalarModel-s, so it should - succeed. The fix for this only works where FreeMarker - coerces to string (string built-ins on - the left-side and concatenation (+) and - interpolation - (${...}) do - that), otherwise unfortunately it will still fail.

        -
      • - -
      • -

        The classic_compatible setting now - accepts value 2 along - true (alias 1) and - false (alias 0). - 2 means true but with - emulating bugs in early 2.x classic-compatibility mode. - Currently this only affects how booleans are converted to - string; with 1 it's always - "true"/"", but with - 2 it's "true"/"false" - for values wrapped by BeansWrapper as - then Boolean.toString() prevails. Note - that - someBoolean?string - will always consistently format the boolean according the - boolean_format setting, just like in - FreeMarker 2.3.

        -
      • -
      - -
    • - -
    • -

      Bug fix [394]: - When trying to access the optional Jython (or W3C DOM) classes - has failed in DefaultObjectWrapper with an - Error, rather than with an - Exception, loading the - DefaultObjectWrapper class itself has failed, - instead of the Jython (or W3C DOM) support being disabled. From - now in, it will survive any kind of Throwable - there, and if the Throwable is not an - ClassNotFoundException, it will also log the - Throwable.

      -
    • - -
    • -

      Improved the performance of - (thisVarIsMissing.foo)!default and similar - parenthetical existence operators and - existence built-ins in the case when the - null/missing variable is not the last step - inside the parenthesis. In that case it's about 30 times faster - now, measured on Java 6. In other cases (when all variables - exists, or the the last step is missing) the performance is - about the same (relatively fast) as before.

      -
    • - -
    • -

      Added interface - freemarker.cache.CacheStorageWithGetSize - which allows querying the current number of cache entries in a - CacheStorage that implements it. It's - implemented by all out-of-the-box - CacheStorage implementations. Also added - getStrongSize() and - getSoftSize() to - MRUCacheStorage.

      -
    • - -
    • -

      Version and build information changes:

      - -
      -
        -
      • -

        The form of the nightly build version numbers has - changed to be Maven/JSR 277 compliant. What earlier was - 2.3.19mod is now something like - 2.3.20-nightly_20130605T130506Z (note how - the last points to the target release version instead of the - last release version).

        -
      • - -
      • -

        The form of the Release Candidate and Preview version - numbers where changed to be Maven/JSP 277 compliant: - 2.4pre2 is now - 2.4.0-pre02, 2.4rc1 is - now 2.4.0-rc01.

        -
      • - -
      • -

        Added new static method to - Configuration to query build date: - getBuildDate(). This is also printed by - the main command line class.

        -
      • -
      - -
    • - -
    • -

      Various internal code cleanups.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Many JavaDoc improvements, mostly in the documentation of - the basic (most frequently used) classes.

      -
    • - -
    • -

      FreeMarker source code has moved to GitHub (https://github.com/freemarker/freemarker), - other project resources has remained on sourceforge.net.

      -
    • - -
    • -

      Project structure cleanup, Ivy-based build script.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_21.html b/fmpp/docs/freemarker/versions_2_3_21.html deleted file mode 100644 index 3769643..0000000 --- a/fmpp/docs/freemarker/versions_2_3_21.html +++ /dev/null @@ -1,1549 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.21 - - - - - - - - -
    - - - - - -

    -2.3.21

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2014-10-12

    Note that since 2.3.21 is designed to be backward compatible - with the previous 2.3.x releases, some of the improvements - and fixes described below are only activated when you specifically ask - for 2.3.21 "incompatible improvements", - because they could, with very small chance, break existing - applications. If the dependent project is still actively developed, - allowing 2.3.21 "incompatible improvements" is highly recommended. - That can be achieved on various ways:

    -
      -
    • -

      Create the - freemarker.template.Configuration object like - new - Configuration(Configuration.VERSION_2_3_21)

      -
    • - -
    • -

      Or alter the Configuration where you - initialize its other settings like - cfg.setIncompatibleImprovements(Configuration.VERSION_2_3_21)

      -
    • - -
    • -

      Or if you are configuring FreeMarker with properties - (*.properties file or - java.util.Properties object), add - incompatible_improvements=2.3.21 to - them.

      -
    • - -
    • -

      Or if you are configuring FreeMarker through - FreemarkerServlet, add this - init-param to it in the - web.xml:

      - -
      -
      -<init-param>
      -    <param-name>incompatible_improvements</param-name>
      -    <param-value>2.3.21</param-value>
      -</init-param>  
      - -
    • -
    -

    Note that we have changed our proprietary BSD-style license to - Apache License, Version 2.0. See the new - license here.

    Note that the minimum required Java version was increased from - 1.2 to 1.4.

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Improved ranges:

      - -
      -
        -
      • -

        Added ranges with exclusive end: - start..<end - (also can be written as - start..!end). - More...

        -
      • - -
      • -

        Added length limited ranges: - start..*length: - For example, 10..*4 gives [10, - 11, 12, 13], 10..*-4 gives - [10, 9, 8, 7], and - 10..*0 gives []. When - these kind of ranges are used for slicing, the slice will - end without error if the end of the sliced sequence or - string is reached before the specified range length was - reached. Thus, for example, to take the first 10 characters - from the string s, or less if - s is shorter than 10 characters, you can - use s[0..*10]. More...

        -
      • - -
      • -

        Square bracket now accepts range values from any - source, like <#assign r = 1..3> - ${'foobar'[r]} will print - "oob". Earlier it has only supported - ranges that were specified directly inside the square - brackets, like 'foobar'[1..3].

        -
      • - -
      • -

        When slicing a sequence with a right-unbounded range, - it's now allowed to have a range start index that's one - higher than the last index of the sliced sequence. For - example, ['x', 'y'][2..] is not an error - anymore, but an empty sequence. (Of course, ['x', - 'y'][3..] is still an error.)

        -
      • - -
      • -

        someString?substring(from, - toExclusive) and - someString?substring(from) - are now deprecated; use this slicing expression instead: - someString[from..<toExclusive] - and - someString[from..]. - A warning if you are processing XML: Since slicing - expressions work both for sequences and strings, and XML - nodes in FTL are typically both sequences and strings at the - same time, there the equivalent expression is - someXmlNode?string[from..<toExclusive] - and - exp?string[from..], - because without the ?string it would - slice the node sequence instead of the text value of the - node.

        -
      • - -
      • -

        If the incompatible_improvements in - the FreeMarker configuration is set to at least 2.3.21, - right-unbounded ranges become readable (like - #list-able). Earlier they could only be - used for slicing, and behaved like empty sequences - otherwise.

        -
      • -
      - -
    • - -
    • -

      New built-in, ?url_path: This is the - same as the - url built-in, except that it doesn't - escape slash (/) characters. This meant to be - used for converting paths (like paths coming from the OS or some - content repository) that use slash (not backslash!) to a path - the can be inserted into the path part of an URL.

      -
    • - -
    • -

      New built-ins for string manipulation:

      - -
      -
        -
      • -

        someString?keep_before(substring[, - flags]): More...

        -
      • - -
      • -

        someString?keep_after(substring[, - flags]): More...

        -
      • - -
      • -

        someString?remove_beginning(substring): - More...

        -
      • - -
      • -

        someString?remove_ending(substring): - More...

        -
      • - -
      • -

        someString?ensure_starts_with(substring[, - substitution[, - flags]]): More...

        -
      • - -
      • -

        someString?ensure_ends_with(substring): - More...

        -
      • -
      - -
    • - -
    • -

      someString?number - now recognizes all XML Schema number formats, like - NaN, INF, - -INF, plus the Java-native formats - Infinity and - -Infinity.

      -
    • - -
    • -

      If incompatible_improvements in the - FreeMarker configuration is set to at least 2.3.21, - someNumber?c will - return "INF", "-INF" and - "NaN" for positive/negative infinity and IEEE - floating point Not-a-Number, respectively. These are the XML - Schema compatible representations of these special values. - Earlier it has returned what - java.text.DecimalFormat did with US locale, - none of which was understood by any (common) computer - language.

      -
    • - -
    • -

      New built-in: - someString?boolean. - This is for example useful for converting "true" and "false" - strings coming from XML to real boolean values. More...

      -
    • - -
    • -

      Date/time/date-time related changes:

      - -
      -
        -
      • -

        Added new kind of - date_format/datetime_format/time_format - setting values: XML Schema formats, starting with - "xs" and ISO 8601:2004 formats, starting - with "iso". The format string can be - continued with various space (or _) - separated options, like h or - m or s or - ms for setting shown accuracy, - nz or fz for setting - time zone offset visibility, and u or, - fu for using UTC time zone . For example, - to use ISO 8601 with minute precision and without the zone - offset being shown, set the - datetime_format setting to "iso - m nz", so then the output will be like - 2014-09-03T20:56. More...

        -
      • - -
      • -

        Because anything that's accepted as - date_format/datetime_format/time_format - setting value can also be used with the - ?string and - ?date/?time/?datetime - build-ins, you can use the new formats like - someDate?string.xs and - someString?date.xs. (For the - "xs" and "iso" - formats, _ can be used instead of space, - which means that, for example, you can write - lastModified?string.iso_m_u instead of - the more verbose lastModified?string["iso m - u"].)

        -
      • - -
      • -

        That "iso" and - "xs" are now possible - date_format/datetime_format/time_format - setting values also means that such values can now be parsed - too via - ?date/?time/?datetime. - The main application is with processing XML DOM-s, as there - values are coming in as strings, and now you can do - something like order.confirmDate?date.xs - to convert them to real dates.

        -
      • - -
      • -

        The ?iso_... - built-ins are now deprecated in favor of the new - setting values described above. They can be set as the - default date/time/date-time format, seamlessly fit into the - formatting architecture (and thus can parse strings too), - and has more/better options (ms always - shows 3 millisecond digits, fz for - forcing showing time zone offset).

        -
      • - -
      • -

        If the "incompatible improvements" - configuration setting is at least 2.3.21, the - ?iso_... built-ins won't show time zone - offset for java.sql.Time values anymore. - Most databases store time values that aren't in any time - zone, but just store hour, minute, second, and decimal - second field values, so showing the time zone doesn't make - sense. (Notable exceptions are PostgreSQL "time with time - zone" columns, where - mzTime?string.iso_fz - could be used.)

        -
      • - -
      • -

        Added ?is_time, - ?is_datetime, - ?is_date_only (should be called - ?is_date, but that was already taken) and - ?is_unknown_date_like to check the exact - type of a date-like value.

        -
      • - -
      • -

        ?is_date is now a deprecated name, - use ?is_date_like instead. This is - because ?is_date sounds like it checks if - the value is a date without time part, but actually it also - returns true for time, date-time, and - unknown date-like values.

        -
      • - -
      • -

        Added ?date_if_unknown, - ?time_if_unknown and - ?datetime_if_unknown built-ins, which - mark a date-like value with some of the sub-types: date - without time, time, or date-time, respectively. However, if - the value already holds this information, the built-in has - no effect. That is, it will never convert the sub-type of a - value, it only adds the sub-type if it was unknown.

        -
      • - -
      • -

        Bug fixed: ISO 8601 dates (via - ?iso_... and "iso" - format settings) now use proleptic Gregorian calendar for - the years before 1582, rather than Julian calendar. This is - (indirectly) required by the standard, and it's also how the - default Sun/Oracle Java XML Schema date/time/dateTime parser - works.

        -
      • -
      - -
    • - -
    • -

      Error message quality improvements (targeting frequent - support requests and some error message bugs):

      - -
      -
        -
      • -

        Fixed glitch where if an #if had - and #else or #elseif, - the - #if/#else/#elseif - wasn't hidden in the FTL stack trace when the error was - inside its nested block.

        -
      • - -
      • -

        Some new context sensitive hints in undefined variable - exception error messages.

        -
      • - -
      • -

        Fixed unclosed directive error messages at end of file - where the wrong unclosed directive name was reported

        -
      • - -
      • -

        Better type error messages when accessing XML data - (applies when wrapped with - freemarker.ext.dom):

        - -
        -
          -
        • -

          Trying to use - node.noSuchChildNodes - on a place where scalar value is expected will explain - that the problem is that you had no matches in the - constructing XML query.

          -
        • - -
        • -

          Trying to use - node.multipleSuchChildNodes - on a place where scalar value is expected will explain - that the problem is that you had multiple matches in the - constructing XML query.

          -
        • - -
        • -

          Trying to use - node.exactlyOneChildNode - as number, date/time/date-time or boolean will explain - that values coming from XML are always strings (text), - and must be converted explicitly via - ?number, ?boolean, - ?date.xs, etc.

          -
        • -
        - -
      • - -
      • -

        Trying to use obj.someMethod - without () on a place where method value - is not expected will recommend calling the method.

        -
      • - -
      • -

        Trying to use methods like - obj.getFoo or - obj.isFoo without ()on - a place where method value is not expected will recommend - using the obj.foo form.

        -
      • - -
      • -

        Messages are now much more readable when rendered in - environments that don't obey to line-breaks. (This often - happens in improperly implemented HTML error pages and logs - viewers.)

        -
      • - -
      • -

        Better FTL instruction stack traces:

        - -
        -
          -
        • -

          Error messages now contain up to 10 lines of FTL - stack trace (unless it's on the top of a full FTL stack - trace), because the FTL stack trace wasn't printed at - all when the exception was a cause exception in a Java - stack trace, or when only the value of - getMessage() was printed instead of a - stack trace.

          -
        • - -
        • -

          The FTL stack trace is now more self explanatory - as it contains more text labels.

          -
        • - -
        • -

          Stack frames that belong to nestings are now - marked differently, and are filtered out when the stack - trace wouldn't fit into the error message otherwise. -

          -
        • -
        - -
      • - -
      • -

        Bug fixed: ?substring has thrown - low level - java.lang.IndexOutOfBoundsException-s - instead of more descriptive - TemplateModelException-s with FTL stack - trace.

        -
      • - -
      • -

        Bug fixed: Slicing with ranges sometimes thrown low - level - java.lang.IndexOutOfBoundsException-s - instead of more descriptive - TemplateModelException-s with FTL stack - trace.

        -
      • - -
      • -

        Bug fixed [402]: - Fixed misleading parser error message when a directive - called without its required parameters (like - <#list>) was reported as unknown - directive.

        -
      • - -
      • -

        Bug fixed [222]: - Poor quality error message when - someString[someIndex] - fails with string index out of bounds.

        -
      • - -
      • -

        Bug fixed [27]: - Not very good quality error messages when - #import-ing a template whose parsing - fails.

        -
      • -
      - -
    • - -
    • -

      New include directive option, - ignore_missing=boolean. - When this is set to true, and the template to - include is missing, the error will be silently ignored, and - nothing will be included.

      -
    • - -
    • -

      The setting directive can now set the - output_encoding setting.

      -
    • - -
    • -

      New special variable: .locale_object. - This is like .locale, except that it's a - java.util.Locale object, not a string. This - is handy if you want to pass the current locale to Java - methods.

      -
    • - -
    • -

      If incompatible_improvements in the - FreeMarker configuration is set to at least 2.3.21, hash - literals that repeat keys now only have the - key once with ?keys, and only has the last - value associated to that key with ?values. - This is consistent with the behavior of - hash[key] - and how maps work in Java.

      -
    • - -
    • -

      Bug fixed: ?is_enumerable has returned - true for Java methods get from Java objects, - despite that those values aren't <#list - ...>-able. (This is actually a historical quirk of - BeansWrapper, not a bug in - ?is_enumerable, but now - ?is_enumerable is aware of this exceptional - case.)

      -
    • - -
    • -

      Bug fixed [257]: - The result value of ?matches wasn't - "reentrant". For example, you couldn't list the - matches inside another listing where you are also listing - exactly the same result value (stored in a common variable), as - they would consume from the same iterator. Most importantly, - even accessing the ?size of the same result - value has terminated the outer listing of the same value.

      -
    • - -
    • -

      Bug fixed [229]: - If you set incompatible_improvements to - 2.3.21 (or higher), unclosed comments (<#-- - ...) and - #noparse-s won't be silently closed at the - end of template anymore, but cause a parsing error - instead.

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Added new Configuration constructor, - Configuration(Version - incompatibleImprovements). This deprecates the vague - Configuration() constructor, and makes using - setIncompatibleImprovements(Version) needless - in most cases. See an example here...

      -
    • - -
    • -

      When setting the - incompatible_improvements setting (like with - the constructor above) to 2.3.21, two setting defaults - change:

      - -
      -
        -
      • -

        The default of the object_wrapper - setting - (Configuration.getObjectWrapper()) - changes from - ObjectWrapper.DEFAULT_WRAPPER to another - almost identical DefaultObjectWrapper - singleton, returned by new - DefaultObjectWrapperBuilder(Version).build(). The - new default object wrapper's "incompatible - improvements" version is set to the same as of the - Configuration. (See later regarding the - 2.3.21 "incompatible improvements" of - BeansWrapper and - DefaultObjectWrapper). Furthermore, the - new default object wrapper doesn't allow changing its - settings; setter methods will throw - IllegalStateException. (If anything tries - to call setters on the old default in your application, - that's a dangerous bug that won't remain hidden now. As the - old default is a singleton too, potentially shared by - independently developed components, most of them expects the - out-of-the-box behavior from it (and the others are - necessarily buggy). Also, then concurrency glitches can - occur (and even pollute the class introspection cache) - because the singleton is modified after publishing.)

        -
      • - -
      • -

        The default of the template_loader - setting - (Configuration.getTemplateLoader()}) - changes to null, which means that - FreeMarker will not find any templates. Earlier the default - was a FileTemplateLoader that used the - current directory as the root. This was dangerous and - fragile as you usually don't have good control over what the - current directory will be. Luckily, the old default almost - never looked for the templates at the right place anyway, so - pretty much all applications had to set - template_loader, so it's unlikely that - changing the default breaks your application.

        -
      • -
      - -
    • - -
    • -

      New BeansWrapper, - DefaultObjectWrapper and - SimpleObjectWrapper constructor that takes a - Version - incompatibleImprovements argument. This has - the same role as the - incompatible_improvements setting of the - Configuration, but it applies to the - ObjectWrapper instead. (As - ObjectWrapper-s are often shared among - multiple Configuration-s, so they can't use - that setting of the Configuration.) In new or - actively developed projects it's recommended to use - Configuration.VERSION_2_3_21 now. The - constructor without the Version parameter is - now deprecated.

      -
    • - -
    • -

      Safer and more memory-efficient way of managing singletons - of DefaultObjectWrapper-s and - BeansWrapper-s that are possibly shared by - independently developed subsystems:

      - -
      -
        -
      • -

        Instead of new - DefaultObjectWrapper(...) - and new - BeansWrapper(...), from - now on you should use new - DefaultObjectWrapperBuilder(version).build() and - new BeansWrapperBuilder(version).build(). - (The builder objects have properties (configuration - settings) like BeansWrapper has, which - specify the properties of the objects created.) The created - objects are singletons (VM-wide, or at - least Web-Application-wide) and read-only (means, - non-configurable, hence safe to share). The main benefit of - using these factories instead of creating new instances is - that it allows FreeMarker to share the class introspection - caches (an internal part of - BeansWrapper-s/DefaultObjectWrapper-s - that is expensive to populate) among the returned instances. - This allow sharing the caches (and the object wrappers) - between components that aren't aware of each other and use - FreeMarker internally.

        -
      • - -
      • -

        Deprecated the static fields - ObjectWrapper.DEFAULT_WRAPPER, - BEANS_WRAPPER and - SIMPLE_WRAPPER, because these - ObjectWrapper-s are configurable (not - read-only), and thus dangerous to use as singletons (a badly - behaving 3rd party component can mess them up). Use the - factories described above instead. They are also more - flexible, as you can specify the desired - incompatible-improvements version for them and various other - BeansWrapper settings.

        -
      • - -
      • -

        Deprecated all SimpleHash, - SimpleCollection and - SimpleSequence constructors that didn't - take an ObjectWrapper argument, as they - have usually used - ObjectWrapper.DEFAULT_WRAPPER as the - default, which itself is deprecated.

        -
      • - -
      • -

        BeansWrapper, - DefaultObjectWrapper and - SimpleObjectWrapper now implements the - freemarker.template.utility.WriteProtectable - interface with which the configuration properties of the - object wrapper can be set permanently to read-only by - calling writeProtect(). An attempt to - call a setter on a such ObjectWrapper - will immediately cause - IllegalStateException. (This is what's - used for the singletons returned by the - getInstance methods too; see - earlier).

        -
      • -
      - -
    • - -
    • -

      The value of the time_zone setting, - when you specify it with a String (in a - java.util.Properties object, or via - <#setting - ...>) can now be - "JVM default" to use the JVM default time - zone. The JVM default is the default value of that setting - anyway, but now you can state this explicitly, or restore this - value if it was overridden earlier.

      -
    • - -
    • -

      Added new configuration setting, - sql_date_and_time_time_zone - (Configurable.setSQLDateAndTimeTimeZone(TimeZone)). - When this is set to non-null, the time zone - used when dealing with java.sql.Date and - java.sql.Time values will be this time zone - instead of the value of the time_zone - FreeMarker configuration setting. This is useful because JDBC - will, usually, construct the Java Date - objects so that they will show the year-month-day and - hour-minute-seconds values from the database "as - is" if you render them using the JVM default time zone. - As time zone conversions for SQL date-only and SQL time-only - values doesn't make much sense (unlike for SQL timestamps), you - should certainly set this setting to the JVM default time zone - (TimeZone.getDefault(), or if you configure - FreeMarker via java.util.Properties, as - property value "JVM default"). The default value is - null for backward compatibility. For more - details see the JavaDoc of - Configurable.setSQLDateAndTimeTimeZone(TimeZone).

      -
    • - -
    • -

      When configuring FreeMarker with - java.util.Properties (typically, when the - configuration is stored in a .properties - file), for the settings where you could specify a fully - qualified class name (most notably for the - object_wrapper setting) now you can also - specify constructor arguments and JavaBean property assignments. - For example, now you can write - object_wrapper=com.example.MyObjectWrapper(1, 2, - exposeFields=true, cacheSize=5000)that's nearly - equivalent with this Java code: obj = new - com.example.MyObjectWrapper(1, 2); obj.setExposeFields(true); - obj.setCacheSize(5000); object_wrapper = obj;. If you - are using this new syntax (i.e., if you have parentheses after - the class name, even if they are empty), and there's a builder - class for the requested class, that will be automatically used. - For example, - object_wrapper=DefaultObjectWrapper(2.3.21) - will create a DefaultObjectWrapperBuilder to - build the final instance, thus the object wrapper will be a - singleton instead of a new instance. The new syntax will also - look for a public static INSTANCE field if - there are 0 arguments and property assignments. For more details - see the Java API documentation of - Configuration.setSetting.

      -
    • - -
    • -

      Template not found exceptions now explain that the - template path is interpreted by a template loader, and show the - toString of the - TemplateLoader. The out-of-the-box - TemplateLoader implementations now have an - overridden toString to show the actual base - directory and such details. Custom - TemplateLoader implementations are encouraged - to override toString.

      -
    • - -
    • -

      Added - Configuration.setSharedVariables(Map/*<String, - Object>*/) for setting the shared variables from - Spring IoC and other IoC solutions. The already existing - Configuration.setSharedVariable(String, - Object) isn't a JavaBean property so it was hard to - use for that. Furthermore, the order in which - Configuration.setObjectWrapper and - Configuration.setSharedVariables are called - doesn't mater (unlike in the case of - Configuration.setSharedVariable), which is - essential in most IoC solutions.

      -
    • - -
    • -

      Mostly concerning tool (like IDE plugin) authors:

      - -
      -
        -
      • -

        ParseException-s now also store the - end-location of the error, not just its start-location. This - is useful if you want to underline the error in the source - code, not just point at it.

        -
      • - -
      • -

        Configuration.getSupportedBuiltInDirectiveNames() - can be used to return the names of directives supported by - FreeMarker.

        -
      • - -
      • -

        TemplateExceptions now expose the - position of the error (template name, line, column, end - line, end column) similarly to - ParseException-s. Where applicable, they - also expose the blamed expression in its canonical FTL - source form; this is mostly useful for - InvalidReferenceException-s.

        -
      • -
      - -
    • - -
    • -

      The concurrent performance of overloaded method lookups - (from the cache) was improved under Java 5 and later.

      -
    • - -
    • -

      The Version instances that are - "incompatible improvements" break points are now - available via constants like: - Configuration.VERSION_2_3_21.

      -
    • - -
    • -

      From now on, if you try to set the "incompatible - improvements" to greater than the current FreeMarker - version, or less than 2.3.0, an - IllegalArgumentException will be thrown. - Thus, new - Configuration(someVersion) - not only activates the fixes up to that version, but ensures - that the application will not run in an environment with an - older FreeMarker version. (On an older FreeMarker version the - improvements that you have requested aren't implemented yet, so - you should get an exception.)

      -
    • - -
    • -

      Added new configuration setting, - show_error_tips, defaults to - true. Sets if tips should be shown in error - messages of errors arising during template processing.

      -
    • - -
    • -

      Instead of overriding - BeansWrapper.finetuneMethodAppearance (now - deprecated), now you can use - BeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner), - so you don't need to extend the object wrapper class to - customize this aspect.

      -
    • - -
    • -

      Added - Configuration.getCoreDirecticeNames() which - returns the names of all directives that are provided by - FreeMarker. This can useful for IDE-s.

      -
    • - -
    • -

      template_loader was added as possible - configuration setting Properties key.

      -
    • - -
    • -

      The standard CacheStorage - implementations now have a getSize() method - for monitoring the cache size. - MruCacheStorage also has - getSoftSize() and - getStrongSize().

      -
    • - -
    • -

      Various smaller improvements in configuration setting - errors messages.

      -
    • - -
    • -

      With incompatible improvements 2.3.21 only: Empty ranges - return Constants.EMPTY_SEQUENCE instead of an - empty SimpleSequence. This is in theory - backward compatible, as the API only promises to give something - that implements TemplateSequenceModel.

      -
    • - -
    • -

      FreeMarker now requires Java version has changed from 1.2 - to 1.4.

      -
    • - -
    • -

      Bugs fixed and improvements in overloaded method - selection/invocation, but only if you create the - BeansWrapper/DefaultObjectWrapper - with constructor parameter - Configuration.VERSION_2_3_21 (or if you are - using Properties to configure FreeMarker, you - can do that like - object_wrapper=BeansWrapper(2.3.21)), or if - you have a Configuration with similar - incompatible_improvements 2.3.21 - and you leave the - object_wrapper setting on its default value. - There's a little chance that because of these changes, a - different overloaded method will be chosen than before, or even - that ambiguity errors will arise where earlier they didn't - (although the opposite is far more frequent), hence the fixes - aren't automatically activated. But the fix mostly only effect - calls that were failing or have chosen then wrong method - earlier, so it's recommended to activate it for projects that - are still actively developed. This fix includes numerous - changes:

      - -
      -
        -
      • -

        Earlier, null argument values has - only matched overloaded methods where the corresponding - parameter had Object type, not a subclass - of it. That's clearly a bug. Now it considers all overloads - where the parameter type is non-primitive, and just like the - Java language, it choses the one with the most specific type - among them. This is the most important fix, and also the - most risky one regarding backward-compatibility. Like if you - have m(Object o) and m(String - s) in a Java class, earlier for a - m(null) call in the template it has - chosen m(Object o), but now it will - choose m(String s) instead (because - String is also - null-able and is more specific than - Object). Furthermore, if you also had - m(File f) in the same class, now it will - cause an ambiguity exception, since the specificity of - File and String can't - be compared (same rule as under Java language), while - earlier that wasn't a problem as only m(Object - o) was seen as applicable.

        -
      • - -
      • -

        The behavior of numbers with overloaded method - selection was heavily reworked:

        - -
        -
          -
        • -

          If possible, it now always choses the overload - where overflow and truncation to integer (like 1.5 to 1) - is avoided. Among the methods where no such critical - loss occurs, it choses the overload with the least risk - of precision loss (unless other conditions with higher - priority suggest otherwise). Earlier, the method - selection was prone to do choices that led to overflow - or precision loss, especially when the parameter was a - literal with decimals.

          -
        • - -
        • -

          Overloaded method call can now convert to - non-primitive numerical types, like a - Byte or byte value - is automatically converted to Integer - if the parameter type is Integer. - (This has always worked for non-overloaded methods.) - Earlier where such conversion was needed, the method - wasn't seen seen applicable.

          -
        • - -
        • -

          Method selection is now not only based on the type - of the wrapped number, but also on its value. For - example, a Long with value - 1 is now seen as compatible with a - method with parameter type int or - short or byte, as - 1 can be stored in those without - loss. This is important as unlike in Java language, in - FTL you doesn't have strict control over the numerical - types (the type of the wrapped number, actually), as FTL - has no type declarations. (If multiple compatible - methods are available, it will still try to chose the - one with the same or bigger numerical type.)

          -
        • - -
        • -

          Conversion from/to BigInteger - is now supported.

          -
        • -
        - -
      • - -
      • -

        Method choice ambiguity errors now occur much less - often. Ambiguities was and are resolved by selecting the - compatible methods then choosing the one with the most - specific parameter types among them. The changes are:

        - -
        -
          -
        • -

          When comparing the overall specificity of two - parameter lists: Earlier the parameter list seen as more - specific was the one that had some parameters that won - in specificity, and if both had such parameters then it - was an ambiguity. Now it's enough if a method has more - such parameters where it's a better match than the other - has, or if the two methods are still equal, if it has - the first better matching parameter. This can lead to - choices that seem arbitrary (but are still - deterministic), but as there's no automated way of - discovering method selection ambiguities in templates - (unlike in Java source code, where they will be detected - during compilation), especially as overloaded selection - has to rely on the runtime type of - the values which even make proper testing hard, this was - considered to be a better compromise than throwing an - exception whenever the choice of the method is not - obvious. Also note that in fact this mechanism is more - complicated than just counting the "winner" - parameter positions for each methods, as certain kind of - wins are stronger than any number of the others: wins - where the other possibility is risking of substantial - mantissa precision loss are the strongest (like dropping - decimals versus not to), wins where the primitive type - wins over the boxed class is the weakest (like - int versus - Integer), subclassing wins (like - String versus - Object) are between these two.

          -
        • - -
        • -

          When comparing the specificity of two parameters - types at the same parameter position: The algorithm now - considers a primitive type as more specific that its - corresponding boxing class (like int - is considered to be more specific than - Integer).

          -
        • - -
        • -

          There was a bug with overloaded varargs methods of - different parameter counts, where sometimes the last - parameters of the compared methods was ignored, which is - taking away a potential deciding factor and thus can - lead to ambiguity error. Whether this happened depends - on the order in which the Java reflection API has - returned the methods, which is undocumented and known to - change at least after some Java updates, breaking the - application.

          -
        • - -
        • -

          When comparing the specificity of two array types, - until now they were seen as equal. Now the component - types are compared, and then that with the less specific - component type is preferred. For example, among - f(String[]) and - f(Object[]), the last will always - win. This might sounds controversial, but as we can't - efficiently tell the common type of all the items in a - sequence or List, an so we don't know - if both arrays are indeed valid targets, we go for the - safest choice.

          -
        • -
        - -
      • - -
      • -

        FTL sequence values (like Java - List-s or FTL - [x, - y, - ...] constants) were - not seen as applicable to a parameter with array type if - there were multiple overloaded methods with the same number - of parameters but with different types on the position of - the array parameter. That is, if you had - f(String[]) and - f(String) in Java, then - f(['foo', 'bar']) in the template - reported no compatible overloads. Now it will choose - f(String[]). Note that if there's also an - f(List) or even an - f(Collection), it will prefer those over - arrays. (For consistency, this conversion will work even if - the argument is a List that come directly - from Java (as opposed to be created inside FTL), i.e., when - it was wrapped then unwrapped to the original - List object.) For a multidimensional - array parameter type, this conversion works recursively, so - you can pass in a sequence-of-sequences as the - argument.

        -
      • - -
      • -

        FTL sequence values that wrapped a Java array (when - FreeMarker was also aware of that via - AdapterTemplateModel or - WrapperTemplateModel) were not seen as - applicable to a parameter with List type - if there were multiple overloaded methods with the same - number of parameters but with different types on the - position of the array parameter. So this is pretty much like - the issue described in the previous point, but for array to - List conversion. The array to - List conversion will be avoided if - possible, but it will be attempted if there's no other - alternative. Note that unlike with List - to array conversions, here FreeMarker can't cope with - multi-dimensional lists, that is, an array-of-arrays won't - be converted to a - List-of-List-s.

        -
      • - -
      • -

        FTL string to Java - char/Character - conversion now works for overloaded method parameters; - earlier it has worked for non-overloaded methods only. If - the string length is 1, it will be seen as compatible with - parameters with char or - Character type.

        -
      • - -
      • -

        Decreased the chance of choosing the wrong target Java - type when unwrapping multi-typed FTL values: When unwrapping - a parameter value that implements multiple FTL types (e.g. - string and hash) but doesn't implement - AdapterTemplateModel or - WrapperTemplateModel, a decision has to - be made if to what Java type the value should be unwrapped - to (e.g. to String or to - Map). In earlier versions that decision - was made based on the most specific common super type of the - parameters types of the given parameter position. However, - it's quite common that the common super type is too generic, - usually Object. Now - BeansWrapper stores "type - flags" for each parameter position of overloaded - methods, from which it can tell whether a potential target - Java type occurs in any of the overloads on the given - parameter position.

        -
      • - -
      • -

        In many cases, less specific hint class was used for - unwrapping than that was possible within the limitations of - the applied hint generation algorithm. (The unwrapping hint - has influence when there's an ambiguity regarding how to - create a Java object form an FTL value. In the vast majority - of the cases, a too generic hint has no effect.) (This is a - highly technical topic. The way it works is that a single - common unwrapping hint class is chosen for a given argument - position shared by the overloads that has the same number of - parameters, and that hint class has to be as specific as - possible while it must fit all those parameter types. The - issue with the too generic hints had several instances: (a) - When the most specific common class/interface of two - same-position parameter types was searched, if there was - multiple common classes/interfaces that had no relationship - (this is always at most one class and one or more unrelated - interfaces), due to the ambiguity it has felt back to using - Object as the unwrapping hint. Now if - there's a non-Object class among them in - such case, it will be chosen as the hint (i.e., we ignore - the common interfaces). Otherwise if only a single interface - remains by removing Cloneable, - Serializable, and - Comparable (in that order), that will be - chosen. Only then it falls back to - Object. (b) The common most specific - class of a primitive type and the corresponding boxing class - was sometimes Object instead of the - boxing class. This has depended on Java's internal ordering - of the methods, and so were quite unpredictable, like the - result could change after upgrading Java under the - application. (c) The common superclass of a numerical - primitive value and a numerical non-primitive value was - always Object, now if they are a - primitive-boxing class pair, then it's the boxing class, - otherwise it's Number. (d) If the varags - parameter position was not the same in all the overloaded - varargs methods, sometimes some varargs arguments where - unwrapped with too generic hints. When this happened was - unpredictable as it depended on Java's internal method - ordering again.)

        -
      • - -
      • -

        When unwrapping method call arguments before calling a - Java method, if the argument was an - AdapterTemplateModel and the target - parameter type was primitive, - AdapterTemplateModel.getAdaptedObject(Class - hint) has received the primitive type of the - target parameter (like int instead of - Integer) as the hint. This did not make - sense since getAdaptedObject can only - return Object-s, not primitive values. - Yet, BeansWrapper has expected the - returned value to be of the primitive type, otherwise it has - discarded it. Exactly the same problem occurs with - WrapperTemplateModel. Thus, ultimately, - if the target parameter type was primitive and some of these - interfaces were implemented, their return value was always - discarded and FreeMarker has felt back to other means of - unwrapping. Now BeansWrapper always - passes in and expects the boxing type (like - Integer) instead of the primitive - type.

        -
      • -
      - -
    • - -
    • -

      Bug fixed [373]: - These are three bugs actually, which can cause problems when - FreeMarker re-loads a template because of a charset override - with <#ftl encoding="...">: First, if - the template loader was a URLTemplateLoader, - when TemplateLoader.getReader() was called - for the second time, and the Reader returned - for the first time was already used, it might returned an empty - or corrupted template, depending on the backing URL - implementation. Secondly, when FreeMarer has decided if a - template file has to be re-loaded because its encoding specified - with <#ftl encoding="..."> differs from - the encoding used for loading the template first, it has used - case-sensitive comparison, thus often re-loaded needlessly (like - "UTF-8" and "utf-8" mean the same). Now this comparison is - case-insensitive. Last not least, when retrying with the second - charset, the TemplateCache has forgotten to - close the first Reader, which can be a handle - leak.

      -
    • - -
    • -

      Bug fixed [411]: - Invalid and redundant execution environment names from the OSGi - bundle manifest were removed. It looks like this now: - Bundle-RequiredExecutionEnvironment: J2SE-1.5, - J2SE-1.4. That is, we prefer (and compile against) - 1.5, but only require 1.4.

      -
    • - -
    • -

      Bug fixed [409]: - SimpleHash's internal Map - is concurrently modified on a non-safe way when getting length-1 - String key that exists but maps to - null. This operation will accidentally add a - Character key to the internal map, which is - not a thread-safe operation.

      -
    • - -
    • -

      Bug fixed [273]: - TemplateLoader-s that use - java.net.URLConnection-s should set - URLConnection.useCaches to - false, or else it won't detect template - caches on certain configurations.

      - -
      -
        -
      • -

        URLTemplateLoader and its - subclasses and - WebApplicationTemplateLoader now has a - setURLConnectionUsesCaches(Boolean) - method. It's recommended to set this property to - false from its default backward - compatible value, null. As FreeMarker has - its own template cache with its own update delay setting - (template_update_delay, - Configuration.setTemplateUpdateDelay(int)), - it shouldn't cause performance problems. The - null value will leave the caching of the - java.net.URLConnection on its default, - which is usually true.

        -
      • - -
      • -

        If incompatible_improvements is set - to 2.3.21 (or higher) and templates are loaded through - Configuration.getTemplate, and the - TemplateLoader in use has - URLConnectionUsesCaches left on - null, it will behave as if it was set to - false. Note that this - incompatible_improvements trick only - works if the template is loaded through - Configuration.getTemplate (or - TemplateCache).

        -
      • -
      - -
    • - -
    • -

      Bug fixed: When changing the properties of - DefaultObjectWrapper or - BeansWrapper that influenced class - introspection results (like exposureLevel or - exposeFields), the introspection cache wasn't - cleared, and thus returned stale information for the classes - that were introspected before those properties were changed. Now - changing such properties always clears the introspection - caches.

      -
    • - -
    • -

      Bug fixed: Constants used for empty sequence, empty hash, - empty collection and empty iterator weren't - Serializable.

      -
    • - -
    • -

      Bug fixed [300]: - Logger class availability check was incorrect in that it has - checked the availability of logger libraries with the thread - context class loader, then later it tried to link to them with - the defining class loader of the FreeMarker classes. With some - class loader setups (notably under Netbeans sometimes) this led - to ClassDefNotFoundError-s that made - FreeMarker unusable. (The check itself was also not very - durable, as it didn't expected LinakeError-s, - only ClassNotFoundException.)

      -
    • - -
    • -

      Bug fixed: ClassUtil.forName, used - inside FreeMarker everywhere to resolve class names to classes, - if the thread context class loader is null, - no longer tries to load with the bootstrap class loader before - loading with the defining class loader of FreeMarker.

      -
    • - -
    • -

      Bug fixed [311]: - TemplateBooleanModel.TRUE and - FALSE are now serializable

      -
    • - -
    • -

      Bug fixed: Various issues in Version - class, such as wrong hashCode, possible - concurrency glitches, and acceptance of some malformed version - strings.

      -
    • - -
    • -

      Bug fixed [414]: - Eclipse debug mode running was suspended during FreeMarker - static initialization on the JRebel availability checked if - JRebel wasn't available.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      The license has changed from our proprietary BSD-Style - license to the well know "Apache License, Version 2.0". - Furthermore, the copyright owner has changed from "Visigoth - Software Society" (which was founded by Jonathan Revusky) to the - three main FreeMarker 2 developers/contributors, "Attila - Szegedi, Daniel Dekany, and Jonathan Revusky". See the new license here.

      -
    • - -
    • -

      The required minimum Java version was raised from 1.2 to - 1.4. FreeMarker will not work on Java 1.2 or 1.3.

      -
    • - -
    • -

      Many smaller improvements and fixes in the Manual and API - JavaDocs.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_3.html b/fmpp/docs/freemarker/versions_2_3_3.html deleted file mode 100644 index 3798b71..0000000 --- a/fmpp/docs/freemarker/versions_2_3_3.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.3 - - - - - - - - -
    - - - - - -

    -2.3.3

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2005-06-23

    Some new features and lot of bugfixes.

    Attention:

    -
      -
    • -

      If you are using the Log4J logging, from now at least Log4J - 1.2 is required. This is because of incompatible changes in the - Log4J API.

      -
    • - -
    • -

      If you build FreeMarker yourself: from now at least JavaCC - 3.2 (instead of JavaCC 2.1) and at least Ant 1.6.1 (instead of Ant - 1.5.x) is required. This doesn't affect users who use the - freemarker.jar comes with the - distribution.

      -
    • -
    - - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      New built-in for formatting numbers for ``computer - audience'' as opposed to human audience: c. It should - be used for numbers that must use Java language formatting - regardless of the number format and locale settings, like for a - database record ID used as the part of an URL or as invisible - field value in a HTML form, or for printing CSS/JavaScript - numerical literals.

      -
    • - -
    • -

      New built-in for the columnar/tabular displaying of - sequences: chunk.

      -
    • - -
    • -

      The sequence - slice and substring operators now allow the omitting of - the last index, in which case it defaults to the index of the - last sequence item or character. Example: - products[2..]. (Also, numerical range - literals now allow the omitting of the final number, in - which case it defaults to infinity. Example: - 5...)

      -
    • - -
    • -

      Bugfix: ?replace has worked forever if - the string to replace was "".

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      New template loader: - freemarker.cache.StringTemplateLoader. It - uses a Map with Strings as - its source of templates. See more in the JavaDoc.

      -
    • - -
    • -

      Experimental Rhino support: FreeMarker now comes with an - experimental object wrapper for Rhino (Java ECMAScript - implementation): - freemarker.ext.rhino.RhinoWrapper

      -
    • - -
    • -

      Some new utility methods for - SimpleXxx classes: - SimpleHash.toMap(), - SimpleSequence.toList().

      -
    • - -
    • -

      Bugfix: FTL literals and any other - SimpleSequnce-s, and - SimpleHash-es now can be used as parameters - to the FreeMarker-unaware Java methods that are exposed by - DefaultWrapper or - BeansWrapper. That is, the method parameters - are automatically converted from - TemplateTypeModel-s - to java.util.Map and - java.util.List respectively.

      -
    • - -
    • -

      Bugfix: The JSP support now works in JSP 2 compliant - containers as well. No, it doesn't support the new features of - JSP 2 yet, it's just that the JSP 1.2 taglib support has not - worked in JSP 2 containers.

      -
    • - -
    • -

      Bugfix: The - Configuration.setOutputEncoding and - setURLEscapingCharset methods died with - NullPointerException when you tried to set - the setting value to null, which is legal for - these settings.

      -
    • - -
    • -

      Bugfix: - freemarker.template.utility.StringUtil.replace(...) - has worked forever if the string to replace was - "".

      -
    • - -
    • -

      Bugfix: The Log4J logging was updated to be compatible - with the upcoming Log4J 1.3. Note that now FreeMarker will need - at least Log4J 1.2.

      -
    • - -
    • -

      Bugfix: FreeMarker didn't built from the source code on - J2SE 1.5, because of the introduction of the - enum keyword.

      -
    • - -
    • -

      Bugfix: The return value of - SimpleSequence.synchronizedWrapper() was not - properly synchronized. Same with - SimpleHash.synchronizedWrapper().

      -
    • - -
    • -

      Bugfix: Problem with BeansWrapper and - overridden bean methods/properties. (Details: bug-tracker entry - #1217661 - and #1166533)

      -
    • - -
    • -

      Bugfix: Can't access JSP taglibs if - Request attribute is defined in the - data-model (Details: bug-tracker entry #1202918).

      -
    • - -
    • -

      Bugfix: Various minor parser glitches were fixed.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Manual improvements, especially in the FAQ.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_4.html b/fmpp/docs/freemarker/versions_2_3_4.html deleted file mode 100644 index 55f7316..0000000 --- a/fmpp/docs/freemarker/versions_2_3_4.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.4 - - - - - - - - -
    - - - - - -

    -2.3.4

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2005-10-10

    Some new features and bugfixes.

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Now you can use [ and - ] instead of < and - > for the FreeMarker tags. For example you - can write [#if - loggedIn]...[/#if] and - [@myMacro /]. More info...

      -
    • - -
    • -

      Bugfix: the has_content built-in - returned false for number, date and boolean - values (if the value was not a multi-type value that is also a - sequence or collection or hash or string). Now it always returns - true for a number, date or boolean values - (except if the value is also a sequence or collection or hash or - string, because then it will be examined only like that).

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bugfix: the parameterless constructor of the - ClassTemplateLoader didn't worked.

      -
    • - -
    • -

      Bugfix: The Jython wrapper didn't wrapped - java.util.Date objects well. Now it wraps - them with BeanWrapper to - TemplateDateModel.

      -
    • - -
    • -

      Bugfix: the include directive was - blamed when the included file had syntax error.

      -
    • -
    - - - - - - -

    -Other changes

    - - -
    -
      -
    • -

      Minor Manual fixes.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_5.html b/fmpp/docs/freemarker/versions_2_3_5.html deleted file mode 100644 index fe68883..0000000 --- a/fmpp/docs/freemarker/versions_2_3_5.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.5 - - - - - - - - -
    - - - - - -

    -2.3.5

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2006-03-11

    This release was withdrawn because of a serious bug in - it. Please don't use it! Of course, all new features of it are - included in FreeMarker 2.3.6.

    A few new features and several bugfixes.

    - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Bug fixed: [1435847] - Alternative syntax doesn't work for comments

      -
    • - -
    • -

      Bug fixed: With the new square bracket syntax, the tag - could be closed with >. Now it can be - closed with ] only.

      -
    • - -
    • -

      Bug fixed: [1324020] - ParseException with the - ftl directive if it wasn't in its own - line

      -
    • - -
    • -

      Bug fixed: [1404033] - eval built-in fails with hash - concatenation

      -
    • -
    - - - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      A new Configuration level setting, - tagSyntax was added. This determines the - syntax of the templates (angle bracket syntax VS square bracket - syntax) that has no ftl directive in - it. So now you can choose to use the new square bracket syntax - by default. However, the recommended is to use auto-detection - (yourConfig.setTagSyntax(Configuration.AUTO_DETECT_TAG_SYNTAX)), - because that will be the default starting from 2.4. - Auto-detection chooses syntax based on the syntax of the first - FreeMarker tag of the template (could be any FreeMarker tag, not - just ftl). Note that as with the previous - version, if a the template uses ftl - directive, then the syntax of the ftl - directive determines the syntax of the template, and the - tagSyntax setting is ignored.

      -
    • - -
    • -

      Now BeansWrapper, - DefaultObjectWrapper and - SimpleObjectWrapper support lookup with 1 - character long strings in Map-s (like - myHash["a"]) that use - Character keys. Simply, as a special case, - when a hash lookup fails on a string that is 1 character long, - it checks for the Character key in the - underlying map. (Bug tracker entry [1299045] - FreeMarker doesn't support map lookup with Character - keys.)

      -
    • - -
    • -

      A new property, strict was added to - BeansWrapper, - DefaultObjectWrapper and - SimpleObjectWrapper. If this property is - true then an attempt to read a bean propertly - in the template (like myBean.aProperty) that - doesn't exist in the bean class (as opposed to just holding - null value) will cause - InvalidPropertyException, which can't be - suppressed in the template (not even with - myBean.noSuchProperty?default('something')). - This way ?default('something') and - ?exists and similar built-ins can be used to - handle existing properties whose value is - null, without the risk of hiding typos in the - property names. Typos will always cause error. But mind you, it - goes against the basic approach of FreeMarker, so use this - feature only if you really know what are you doing.

      -
    • - -
    • -

      Bug fixed: [1426227] - NullPointerException in - printStackTrace(...)

      -
    • - -
    • -

      Bug fixed: [1386193] - Division by zero in ArithmeticEngine

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_6.html b/fmpp/docs/freemarker/versions_2_3_6.html deleted file mode 100644 index fff333c..0000000 --- a/fmpp/docs/freemarker/versions_2_3_6.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.6 - - - - - - - - -
    - - - - - -

    -2.3.6

    - - -

    Date of release: 2006-03-15

    Quick release that fixes a serious bug of 2.3.5, days after its - release. So for the recently added new features please see the section of 2.3.5.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      Bug fixed: In FreeMarker 2.3.5 only, when you read a bean - property for the second time, FreeMarker will say that it's - missing (null).

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_7.html b/fmpp/docs/freemarker/versions_2_3_7.html deleted file mode 100644 index c2029f5..0000000 --- a/fmpp/docs/freemarker/versions_2_3_7.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.7 - - - - - - - - -
    - - - - - -

    -2.3.7

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2006-06-23

    This release, compared to 2.3.7 RC1, contains new operators for - handling null/missing variables, , the substring - built-in, and some more bugfixes. Note that 2.3.7 RC1 has a long - change log, so you may want to read - that too.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      The seq_contains built-in now handles - TemplateCollectionModel-s as well.

      -
    • - -
    • -

      Bug fixed: In 2.3.7 RC1 - FreemarkerServlet has always died with - NullPointerException during - initialization.

      -
    • -
    - - - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      3 new operators were added for terser missing variable - handling. These operators make the default, - exists and if_exists - built-ins deprecated. (The parser doesn't issue any warning - messages when you use deprecated built-ins, and they are still - working.):

      - -
      -
        -
      • -

        exp1!exp2 - is near equivalent with - exp1?default(exp2), - also - (exp1)!exp2 - is near equivalent with - (exp1)?default(exp2). - The only difference is that this new operator doesn't - evaluate the - exp2 when the - default value is not needed.

        -
      • - -
      • -

        exp1! is - similar to - exp1?if_exists, - also (exp1)! - is similar to - (exp1)?if_exists. - The difference is that with this new operator the default - value is an empty string and an empty list and empty hash at - the same time (multi-type variable), while with - if_exists the default value was an empty - string and an empty list and empty hash and boolean - false and a transform that does nothing - and ignores all parameters at the same time.

        -
      • - -
      • -

        exp1?? - is equivalent with - exp1?exists, - also (exp1)?? - is equivalent with with - (exp1)?exists.

        -
      • -
      - -
    • - -
    • -

      New built-in: - exp?substring(from, - toExclusive), also callable - as - exp?substring(from). - Getting substrings was possible for a long time like - myString[from..toInclusive] - and - myString[from..], - but - myString?substring(from, - toExclusive) and - myString?substring(from) - has the advantage that it has an exclusive end, which is more - practical. (Edit: Since 2.3.21 ranges are the preferred way - again, as it has - myString[from..<toExclusive].) - Sequence (list) slices still has to be get with the old syntax, - since substring only applies to strings. - Please note that the ``to'' parameter is 1 greater with this new - builtin, as it is an exclusive index. Further difference is that - the substring built-in requires that the - ``from'' index is less than or equal to the ``to'' index. So 0 - length substrings are possible now, but not reversed - substrings.

      -
    • - -
    • -

      Bug fixed: [1487694] - malfunction when the recover directive has no - nested content

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_7rc1.html b/fmpp/docs/freemarker/versions_2_3_7rc1.html deleted file mode 100644 index 3525c59..0000000 --- a/fmpp/docs/freemarker/versions_2_3_7rc1.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.7 RC1 - - - - - - - - -
    - - - - - -

    -2.3.7 RC1

    - -
    -

    - - Page Contents - -

    - - -
    - - -

    Date of release: 2006-04-27

    This release contains many bugfixes and some - FreemarkerServlet related improvements. It's a - Release Candidate, which means that it shouldn't be used in production - environment yet. We recommend this release for development, however. - Please test it.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      FreemarkerServlet improvement: - AllHttpScopesHashModel is now public, so you - can add unlisted variables to the data-model.

      -
    • - -
    • -

      FreemarkerServlet improvement: When it - throws a ServletException, the J2SE 1.4 cause - exception is now set under J2SE 1.4.

      -
    • - -
    • -

      Bug fixed: [1469275] - NullPointerException when using - BeansWrapper with reloaded classes

      -
    • - -
    • -

      Bug fixed: [1449467] - HttpSessionHashModel is not - Serializable

      -
    • - -
    • -

      Bug fixed: [1435113] - Error in BeanWrapper with indexed - properties

      -
    • - -
    • -

      Bug fixed: [1411705] - Acquisition bug in TemplateCache

      -
    • - -
    • -

      Bug fixed: [1459699] - Tag syntax can't set with - Configuration.setSetting(String, - String)

      -
    • - -
    • -

      Bug fixed: [1473403] - ReturnInstruction.Return should be - public

      -
    • -
    - - - - - - -

    -Changes on the FTL side

    - - -
    -
      -
    • -

      Bug fixed: [1463664]kup - [/#noparse] is printed out

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_8.html b/fmpp/docs/freemarker/versions_2_3_8.html deleted file mode 100644 index 365dcb2..0000000 --- a/fmpp/docs/freemarker/versions_2_3_8.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.8 - - - - - - - - -
    - - - - - -

    -2.3.8

    - - -

    Date of release: 2006-07-09

    This release substantially improves the JSP 2.0 compatibility. - (For those who have seen the same points in 2.3.7: Sorry, the version - history was incorrect... those JSP 2.0 related changes were not in the - release yet.)

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      JSP support improvement: [1326058] - Added support for DynamicAttributes (new in - JSP 2.0)

      -
    • - -
    • -

      JSP support improvement: Added support for - pushBody()/popBody() in - FreemarkerPageContext

      -
    • - -
    • -

      JSP support improvement: Added support for - getVariableResolver() (new in JSP - 2.0).

      -
    • - -
    • -

      JSP support improvement: Added support for - include(String, boolean) (new in JSP - 2.0).

      -
    • - -
    • -

      JSP support improvement: Added support for - getExpressionEvaluator() (new in JSP 2.0). - However, it will need Apache commons-el in the class path, or - else this method will not work (it's optional). Note that EL - support is not needed in principle, since FreeMarker has it's - own expression language. But some custom JSP 2 tags may still - want to use this method, after all it's in the JSP 2 API.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/versions_2_3_9.html b/fmpp/docs/freemarker/versions_2_3_9.html deleted file mode 100644 index 89f0b87..0000000 --- a/fmpp/docs/freemarker/versions_2_3_9.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - FreeMarker Manual - 2.3.9 - - - - - - - - -
    - - - - - -

    -2.3.9

    - - -

    Date of release: 2007-01-23

    This release contains support for accessing JDK 1.5 enums and - public fields of classes from the templates through the - BeansWrapper.

    - - - - -

    -Changes on the Java side

    - - -
    -
      -
    • -

      BeansWrapper can now expose public - fields of objects to the template if you call the - setExposeFields(true) on it. More info...

      -
    • - -
    • -

      BeansWrapper can now pass any sequence - model to Java methods expecting a - java.util.Collection or a native Java array - (including primitive arrays). More info...

      -
    • - -
    • -

      BeansWrapper can now pass any sequence - and collection model to Java methods expecting a - java.lang.Iterable. More info...

      -
    • - -
    • -

      BeansWrapper can now unwrap numeric - models into correct target types when passing to Java methods - expecting a primitive or boxed number. Use of various expert built-ins to - manually coerce the types becomes mostly unnecessary.

      -
    • - -
    • -

      Fixed a bug where BeansWrapper would - pass a java.util.Collection to a method - expecting a java.util.Set in certain rare - cases. More - info...

      -
    • - -
    • -

      Support for JDK 1.5 enums in - BeansWrapper and - DefaultObjectWrapper. By calling the - getEnumModels() method, you can retrieve a - hash model that is keyed by class names and allows access to - enumerated values. I.e. if you bind this hash model under name - enums in the data-model, you can write - expressions like - enums["java.math.RoundingMode"].UP in the - template. The enum values can be used as scalars and support - equality and inequality comparisons. More info...

      -
    • - -
    • -

      freemarker.ext.rhino.RhinoWrapper now - correctly translates Rhino Undefined - instance, UniqueTag.NOT_FOUND, and - UniqueTag.NULL to FreeMarker undefined - value.

      -
    • -
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui.html b/fmpp/docs/freemarker/xgui.html deleted file mode 100644 index f32cb0e..0000000 --- a/fmpp/docs/freemarker/xgui.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - FreeMarker Manual - XML Processing Guide - - - - - - - - -
    - - - - - -

    -Part IV   XML Processing Guide

    - -
    -

    - - Part Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_declarative.html b/fmpp/docs/freemarker/xgui_declarative.html deleted file mode 100644 index b3bd710..0000000 --- a/fmpp/docs/freemarker/xgui_declarative.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - FreeMarker Manual - Declarative XML processing - - - - - - - - -
    - - - - - -

    -Chapter 3   Declarative XML processing

    - -
    -

    - - Chapter Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_declarative_basics.html b/fmpp/docs/freemarker/xgui_declarative_basics.html deleted file mode 100644 index 5755504..0000000 --- a/fmpp/docs/freemarker/xgui_declarative_basics.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - FreeMarker Manual - Basics - - - - - - - - -
    - - - - - -

    -Basics

    - - -
    -

    Note

    - -

    This section uses the DOM tree and the variable made in a previous chapter.

    -
    -

    With the imperative approach of XML processing -- this was shown - in the previous chapter -- you write an FTL program that walks the - tree to find the different kind of nodes. With the declarative - approach, you rather define how to handle the different kind of nodes, - and then let FreeMarker walk the tree an call the handlers you have - defined. This approach is useful for complex XML schemas, where the - same element can occur as the child of many other elements. Examples - of such schemas are XHTML and XDocBook.

    The directive you most often use with the declarative approach - is the recurse - directive. This directive gets a node variable as parameter, - and ``visits'' all its children nodes, one after the other, starting - with the first child. ``Visiting'' a node means that it calls a - user-defined directive (like a macro) that has the same name as the - name of the child node (?node_name). We say on - this, that the user-defined directive handles the - node. The node that the user-defined directive just handles is - available as special variable .node. For example, - this FTL:

    -
    -<#recurse doc>
    -
    -<#macro book>
    -  I'm the book element handler, and the title is: ${.node.title}
    -</#macro>  
    -

    will print (I have removed some disturbing white-space form the - output):

    -
    -I'm the book element handler, and the title is: Test Book  
    -

    If you call recurse without parameter, then - it uses .node, that is, it visits all children - nodes of the node currently handled. So this FTL:

    -
    -<#recurse doc>
    -
    -<#macro book>
    -  Book element with title ${.node.title}
    -    <#recurse>
    -  End book
    -</#macro>
    -
    -<#macro title>
    -  Title element
    -</#macro>
    -
    -<#macro chapter>
    -  Chapter element with title: ${.node.title}
    -</#macro>  
    -

    will print (I have removed disturbing white-space form the - output):

    -
    -Book element with title Test Book
    -Title element
    -Chapter element with title: Ch1
    -Chapter element with title: Ch2
    -End book  
    -

    You have seen how to define handlers for element nodes, but not - how to define handler for the text nodes. Since the name of the - handler is the same as the node-name of nodes it handles, and as the - node-name of all text nodes is @text (see the table), you define handler for the - text nodes like this:

    -
    -
    -<#macro @text>${.node?html}</#macro>  
    -

    Note the ?html. You have to HTML-escape the - text, since you generate output of HTML format.

    Here it is the template that transforms the XML to complete - HTML:

    -
    -<#recurse doc>
    -
    -<#macro book>
    -  <html>
    -    <head>
    -      <title><#recurse .node.title></title>
    -    </head>
    -    <body>
    -      <h1><#recurse .node.title></h1>
    -      <#recurse>
    -    </body>
    -  </html>
    -</#macro>
    -
    -<#macro chapter>
    -  <h2><#recurse .node.title></h2>
    -  <#recurse>
    -</#macro>
    -
    -<#macro para>
    -  <p><#recurse>
    -</#macro>
    -
    -<#macro title>
    -  <#--
    -    We have handled this element imperatively,
    -    so we do nothing here.
    -  -->
    -</#macro>
    -
    -<#macro @text>${.node?html}</#macro>  
    -

    and the output will be (now I will honestly include the annoying - white-space...):

    -
    -  <html>
    -    <head>
    -      <title>Test Book</title>
    -    </head>
    -    <body>
    -      <h1>Test Book</h1>
    -
    -  
    -    <h2>Ch1</h2>
    -
    -    
    -      <p>p1.1
    -
    -      <p>p1.2
    -
    -      <p>p1.3
    -
    -  
    -    <h2>Ch2</h2>
    -
    -    
    -      <p>p2.1
    -
    -      <p>p2.2
    -
    -  
    -    </body>
    -  </html>
    -
    -    
    -

    Note that you can reduce substantially the amount of superfluous - whitespace in the output by using the trim directives, as - <#t>. See also: Template Author's Guide/Miscellaneous/White-space handling

    You may say that the FTL that did it with imperative approach - was much shorter. That's true, but the example XML uses a very simple - schema, and as I said, the declarative approach brings its form with - XML schemas that are not that firm about what element can occur where. - Say, introduce element mark, that should color text - to red, does not mater where do you use it; in a - title, or in a para. For this, - with the declarative approach, you just add a macro:

    -
    -<#macro mark><font color=red><#recurse></font></#macro>  
    -

    And then <mark>...</mark> will - automatically work everywhere. So for certain XML schemas, declarative - XML processing will actually result in shorter, and what is even more - important, much clearer FTL-s, than imperative XML processing. It's up - to you to decide which approach to use when; don't forget that you can - mix the two approaches freely. Say, in an element handler, you can use - imperative approach to process the contents of that element.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_declarative_details.html b/fmpp/docs/freemarker/xgui_declarative_details.html deleted file mode 100644 index fc14d12..0000000 --- a/fmpp/docs/freemarker/xgui_declarative_details.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - FreeMarker Manual - Details - - - - - - - - -
    - - - - - -

    -Details

    - -
    -

    - - Page Contents - -

    - - -
    - - - - - - - -

    -Default handlers

    - - -

    For some XML node types, there is a default handler, which - will handle the node if you haven't defined a handler for the node - (i.e. if there is no user-defined directive available with name - identical to the node name). Here are these node types, and what the - default handler does:

    - -
    -
      -
    • -

      Text node: prints the text as it. Note, that in most - applications, this will not be good for you, because you should - escape the text before you send it to the output (with - ?html or ?xml or - ?rtf, ...etc. depends on the output - format).

      -
    • - -
    • -

      Processing instruction node: call handler called - @pi if you have created such user-defined - directive, otherwise do nothing (ignore the node).

      -
    • - -
    • -

      Comment node, document type node: Do nothing (ignore the - node).

      -
    • - -
    • -

      Document node: Call recurse, that is, - visit all children of the document node.

      -
    • -
    - - -

    Element and attribute nodes will be handled according to the - usual, XML independent mechanism. That is, - @node_type will be - called as handler, and if that's not defined, then an error stops - template processing.

    - -

    In the case of element nodes, this means that if you define a - macro (or other kind of user-defined directive) called - @element, that will catch all element nodes, - which has no more specific handler. If you have no - @element handler, then you - must define a handler for all possible - elements.

    - -

    Attribute nodes are not visited by the - recurse directive, so you don't need to write - handlers for them.

    - - - - - -

    -Visiting a single node

    - - -

    With the visit - directive you can visit a single node, instead of the - children of the node: - <#visit nodeToVisist>. - This can be useful sometimes.

    - - - - - -

    -XML namespaces

    - - - - -

    We said that the name of the handler user-defined directive - (like a macro) for an element is the name of the element. In fact, - it is the full-qualified name of the element: - prefix:elementName. - The rules regarding the usage of - prefix-es is the same - as with imperative processing. Thus, the user-defined - book directive handles only element - book that does not belong to any XML namespace - (unless you have specified a default XML namespace). So if the - example XML would use XML namespace - http://example.com/ebook:

    - -
    -
    -<book xmlns="http://example.com/ebook">
    -...  
    - - -

    Then the FTL should look as this:

    - -
    -
    -<#ftl ns_prefixes={"e":"http://example.com/ebook"}>
    -
    -<#recurse doc>
    -
    -<#macro "e:book">
    -  <html>
    -    <head>
    -      <title><#recurse .node["e:title"]></title>
    -    </head>
    -    <body>
    -      <h1><#recurse .node["e:title"]></h1>
    -      <#recurse>
    -    </body>
    -  </html>
    -</#macro>
    -
    -<#macro "e:chapter">
    -  <h2><#recurse .node["e:title"]></h2>
    -  <#recurse>
    -</#macro>
    -
    -<#macro "e:para">
    -  <p><#recurse>
    -</#macro>
    -
    -<#macro "e:title">
    -  <#--
    -    We have handled this element imperatively,
    -    so we do nothing here.
    -  -->
    -</#macro>
    -
    -<#macro @text>${.node?html}</#macro>  
    - - -

    Or, you can define a default XML namespace, and then the - further part of the template remains the same as in the original XML - namespace free example:

    - -
    -
    -<#ftl ns_prefixes={"D":"http://example.com/ebook"}>
    -
    -<#recurse doc>
    -
    -<#macro book>
    -...  
    - - -

    But in this case don't forge that in XPath expressions (we - didn't used any in the example) the default XML namespace must be - accessed with an explicit D: since names without - prefix always refer to nodes with no XML namespace in XPath. Also - note that with the same logic as with imperative XML processing, the - name of handlers for elements that has no XML namespace is - N:elementName if (and - only if) there is a default XML namespace. However, for nodes that - are not of type element (such as text nodes), you never use the - N prefix in the handler name, because those nodes - are free of the idea of XML namespaces. So for example, the handler - for text nodes is always just @text.

    - -

    For more detailed information, please read the reference of - recurse and visit - directives.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_expose.html b/fmpp/docs/freemarker/xgui_expose.html deleted file mode 100644 index f4f87a3..0000000 --- a/fmpp/docs/freemarker/xgui_expose.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - FreeMarker Manual - Exposing XML documents - - - - - - - - -
    - - - - - -

    -Chapter 1   Exposing XML documents

    - -
    -

    - - Chapter Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_expose_dom.html b/fmpp/docs/freemarker/xgui_expose_dom.html deleted file mode 100644 index 5dea0da..0000000 --- a/fmpp/docs/freemarker/xgui_expose_dom.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - FreeMarker Manual - The DOM tree - - - - - - - - -
    - - - - - -

    -The DOM tree

    - - -

    We will use this XML document for the examples:

    -
    -<book>
    -  <title>Test Book</title>
    -  <chapter>
    -    <title>Ch1</title>
    -    <para>p1.1</para>
    -    <para>p1.2</para>
    -    <para>p1.3</para>
    -  </chapter>
    -  <chapter>
    -    <title>Ch2</title>
    -    <para>p2.1</para>
    -    <para>p2.2</para>
    -  </chapter>
    -</book>  
    -

    W3C DOM models an XML document as a tree of nodes. The node tree - of the above XML can be visualized as:

    -
    -document
    - |
    - +- element book
    -     |
    -     +- text "\n  "
    -     |
    -     +- element title
    -     |   |
    -     |   +- text "Test Book"
    -     |
    -     +- text "\n  "
    -     |
    -     +- element chapter
    -     |   |
    -     |   +- text "\n    "
    -     |   |
    -     |   +- element title
    -     |   |   |
    -     |   |   +- text "Ch1"
    -     |   |
    -     |   +- text "\n    "
    -     |   |
    -     |   +- element para     
    -     |   |   |
    -     |   |   +- text "p1.1"
    -     |   |
    -     |   +- text "\n    "
    -     |   |
    -     |   +- element para     
    -     |   |   |
    -     |   |   +- text "p1.2"
    -     |   |
    -     |   +- text "\n    "
    -     |   |
    -     |   +- element para     
    -     |      |
    -     |      +- text "p1.3"
    -     |
    -     +- element
    -         |
    -         +- text "\n    "
    -         |
    -         +- element title
    -         |   |
    -         |   +- text "Ch2"
    -         |
    -         +- text "\n    "
    -         |
    -         +- element para     
    -         |   |
    -         |   +- text "p2.1"
    -         |
    -         +- text "\n    "
    -         |
    -         +- element para     
    -             |
    -             +- text "p2.2"  
    -

    Note that the disturbing "\n  "-s are the - line-breaks (indicated here with \n, an escape - sequence used in FTL string literals) and the indentation spaces - between the tags.

    Notes on the DOM related terminology:

    -
      -
    • -

      The topmost node of a tree is called the root. In the case of XML documents, it is - always the ``document'' node, and not the top-most element - (book in this example).

      -
    • - -
    • -

      We say that node B is the child of node A, if B is the - immediate descendant of A. For example, the - two chapter element nodes are the children of - the book element node, but the - para element nodes are not.

      -
    • - -
    • -

      We say that node A is the parent of node B, if A is the - immediate ascendant of node B, that is, if B - is the children of A. For example, the book - element node is the parent of the two chapter - element nodes, but it is not the parent of the - para element nodes.

      -
    • - -
    • -

      There are several kind of components that can occur in XML - documents, such as elements, text, comments, processing - instructions, etc. All such components are nodes in the DOM tree, - so there are element nodes, text nodes, comment nodes, etc. In - principle, the attributes of elements are also nodes in the tree - -- they are the children of the element --, but still, usually we - (and other XML related technologies) exclude them of element - children. So basically they don't count as children nodes.

      -
    • -
    -

    The programmer drops the document node of the DOM tree into the - FreeMarker data-model, and then the template author can walk the DOM - tree using that variable as the starting-point.

    The DOM nodes in FTL correspond to node - variables. This is a variable type, similarly to type - string, number, hash, etc. Node variable type makes it possible for - FreeMarker to get the parent node and the child nodes of a node. This - is technically required to allow the template author to navigate - between the nodes, say, to use the node built-ins or the visit and - recurse - directives; we will show the usage of these in the further - chapters.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_expose_put.html b/fmpp/docs/freemarker/xgui_expose_put.html deleted file mode 100644 index eea6c21..0000000 --- a/fmpp/docs/freemarker/xgui_expose_put.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - FreeMarker Manual - Putting the XML into the data-model - - - - - - - - -
    - - - - - -

    -Putting the XML into the data-model

    - - -
    -

    Note

    - -

    This section is for programmers.

    -
    -

    It's easy to create a simple program to try the examples. Just - replace the ``Create a data-model'' part of the example of Programmer's Guide - Quickstart with this:

    -
    -/* Create a data-model */
    -Map root = new HashMap();
    -root.put(
    -        "doc",
    -        freemarker.ext.dom.NodeModel.parse(new File("the/path/of/the.xml")));  
    -

    and then you have a program that outputs the result of the XML - transformation to the standard output (usually the terminal - screen).

    Notes:

    -
      -
    • -

      The parse method removes comment and - processing instruction nodes by default. See the API for more - details.

      -
    • - -
    • -

      NodeModel also allows you to wrap - org.w3c.dom.Node-s directly. You may want to - clean up the DOM tree first with the static utility methods, such - as NodeModel.simplify or your own custom - cleanup routines.

      -
    • -
    -

    Note that there are tools available that you can use to generate - files from XML documents, so you don't have to write your own for this - common task. See here...

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_imperative.html b/fmpp/docs/freemarker/xgui_imperative.html deleted file mode 100644 index 5bcb4e3..0000000 --- a/fmpp/docs/freemarker/xgui_imperative.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - FreeMarker Manual - Imperative XML processing - - - - - - - - -
    - - - - - -

    -Chapter 2   Imperative XML processing

    - -
    -

    - - Chapter Contents - -

    - - -
    - - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_imperative_formal.html b/fmpp/docs/freemarker/xgui_imperative_formal.html deleted file mode 100644 index 1ef121d..0000000 --- a/fmpp/docs/freemarker/xgui_imperative_formal.html +++ /dev/null @@ -1,553 +0,0 @@ - - - - - - - - FreeMarker Manual - Details - - - - - - - - -
    - - - - - -

    -Details

    - - -

    Every variable that corresponds to a single node in the DOM tree - is a multi-type variable of type node and type hash (for programmers: - implements both TemplateNodeModel and - TemplateHashModel). Thus, you can use the node built-ins with them. Hash keys - are interpreted as XPath expressions, except the special keys shown in - the table below. Some of the node variables also have string type, so - you can use them as string variables (for programmers: they implement - TemplateScalarModel).

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Node type (?node_type)Node name (?node_name)String value (e.g. <p>${node})Special hash keys
    "document""@document"No string value. (Error when you try to use it as - string.)"elementName", - "prefix:elementName", - "*", "**", - "@@markup", - "@@nested_markup", - "@@text"
    "element""name": the - name of the element. This is the local name (i.e. name without - namespace prefix).If it has no element children, the text of all text node - children concatenated together. Error otherwise, when you try to - use it as string."elementName", - "prefix:elementName", - "*", "**", - "@attrName", - "@prefix:attrName", - "@@", "@*", - "@@start_tag", - "@@end_tag", - "@@attributes_markup", - "@@markup", - "@@nested_markup", - "@@text", "@@qname"
    "text""@text"The text itself."@@markup", - "@@nested_markup", - "@@text"
    "pi""@pi$target"The part between the target name and the - ?>."@@markup", - "@@nested_markup", - "@@text"
    "comment""@comment"The text of the comment, without the delimiters - <!-- and -->."@@markup", - "@@nested_markup", - "@@text"
    "attribute""name": the - name of the attribute. This is the local name (i.e. name without - namespace prefix).The value of the attribute."@@markup", - "@@nested_markup", - "@@text", "@@qname"
    "document_type""@document_type$name": - name is the name - of the document element.No string value. (Error when you try to use it as - string.)"@@markup", - "@@nested_markup", - "@@text"
    -
    -

    Notes:

    -
      -
    • -

      There is no CDATA type. CDATA nodes are transparently - considered as text nodes.

      -
    • - -
    • -

      Variables do not support - ?keys and ?values.

      -
    • - -
    • -

      Element and attribute node names are local names, that is, - they do not contain the namespace prefix. The URI of the namespace - the node belongs to can be queried with the - ?node_namespace built-in.

      -
    • - -
    • -

      XPath expression needs Jaxen (recommended, but please use - 1.1-beta-8 or later; download - it here) or Apache Xalan classes available, or an error - will stop template execution. Note, however, that as some special - hash keys hide the XPath expressions of the same meaning, those - XPath expressions will work even if there is no XPath - implementation available. If both - Xalan and Jaxen is available, FreeMarker will use Xalan, unless - you choose Jaxen by calling - freemarker.ext.dom.NodeModel.useJaxenXPathSupport() - from Java.

      -
    • - -
    • -

      If Jaxen is used for the XPath support (not Xalan), then - FreeMarker variables are visible with XPath variable references - (e.g. - doc["book/chapter[title=$currentTitle]"]).

      -
    • -
    -

    Meaning of special hash keys:

    -
      -
    • -

      "elementName", - "prefix:elementName": - Returns the sequence of child nodes that are elements of name - elementName. (Note - that the term ``child'' means immediate - descendant.) The selection is XML name-space aware, unless the XML - document was persed with an XML parser that was not in namespace - aware mode. In XML name-space aware mode, names without prefix - (elementName) selects only elements - that doesn't belong to any XML name-space (unless you have - registered a default XML namespace), and names with prefix - (prefix:elementName) - selects only elements that are belonging to the XML namespace - denoted by the prefix. The registration of prefixes and the - setting of the default XML namespace is done with the - ns_prefixes parameter of the ftl - directive.

      -
    • - -
    • -

      "*": Returns the sequence of all child - (direct descedant) element nodes. The - sequence will contain the elements in the ``document order'', that - is, in the order in which the first character of the XML - representation of each node occurs (after expansion of general - entities).

      -
    • - -
    • -

      "**": Returns the sequence of all - descendant element nodes. The sequence will - contain the elements in the document order.

      -
    • - -
    • -

      "@attName", - "@prefix:attrName": - Returns the attribute - attName of the - element as a sequence of size 1 that contains the attribute node, - or as an empty sequence if the attribute does not exist (so to - check if an attribute exists use - foo.@attName[0]??, - not - foo.@attName??). As - with special key - "elementName", if - the length of the sequence is 1, then it also acts as its first - subvariable. If no - prefix is used, then - it returns only attribute that does not use XML namespace (even if - you have set a default XML namespace). If a - prefix is used, it - returns only the attribute that belongs to the XML namespace - associated with the - prefix. The - registration of prefixes is done with the - ns_prefixes parameter of the ftl - directive.

      -
    • - -
    • -

      "@@" or "@*": Returns - the sequence of attribute nodes belonging to the parent element. - This is the same as XPath @*.

      -
    • - -
    • -

      "@@qname": Returns the full-qualified - name of the element (such as e:book, in - contrast to the local name returned by - ?node_name that is book) . - The prefix used (as e) is chosen based on the - prefix registered in the current namespace with the - ns_prefixes parameter of the - ftl directive, and not influenced by the prefix - used in the source XML document. If you have set a default XML - namespace, then for nodes that use that, prefix - D will be used. For nodes that does not belong - to an XML namespace, no prefix is used (even if you have set a - default namespace). If there is no prefix registered for the - namespace of the node, the result is a non-existent variable - (node.@@qname?? is - false).

      -
    • - -
    • -

      "@@markup": This returns the full XML - markup of a node, as a string. (Full XML markup means that it also - contains the markup of the child nodes, and the markup of the - children of the child nodes, and so on.) The markup you get is not - necessary the same as the markup in the source XML file, it's just - semantically identical. Especially, note that CDATA sections will - become to plain text. Also note that depending on how did you - wrapped the original XML document with FreeMarker, comment or - processing instruction nodes may were removed, and then they will - be missing from the output of course. The first outputted start - tag will contain - xmlns:prefix - attributes for each XML name-spaces used in the outputted XML - fragment, and those prefixes will be used in the outputted element - and attribute names. These prefixes will be the same as the - prefixes registered with the ns_prefixes - parameter of the ftl directive (no prefix will - be used for D, as it will be registered as the - default name-space with an xmlns attribute), or - if no prefix was assigned for a XML name-space with that, then an - arbitrary chosen unused prefix is used.

      -
    • - -
    • -

      "@@nested_markup": This is similar to - "@@markup", but it returns the XML markup of an - element without its opening and closing tags. For the document - node, it returns the same as "@@markup". For - other node types (text, processing instruction, etc.), it returns - an empty string. Unlike with "@@markup", no - xmlns:prefix - attributes will be placed into the ouput, but regarding the - prefixes used in element and attribute names the rules are the - same.

      -
    • - -
    • -

      "@@text": This returns the value of all - text nodes that occur within the node (all descendant text nodes, - not just direct children), concatenated together into a single - string. If the node has no text node children, then the result is - an empty string.

      -
    • - -
    • -

      "@@start_tag": Returns the markup of the - start-tag of the element - node. As with @@markup, the output is not - necessary the same as in the original XML document, but it is - semantically equivalent with that. Regarding the XML name-spaces - (xmlns:prefix - attributes in the output, etc.) the rules are the same as with - "@@markup"

      -
    • - -
    • -

      "@@end_tag": Returns the markup of the - end-tag of the element node. - As with @@markup, the output is not necessary - the same as in the original XML document, but it is semantically - equivalent with that.

      -
    • - -
    • -

      @@attributes_markup: Returns the markup - of the attributes of the - element node. As with @@markup, the output is - not necessary the same as in the original XML document, but it is - semantically equivalent with that.

      -
    • -
    - - - - - -

    -Node sequences

    - - -

    Many of the special hash keys (indicated in the above list), - and XPath expressions that result in node-sets (see the XPath recommendation) - return a sequence of nodes.

    - -

    These node sequences, if they store exactly 1 subvariable, - will also act as the subvariable itself. For example, - ${book.title[0]} will do the same as - ${book.title}, if there is only one - title element child of element - book.

    - -

    Returning an empty node sequence is a normal situation. For - example, if in a concrete XML document, element - book has no child element - chapter, then book.chapter - results in an empty node sequence. Beware! This also means, that - book.chaptre (note the typo) will also return - empty node sequence, and will not stop with error. Also, - book.chaptre?? (note the typo) will return - true because the empty sequence exists, so you - have to use book.chaptre[0]?? for the - check.

    - -

    Node sequences that store not 1 nodes (but 0 or more than 1 - nodes) also support some of the hash keys described above. Namely, - the following special keys are supported:

    - -
    -
      -
    • -

      "elementName", - "prefix:elementName"

      -
    • - -
    • -

      "@attrName", - "@prefix:attrName"

      -
    • - -
    • -

      "@@markup", - "@@nested_markup"

      -
    • - -
    • -

      "@@text"

      -
    • - -
    • -

      "*", "**"

      -
    • - -
    • -

      "@@", "@*"

      -
    • -
    - - -

    When you apply one of the above special keys on a node - sequence that contains more than 1 or 0 nodes, then for each node in - the sequence (where the special key does make sense, e.g. text nodes - will be skipped for key * or - @foo), the special key will be applied as it was - explained for single nodes, and the results will be concatenated to - form the final result. The results will be concatenated in the order - as the corresponding nodes occur in the node sequence. The - concatenation means string or sequence concatenation depending on - the type of the results. If the special key would result in a string - for a single node, then for multiple nodes the result is a single - string too (the results for the single nodes concatenated), and if - the special key would return a sequence for a single node, then for - multiple nodes the result is a single sequence too. If there are 0 - nodes in the sequence you apply the special key on, the string - result is an empty string or an empty sequence respectively.

    - -

    XPath expressions can be used with node sequences. However, - for 0 or more than 1 nodes it will work only if you use Jaxen - instead of Xalan, because of the limitations of the Xalan XPath - implementation.

    - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_imperative_learn.html b/fmpp/docs/freemarker/xgui_imperative_learn.html deleted file mode 100644 index c074f29..0000000 --- a/fmpp/docs/freemarker/xgui_imperative_learn.html +++ /dev/null @@ -1,781 +0,0 @@ - - - - - - - - FreeMarker Manual - Basics - - - - - - - - -
    - - - - - -

    -Basics

    - - - - -
    -

    Note

    - -

    This section uses the DOM tree and the variable made in the - previous chapter.

    -
    -

    Assume that the programmer has put the XML document into the - data-model as variable doc. This variable - corresponds to the root of the DOM - tree, the ``document''. The actual variable structure behind - doc is wily enough, and only roughly resembles the - DOM tree. So instead of getting lost in the details, let's see how to - use it by example.

    - - - - -

    -Accessing elements by name

    - - -

    This FTL prints the title of the book:

    - -
    -
    -<h1>${doc.book.title}</h1>  
    - - -

    The output will be:

    - -
    -
    -<h1>Test Book</h1>  
    - - -

    As you see, both doc and - book can be used as hashes; you get their child - nodes as subvariables. Basically, you describe the path by which you - reach the target (element title) in the DOM tree. - You may notice that there was some swindle above: with - ${doc.book.title}, it seems that we instruct - FreeMarker to print the title element itself, but - we should print its child text node (check the DOM tree). It still works, because - elements are not only hash variables, but string variables as well. - The scalar value of an element node is the string resulting from the - concatenation of all its text child nodes. However, trying to use an - element as scalar will cause error if the element has child - elements. For example ${doc.book} would stop with - error.

    - -

    This FTL prints the titles of the two chapters:

    - -
    -
    -<h2>${doc.book.chapter[0].title}</h2>
    -<h2>${doc.book.chapter[1].title}</h2>  
    - - -

    Here, as book has 2 - chapter element children, - doc.book.chapter is a sequence that stores the - two element nodes. Thus, we can generalize the above FTL, so it - works with any number of chapters:

    - -
    -
    -<#list doc.book.chapter as ch>
    -  <h2>${ch.title}</h2>
    -</#list>  
    - - -

    But what's if there is only one chapter? Actually, when you - access an element as hash subvariable, it is - always a sequence as well (not only hash and - string), but if the sequence contains exactly 1 item, then the - variable also acts as that item itself. So, returning to the first - example, this would print the book title as well:

    - -
    -
    -<h1>${doc.book[0].title[0]}</h1>  
    - - -

    But you know that there is exactly 1 book - element, and that a book has exactly 1 title, so you can omit the - [0]-s. - ${doc.book.chapter.title} would work too, if the - book happen to have only 1 chapter-s (otherwise - it is ambiguous: how is it to know if the title - of which chapter you want? So it stops with an - error.). But since a book can have multiple chapters, you don't use - this form. If the element book has no - chapter child, then - doc.book.chapter will be a 0 length sequence, so - the FTL with <#list ...> will still - work.

    - -

    It is important to realize the consequence that, for example, - if book has no chapter-s then - book.chapter is an empty sequence, so - doc.book.chapter?? will not - be false, it will be always - true! Similarly, - doc.book.somethingTotallyNonsense?? will not be - false either. To check if there was no children - found, use doc.book.chapter[0]?? (or - doc.book.chapter?size == 0). Of course you can - use similarly all the missing value handler - operators (e.g. - doc.book.author[0]!"Anonymous"), just don't - forget that [0].

    - -
    -

    Note

    - -

    The rule with sequences of size 1 is a convenience feature - of the XML wrapper (implemented via multi-type FTL variables). It - will not work with other sequences in general.

    -
    - - -

    Now we finish the example by printing all the - para-s of each chapter:

    - -
    -
    -<h1>${doc.book.title}</h1>
    -<#list doc.book.chapter as ch>
    -  <h2>${ch.title}</h2>
    -  <#list ch.para as p>
    -    <p>${p}
    -  </#list>
    -</#list>  
    - - -

    this will print:

    - -
    -
    -<h1>Test</h1>
    -  <h2>Ch1</h2>
    -    <p>p1.1
    -    <p>p1.2
    -    <p>p1.3
    -  <h2>Ch2</h2>
    -    <p>p2.1
    -    <p>p2.2  
    - - -

    The above FTL could be written more nicely as:

    - -
    -
    -<#assign book = doc.book>
    -<h1>${book.title}</h1>
    -<#list book.chapter as ch>
    -  <h2>${ch.title}</h2>
    -  <#list ch.para as p>
    -    <p>${p}
    -  </#list>
    -</#list>  
    - - -

    Finally, a ``generalized`` usage of the child selector - mechanism: this template lists all para-s of the - example XML document:

    - -
    -
    -<#list doc.book.chapter.para as p>
    -  <p>${p}
    -</#list>  
    - - -

    The output will be:

    - -
    -
    -  <p>p1.1
    -  <p>p1.2
    -  <p>p1.3
    -  <p>p2.1
    -  <p>p2.2
    -    
    - - -

    This example shows that hash subvariables select the children - of a sequence of notes (just in the earlier examples that sequence - happened to be of size 1). In this concrete case, subvariable - chapter returns a sequence of size 2 (since there - are two chapter-s), and then subvariable - para selects the para child - nodes of all nodes in that sequence.

    - -

    A negative consequence of this mechanism is that things like - doc.somethingNonsense.otherNonsesne.totalNonsense - will just evaluate to an empty sequence, and you don't get any error - messages.

    - - - - - -

    -Accessing attributes

    - - -

    This XML is the same as the original, except that it uses - attributes for the titles, instead of elements:

    - -
    -
    -<!-- THIS XML IS USED FOR THE "Accessing attributes" CHAPTER ONLY! -->
    -<!-- Outside this chapter examples use the XML from earlier.       -->
    -
    -<book title="Test">
    -  <chapter title="Ch1">
    -    <para>p1.1</para>
    -    <para>p1.2</para>
    -    <para>p1.3</para>
    -  </chapter>
    -  <chapter title="Ch2">
    -    <para>p2.1</para>
    -    <para>p2.2</para>
    -  </chapter>
    -</book>  
    - - -

    The attributes of an element can be accessed in the same way - as the child elements of the element, except that you put an at-sign - (@) before the name of the attribute:

    - -
    -
    -<#assign book = doc.book>
    -<h1>${book.@title}</h1>
    -<#list book.chapter as ch>
    -  <h2>${ch.@title}</h2>
    -  <#list ch.para as p>
    -    <p>${p}
    -  </#list>
    -</#list>  
    - - -

    This will print exactly the same as the previous - example.

    - -

    Getting attributes follows the same logic as getting child - elements, so the result of ch.@title above is a - sequence of size 1. If there were no title - attribute, then the result would be a sequence of size 0. So be - ware, using existence built-ins is tricky here too: if you are - curious if foo has attribute - bar then you have to write - foo.@bar[0]??. (foo.@bar?? is - wrong, because it always returns true.) - Similarly, if you want a default value for the - bar attribute, then you have to write - foo.@bar[0]!"theDefaultValue".

    - -

    As with child elements, you can select the attributes of - multiple nodes. For example, this template prints the titles of all - chapters:

    - -
    -
    -<#list doc.book.chapter.@title as t>
    -  ${t}
    -</#list>  
    - - - - - - -

    -Exploring the tree

    - - -

    This FTL will enumerate all child nodes of the book - element:

    - -
    -
    -<#list doc.book?children as c>
    -- ${c?node_type} <#if c?node_type = 'element'>${c?node_name}</#if>
    -</#list>  
    - - -

    this will print:

    - -
    -
    -- text
    -- element title
    -- text
    -- element chapter
    -- text
    -- element chapter
    -- text  
    - - -

    The meaning of ?node_type is probably clear - without explanation. There are several node types that can occur in - a DOM tree, such as "element", - "text", "comment", - "pi", ...etc.

    - -

    The ?node_name returns the name of element - for element nodes. For other node types, it also returns something, - but that's mainly useful for declarative XML processing, which will - be discussed in a later - chapter.

    - -

    If the book element had attributes, they would - not appear in the above list, for practical - reasons. But you can get a list that contains all attributes of the - element, with subvariable @@ of the element - variable. If you modify the first line of the XML to this:

    - -
    -
    -<book foo="Foo" bar="Bar" baaz="Baaz">  
    - - -

    and run this FTL:

    - -
    -
    -<#list doc.book.@@ as attr>
    -- ${attr?node_name} = ${attr}
    -</#list>  
    - - -

    then you get this output (or something similar):

    - -
    -
    -- baaz = Baaz
    -- bar = Bar
    -- foo = Foo  
    - - -

    Returning to the listing of children, there is a convenience - subvariable to list only the element children of an element:

    - -
    -
    -<#list doc.book.* as c>
    -- ${c?node_name}
    -</#list>  
    - - -

    This will print:

    - -
    -
    -- title
    -- chapter
    -- chapter  
    - - -

    You get the parent of an element with the - parent built-in:

    - -
    -
    -<#assign e = doc.book.chapter[0].para[0]>
    -<#-- Now e is the first para of the first chapter -->
    -${e?node_name}
    -${e?parent?node_name}
    -${e?parent?parent?node_name}
    -${e?parent?parent?parent?node_name}  
    - - -

    This will print:

    - -
    -
    -para
    -chapter
    -book
    -@document  
    - - -

    In the last line you have reached the root of the DOM tree, - the document node. It's not an element, and this is why it has that - strange name; don't deal with it now. Obviously, the document node - has no parent.

    - -

    You can quickly go back to the document node using the - root built-in:

    - -
    -
    -<#assign e = doc.book.chapter[0].para[0]>
    -${e?root?node_name}
    -${e?root.book.title}  
    - - -

    This will print:

    - -
    -
    -@document
    -Test Book  
    - - -

    For the complete list of built-ins you can use to navigate in - the DOM tree, read the reference - of node built-ins.

    - - - - - -

    -Using XPath expressions

    - - -
    -

    Note

    - -

    XPath expressions work only if Jaxen (recommended, but use - at least Jaxen 1.1-beta-8, not older) or Apache Xalan - classes are available. (Apache Xalan classes are included in Sun - J2SE 1.4, 1.5 and 1.6 (and maybe later too); no separate Xalan jar - is needed.)

    -
    - - -
    -

    Note

    - -

    Don't use the sample XML from the previous section, where - title is an attribute; that applies only to - that section.

    -
    - - -

    If a hash key used with a node variable can't be interpreted - otherwise (see the next - section for the precise definition), then it will by - interpreted as an XPath expression. For more information on XPath, - please visit http://www.w3.org/TR/xpath.

    - -

    For example, here we list the para elements - of the chapter with title element (not - attribute!) content "Ch1'':

    - -
    -
    -<#list doc["book/chapter[title='Ch1']/para"] as p>
    -  <p>${p}
    -</#list>  
    - - -

    It will print:

    - -
    -
    -  <p>p1.1
    -  <p>p1.2
    -  <p>p1.3  
    - - -

    The rule with sequences of length 1 (explained in earlier - sections) stands for XPath results as well. That is, if the - resulting sequence contains exactly 1 node, it also acts as the node - itself. For example, print the first paragraph of chapter - ``Ch1'':

    - -
    -
    -${doc["book/chapter[title='Ch1']/para[1]"]}  
    - - -

    which prints the same as:

    - -
    -
    -${doc["book/chapter[title='Ch1']/para[1]"][0]}  
    - - -

    The context node of the XPath expression is the node (or - sequence of nodes) whose hash subvariable is used to issue the XPath - expression. Thus, this prints the same as the previous - example:

    - -
    -
    -${doc.book["chapter[title='Ch1']/para[1]"]}  
    - - -

    Note that currently you can use a sequence of 0 or multiple - (more than 1) nodes as context only if the programmer has set up - FreeMarker to use Jaxen instead of Xalan.

    - -

    Also note that XPath indexes sequence items from 1, while FTL - indexes sequence items from 0. Thus, to select the first chapter, - the XPath expression is "/book/chapter[1]", while - the FTL expression is book.chapter[0].

    - -

    If the programmer has set up FreeMarker to use Jaxen instead - of Xalan, then FreeMarker variables are visible with XPath variable - references:

    - -
    -
    -<#assign currentTitle = "Ch1">
    -<#list doc["book/chapter[title=$currentTitle]/para"] as p>
    -...  
    - - -

    Note that $currentTitle is not a FreeMarker - interpolation, as there are no { and - } there. That's an XPath expression.

    - -

    The result of some XPath expressions is not a node-set, but a - string, a number, or a boolean. For those XPath expressions, the - result is an FTL string, number, or boolean variable respectively. - For example, the following will count the total number of - para elements in the XML document, so the result - is a number:

    - -
    -
    -${x["count(//para)"]}  
    - - -

    The output will be:

    - -
    -
    -5  
    - - - - - - -

    -XML namespaces

    - - - - -

    Be default, when you write something like - doc.book, then it will select the element with - name book that does not belongs to any XML - namespace (similarly to XPath). If you want to select an element - that is inside an XML namespace, you must register a prefix and use - that. For example, if element book is in XML - namespace http://example.com/ebook, then you have - to associate a prefix with it at the top of the template with the - ns_prefixes parameter of the ftl - directive:

    - -
    -
    -<#ftl ns_prefixes={"e":"http://example.com/ebook"}>  
    - - -

    And now you can write expressions as - doc["e:book"]. (The usage of square bracket - syntax was required because the colon would confuse FreeMarker - otherwise.)

    - -

    As the value of ns_prefixes is a hash, you - can register multiple prefixes:

    - -
    -
    -<#ftl ns_prefixes={
    -    "e":"http://example.com/ebook",
    -    "f":"http://example.com/form",
    -    "vg":"http://example.com/vectorGraphics"}
    ->  
    - - -

    The ns_prefixes parameter affects the whole - FTL namespace. This means - in practice that the prefixes you have registered in the main page - template will be visible in all <#include - ...>-d templates, but not in <#imported - ...>-d templates (often referred as FTL libraries). Or - from another point of view, an FTL library can register XML - namespace prefixes for it's own use, without interfering with the - prefix registrations of the main template and other - libraries.

    - -

    Note that, if an input document is dominated by a given XML - namespace, you can set that as the default namespace for - convenience. This means that if you don't use prefix, as in - doc.book, then it selects element that belongs to - the default namespace. The setting of the default namespace happens - with reserved prefix D, for example:

    - -
    -
    -<#ftl ns_prefixes={"D":"http://example.com/ebook"}>  
    - - -

    Now expression doc.book select the - book element that belongs to XML namespace - http://example.com/ebook. Unfortunately, XPath - does not support this idea of a default namespace. Thus, in XPath - expressions, element names without prefixes always select the - elements that does not belong to any XML namespace. However, to - access elements in the default namespace you can directly use prefix - D, for example: - doc["D:book/D:chapter[title='Ch1']"].

    - -

    Note that when you use a default namespace, then you can - select elements that does not belong to any node namespace with - reserved prefix N, for example - doc.book["N:foo"]. It doesn't go for XPath - expressions, where the above can be witten as - doc["D:book/foo"].

    - - - - - -

    -Don't forget escaping!

    - - -

    We have made a big mistake in all examples. We generate output - of HTML format, and HTML format reserves characters as - <, &, etc. So when we - print plain text (as the titles and paragraphs), we have to escape - it. Thus, the correct version of the example is:

    - -
    -
    -<#escape x as x?html>
    -<#assign book = doc.book>
    -<h1>${book.title}</h1>
    -<#list book.chapter as ch>
    -  <h2>${ch.title}</h2>
    -  <#list ch.para as p>
    -    <p>${p}
    -  </#list>
    -</#list>
    -</#escape>  
    - - -

    So if the book title is "Romeo & Julia", the resulting - HTML output will be correctly:

    - -
    -
    -...
    -<h1>Romeo &amp; Julia</h1>
    -...  
    - - -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/freemarker/xgui_preface.html b/fmpp/docs/freemarker/xgui_preface.html deleted file mode 100644 index e0c109e..0000000 --- a/fmpp/docs/freemarker/xgui_preface.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - FreeMarker Manual - Preface - - - - - - - - -
    - - - - - -

    -Preface

    - - -

    Although FreeMarker was originally designed as a web page template - engine, as of version 2.3 it also targets another application domain: - transforming XML into arbitrary textual output (e.g. HTML files). Thus, - in many cases, FreeMarker is an XSLT alternative.

    Technically, there is nothing special in transforming XML - documents. It's just like when you do anything else with FreeMarker: you - drop the XML document into the data-model (and possibly other - variables), and then you merge the data-model with the FTL template(s) - that generate the output text. The extra features introduced for better - XML processing are the node FTL variable type (symbolizes a node in - generic tree structures, usable not only for XML) and the built-ins and - directives dealing with them, and the XML wrapper you get out-of-the-box - that exposes XML documents as FTL variables for the templates.

    What's the difference between using FreeMarker or XSLT? The FTL - language has the usual imperative/procedural logic. On the other hand, - XSLT is a language with declarative style, designed by "too clever" - people, so it's not easy to adopt its logic, nor to use it in many - cases. Also its syntax is terribly verbose. However, XSLT's - "apply-templates" method can be very handy when you process XML - documents, thus FreeMarker supports something similar called the - ``visitor pattern''. So in many applications, it is much easier to write - FTL stylesheets than XSLT style-sheets. Another fundamental difference - is that FTL "transforms" the node tree to text, while XSLT transforms - the tree to another tree. So you cannot always use FreeMarker where you - can use XSLT.

    -
    - - - - - - - - - - -
    - FreeMarker Manual -- For FreeMarker 2.3.21 -
    - HTML generated: 2014-10-12 18:53:30 GMT -
    - - Edited with XMLMind XML Editor - -
    - -
    - Here! -
    - - - diff --git a/fmpp/docs/frontends.html b/fmpp/docs/frontends.html deleted file mode 100644 index 023be23..0000000 --- a/fmpp/docs/frontends.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - -Front-ends - FMPP - - - - - - - - - - - - - - - -
    -

    Front-ends

    - -
    -
    -

    Chapter Contents

    - -
    - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/ftl.html b/fmpp/docs/ftl.html deleted file mode 100644 index 0f20032..0000000 --- a/fmpp/docs/ftl.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - -FTL - FreeMarker Template Language - FMPP - - - - - - - - - - - - - - - -
    -

    FTL - FreeMarker Template Language

    - -
    -
    - -

    This is the syntax used for the template files. Please read the FreeMarker Manual about this.

    - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/index.html b/fmpp/docs/index.html deleted file mode 100644 index c85b3e7..0000000 --- a/fmpp/docs/index.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - -FMPP: Text file preprocessor (HTML preprocessor) - - - - - - - - - - - - - -
    -

    FMPP - FreeMarker-based file PreProcessor

    - -
    -
    -

    Page contents

    - -
    -
    -
    - - -

    What is FMPP?

    -

    FMPP is a general-purpose text file preprocessing tool that uses FreeMarker templates. It process entire directories recursively. It can be used for generating complete static websites, source code, configuration files, etc. It can insert data from sources like CSV, XML, and JSON into the generated files. (You can add new kind of data sources in Java.) See the Tutorial for a more concrete introduction.

    - -

    FMPP can be used with UN*X-style command-line interface, or as Ant task, or can be embedded into your application using its Java API.

    - -

    FMPP was written in Java, thus it runs on all modern platforms (Windows, "Linux", OS X, etc.).

    - -

    FMPP is Free software under Apache License 2.0. See license...

    - - -

    Features

    -

    A quick list of FMPP capabilities:

    -
      -
    • FreeMarker as the preprocessor language: -
        -
      • All the usual template constructs, such as include, if/else/elseif, loop.
      • -
      • Macros with named arguments and nested content (body).
      • -
      • Variables (global, or local for a macro call)
      • -
      • Complex expressions using string, arithmetical and logical operations.
      • - Extensible with custom functions. -
      • Automatic and manual escaping (HTML, XML, custom function)
      • -
      • Transforming (filtering) blocks of output; extensible with custom transformations in Java.
      • -
      • Capturing block of output into a variable.
      • -
      • Charset aware, internally uses UNICODE.
      • -
      • Number and date/time formatting with masks (patterns). Locale sensitive formatting.
      • -
      -
    • -
    • Bulk file processing: -
        -
      • Process entire directories recursively.
      • -
      • Different file processing mode can be chosen for each file, based on path patterns (as file extension): execute file as template, or parse it as XML and then render it to output with a template, or binary-copy it, or ignore it.
      • -
      • Can ignore bad source files and log the error message into a text file.
      • -
      • Can guarantee that certain files will be processed later than others.
      • -
      -
    • -
    • You can expose data from arbitrary data sources be writing extensions in Java. - Currently out-of-the-box supported data sources: -
        -
      • XML file
      • -
      • CSV and tab-separated text file
      • -
      • JSON file
      • -
      • Java "properties" file
      • -
      • Ant properties, Ant project and target information
      • -
      • System clock
      • -
      • Plain text file
      • -
      -
    • -
    • Other highlighted features: -
        -
      • Output splitting: a single source file can generate multiple output files (including 0 output files).
      • -
      • Automatic file inclusion, automatic escaping, and whatnot that can be done with automatically inserted headers and footers, chosen based on path patterns.
      • -
      • Generate HTML <img>-s with calculated width and height.
      • -
      • Calculate the relative path to the home directory, or to any other file.
      • -
      • Rendering (transforming) XML files with FreeMarker templates. (Similar to the typical XSLT usage pattern.)
      • -
      • Query the size/existence of source files.
      • -
      • Query output encoding (charset).
      • -
      • URL-escaping (with the actual output charset).
      • -
      -
    • -
    - - - -

    Documentation

    - - - -

    Download

    -

    To download the latest release, please visit the FMPP homepage: http://fmpp.sourceforge.net/

    - -

    For text editor and IDE plug-ins and other FreeMarker template-related tools, please visit the FreeMarker homepage: http://freemarker.org/ (mirror: http://freemarker.sourceforge.net/)

    - - -

    Contact

    - -

    Ask for help or provide suggestions:

    - - -
    -

    Please report bugs you find! Any programming, documentation content or grammatical mistakes (even minor typos). Thank you!

    -

    Use the bug reporting Web page,
    - or e-mail: ddekanyREMOVETHIS@freemail.hu (delete the "REMOVETHIS"!)

    - -

    Please report FreeMarker bugs at the FreeMarker bug reporting Web page, not for me. If you are not sure if you have found a FreeMarker or FMPP bug, just report it as an FMPP bug.

    -
    - - - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/installing.html b/fmpp/docs/installing.html deleted file mode 100644 index cc1b151..0000000 --- a/fmpp/docs/installing.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - -Installing - FMPP - - - - - - - - - - - - - - - -
    -

    Installing

    - -
    - -
    - - -

    Warning!

    -

    Please understand that FMPP, as a bulk file processor, may generates high amount of output files, and overwrites all files with the same names as the names of output files without warning. It's a practical decision comes from the usage pattern of the tool. So watch where will the output files go.

    - -

    Also note that, according the license, the author does not take responsibly if the usage of FMPP causes harm for you somehow.

    - - -

    Pre-requirements

    -
      -
    • Java must be installed on your machine (version 1.4 or later). Note that Java is available for free, and on various platforms (Windows, OS X, "Linux", etc.), so FMPP works on many platforms. -
    • If you want to use the FMPP Ant task, you need Ant 1.5.1 or later. If you don't know what's Ant then don't worry, you will not need it. -
    - - -

    Extracting

    -

    Extract the downloaded archive file (fmpp_X.X.X.tar.gz or fmpp_X.X.X.zip) into the directory where you prefer to store FMPP. For Windows users it is typically C:\fmpp or C:\Program Files\fmpp, for UN*X users it is typically ~/opt/fmpp or /opt/fmpp or /usr/lib/fmpp (where fmpp is the extracted fmpp_X.X.X directory after renaming). From now on I will refer to this directory as <FMPP_HOME>.

    - -

    - - - -

    Setup the command-line tool

    - - -

    On Windows

    -

    The steps are:

    -
      -
    1. Extract the downloaded archive file (fmpp_0.9.15.tar.gz or fmpp_0.9.15.zip) into C:\Program Files\fmpp (note that "Program Files" may be shown in a localized form, like "Programme") or C:\fmpp or wherever you prefer to. From now on I will refer to this directory as <FMPP_HOME>
    2. -
    3. For convenience, add <FMPP_HOME>/bin to the PATH environment variable. (How? Google: set path windows)
    4. -
    5. Check if fmpp.bat isn't present in C:\Windows (or in another directory in the PATH) from an earlier installation. Delete it if it does.
    6. -
    7. Check if the JAVA_HOME environment variable is set correctly (should point to your Java installation directory, not its bin subdirectory), or else that the intended version of the java executable is in the PATH.
    8. -
    9. To check that everything works, open a command line window and issue: fmpp --version
    10. -
    - -

    Note: Because of the limitations of .bat files, you may get error messages as "The input line is too long". To solve this, install FMPP in a more "shallow" directory, so that the path to the FMPP related files will be shorter.

    - - - -

    On UN*X (Linux, FreeBSD, OS X, etc.)

    -

    The steps are:

    -
      -
    1. Extract the downloaded archive file (fmpp_0.9.15.tar.gz or fmpp_0.9.15.zip) into the /usr/lib/fmpp or /opt/fmpp directory (conventions vary by distribution), or wherever you prefer to. From now on I will refer to this directory as <FMPP_HOME>. -
    2. -
    3. For convenience, create a soft link somewhere in the PATH, like sudo ln -s <FMPP_HOME>/bin/fmpp /usr/bin/fmpp.
    4. -
    5. Issue which fmpp to see if it's not shadowed by an earlier installation elsewhere.
    6. -
    7. Check if the intended version of the java executable is in the PATH, or else that the JAVA_HOME environment variable is set correctly (should point to your Java installation directory, not its bin subdirectory).
    8. -
    9. To check that everything works, open a command line window and issue: fmpp --version
    10. -
    - - -

    Notes

    -
      -
    • If there's a FMPP_HOME environment variable, it <FMPP_HOME>\bin\fmpp.bat and <FMPP_HOME>\bin\fmpp will use that directory instead of its own grandparent directory.
    • -
    • You can run FMPP without the provided shell scripts directly with the java command, like java -jar <FMPP_HOME>/lib/fmpp.jar. (You can also put all required jar-s and class directories into the CLASSPATH and then issue java fmpp.tools.CommandLine.) Note though that you will lose console width detection with these approaches.
    • -
    • You can move the jars into the lib subdirectory of Ant (if you want to use the Ant task anyway). If you do this, the command line tool need Ant be installed on a "standard" location (like C:\Program Files\ant), or ANT_HOME must be correctly set.
    • -
    - - - - -

    Setup the Ant task

    - -

    If you want to use FMPP as Ant task, copy the required jar files from <FMPP_HOME>/lib into the lib directory of your Ant installation (issuing ant install from <FMPP_HOME> will do this for you), or ensure that the jars are in the CLASSPATH environment variable. Then, whenever you need the FMPP task in a project, add this line to your build.xml:

    - -
    <taskdef name="fmpp" classname="fmpp.tools.AntTask"/>
    - -

    And then you can use the <fmpp ...> task. - - - -

    Installing optional parts and custom extensions

    - -

    For the command-line tool, simply drop the jar file that contains the required classes into the <FMPP_HOME>/lib directory (or, into the Ant lib directory, if you store fmpp.jar there only). For the Ant task, either ensure that the required jars are in the CLASSPATH, or drop the jars into the lib directory of your Ant installation.

    - - - -

    Updating FreeMarker

    - -

    You can replace the included FreeMarker version with a later version. Download the latest backward compatible FreeMarker release, and overwrite <FMPP_HOME>/lib/freemarker.jar with the freemarker.jar of the FreeMarker release. (Of course, if you are using the FMPP Ant task, you may need to replace the freemarker.jar in the lib directory of the Ant installation too.)

    - - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/languages.html b/fmpp/docs/languages.html deleted file mode 100644 index 9bf7eea..0000000 --- a/fmpp/docs/languages.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - -Languages (formats) used - FMPP - - - - - - - - - - - - - - - -
    -

    Languages (formats) used

    - - -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/license.html b/fmpp/docs/license.html deleted file mode 100644 index 8c1e7d9..0000000 --- a/fmpp/docs/license.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - -License - FMPP - - - - - - - - - - - - - - -
    -

    License

    - -
    -
    -
    Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky
    -
    -Licensed under the Apache License, Version 2.0 (the "License");
    -you may not use this file except in compliance with the License.
    -You may obtain a copy of the License at
    -
    -http://www.apache.org/licenses/LICENSE-2.0
    -
    -Unless required by applicable law or agreed to in writing, software
    -distributed under the License is distributed on an "AS IS" BASIS,
    -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -See the License for the specific language governing permissions and
    -limitations under the License.
    -
    -==============================================================================
    -END LICENSE
    -
    -
    -SOFTWARE INCLUDED IN THE FULL FMPP DISTRIBUTION
    -
    -This section only applies to the full FMPP distribution, not to
    -"fmpp.jar" (not to the Maven artifact, net.sourceforge.fmpp:fmpp).
    -
    -  This product includes software developed by the
    -  Apache Software Foundation (http://www.apache.org/).
    -
    -The full FMPP distribution includes software developed by various parties,
    -under various licenses. Below you find the list of these, with their location
    -inside the distribution archive.
    -
    -  The contents of the "bin" directory is derived from Apache Ant, a software
    -  developed by the Apache Software Foundation (http://www.apache.org/).
    -  It's derived from Ant 1.5, which is under Apache Software License 1.1.
    -  Read LICENSE_ANT.txt for more information.
    -
    -  "lib/resolver.jar" is a binary distribution of Apache xml-commons Resolver,
    -  a software developed by the Apache Software Foundation.
    -  Xml-commons Resolver is under Apache Software License 2.0.
    -  Read LICENSE_RESOLVER.txt for more information.
    -
    -  "lib/bsh.jar" is a binary distribution of BeanShell.
    -  BeanShell is under LGPL (GNU Lesser Public License) license.
    -  Visit http://www.beanshell.org for more information.
    -
    -  "lib/imageinfo.jar" is a binary distribution of ImageInfo, a software
    -  developed by Marco Schmidt, who has contributed it to the Public Domain.
    -
    -  "lib/freemarker.jar" is a binary distribution of FreeMarker.
    -  FreeMarker is under Apache License 2.0 (since FreeMarker 2.3.21).
    -  Read LICENSE_FREEMARKER.txt for more information.
    -
    -  "lib/test/junit.jar" is a binary distribution of JUnit 3.8.
    -  JUnit 3.8 is under Common Public License Version 1.0.
    -  Visit http://www.opensource.org/licenses/cpl1.0.txt  for more
    -  information.
    -
    -  The "icomoon" font files (icomoon.eot, icomoon.svg, icomoon.ttf, and
    -  icomoon.woff) under "src/docs/style/fonts/" and "docs/style/fonts/" are
    -  generated from Entypo pictograms, version 2.0, by Daniel Bruce
    -  (www.entypo.com). Each included pictogram is either licensed under
    -  Creative Commons Attribution-ShareAlike 3.0 (CC BY-SA 3.0), or under
    -  SIL Open Font License. For more information about these licenses visit
    -  http://creativecommons.org/licenses/by-sa/3.0/legalcode" and
    -  http://scripts.sil.org/OFL. Note that the fonts are only used as part of
    -  the FMPP documentation and the FMPP Web site, thus aren't needed for the
    -  operation of the FMPP application.
    -
    -"lib/fmpp.jar" doesn't contain parts that belong under a different license or
    -to a different copyright owner than the main license and copyright owner of
    -FMPP (since FMPP 0.9.15).
    - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/manual.html b/fmpp/docs/manual.html deleted file mode 100644 index 2043b24..0000000 --- a/fmpp/docs/manual.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - -FMPP Manual - FMPP - - - - - - - - - - - - - - -
    -

    FMPP Manual

    - -
    -
    -

    Updated for FMPP 0.9.15 - (requires FreeMarker - 2.3.21 or later compatible) -

    Note: The FMPP Manual only covers the framework that FMPP builds around FreeMarker. - FreeMarker is a template engine that is independent of FMPP. - For using FMPP you need to know the FreeMarker template language.

    Table of Contents

    - -
    -
    -

    Please report bugs you find! Any programming, documentation content or grammatical mistakes (even minor typos). Thank you!

    -

    Use the bug reporting Web page,
    - or e-mail: ddekanyREMOVETHIS@freemail.hu (delete the "REMOVETHIS"!)

    - -

    Please report FreeMarker bugs at the FreeMarker bug reporting Web page, not for me. If you are not sure if you have found a FreeMarker or FMPP bug, just report it as an FMPP bug.

    -
    - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/miscellaneous.html b/fmpp/docs/miscellaneous.html deleted file mode 100644 index a54f357..0000000 --- a/fmpp/docs/miscellaneous.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - -Miscellaneous - FMPP - - - - - - - - - - - - - - - -
    -

    Miscellaneous

    - -
    -
    -

    Chapter Contents

    - -
    - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/overview.html b/fmpp/docs/overview.html deleted file mode 100644 index 03e8b6e..0000000 --- a/fmpp/docs/overview.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - -Concepts and Terminology - FMPP - - - - - - - - - - - - - - - -
    -

    Concepts and Terminology

    - -
    - -
    - -

    Read the Tutorial before this, otherwise you won't understand this chapter.

    - - - -

    FMPP core and front-ends

    - -

    FMPP consist of the FMPP core, and the front-ends wrapping that. Front-ends provide interface by which you can communicate with the FMPP core. For example the command-line tool (that we have used previously) is a front-end that provides command-line interface. The FMPP Ant task is another front-end that provides Ant task interface. A graphical front-end could be written too. But whatever front-end you use, you (indirectly) use the FMPP core. So most of the documentation is about the FMPP core, which basically encapsulates all abilities of FMPP.

    - -

    Note that the FMPP core wraps FreeMarker, the template engine.

    - -

    For more info see the chapter about writing front-ends.

    - - - - -

    Settings

    - -

    Settings are variables that describe for the FMPP core what and how to do. Examples of settings you have already met: sourceRoot, outputRoot, data. Front-ends basically do nothing else, just set the settings of the core, and then "trigger" the core to do the job. So if you know all settings, then basically you know everything FMPP can do.

    - -

    It's a good practice to store the settings of your project in configuration files (as config.fmpp was). As the FMPP core understand them, you can use them with all front-ends. Configuration files use a simple FMPP specific language, TDD.

    - - - - -

    File processing and related terms

    - -

    Processing a file is the act of the generation of the output file (or files) based on a source file. This may means the execution of the file as FreeMarker template, or binary-copying the file, processing the file as XML, or, in extreme case, create no output the file (say, for a .bak file). The path of the output file relatively to the outputRoot will be the same as the path of the corresponding source file relatively to the sourceRoot (at least initially; the template can change the output file path on-the-fly).

    - -

    Term processing mode refers to how a certain file is processed. In the Quick Tour, the HTML files were processed in "execute" mode, and the image file was processed in "copy" mode. You can find all details about processing modes here.

    - -

    Processing session: This is the course of batch processing the (selected) files of the source directory. For example, all fmpp call in the Quick Tour did a processing session.

    - -

    Strictly speaking, FMPP only processes files, not directories. It looks for source files in the sub-directories of the source root directory recursively, and when an output file has to be created, its missing parent directories will be created automatically. Any setting that deals with processing things is applicable only to files, not to directories (with some exceptions, like alwaysCreateDirectories).

    - -

    FMPP doesn't use the term "processing" for data files like data/style.tdd or data/birds.csv was in the tutorial. A data file isn't processed like a template file (or an image file), it does not produce output file itself. Instead, it can be loaded into a variable for later usage in templates.

    - - - - -

    Data, data loader

    - -

    In FMPP context data means data coming from data sources as XML file, CSV file, MySQL database, etc. In the Quick Tour, data/style.tdd and data/birds.csv are data files. Files that are processed to produce output files, as the HTML-s and the image are not data files.

    - -

    The FreeMarker templates see the "data" as variables. This set of variables is called the data model with FreeMarker terminology. The data model is shared, visible for all templates. During output generation the template may creates new variables for temporary calculations, but those variables are not part of the data model, and will gone when the template execution is finished. Templates can't modify the data model, so all templates get the same data model, which was filled with the data setting at the very beginning of the processing session.

    - -

    Data loaders are objects that load and interpret data from certain type of data source, so FMPP can expose the data as variables for the templates. For example, in the Quick Tour we have used data loader csv that interprets CSV files. When the data source is file based, you use paths as data data/birds.csv. Relative paths are relative to the directory dictated by the dataRoot setting, which is be default the same as sourceRoot. Data loaders are described in more details here.

    - - - - -

    The pp hash

    - -

    The data model always contains a hash with name pp (stands for PreProcessor). This hash contains directives and methods and other variables that templates can use to control output generation, do path calculations, and do various other FMPP specific operations. You can find the description of the pp hash here.

    - - - - -

    Virtual paths

    - -

    FMPP works with 3 file systems: the real file system, and 2 virtual file systems:

    -
      -
    • source file system: The root directory of this file system is the sourceRoot directory. Template files usually see this file system, as when they <#include ...> other template files. All files that FMPP processes must be inside this file system, thus inside the source root directory.
    • - -
    • output file system: The root directory of this file system is the outputRoot directory. In templates, directives that control output file names and paths (as <@pp.changeOutputFile ...>) use this file system. It is guaranteed that all output files will be inside this file system, thus inside the output root directory.
    • -
    - -

    Most directives/methods in templates that require path parameters use one of the virtual file systems. These paths are called virtual paths. Virtual paths always use UN*X style format, so they always use slash (/), not back-slash (\). Absolute virtual paths (as /foo/bar) always start from the virtual file system root (not from the root of the real file-system). You can't leave this root, not even with tricky path as /... Relative virtual paths (as foo/bar or ../foo/bar) are resolved relatively to:

    -
      -
    • If they are used in built-in FreeMarker directives (as <#include ...> or <#import ...>): the directory of the currently executing template.
    • -
    • If they are used in other directives to refer to source files: the directory of the currently processed source file.
    • -
    • If they are used in directives to refer to output files: the directory of the currently written output file.
    • -
    - -

    Note that the dataRoot setting (used by data loaders) just specifies a base directory, not a virtual file system root. So you can leave it with ..-s.

    - - - - -

    Real paths

    - -

    Paths that navigate in the real file system (not in a virtual file systems) are called real paths. Real paths always use the native path format of the host operating system. However, Windows users can and should use slash (/) instead of backslash (\), to keep UN*X compliance, and to avoid escaping issues.

    - -

    Real paths are used in these cases:

    -
      -
    • For setting values that store a path (or paths), such as sourceRoot and outputRoot. Relative paths in these settings are resolved relatively to the, so called, configuration base (unless explicitly stated otherwise for a certain setting). If the setting value comes from a configuration file, then it is the directory that contains the configuration file (however, this can be overridden with the configurationBase setting). If the value comes from other source (such as from a command-line argument), then the front-end specifies what the configuration base is for that setting value (see the documentation of the front-end). - -
    • For data loaders that load files, as csv(data/birds.csv). If the path is relative, then it is relative to the dataRoot, which defaults to the sourceRoot. Note that the usage of / instead of the native path separator (as backslash) is always allowed and recommended here. - -
    • As the parameter to some pp directives/methods that explicitly state this. -
    - -

    In other cases FMPP uses virtual paths. - - - - -

    Adopted FreeMarker type names

    - -

    FMPP adopts some of FreeMarker's terms regarding the type names, to decrease confusion:

    -
      -
    • String: text. -
    • Boolean: logical value. It can be true or false. -
    • Number: Number... maybe decimal, maybe whole. You often will also see term "integer", which means whole number. -
    • Sequence: You may know this with name list, or array, or vector. It is a list of values of any type. The items in the list are indexed with integers, starting from 0. -
    • -Hash: You may know this with name dictionary, or map, or associative array. This is a set of name-value pairs. The names are unique strings in the hash, so they identify the values associated with them. As it used to be said, they are "keys". -
    - - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/pathpattern.html b/fmpp/docs/pathpattern.html deleted file mode 100644 index 02c2fa3..0000000 --- a/fmpp/docs/pathpattern.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - -Path Patterns - FMPP - - - - - - - - - - - - - - - -
    -

    Path Patterns

    - -
    -
    - -

    Probably you have already used commands like dir *.txt (or ls *.txt on UN*X). This lists all files in the current directory where the name of the file ends with .txt. The *.txt stuff is called a path pattern.

    - -

    With FMPP you also use path patterns to select certain files, say, in the modes setting, to tell FMPP which files to copy as is, and which files to execute as template. A path pattern looks like a path, but it can contain some special parts:

    -
      -
    • *: matches zero or more characers, except slash (/). For example a*c matches to abc, axyzc and ac, but not a/c. -
    • ?: matches exactly one characer, except slash (/). For example a?c matches to abc, but not axyzc or ac or a/c. -
    • **: This matches zero or more directories of the path. For example a/**/c matches to a/b/c, a/b/xyz/c and a/c. Another example: **/*.gif matches to foo.gif, a/foo.gif and , a/b/foo.gif. Also, if you use ** at the end of the pattern, then it match with all file names as well. Thus, foo/** will match all files inside foo, such as foo/bar.txt or foo/sub/bar.txt. Furthermore, if the pattern ends with /, then it is considered as shorthand for /**, so foo/ is the same as foo/**. -
    - -

    If your operating system use something else instead of / (as \ on Windows), FMPP will internally convert the native paths to UN*X format, so do not worry about this. Just use slash in the patterns. (Or, in fact, you can even use the native "slash" in patterns, just it is not a good practice in general.)

    - -

    Note that pattern as *.gif will match only the GIF files in the current directory. If you want to match all GIF files of the subdirectories (and sub-subdirectories, etc.) as well, use **/*.gif. - -

    The meaning of "current directory" in FMPP depends on the concrete situation where you use the path. In most cases where you will use path patterns (as with the modes setting) it will be the source root directory. Also, the meaning of "root directory" is depends on where you use the path. That is, absolute path /foo.txt maybe means foo.txt in the source root directory (this is the typical), or in the output root directory, or in the real root directory of the file system, etc.

    - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/pphash.html b/fmpp/docs/pphash.html deleted file mode 100644 index eb6d688..0000000 --- a/fmpp/docs/pphash.html +++ /dev/null @@ -1,974 +0,0 @@ - - - - - - - -The pp Hash - FMPP - - - - - - - - - - - - - - - -
    -

    The pp Hash

    - -
    - -
    - -

    The pp hash is a variable that is always present in the data model. This contains the built-in, standard variables of FMPP.

    - -

    Note: For more information about variable types, directives, etc. in general, please read the FreeMarker Manual.

    - - -

    Information about the source

    - - - -

    sourceFile

    - Type: string -

    The path of the current source file (includes the file name), relatively to the source root directory. It does not start with slash. Uses UN*X path format.

    - - - - - -

    sourceDirectory

    - Type: string -

    The path of the directory of the current source file, relatively to the source root directory. It is finished with a slash, except if the directory is the source root directory itself, in which case the result is an empty (0 length) string. The result never starts with slash. Uses UN*X path format.

    - - - - -

    sourceFileName

    - Type: string -

    The filename of the current source file.

    - - - - -

    sourceEncoding

    - Type: string -

    The encoding (charset) of the source file, e.g. ISO-8859-1. It is always a concrete charset name, never host.

    - - - - -

    sourceRoot

    - Type: string -

    The absolute real path of the source root directory, finished with a "native slash" (i.e. maybe a backslash). As it is a real path, it uses the native path format.

    - - - - -

    realSource

    - Type: string -

    The absolute real path of the current source file. As it is a real path, it uses the native path format.

    - - - - -

    realSourceDirectory

    - Type: string -

    The absolute real path of the directory of the current source file, finished with a "native slash" (i.e. maybe a backslash). As it is a real path, it uses the native path format.

    - - - - - -

    Information about the output

    - -

    Note that as the output file name and directory, and the output encoding can be changed during the execution of template, the value of these variables can change during the execution of the template, to reflect the current situation.

    - - - -

    outputFile

    - Type: string -

    The path of the current output file (includes the file name), relatively to the output root directory. It does not start with slash. Uses UN*X path format.

    - - - - -

    outputDirectory

    - Type: string -

    The path of the directory of the current output file, relatively to the output root directory. It is finished with a slash, except if the directory is the output root directory itself, in which case the result is an empty (0 length) string. The result never starts with slash. Uses UN*X path format.

    - - - - -

    outputFileName

    - Type: string -

    The filename of the current output file.

    - - - - -

    outputEncoding

    - Type: string -

    The encoding (charset) of the output file, e.g. ISO-8859-1. It is always a concrete charset name, never host or source.

    - - - - -

    outputRoot

    - Type: string -

    The absolute real path of the output root directory, finished with a "native slash" (i.e. maybe a backslash). As it is a real path, it uses the native path format.

    - - - - -

    realOutput

    - Type: string -

    The absolute real path of the current output file. As it is a real path, it uses the native path format.

    - - - - -

    realOutputDirectory

    - Type: string -

    The absolute real path of the directory of the current output file, finished with a "native slash" (i.e. maybe a backslash). As it is a real path, it uses the native path format.

    - - - - - -

    Changing the output file

    - - - -

    changeOutputFile

    - Type: directive -
    Supports nested content: no -
    Parameters: -
      -
    • name: - string. - The new virtual path of the output file. The path can point into a different directory than the directory of the current output file. - -
    • append=false: - boolean. - If this is true, then if a file with the same name as the name of the new output file already exists, it will be continued, rather then overwritten. If the file does not already exist, then this parameter has no effect. - -
    - -

    Closes the current output file, and starts a new output file with the new name. All further output goes into the new file. If the name of the new output file is the same as the current output file, then nothing happens.

    - -

    A word of warning: Don't forget that the path that you specifiy is interpreted relatively to the current output file. So using a relative path like products/${productName}.html ( instead of an absolute path like /shop/products/${productName}.html) inside a loop is most certainly not what you want, because then 2nd product will go into the /shop/products/products/${productName}.html directory, the 3rd into /shop/products/products/products/${productName}.html, and so on. Of course this problem doesn't occur if the relative path is just a file name, like ${productName}.html.

    - - - - -

    renameOutputFile

    - Type: directive -
    Supports nested content: no -
    Parameters: -
      -
    • name: - string. - The new virtual path of the output file. The path can point into a different directory than the directory of the current output file. - -
    • extension: - string. - Replaces the extension (the part after the last dot in the file name) of the current output file, with the value of this parameter. If the file name has no extension (there is no dot in it), then a dot and the new extension is added to the end of the file name. (The parameter value should never contain the starting dot.) - -
    - -

    Changes the name of the current output file, or moves the output file if neccessary. If a file with the same name already exists, this will overwrite that file without warning. If the new name is the same as the name of the current output file, then nothing happens.

    - -

    Either the name or the extension parameter must be specified. You can't use both together. - - - - -

    dropOutputFile

    - Type: directive -
    Supports nested content: no -
    Parameters: - none -

    Deletes the current output file, and drops all further output that would go into this file. Call this directive at the beginning of templates that need to be processed, but you don't want any output files from them. (Of course, you can call this directive even at the end of the template, just that's slower...)

    -

    Note that this directive can be neutralized with directive pp.restartOutputFile.

    - - - - -

    restartOutputFile

    - Type: directive -
    Supports nested content: no -
    Parameters: - none -

    Empties the current output file (but doesn't delete the file). The next character sent to the output will be the first character of the output file. Also, the charset of the output file can be safely set, exactly like if you were at the beginning of the output file creation.

    -

    Note that this directive neutralizes the effect of directive pp.dropOutputFile.

    - - - - -

    nestOutputFile

    - Type: directive -
    Supports nested content: yes -
    Parameters: -
      -
    • name: - string. - The new virtual path (includes the file name) of the output file. The path can point into a different directory than the directory of the current output file. - -
    • append=false: - boolean. - If this is true, then if a file with the same name as the name of the new output file already exists, it will be continued, rather then overwritten. If the file does not already exist, then this parameter has no effect. - -
    - -

    This is similar to changeOutputFile, but it writes only the content generated in its nested content into the new file, and then it restores things, so the output will go into the same output file as before the calling of the directive. For example:

    - -
    The 1st line of the original file.
    -<@pp.nestOutputFile name="new.txt">
    -  The 1st line of new.txt.
    -</@pp.nestOutputFile>
    -The 2nd line of the original file.
    -<@pp.nestOutputFile name="new.txt" append=true>
    -  The 2nd line of new.txt.
    -</@pp.nestOutputFile>
    -The 3rd line of the original file.
    -

    A file can be nested into itself. For example:

    - -
    <@pp.nestOutputFile name='1.txt'>
    -  The 1st line of 1.txt
    -  <@pp.nestOutputFile name='2.txt'>
    -    The 1st line of 2.txt
    -    <@pp.nestOutputFile name='1.txt'>
    -      The 2nd line of 1.txt
    -    </@pp.nestOutputFile>
    -    The 2nd line of 2.txt
    -  </@pp.nestOutputFile>
    -  The 3rd line of 1.txt
    -</@pp.nestOutputFile>  
    -

    Note that append=true was not needed for adding the 2nd line to the 1.txt, since the directive just switched back to the already opened 1.txt.

    - - - - - -

    setOutputEncoding

    - Type: directive -
    Supports nested content: no -
    Parameters: -
      -
    • encoding: - string. - The name of the charset, e.g. ISO-8859-2. It understands the special values source and host. - -
    - -

    Sets the encoding of the output. This will die with error if the output file is already partially written to the disk. Thus, if you want to change the output encoding, do it as early as possible. FMPP buffers the output for the output file in the memory until the buffer size reaches 160 characters, but after that it starts to flush the buffer to the disk. Also, directives that change the current output file may flush the buffer. When you start a new file (say, with changeOutputFile), it starts a new buffer in the memory, so you can set the encoding of the new file.

    - - - - - -

    Utilities for paths

    - - - -

    pathTo

    - Type: method -
    Result type: string -
    Parameters: -
      -
    1. destination: string. - The virtual path in the output file system to the destination file or directory. The destination file or directory need not exist. - -
    - -

    This method returns the relative virtual path that leads from the directory of the current output file, to the destination file or directory. For example, if you want to create a link that points to <outputroot>/products/index.html, then you can write:

    - -
    <a href="${pp.pathTo('/products/index.html')}">Product index</a>
    -

    and the link will always point to that file, does not mater where the file that contains the above link is.

    - -

    The returned path never starts with /; it is always a relative path.

    - -

    If the destination path is finished with slash, then, and only then, the resulting path will be also finished with slash, except if the only character in the result would be that slash, in which case the result will be an empty (0 length) string instead.

    - - - - - -

    home

    - Type: string -

    Same as what pp.pathTo('/') would return. That is, the virtual path to the output root directory, from the current output file. It is finished with a slash, except if the current output file is directly in the output root directory, in which case the result is an empty (0 length) string. The result never starts with slash. So the possible values are something like: ../../

    - -

    Example: The src will always point to the file in the img directory of the output root, does not mater if you move the HTML file in the directory hierarchy:

    - -
    <img src="${pp.home}img/logo.jpg" alt="Logo">
    - - - -

    outputRootRelativePath

    - Type: method -
    Result type: string -
    Parameters: -
      -
    1. file path: string. - The virtual output path to convert. The output file pointed by the path need not exist. - -
    -

    Converts a virtual output path to a virtual output path that is relative to the output root directory. The resulting path will not start with slash.

    - - - - -

    sourceRootRelativePath

    - Type: method -
    Result type: string -
    Parameters: -
      -
    1. file path: string. - Same as the parameter of outputRootRelativePath, but it uses the the source file system. - -
    -

    Same as outputRootRelativePath, but it uses the source root directory and the current source file respectively.

    - - - - -

    sourcePathTo

    - Type: method -
    Result type: string -
    Parameters: -
      -
    1. destination: string. - Same as the parameter of pathTo, but it uses the source file system. - -
    -

    Same as pathTo, but it uses the source root directory and the current source file respectively.

    - - - - -

    slash

    - Type: string -

    The platform dependent slash character used in native paths. This will be backslash (\) on Windows.

    - - - - -

    urlEnc

    - Type: method -
    Result type: string -
    Parameters: -
      -
    1. string to encode: string. - The string to encode. - -
    - -

    Deprecated: use the url built-in of FreeMarker instead. For example: ${"a+b/c"?url}.

    - -

    Encodes a string with URL encoding. For example the result of pp.urlEnc("a+b/c") will be a%2Bb%2Fc, if the output charset is an US-ASCII based charset.

    - - - - -

    urlPathEnc

    - Type: method -
    Result type: string -
    Parameters: -
      -
    1. string to encode: string. - The string to encode. - -
    - -

    Same as FreeMarker's url built-in (?url), except that it does not encode slash characters. For example the result of pp.urlPathEnc("new products/bálna.html") will be new%20products/b%E1lna.html, if the output charset is ISO-8859-1.

    - - - - - -

    Utilities for files

    - - - -

    sourceFileSize

    - Type: method -
    Result type: number -
    Parameters: -
      -
    1. file path: string. - The virtual path of the file in the source file system. - -
    - -

    Returns the size of the file in bytes. If the file does not exist, it returns 0.

    - - - - -

    sourceFileLastModified

    - Type: method -
    Result type: date (date+time) -
    Parameters: -
      -
    1. file path: string. - The virtual path of the file in the source file system. - -
    - -

    Tells the last modification date+time of file. If the file does not exist, it raises an error.

    - - - - -

    sourceFileExists

    - Type: method -
    Result type: boolean -
    Parameters: -
      -
    1. file path: string. - The virtual path of the file in the source file system. - -
    - -

    Tells if the file exists or not.

    - - - - -

    outputFileSize

    - Type: method -
    Result type: number -
    Parameters: -
      -
    1. file path: string. - The virtual path of the file in the output file system. - -
    - -

    Returns the size of the file in bytes. If the file does not exist, it returns 0.

    - - - - -

    outputFileLastModified

    - Type: method -
    Result type: date (date+time) -
    Parameters: -
      -
    1. file path: string. - The virtual path of the file in the output file system. - -
    - -

    Tells the last modification date+time of file. If the file does not exist, it raises an error.

    - - - - -

    outputFileExists

    - Type: method -
    Result type: boolean -
    Parameters: -
      -
    1. file path: string. - The virtual path of the file in the output file system. - -
    - -

    Tells if the file exists or not.

    - - - - -

    realFileSize

    - Type: method -
    Result type: number -
    Parameters: -
      -
    1. file path: string. - The real path (native path) of the file. The file can be outside all root directories. FMPP passes the resolving of relative paths to the host OS, so it is not defined by FMPP what the end result will be. In general, it is better to use absolute paths here.
      - Windows users: According to the syntactical rules of FTL, you must use double backslashes in string literals: "C:\\work\\foo\\bar.txt", or use raw strings: r"C:\work\foo\bar.txt". Also, according to the Windows API rules, you can simply use slash: "C:/work/foo/bar.txt", which is probably the best solution. - -
    - -

    Returns the size of the file in bytes. If the file does not exist, it returns 0.

    - - - - -

    realFileLastModified

    - Type: method -
    Result type: date (date+time) -
    Parameters: -
      -
    1. file path: string. - The real path (native path) of the file. The rules are the same as with realFileSize. - -
    - -

    Tells the last modification date+time of file. If the file does not exist, it raises an error.

    - - - - -

    realFileExists

    - Type: method -
    Result type: boolean -
    Parameters: -
      -
    1. file path: string. - The real path (native path) of the file. The rules are the same as with realFileSize. - -
    - -

    Tells if the file exists or not.

    - - - - - - -

    Writable hashes and sequences

    - -

    Writable sequences and hashes are an FMPP specific extension to FreeMarker, as FreeMarker does not support the modification of sequences and hashes. (This has good reasons in the on-the-fly dynamic page generation segment that FreeMarker mostly targets, but it can be a problem in extreme FreeMarker applications as FMPP.) To read the variables of these sequences and hashes, you can use the same expressions as with plain sequences and hashes. But, to modify the contents of them, you have to use the directives described below, since predefined directives as <#assign ...> can't modify subvariables. Unfortunately, sequence addition, sub-sequence operator (like seq[5..10]) and ?reverse do not copy the original sequence, just wraps it (for efficiency), so the resulting sequence will change if the original sequence is changed later (this is basically an abnormal aliasing effect). The same problem exists with the result of hash addition; it just wraps the two hashes, so the resulting hash will magically change if you modify the hashes you have added earlier. As a work-around, after you did the above problematic operations, either be sure you will not modify the objects that were used as input, or create a copy of the result like: <#assign b = pp.newWritableSequence(a[5..10])> and <#assign c = pp.newWritableHash(hashA + hashB)>). Of course this is easy to miss... so rather try to build the data model so you will not need to modify collections. Keeping templates simple and moving complex calculations out to custom data loaders or BeanShell scripts (see the bsh function of localData here...) is advisable anyway.

    - -

    Note that only the sequences that were made with the newWritableSequence method are writable. Also, only the hashes that were made with the newWritableHash method are writable. You can't modify plain sequences or hashes with the below directives.

    - -

    Also note that writable sequences and hashes suffer from the effect called aliasing (that most programmers will find natural). This effect, explained with an example, looks like this:

    - -
    <#assign a = pp.newWritableSequence()>
    -<@pp.add seq=a value="red" />
    -<#assign b = a>
    -<@pp.add seq=b value="green" />
    -a: <#list a as i>${i} </#list>
    -b: <#list b as i>${i} </#list>
    -

    Here the output will be:

    - -
    a: red green
    -b: red green
    -

    That is, FreeMarker variables just store a reference (pointer) to the sequence or hash, not the sequence or hash itself. So both a and b points to the same single sequence object, which floats somewhere in the memory. This fact becomes significant because you modify that object, otherwise you wouldn't notice it. To create individual copies, use newWritableSequence or newWritableHash, for example:.

    - -
    <#assign a = pp.newWritableSequence()>
    -<@pp.add seq=a value="red" />
    -<#assign b = pp.newWritableSequence(a)>
    -<@pp.add seq=b value="green" />
    -a: <#list a as i>${i} </#list>
    -b: <#list b as i>${i} </#list>
    -

    Here b is a new sequence whose initial content is the same as the content of a. Thus, the output will be:

    - -
    a: red
    -b: red green
    - - -

    newWritableSequence

    - Type: method -
    Result type: writable sequence -
    Parameters: -
      -
    1. initial content: sequence, optional. - -
    -

    Creates a new empty writable sequence. However, if called with parameter then adds the items in the parameter sequence to this new sequence (known as "shallow copy" among programmers). Example:

    - -
    <#assign a = pp.newWritableSequence()>
    -<#assign b = pp.newWritableSequence(['red', 'green', 'blue'])>
    -${a?size}
    -${b?size}
    -

    The output will be:

    - -
    0
    -3
    - - - - -

    newWritableHash

    - Type: method -
    Result type: writable hash -
    Parameters: -
      -
    1. initial content: hash, optional. - -
    -

    Creates a new empty writable hash. However, if called with parameter then adds the items in the parameter hash to this new hash (known as "shallow copy" among programmers). Example:

    - -
    <#assign a = pp.newWritableHash()>
    -<#assign b = pp.newWritableHash({'red':'FE0000', 'green':'10F000', 'blue':'0007FF'})>
    -${a?size}
    -${b?size}
    -

    The output will be:

    - -
    0
    -3
    - - - -

    copyWritable

    - Deprecated: Use newWritableSequence and newWritableHash instead.
    - Type: method -
    Result type: writable hash or writable sequence -
    Parameters: - none -

    Copies a writable hash or sequence. (It is used to prevent aliasing effect. The result is a "shallow copy" of the original hash or sequence.)

    - - - - -

    add

    - Type: directive -
    Supports nested content: no -
    Parameters: -
      -
    • seq: - writable sequence. - The sequence to modify. -
    • index=seq?size: - number. - The index where you want to insert the subvariable into the sequence. The index of the first subvariable is 0. -
    • value: - any. - The new value of the subvariable. -
    - - - - -

    Inserts a new subvariable into the sequence, at the specified index. Shifts the subvariable currently at that position (if any) and any subsequent subvariables to the right (adds one to their indices). If you do not use the index parameter, or if its value is 1 higher than the index of the last subvariable, then it appends the new subvariable at the end of the sequence.

    - - - - -

    set

    - Type: directive -
    Supports nested content: no -
    Parameters: -
      -
    • seq: - writable sequence. - The sequence to modify. -
    • index: - number. - The index of subvariable to set. The index of the first subvariable is 0. -
    • hash: - writable hash. - The hash to modify. -
    • key: - string. - The name of the subvariable that you want to add to the hash, or that you want to replace. -
    • value: - any. - The value of the new subvariable. -
    - - - - - - -

    This can be used for two purposes, depending on if you use the seq or the hash parameter:

    -
      -
    • For sequences: Sets an already existing subvariable of the sequence or hash. The index must be the index of an existing subvariable, or an error will occur. - -
    • For hashes: Adds a new subvariable to the hash with the name specified with the key parameter, or replaces the subvariable with the same name if that already exists. -
    - - - - - -

    remove

    - Type: directive -
    Supports nested content: no -
    Parameters: -
      -
    • seq: - writable sequence. - The sequence to modify. -
    • index: - number. - The index of the subvariable to remove. -
    • hash: - writable hash. - The hash to modify. -
    • key: - string. - The name of the subvariable that you want to remove from the hash. -
    - - - - - -

    This can be used for two purposes, depending on if you use the seq or the hash parameter:

    -
      -
    • For sequences: Removes the subvariable on the specified index, and shifts any subsequent subvariables to the left (subtracts one from their indices). The index must denote an existing subvariable, or an error will be raised. - -
    • For hashes: Removes the subvariable with the name specified with the key parameter, or does nothing if no such subvariable exists. -
    - - - - -

    clear

    - Type: directive -
    Supports nested content: no -
    Parameters: -
      -
    • seq: - writable sequence. - The sequence to clear. -
    • hash: - writable hash. - The hash to clear. -
    - - - -

    Removes all subvariables of the sequence or hash.

    - - - - - -

    Miscellaneous

    - - - -

    warning

    - Type: directive -
    Supports nested content: no -
    Parameters: -
      -
    • message: - string. - The warning message. -
    - - -

    Issues a warning message. It depends on the concrete front-end in use and the settings, but usually the message will be displayed on the screen and/or will be added to the log file. The processing will not stop if you issue a warning. To stop processing with error message you should use <#stop "message">.

    - - - - -

    ignoreOutput

    - Type: directive -
    Supports nested content: yes -
    Parameters: - none -

    All text generated inside the nested content of this directive will be thrown away.

    - - - - -

    locale

    - Type: string -

    The currently used locale in the usual format. For example: ar_SA, ar_IQ, en_US, en_UK, es_ES, ...etc. - - - - -

    loadData

    - Type: method -
    Result type: any -
    Parameters: -
      -
    1. loader name: string. - The name of the data loader. - -
    2. arguments...: any. - The arguments to the data loader. These are 0 or more arguments. - -
    - -

    Loads data using data loaders, and returns the loaded data as the result of the method call. For example this:

    - -
    <#assign foo = pp.loadData('csv', 'foo.txt', {'separator':',', 'encoding':'UTF-8'})>
    -

    does something similar as when you use the below in an FMPP configuration file:

    - -
    data: {foo:csv(foo.txt, {separator:',', encoding:UTF-8})}
    -

    The difference is that with the pp.loadData, you load the data on demand, and into a temporary variable that will be available only for a single template processing.

    - -

    The get data loader can't be invoked with this method. - - - - -

    now

    - Type: date (date+time) -

    Returns the current date and time.

    - -

    For example this:

    - -
    Current date and time: ${pp.now}
    -Current time: ${pp.now?time}
    -Current date: ${pp.now?date}
    -Current day of week: ${pp.now?string("EEEE")}
    -<#setting datetime_format="yyyy-MM-dd HH:mm:ss zzzz">
    -Current date and time: ${pp.now}
    -

    will output something like this:

    - -
    Current date and time: Apr 12, 2003 5:28:50 PM
    -Current time: 5:28:50 PM
    -Current date: Apr 12, 2003
    -Current day of week: Saturday  
    -Current date and time: 2003-04-12 17:28:50 Central European Summer Time
    -

    For more information about using date/time values, please read the FreeMarker Manual.

    - - - - -

    sessionStart

    - Type: date (date+time) -

    Returns the date and time of the processing session starting.

    - - - - -

    s

    - Type: writable hash -

    Stands for "shared". This is a writable hash that keeps its content during the whole processing session. That is, if you add a subvariable to it during the execution of a template, then that subvariable will be visible for all templates processed later in the same session. An example of the usage of pp.s can be found in <FMPP>/docs/examples/session

    - - - - -

    doc

    - Type: node -

    This variable exists only while an XML file is processed in renderXml processing mode (see the documentation of the modes setting). This variable stores the source file (the XML file) as a node variable that corresponds to the W3C DOM document object.

    - -

    An example that uses renderXml processing mode and pp.doc is <FMPP>/docs/examples/xml_rendering

    - - - - -

    version

    - Type: string -

    This is the version number of the FMPP engine.

    - - - - -

    freemarkerVersion

    - Type: string -

    This is the version number of the FreeMarker the FMPP engine currently uses.

    - - - - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/properties.html b/fmpp/docs/properties.html deleted file mode 100644 index 437c2a1..0000000 --- a/fmpp/docs/properties.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - -"Properties" Files - FMPP - - - - - - - - - - - - - - - -
    -

    "Properties" Files

    - -
    -
    - -

    This is a standard format widely used in the Java world to specify set of name-value pairs, where all name is unique (a key).

    - -

    Name-value pairs are specified with name=value format, and each such pair is in its own line. For example:

    - -
    bgColor=blue
    -textColor=white
    -copyright=Copyright (c) 2003, Big Joe All rights reserved.
    -

    If the last character on the line is backslash (\), then the next line is treated as a continuation of the current line; the \ and line break are simply discarded, and any leading whitespace (space, tab, etc.) characters on the continuation line are also discarded and are not part of the value. It is useful if the line would be too long for conveniently reading/editing it:

    - -
    copyright=Copyright (c) 2003, \
    -          Big Joe \
    -          All rights reserved.
    -

    Note that if you accidentally put a space after the \, then it will not work.

    - -

    In the name or value, Java language escape sequences \t, \n, \r, \f, \\, \", \', and \uxxxx are recognized and converted to single characters. Any other escape sequence will be converted to the character after the backlash (e.g. \x will be converted to x). Note that because of the special meaning of backslash, to put a backslash into the name or value, you have to write two backslashes (\\).

    - -
    aNativeWindowsPath=C:\\My Documents\\test
    -someText=First line\nSecond line\nThrid line
    -

    Whitespace is ignored after and before the =, so you can write:

    - -
    bgColor = blue
    -textColor = white
    -

    Alternatively, you can use colon or just whitespace to separate the name and value:

    - -
    bgColor: blue
    -textColor white
    -

    Thus, if the name contains =, : or whitespace, it must be escaped:

    - -
    this\ is\ the\ name = something
    -C\: = /mnt/win
    -

    Empty lines of the file, and the lines that start with # or !, will be ignored. This can be used for commenting:

    - -
    # colors
    -bgColor=blue
    -textColor=white
    -
    -# other text
    -copyright=Copyright (c) 2003, Big Joe All rights reserved.
    -

    "properties" files always use ISO-8859-1 charset. If you have to enter a character that is not in the ISO-8859-1 repertoire, you have to use the \uxxxx escape (where xxxx is the hexadecimal UCS code of the character).

    - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/qtour.html b/fmpp/docs/qtour.html deleted file mode 100644 index bdd98e7..0000000 --- a/fmpp/docs/qtour.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - -Tutorial - FMPP - - - - - - - - - - - - - - - -
    -

    Tutorial

    - -
    - -
    - -

    This chapter is a quick, practical, but rough introduction to FMPP.

    - - -

    Step 1: Process a directory

    - -

    The basic idea is that you have source root directory and an output root directory. The source root directory contains the files to process, and the output root directory will contain the processed files. Processing the file either means that FMPP will execute the file as FreeMarker template, or that it will copy the file as is (in the case of image files, archive files, etc.). (In fact there are other seldom used processing modes as well, like XML rendering.)

    - -

    To see an example, go to the <FMPP>/docs/examples/qtour_step1 directory. Here we have a directory called src:

    - -

    Quick tour step 1 src

    - -

    Also, you will find config.fmpp in the qtour_step1 directory. This file contains the settings for FMPP, and now contains this:

    - -
    sourceRoot: src
    -outputRoot: out
    -

    If you issue fmpp command from the command-line while you are in the qtour_step1 directory, then FMPP will process the src directory and places the output into the out directory. On the console you will see something like:

    - -
    Note: Using the config.fmpp in the working directory.
    -- Executing: index.html
    -- Copying: falcon.png
    -- Executing: subdir\something.html
    -
    -*** DONE ***
    -
    -2 executed + 1 copied = 3 processed
    -0 failed, 0 warning(s)
    -Time elapsed: 0.234 seconds
    -

    and the newly created out directory will contain exactly the same files and subdirectories as src. - -

    Quick tour step 1 diagram

    - -

    The above messages suggest that the PNG file was copied, while the two HTML-s were executed:

    -
      -
    • "Copying" means that the file is copied as is, without changing even a bit compared to the original file (binary copy). -
    • "Executing" means that the file is interpreted by FreeMarker as template file, and the content of the output file is generated by FreeMarker. Template files are plain text files that can contain special parts, which are instructions to FreeMarker. Since in this first example the HTML files don't contain any such special parts, the output files will be identical to the original HTML-s. -
    - - - -

    Step 2: Pulling data from a data source

    - -

    If you look into the two HTML-s of qtour_step1/src, you see that both contains this line:

    - -
    <body bgcolor="#FFFFE0" text="#000000">
    - -

    Assume you want to store these colors in a single centralized place, so if you change them, all pages will change. For this, you have to tell FMPP what data to expose for the templates. For now, tell FMPP to load data from a TDD file. A TDD file is a simple text file that stores name-value pairs. (It happens to be the same format that config.fmpp uses, but it's just accidental coincidence. You could load data from other type of data source in the same way.) If you go to the <FMPP>/docs/examples/qtour_step2 directory, you will find style.tdd in src/data that contains this:

    - -
    bgColor: #FFFFE0
    -textColor: #000000
    -

    Both line in both HTML-s has been changed to:

    - -
    <body bgcolor="${bgColor}" text="${textColor}">
    -

    The two ${...}-s are instructions to FreeMarker that insert the value of a variable. When I'm saying that FMPP exposes data for the templates, then it simply means that it creates variables for the templates, based on some data source. We tell FMPP to load data from data/style.tdd file before it starts to process the files, in the config.tdd of the qtour_step2 directory:

    - -
    sourceRoot: src
    -outputRoot: out
    -data: tdd(data/style.tdd)
    -

    If you issue an fmpp command in the qtour_step2 directory, and look into the result in the out directory, then you will see that the ${...}-s in the HTML files are replaced with the actual colors.

    - -

    Quick tour step 2 diagram

    - -

    It is important that the data directory was not copied into the output (the files in it were not "executed" or "copied"). This is because src/data contains a file with name ignoredir.fmpp, and the presence of this file instructs FMPP not to process the directory.

    - - - -

    Step 3: Even more data

    - -

    You can use any number of data sources, not only a single file. In <FMPP>/docs/examples/qtour_step3 I have added one more data source: data/birds.csv. CSV is a primitive format often used to exchange data among spread sheet applications and other applications. bird.csv stores a table with "name", "description" and "favoriteFood" columns. I want to use the content of this table in the generated HTML pages later, so let load this table into variable birds, in config.fmpp:

    - -
    sourceRoot: src
    -outputRoot: out
    -data: {
    -    tdd(data/style.tdd)
    -    birds: csv(data/birds.csv)
    -}
    -

    Here FMPP creates variables for the templates from multiple data sources (data/style.tdd, data/birds.csv).

    - -

    The index.html now contains some new lines, that fetch the data form the CSV file via the birds variable, and print a list from it. The <#...> tags are instructions to FreeMarker (see in the FreeMarker Manual):

    - -
    <ul>
    -<#list birds as bird>
    -  <li>${bird.name?cap_first}: ${bird.description}
    -      Favorite food: ${bird.favoriteFood}
    -</#list>
    -</ul>
    -

    The output of the above template lines will be something like:

    - -
      <ul>
    -    <li>Arctic-tern: Flies very long distances all years.
    -        Favorite food: sardine
    -    <li>House-sparrow: Don't you say you don't know it...
    -        Favorite food: sunflower
    -    <li>Sakeret: Great hunter of the sky.
    -        Favorite food: pigeon
    -  </ul>
    -

    Note that the template uses birds variable independently of the actual file format (CSV) behind it. You could replace the CSV with whatever data source that can be interpreted as table (as a database table) and the templates could be the same, only the config.fmpp has to be adjusted. (However, FMPP supports only a few data source types out of the box yet, so maybe you have to write/obtain extension Java classes for it.)

    - -

    You can find more information about data and data loading here.

    - - - -

    Step 4: Multiple output files from the same source file

    - -

    Let's say you want to create separate HTML pages for each birds, rather than listing all information about them on the index page, and you want only link to those pages on index.html. <FMPP>/docs/examples/qtour_step4 does this. The index page had trivial changes to generate the links. The interesting is that we have a new file, bird.html. This single file is the template for all bird pages, and will generate a separate HTML file for each birds:

    - -

    Quick tour step 4 diagram

    - -

    The bird.html looks as this:

    - -
    <@pp.dropOutputFile />
    -<#list birds as bird>
    -<@pp.changeOutputFile name=bird.name+".html" />
    -<html>
    -<head>  
    -  <title>${bird.name?cap_first}</title>
    -</head>  
    -<body bgcolor="${bgColor}" text="${textColor}">
    -  <h1>${bird.name?cap_first}</h1>
    -  
    -  <p>${bird.description}</p>
    -
    -  <p><b>Favorite food:</b> ${bird.favoriteFood}</p>
    -</body>
    -</html>
    -</#list>
    -

    The <@...> tags are instructions to FreeMarker (see the FreeMarker Manual). The pp variable is defined by FMPP, and is always there, automatically. It stores the built-in variables of FMPP, e.g. directives as dropOutputFile above. <@pp.dropOutputFile /> instructs FMPP to drop the current output file, so we will not have bird.html in the output directory. <@pp.changeOutputFile .../> instructs FMPP to start a new output file with the given name. So bird.html will produce 3 output files (one output file for each row of the table): arctic-tern.html, house-sparrow.html, and sakeret.html.

    - - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/reportbug.html b/fmpp/docs/reportbug.html deleted file mode 100644 index 28ebff8..0000000 --- a/fmpp/docs/reportbug.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - -Reporting bugs - FMPP - - - - - - - - - - - - - - - -
    -

    Reporting bugs

    - -
    -
    -
    -

    Please report bugs you find! Any programming, documentation content or grammatical mistakes (even minor typos). Thank you!

    -

    Use the bug reporting Web page,
    - or e-mail: ddekanyREMOVETHIS@freemail.hu (delete the "REMOVETHIS"!)

    - -

    Please report FreeMarker bugs at the FreeMarker bug reporting Web page, not for me. If you are not sure if you have found a FreeMarker or FMPP bug, just report it as an FMPP bug.

    -
    - -

    Back where you come from...

    - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/robots.txt b/fmpp/docs/robots.txt deleted file mode 100644 index ef7885c..0000000 --- a/fmpp/docs/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: /freemarker \ No newline at end of file diff --git a/fmpp/docs/settings.html b/fmpp/docs/settings.html deleted file mode 100644 index 7294722..0000000 --- a/fmpp/docs/settings.html +++ /dev/null @@ -1,1255 +0,0 @@ - - - - - - - -Settings - FMPP - - - - - - - - - - - - - - - -
    -

    Settings

    - -
    - -
    - - -

    Things you must know about settings

    - -

    The basic definition of the "setting" term is here... - - -

    The common characteristics of settings

    - -

    The characteristics of a setting can be described with these attributes: -

      -
    • Name: The name of the setting. This name is used in configuration files. Also, front-ends used to use this or similar name for the setting in their user interface.
    • - -
    • Type: The type of the value, such as string, integer, boolean, sequence or hash. If you specify the values in a configuration file, then the TDD syntax clearly specifies what syntax to use for which types. For the front-end specific user interface, it depends on the concrete front-end how you face with types. But, if the front-end wants you to enter the value for a single setting as simple text, then you have to enter scalar values (string, integer and boolean) as is (without any TDD quotation), but you have to use TDD syntax for non-scalar types as sequences and hashes. For setting that are sequences, sequence mode TDD is used (i.e. no [ and ] needed), and for setting that are hashes hash mode TDD is used (i.e. no { and } needed).
    • - -
    • Default: If the value of the setting was not set, the processing session will use this value. If the setting has no default value that doesn't mean that you are required to specify a value for it.
    • -
    - -

    Notes:

    -
      -
    • Settings of type "string (path)" are real paths.
    • -
    • All settings are optional, unless explicitly noted otherwise.
    • -
    - - - -

    The merging of setting values

    - -

    Setting values can be specified in multiple layers. For example, it is possible that a setting is specified in the configuration file, and then again with a command-line argument of the command-line tool.

    - -

    Setting layers has a priority order, for example, the setting layer defined by the command-line arguments has higher priority than the setting layer defined by the configuration file. When the value of the same setting is specified in two layers, then the value that comes from the layer with higher priority overrides the setting value comes from the lower layer. If the type of the setting is not map or sequence, then this simply means that the value from the higher layer will be used, and the other value will be totally hidden. But if the setting type is sequence or hash, then the sequence values will be merged:

    -
      -
    • When sequences are merged, the two sequences are concatenated, and the sequence with the higher priority will start the new concatenated sequence.

    • - -
    • When hashes are merged, the union of the two hashes is constructed, and for clashing keys the values in the hash with higher priority will be used. The type of the value of the hash items is not considered when the merging happens, simply the item from the higher priority hash will be used in the resulting hash. Thus, hash merging is not "deep", becasue the value of clashing items with hash values are not merged. For example, if you merge {x:{v:1}, y:2} with {x:{w:2}}, then the result will be {x:{w:2}, y:2}, and not {x:{v:1, w:2}, y:2}.

    • -
    - -

    Logically, the rules described in this section can be applied for more than two layers of settings as well.

    - - - - -

    Directories

    - -

    - Name: sourceRoot
    - Type: string (path)
    - Default: No default value
    -Command-line short name: S
    -Ant task attribute name alternative: srcdir
    -

    - -

    - Name: outputRoot
    - Type: string (path)
    - Default: No default value
    -Command-line short name: O
    -Ant task attribute name alternative: destdir
    -

    - -

    - Name: dataRoot
    - Type: string (path)
    - Default: the value of sourceRoot
    -

    - -

    - Name: alwaysCreateDirectories
    - Type: boolean
    - Default: false
    -Ant task attribute name alternative: alwaysCreateDirs
    -

    - -

    In the typical use case FMPP processes all files in the directory specified by sourceRoot, and writes the result into the directory specified by the outputRoot directory. These two root directories serve as the root directory of two virtual file systems that store the source files and the output files respectively. This means that all files that FMPP processes must be inside the source root directory (except data files - see later), and it is guaranteed that all output files will be inside the output root directory (as far as you do not by-pass FMPP intentionally with custom extensions). You can't leave the roots by moving upward with ..-s. Also, when you refer to files or directories in the templates as the parameters of predefined directives, absolute paths like /example.html are interpreted relatively to the source or output root directories (except if the parameter deals with data files - see later).

    - -

    Note that both the source root and the output root must be defined before starting a processing session (but a front-end may assings a default value to them). Also, if you use the outputFile setting these two settings always have a default value.

    - -

    The directory specified by dataRoot is interesting for data loaders only. If a data loader gets a relative path, then it should interpret that relatively to the data root directory. If it gets an absolute path, it should interpret that as is. As you can see from this, data root directory does not try to mimic a file system root as the other two root directories. Data loaders can reach files outside the data root directory.

    - -

    By default, the data root is the same as the source root. This encourages the practice where you store the data files in the, say, data subdirectory of the source root, and then mark that directory with a ignoredir.fmpp file (file content is irrelevant), so FMPP will not process the content of the directory. Thus, you keep all input together: data sources, templates and static files (as images).

    - -

    By default, no empty subdirectories will be created in the output root directory. More precisely, directories are created only on demand, when actual output files have to be created in them, hence normally you don't have empty directories in the output. However, this behavior can be changed with alwaysCreateDirectories; with that setting set to true, each source directory will produce a corresponding output directory (unless it contains an ignoredir.fmpp file). Also, if a source directory contains a file named createdir.fmpp (file content is irrelevant) then the corresponding output directory will be created, regardless of the alwaysCreateDirectories setting (unless, again, ignoredir.fmpp is also present)

    - -

    It is possible to tell FMPP to process only certain files and directories of the source root, not all of them; see the sources setting.

    - - - -

    Source and output files

    - -

    - Name: sources
    - Type: sequence (of paths)
    - Default: No default value
    -

    - -

    - Name: outputFile
    - Type: string (path)
    - Default: No default value
    -Command-line short name: o
    -

    - -

    Be default FMPP processes all files in the source root directory. But if you use the sources setting, FMPP will process only the files and/or directories listed there. Relative paths in this setting are resolved relatively to the source root directory, not to the configuration base (unless you use outputFile setting).

    - -

    If you use the outputFile setting, then FMPP switches to single file mode. In this mode, it will process only 1 files, and store its output in the file specified by the outputFile setting. You must use sources, and it must list exactly 1 file. If a relative path is given in the sources, it is resolved relatively to configuration base, not to the source root. If you didn't specified outputRoot or sourceRoot, it will default to the parent directory of the output file or source file respectively.

    - -

    The user interface of front-ends tend to require you to use some special way to specify the value sources setting. Please read the documentation of the front-end you use about this. Note that configuration files are front-end independent, so there you always simply set sources be assigning value to the sources key.

    - - - -

    Text encoding issues

    - -

    - Name: sourceEncoding
    - Type: string
    - Default: ISO-8859-1
    -Command-line short name: E
    -

    - -

    - Name: outputEncoding
    - Type: string
    - Default: source
    -

    - -

    - Name: urlEscapingCharset
    - Type: string
    - Default: output
    -

    - -

    People use different encodings to store text in binary form, often referred as charsets. Examples of charsets are: ISO-8859-1, ISO-8859-2, CP852, CP1250, Shift_JIS, UTF-8. FMPP internally uses UNICODE everywhere, but when it has to read a text file or write a text file, it must deal with charsets to correctly decode/encode the text. -To read text files, FMPP uses the source encoding. This is be default ISO-8859-1. Also, a FreeMarker template has the ability to tell its own encoding with <#ftl encoding="something">, and this overrides the source encoding for the individual template file.

    - -

    To write text files, FMPP uses the output encoding. This is be default holds the special value source, which means that FMPP will use the encoding of the source text file (template file). If you change the value of the setting to a concrete charset, such as UTF-8, then text files will be always written with that encoding. However, templates can set the encoding of the output file with <@pp.setOutputEncoding encoding="something"/>, and this overrides the encoding dictated by the settings.

    - -

    The urlEscapingCharset specifes the name of the charset (encoding) used for URL escaping. It defaults to output, which means that the output encoding will be used for URL escaping. URL escaping happens for example when you use FreeMarker's url built-in (e.g. <a href="foo.cgi?id=${id?url}">) or the pp.urlPathEnc method.

    - -

    All of these settings understands the special charset host, which means the default encoding of the host operating system.

    - -

    The set of supported charsets (and their preciese names) depends on the Java platfrom implementation you run FMPP on.

    - - - - -

    Processing mode choosing

    - -

    - Name: modes
    - Type: sequence (of function calls)
    - Default: empty
    -Command-line short name: M
    -

    - -

    - Name: ignoreCvsFiles
    - Type: boolean
    - Default: true
    -

    - -

    - Name: ignoreSvnFiles
    - Type: boolean
    - Default: true
    -

    - -

    - Name: ignoreTemporaryFiles
    - Type: boolean
    - Default: true
    -

    - -

    When FMPP has to process a file, it has to decide how to process that. That is, it has to choose a "processing mode" for the file. The processing mode can be one of:

    -
      -
    • execute: Execute the file as FreeMarker template (FTL) -
    • copy: Copy the file as is. Uses binary copy; charset does not mater here. -
    • renderXml: Parse the file as XML, and then render the XML document to output file(s) using a FreeMarker template. The template file is choosen for the XML file based on the xmlRenderings setting. For more information read about XML rendering... -
    • ignore: Skip the file. -
    - -

    First, if the ignoreCvsFiles setting is true, and the file name is .cvsignore or matches .#?*, or the file is inside a sub-directory of the source root that is called CVS, then it chooses the "ignore" processing mode. Also, if the ignoreSvnFiles setting is true, and the file is inside a sub-directory of the source root that is called .svn, then it chooses the "ignore" processing mode (note that it doesn't ignore conflict files, i.e., *.mine and *.rnumber). Also, if ignoreTemporaryFiles setting is true, and the file name matches ?*~ or ~?* or #?*# or %?*% or _.?*, or the extension (the part after the last dot in the file name) after converting to lowercase matches bak or ~* or *~ then it chooses the "ignore" processing mode. Note that the FMPP Ant task always sets these settings to false, so it does not interfere with the defaultExcludes parameter of Ant.

    - -

    Then, the processing mode is chosen with a sequence of path patterns, which is defined by the modes setting. The first path pattern in the sequence that matches the virtual path of the file, chooses the processing mode. If no matching path were found, then FMPP chooses the processing mode automatically:

    -
      -
    • If the file extension after converting to lowercase is xml and the xmlRenderings is not an empty sequence, then it chooses the "renderXml" mode. -
    • If the file extension after converting to lowercase is one of: ace, arc, arj, avi, bmp, bz, bz2, cab, chm, class, com, dll, doc, exe, fli, gif, gz, ico, jar, jpeg, jpg, lha, lzh, mov, mp3, mpeg, mpg, msi, pcx, pdf, png, ps, rar, swf, tar, taz, tga, tgz, tiff, tz, wav, wma, xls, zip, then it chooses the "copy" processing mode. -
    • Otherwise it chooses the "execute" processing mode. -
    -

    The modes setting is a list of TDD functions, where the function name is either execute, copy, renderXml, or ignore. The arguments to the functions are one or more path patterns of virtual paths in the source file system. For example this (in a configuration file):

    -
    modes: [
    -    ignore(**/tmp/)
    -    copy(foo/**/*.html, foo/**/*.htm)
    -    execute(**/*.html, **/*.htm, **/*.xhtml)
    -    copy(**/*)
    -]

    will produce this processing mode chooser sequence:

    - -
    Path patternProcessing mode -
    **/tmp/ignore -
    foo/**/*.htmlcopy -
    foo/**/*.htmcopy -
    **/*.htmlexecute -
    **/*.htmexecute -
    **/*.xhtmlexecute -
    **/*copy -
    - -

    Note that processing modes are only applicable to files, not to directories. Say, you can't tell FMPP to ignore a directory, but to ignore all files in the directory (as **/tmp/ above). The end result will be that the directory will not be created, as it contains no output file.

    - - - - -

    Header and footer choosing

    - -

    - Name: borders
    - Type: sequence (of function calls)
    - Default: empty
    -

    - -

    With these settings you can insert a header before templates, and insert a footer after templates (templates = files processed in "execute" processing mode). The insertion of header and footer happens only in the memory of the computer, and does not modify the source files. This can be used to add common headers and footers to the templates without actually typing them again and again. Also, you can change the header/footer of many templates at once.

    - -

    The intent of headers and footers is not to show something at the top and bottom of pages. Rather it is to insert FTL directives that import or include commonly used macros, or to place the page inside a directive block, as <#escape ...>...</#escape>. For concrete examples please see <FMPP>/docs/examples/border.

    - -

    Note: Unfortunately the inserted header displace the error locations (column, row) in the error messages (I can't fix it in FMPP; FreeMarker improvements are needed to address this). However, if the header doesn't contain line-break, then this unwanted effect is limited to the first line of the template. So it's strongly recommended to not use line-break in headers.

    - -

    Footers and headers are chosen with similar mechanism to processing modes (see modes). There are two independent sequence of path-pattern to text entry mappings (so called "choosers"), one for choosing headers, and one for choosing footers. When FMPP loads a template file, it checks if the virtual path of the file matches to an entry in the header chooser sequence, and if so, it uses the header specified in the first such entry. Also, it does the same with the sequence of footers choosers, to choose a footer.

    - -

    There is a single setting to build both sequences at once: borders. You give a sequence of header, footer and border functions in it. The first argument to header and footer functions is the text of header and footer respectively, and the further arguments are the path patterns of virtual paths in the source file system. If you omit the path patterns, that's the same as if you give ** (i.e. match all files). border is convenience function: border(a, b, paths...) is equivalent with header(a, paths...), footer(b, paths...). Example:

    -
    header("<#import '/lib/css.ftl' as css>", **/*.css)
    -border("<#escape x as x?html>", "</#escape>", **/*.html, **/*.htm)

    This build these sequences:

    -
      -
    • Header chooser sequence: - -
      Path patternHeader -
      **/*.css<#import '/lib/css.ftl' as c> -
      **/*.html<#escape x as x?html> -
      **/*.htm<#escape x as x?html> -
      -
    • -
    • Footer chooser sequence: - -
      Path patternFooter -
      **/*.html</#escape> -
      **/*.htm</#escape> -
      -
    • -
    - -

    Only the first matching entry of the sequence is used for a file, the later entries are ignored. But sometimes you want to choose multiple headers/footers for the same file. In that case, you can define multiple independent sequences, so said, layers. Layers are separated with layer(). For example, modify the above example, so it imports /lib/common.ftl at the top for all files, without disabling the other headers/footers:

    - -
    # The 1st (implicit) layer starts here
    -header("<#import '/lib/common.ftl' as c>", **/*.css, **/*.html, **/*.htm),
    -layer()
    -# The 2nd layer starts here
    -header("<#import '/lib/css.ftl' as css>", **/*.css),
    -border("<#escape x as x?html>", "</#escape>", **/*.html, **/*.htm)
    -

    Here we have two independent header chooser sequences, so both CSS and HTLM files will import lib/common.ftl, and in additional CSS files will import lib/css.ftl, and HTML files will use an escape block. You can have any number of layers.

    - -

    A header chosen from an earlier layer will be used earlier in the template file than headers chosen from later layers. A footer chosen from an earlier layer will be used later in the template file than footers chosen from later layers. For example:

    - -
    borders: [
    -  border('L1(', ')L1')
    -  layer()
    -  border('L2{', '}L2')
    -  layer()
    -  border('L3[', ']L3')
    -]
    -

    If the content of a template file is content, its output will be:

    - -
    L1(L2{L3[content]L3}L2)L1
    - - - -

    Output file name deduction

    - -

    - Name: removeExtensions
    - Type: sequence (of strings)
    - Default: empty
    -Command-line short name: R
    -

    - -

    - Name: removePostfixes
    - Type: sequence (of strings)
    - Default: empty
    -

    - -

    - Name: replaceExtensions
    - Type: sequence (of strings)
    - Default: empty
    -

    - -

    Initially the name of the output file is the same as the name of the source file. These two settings allow you to change the output filename somewhat, be removing parts of source file name. - -

    The precise meaning of the settings:

    -
      -
    • removeExtensions: If the source file name ends with an exension in this sequence, then it will be removed from the output file name. For example, if t is in the sequence (note that there is no dot before the t), then the output file for example.html.t will be example.html. The extension to remove can contain dots (as tar.gz).
    • - -
    • removePostfixes: If the source file name before the first dot ends with a string in this sequence, then it will be removed from the output file name. For example, if _t is in the sequence, then the output file for example_t.html will be example.html. If the file name does not contains dot, then it still works: example_t will become to example.
    • - -
    • replaceExtensions: This sequence is used to replace the file extensions with another extensions. For example, if the sequence is this:
      - ftl, html, xftl, xml
      - then the ftl extension will be replaced with html (i.e. the output file name for source file foo.ftl will be foo.html), and the xftl extension will be replaced with xml. The 1st, 3rd, 5th, etc. sequence elements are the old extensions, and the 2nd, 4th, 6th, etc. sequence elements are the new extensions, so html extension will not be replaced with xftl. Also, only one extension replacement will occur for the same file name, so in the case of
      - x, y, y, z
      - x will not become to z.
    • - -
    -

    The settings are applied in the order as they appear above. Each setting is applied only once on the same file name. - -

    Note that output file name deduction is only apply to files, not to directories.

    - - - - -

    Skipping unchanged files

    - -

    - Name: skipUnchanged
    - Type: string
    - Default: none
    -Command-line short name: -U
    -

    - -

    This setting specifies that the processing of which source files can be skipped, if the source file was not modified after the last modification time of the output file. The value of setting can be one of:

    -
      -
    • none: Don't skip unchanged files. -
    • all: Skip all unmodified files. Warning! It has the problem that if the data that the template displays was changed, or a file that is <#include ...>-d or <#import ...>-d by the template was changed, it will not re-generate the output, since the template file itself was not changed. -
    • static: Skip only unmodified files that will be simply copied anyway (the files where the modes chooses "copy" processing mode). Process all other files. This is the recommended setting for most projects. -
    -

    If the output does not exist, the source file will be always processed.

    - -

    This feature will not work for templates that rename or drop the original output file during the template execution, since FMPP will believe in the next processing session that the output file for those files is missing, and thus it will process them again.

    - - - - -

    Turn choosing

    - -

    - Name: turns
    - Type: sequence (of function calls)
    - Default: empty sequence
    -

    - -

    When FMPP has to process multiple files in the same processing session (for example, when you process a whole directory), then the order in which the files will be processed, is undefined. This is a problem in certain use cases, where it must be ensured that certain files will be processed later than others. For example, if a page contains the alphabetic index of keywords occur in other pages, then that page must be processed for the last, because the information is collected during the processing of the other pages. This is what turns are about: to guarantee the order of the processing of files.

    - -

    The processing session is divided up into, so called, turns. Turns are identified with the turn number, which is simply the order of the turn. The session starts with turn 1, then comes turn 2, and then comes turn 3, ...etc. FMPP puts all files that will be processed into exactly one of the turns, based on the turn chooser sequence.

    - -

    The turn chooser sequence is a sequence of path-pattern -> turn-number pairs. For each source file, the virtual path of the source file is compared with these path patterns, and the first pattern of the sequence that matches determines the turn in which the file will be processed. If there is no matching pattern in the sequence for the file, then the file will be processed in turn 1.

    - -

    For example, if config.fmpp contains this line: - -

    turns: [turn(3, main_idx.html), turn(2, **/*_idx.html)]
    -

    then all files where the file name ends with _idx.html will be processed in turn 2, except main_idx.html, which will be processed in turn 3. All other files will be processed in turn 1.

    - -

    There is no upper limit of the turn number (except a technically limit, somewhere near 2 thousand million). Simply, the last turn will be the turn with the highest number, which is mentioned in the turn chooser sequence, or 1, if the sequence is empty. The first turn is always the turn 1. It is not a problem if a turn contains no file processing.

    - -

    See <FMPP>/docs/examples/session for a working example, or the FMPP task call in the build.xml.

    - - - - -

    Data model building

    - -

    - Name: data
    - Type: hash
    - Default: No default value
    -Command-line short name: D
    -

    - -

    - Name: localData
    - Type: sequence
    - Default: No default value
    -

    - -

    - Name: templateData
    - Deprecated! Use localData instead.
    - Type: string (Java class name)
    - Default: No default value
    -

    - -

    As you may know from the FreeMarker manual, FreeMarker generates the output by merging a template with a data model, and the data model is a hash variable, the root hash. With FMPP terminology, it is usually just referred as "the data". In FMPP, the population of the root hash happens in two places:

    -
      -
    1. Session level data: Once per processing session, at the very beginning of it (before any file processing is stared), the root hash is filled with variables based on the data setting. This is what happened in the Quick Tour, when we have loaded the colors and the table of birds. These variables will be constant during the whole session, and visible for all templates. They must not be modified while the processing session is executing, even if you find a technical way to do that. Note that FreeMarker uses multiple variable layers, so you doesn't modify these variables with <#assign ...> or <#global ...>, just hide them for the time of the template execution, which is OK (the effect will not be visible for the files processed later). - -
    2. Local data (file processing level data): For each processed file, just before FMPP starts to proccess the file, some extra variables are put into the root hash that are specific for that file. These variables will be present in the root hash only while that file is being processed (hence "local data"), so the next file processing will start with the original session level data in the root hash again. The local data is built in three steps, in this order: -
        -
      1. Variables created based on the localData setting. (See details later...) -
      2. Deprecated: User written Java object of class specified by templateData adds an arbitrary set of variables. This feature is deprecated and will be removed later. -
      3. The FMPP core adds the pp hash. -
      - Variable added later will overwrite the variable of similar name added earlier. Also, variable that is local data will hide (seemingly overwrite) the variable of similar name that is session level data. -
    3. -
    - -

    From the view point of FreeMarker templates, variables that are part of the session level data and the part of the local data are not different. They are equal parts of the data model.

    - - -

    More about the data setting

    - -

    When you use TDD syntax for defining the hash for data, TDD function calls are interpreted as data loader invocations. For reminder, here is the relevant part of config.fmpp from <FMPP>/docs/examples/qtour_step4:

    - -
    data: {
    -    tdd(data/style.tdd)
    -    birds: csv(data/birds.csv)
    -}
    -

    TDD syntax makes it possible to enter values directly as well, without using data loaders. For example, you could directly enter the "birds" table with TDD (altoguh it is not too convenient): - -

    data: {
    -    tdd(data/style.tdd)
    -    birds: [
    -        {
    -            name: arctic-tern
    -            description: "Flies very long distances all years."
    -            favoriteFood: sardine
    -        }
    -        {
    -            name: house-sparrow
    -            description: "Don't you say you don't know it..."
    -            favoriteFood: sunflower
    -        }
    -        {
    -            name: sakeret
    -            description: "Great hunter of the sky."
    -            favoriteFood: pigeon
    -        }
    -    ]
    -}
    - - - - -

    More about the localData setting

    - -

    Let's start with a simple example. We have a variable bgColor in the session level data with value green. We want to override this with value yellow for the source files that are in directory sub (or in its subdirectories, ...etc.):

    - -
    data: {
    -    bgColor: green
    -}
    -
    -localData: [
    -    case(sub/**, {bgColor: yellow})
    -]
    -

    Complicate it a bit... now set the bgColor if the file is in directory sub or sub2:

    - -
    localData: [
    -    case(sub/**, sub2/**, {bgColor: yellow})
    -]
    -

    Now do the same as earlier, except for files that are in directory sub/sky, where the bgColor is always blue:

    - -
    localData: [
    -    case(sub/sky/**, {bgColor: blue})
    -    case(sub/**, sub2/**, {bgColor: yellow})
    -]
    -

    The rule is that the first case(...) where one of the path patterns matches the source file path, will specify the local data (given as the last parameter), and the further case(...)-s are ignored. There can be any number of case(...)-s listed (note that localData is a sequence), and a case(...) can have any number of path patterns (but 0).

    - -

    Tricky example: do the same as earlier, but don't override the color if the file name starts with foo:

    - -
    localData: [
    -    case(**/foo*, {})
    -    case(sub/sky/**, {bgColor: blue})
    -    case(sub/**, sub2/**, {bgColor: yellow})
    -]
    -

    Assume you want to set variable author to Joe for all files where the file name contains _j., and to Amy for all files contains _a.. But, you want to do this independently of the bgColor business. In this case you have to use layers:

    - -
    localData: [
    -    # The 1st (implicit) layer starts here
    -    case(**/foo*, {})
    -    case(sub/sky/**, {bgColor: blue})
    -    case(sub/**, sub2/**, {bgColor: yellow})
    -    layer()
    -    # The 2nd layer starts here
    -    case(**/*_j.*, {author: Joe})
    -    case(**/*_a.*, {author: Amy})
    -]
    -

    The rule is that layers are separated with a layer() function call. You can have any number of layers. The case(...)-list of each layer will be searched for the first match independently. If more layers put the same variable into the data model, the higher layer (earlier layer) wins (hence "layers"). Layers are calculated starting with the lowest layer. Note that to ease setting merging, layers that doesn't contain any case(...)-s are removed automatically.

    - -

    The last parameter of the case can be:

    -
      -
    • Arbitrary TDD hash (as in the examples above). This behaves as the value of the data setting, so you can use any number of key-value pairs, and invoke data loaders. The value of hash is calculated at most once per processing session, when it is first needed. For the subsequent file processings where the same case(...) is choosen, the calculated value is reused, so the data loaders don't re-load the external resources. If the case(...) is never chosen during the session, the value of the TDD hash is not calculated at all.
    • - -
    • A TDD function call. The supported functions are: -
        -
      • bsh: Deduces the path of a BeanShell script file from the source file path, and executes that script to create local data. The path of the script file will be the same as the path of the source file, except that the file name part is modified according the options described later. The script must return a java.util.Map, which stores the variables (keys are the names of the variables, associated values are the values of the variables) that will be added to the local data. The following variables are accessible for the scripts: engine, the fmpp.Engine instance, and templateEnvironment, the fmpp.TemplateEnvironment instance. There is 1 parameter to this function (optional), a hash that can store the following options (each is optional): -
          -
        • ending: The string appended at the end of the source file name. Can't be 0 length string. It defaults to .bsh.
        • -
        • removeExtension: Sets if the extension from the source file name should be removed before appending the ending. The extension is the part after the last dot of the file name. The dot itself is also removed. Defaults to false.
        • -
        • ignoreMissing: Set if it will be ignored if no script file found for the source file (and the source file will be processed normally), rather than aborting the processing of the file with error. Defaults to false.
        • -
        • encoding: The encoding of the script files. If it is not set then the value of the sourceEncoding setting will be used.
        • -
        -
      • -
      -
    • - -
    • A string. In this case the string will be interpreted as BeanShell script that must evaluate to an object that implements fmpp.LocalDataBuilder. This let Java programmers to implement custom local data strategies. See the API documentation for more information. (The predefined strategies above are also implemented with this interface internally.)
    • -
    - -

    Finally, let see an example of the usage of the bsh function: It will execute a BeanShell script file for each HTML to add local data. For example, the script file for source file foo/bar.html should be foo/bar.html.bsh. If there is no script for the HTML file, it will not consider that as an error.

    - -
    modes: ignore(**/*.bsh)
    -localData: [
    -    case(**/*.htm, **/*.html, bsh({ignoreMissing}))
    -]
    -

    A possible .bsh file, that adds local variables x and y:

    - -
    res = new HashMap();
    -res.put("x", "Just for test: " + templateEnvironment.getData("author"));
    -res.put("y", "Blah...");
    -return res;
    -

    For a working example see <FMPP>/docs/examples/local_data.

    - - - - - - -

    Locale

    - -

    - Name: locale
    - Type: string (locale)
    - Default: en_US
    -Command-line short name: A
    -

    - -

    Set the locale (language, country) used in templates. It has significance because different countries write numbers differently, sort text differently, etc.

    - -

    The value is a string which consist of a language code (lowercase two-letter ISO-639 code) plus optional county code (uppercase two-letter ISO-3166 code) separated from the language code with underscore, and if we have specified the country then an optional variant code (not standardized) separated from the country with underscore. Examples of valid values: en, en_US, en_US_MAC. FreeMarker will try to use the most specific available locale, so if you specify en_US_MAC but that is not known, then it will try en_US, and then en, and then the default locale of the computer.

    - -

    Also, the special value host can be used to ask FMPP to use the default locale of the host operating system. However, for most applications it is not recommended to depend on the host locale, since then the output will depend on where you run the generation (and not on what people will use the output).

    - -

    If you don't know what your locale string would be, use the --print-locales option of the command-line tool. Note that unfortunately, the codes printed here are far the superset of locales that Sun's Java platform implementation actually correctly handles.

    - -

    Note that the initial value of the setting is en_US, because it is the locale that formats things similarly as a programmer would expect.

    - - - - -

    Number format

    - -

    - Name: numberFormat
    - Type: string
    - Default: 0.############
    -

    - -

    This specifies the default format of numbers when FreeMarker has to convert numbers to strings. For example, if you change this setting to 0.00 then:

    - -
    ${1}, ${1.1}, ${1.245}
    - -

    will print (if the locale setting is en_US):

    - -
    1.00, 1.10, 1.25
    - -

    Note that you can override the effect of this setting in the templates with <#setting number_format="something">, also you can override this for each interpolations with ?string("something").

    - -

    The syntax and semantic of the format string is as java.text.DecimalFormat defines it. For convenience I quote a part from the documentation of java.text.DecimalFormat:

    - - -

    Pattern Syntax -

    - pattern     := pos_pattern{';' neg_pattern}
    - pos_pattern := {prefix}number{suffix}
    - neg_pattern := {prefix}number{suffix}
    - number      := integer{'.' fraction}{exponent}
    - prefix      := '\u0000'..'\uFFFD' - special_characters
    - suffix      := '\u0000'..'\uFFFD' - special_characters
    - integer     := min_int | '#' | '#' integer | '#' ',' integer
    - min_int     := '0' | '0' min_int | '0' ',' min_int
    - fraction    := '0'* '#'*
    - exponent    := 'E' '0' '0'*
    -  
    - Notation:
    -   X*       0 or more instances of X
    -   { X }    0 or 1 instances of X
    -   X | Y    either X or Y
    -   X..Y     any character from X up to Y, inclusive
    -   S - T    characters in S, except those in T
    - 
    - -

    Special Pattern Characters - -

    Many characters in a pattern are taken literally; they are matched during - parsing and output unchanged during formatting. Special characters, on the - other hand, stand for other characters, strings, or classes of characters. - They must be quoted, unless noted otherwise, if they are to appear in the - prefix or suffix as literals. - -

    The characters listed here are used in non-localized patterns. Localized - patterns use the corresponding characters taken from this formatter's - DecimalFormatSymbols object instead, and these characters lose - their special status. Two exceptions are the currency sign and quote, which - are not localized. - -

    - - - - - - - - - - - -
    SymbolLocationLocalized?Meaning
    0NumberYDigit -
    #NumberYDigit, zero shows as absent
    .NumberYDecimal separator or monetary decimal separator
    -NumberYMinus sign
    ,NumberYGrouping separator
    ENumberY - Separates mantissa and exponent in scientific notation. - Need not be quoted in prefix or suffix.
    ;Subpattern boundaryY - Separates positive and negative subpatterns
    %Prefix or suffixYMultiply by 100 and show as percentage
    \u2030Prefix or suffixY - Multiply by 1000 and show as per mille
    ¤
    (\u00A4)
    Prefix or suffixN - Currency sign, replaced by currency symbol. If - doubled, replaced by international currency symbol. - If present in a pattern, the monetary decimal separator - is used instead of the decimal separator.
    'Prefix or suffixN - Used to quote special characters in a prefix or suffix, - for example, "'#'#" formats 123 to - "#123". To create a single quote - itself, use two in a row: "# o''clock".
    - - - - -

    Boolean format

    - -

    - Name: booleanFormat
    - Type: string
    - Default: true,false
    -

    - -

    This setting specifies how boolean values will be converted to text or from text inside FreeMarker templates (not in data loaders). Note that by default doing something like ${myBoolean} is an error, because FreeMarker denies using "true,false" for implicit boolean to text conversion; write ${myBoolean?c} where you want true and false as is in the output.

    - -

    This setting directly correspond to the FreeMarker setting with similar name, so find the full documentation there: -FreeMarker settings.

    - -

    Example: "Yes,No" means that ${myBoolean?c} will print Yes or No. - - - - -

    Date/time format

    - -

    - Name: dateFormat
    - Type: string
    - Default: No default value
    -

    - -

    - Name: timeFormat
    - Type: string
    - Default: No default value
    -

    - -

    - Name: datetimeFormat
    - Type: string
    - Default: No default value
    -

    - -

    - Name: timeZone
    - Type: string
    - Default: No default value
    -

    - -

    - Name: sqlDateAndTimeTimeZone
    - Type: string
    - Default: No default value
    -

    - -

    These settings specify how date/time/date-time values will be converted to text or from text inside FreeMarker templates (not in data loaders, unless said otherwise).

    - -

    These settings directly correspond to the FreeMarker settings with similar name, so find their full documentation there: -FreeMarker settings.

    - -

    Examples of datetimeFormat-s: "dd.MM.yyyy HH:mm:ss" (where HH means 0-23 hours) or "MM/dd/yyyy hh:mm:ss a" (where a means AM or PM, if the current language is English), "iso" (ISO 8601:2004 format), "xs" (XML Schema format). - -

    Examples of timeZone-s: "GMT", "GMT+2", "GMT-1:30", "CET", "PST", "America/Los_Angeles", "JVM default" - -

    When a format setting isn't set, the default format of the current locale (country) will be used, which are specified by the Java installation you run FMPP on. If the timeZone isn't set, the time zone of the host computer will be used (specified by the Operating System).

    - - - -

    Handling errors

    - -

    - Name: stopOnError
    - Type: boolean
    - Default: true
    -Command-line short name: s, c
    -

    - -

    Be default when FMPP encounters problem during the processing of a source file, it terminates the whole processing session with the error. It can be annoying if you have many bad files, because you have to restart the whole session and wait until the session reaches another bungled template (or other kind of problematic source file), again and again, until you have fixed all of them. If you change this setting to false, FMPP will not stop on the errors, just skips the problematic source file and continues the processing session with the next source file. You should use logFile together in this case, so you can later digest all problems occured during the processing session.

    - -

    Note that this settings will only suppress errors that occur during the processing of source files. It will not suppress errors like, for example, bad data files (unless it's loaded in a template with pp.data) or invalid setting values.

    - - - - -

    Expert mode

    - -

    - Name: expert
    - Type: boolean
    - Default: false
    -Command-line short name: x
    -

    - -

    This setting is to enable suspicious situations, when the engine or the tool suspects that you have miss-configured something, and thus an accidental data loss can happen. It is recommended to leave this setting false, until it actually blocks something that you want to do.

    - -

    Please note that overwriting a file in general is a normal situation for FMPP; no expert mode required to do that.

    - - - -

    Case sensitive path comparison

    - -

    - Name: caseSensitive
    - Type: boolean
    - Default: false
    -

    - -

    This setting tells if FMPP should differentiate upper- and lower-case letters when it compares paths for equality, or when it matches paths to path patterns. Regardless of this setting, FMPP always tries to keep the case of file names (i.e. the output of Foo.txt will be Foo.txt, and not foo.txt or FOO.TXT), as far as the host operating system does not prevent this.

    - - - -

    Logging

    - -

    - Name: logFile
    - Type: string (path)
    - Default: No default value
    -Command-line short name: L
    -

    - -

    - Name: appendLogFile
    - Type: boolean
    - Default: No default value
    -

    - -

    If these settings are supported or not, depends on the front-end you use. If a setting is not supported, the front-end must silently ignore it.

    - -

    If the logFile setting is set, the front-end should record information about the processing session into the file, such as the warning messages and errors occurred.

    - -

    If appendLogFile is false, then already existing log file (possibly left from the previous processing session) is deleted and restarted. This is the recommended default behavior, however a front-end may chooses something different. If appendLogFile is true, then old log file should be continued.

    - -

    Please read the documentation of the front-end you use for the precise behavior of these settings.

    - - - - -

    Showing the progress and other messages

    - -

    - Name: quiet
    - Type: string
    - Default: No default value
    -Command-line short name: q, v, Q
    -

    - -

    - Name: echoFormat
    - Type: string
    - Default: No default value
    -Command-line short name: F
    -

    - -

    - Name: columns
    - Type: integer
    - Default: No default value
    -

    - -

    - Name: printStackTrace
    - Type: boolean
    - Default: false
    -

    - -

    - Name: snip
    - Type: boolean
    - Default: true
    -

    - -

    If these settings are supported or not, depends on the front-end you use. If a setting is not supported, the front-end must silently ignore it.

    - -

    The quiet setting tells the front-end if how much should it show the progress of the processing session on the screen. The accepted values are true, false (of type string or boolean), and reallyQuiet. Also, empty string is equivalent with true. (Values -1, 0, 1 are also supported for backward compatibility.) The precise meaning of values is front-end specific.

    - -

    The echoFormat setting specifies how to display the progress of the processing session on the screen. The meaning of values and the set of understood values are front-end specific, but values verbose, normal, terse and quiet should be understood, also the shorthands of them: v, n, t and q. The front-end must not stop with error if it doesn't understand the value that comes from a configuration file.

    - -

    The columns setting specifies the number of columns on the console (terminal), which is used for text wrapping. This is only applicable if you are using a command line interface for FMPP (or something similar). If you are using the provided shell script to invoke the command line interface, that will try to auto-detect the actual value (since 0.9.15), so you shouldn't set this setting, unless the auto-detection gives incorrect result.

    - -

    The printStackTrace setting specifies if the front-end should print stack trace to the screen on error, or a terser error description. snip is deprecated, and now it's just the inverted alias of printStackTrace.

    - -

    Please read the documentation of the front-end you use for the precise behavior of these settings.

    - - - -

    Meta settings

    - -

    - Name: configurationBase
    - Type: string (path)
    - Default: No default value
    -

    - -

    - Name: inheritConfiguration
    - Type: string (path)
    - Default: No default value
    -

    - -

    These settings influence the interpretation of the configuration file they are stored in. Although front-ends may support the specification of these settings outside configuration files, with the front-end specific interface, the meta setting specified in this way is used to emulate that the setting is present in the configuration file the front-end loads.

    - -

    The configurationBase setting sets the configuration base for the setting values stored in the same configuration file. If the configurationBase itself is a relative path, then it is resolved relatively to the directory of the configuration file.

    - -

    If inheritConfiguration is present in a configuration file, then the configuration will inherit the configuration file pointed by the value of this setting. If inheritConfiguration is a relative path, then it is resolved relatively to the configuration base, which is already overridden by configurationBase if that's persent in the configuration file.

    - - - - -

    XML related settings

    - - -

    - Name: xmlCatalogFiles
    - Type: sequence (of paths)
    - Default: No default value
    -

    - -

    - Name: xmlCatalogPrefer
    - Type: string
    - Default: public
    -

    - -

    - Name: validateXml
    - Type: boolean
    - Default: false
    -

    - -

    - Name: xpathEngine
    - Type: string
    - Default: dontSet
    -

    - -

    - Name: xmlRenderings
    - Type: sequence (of hashes)
    - Default: empty
    -

    - - -

    Catalogs

    - -

    Catalog files are (primarily) used to map public identifiers (and system identifiers) to local files. For example, you want to load an XML file that starts with this:

    - -
    <?xml version="1.0"?>
    -<!DOCTYPE html
    -    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    ->
    -

    Whenever you try to load this XML file, the XML parser will need the DTD requested by the DOCTYPE, so it will try to download it from http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd (and all other files the DTD will refer to), which is obviously a bad joke. The standard solution is that you obtain the DTD file (and the further files it refers to) and store it locally on your computer, and also you write a catalog file that maps public identifiers (as -//W3C//DTD XHTML 1.0 Transitional//EN) to the local paths of the files. Then, you have to specify the catalog file(s) for FMPP with the xmlCatalogFiles setting.

    - -

    FMPP supports the "widely known" catalog formats: OASIS plain text TR9401 catalog files, OASIS XML Catalogs, and XCatalogs. Delegate entries are supported. Don't panic if you can't undestand a word of it! :) Just look at <FMPP>/docs/examples/xml_validating. For most people it's enough to know (copy-paste...) what (s)he sees there. If you still need more information, please visit the Web page of the OASIS Entity Resolution Technical Committee: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=entity.

    - -

    The meaning of xmlCatalogPrefer should be clean if you are familiar with OASIS catalogs. If you are not, just left it unchanged. The allowed values of this setting are system, public, and globalDefault.

    - -

    Both catalog related settings has a global (Java virtual machine level) default. Please find the documentation of org.apache.xml.resolver package on the Internet about this. In the case of xmlCatalogFiles, the global default will be appended at the end of the list of catalog files. In the case of xmlCatalogPrefer, the global default is used when the value of the setting is globalDefault. Attention! If you don't use the xmlCatalogFiles FMPP setting, then the catalog feature is disabled, so you must specify this setting (even an empty sequence) to use the global defaults.

    - - - - -

    Validation

    - -

    The validateXml setting specifies if, by default, XML files are validated (i.e. checked against the DTD) or not. With "by default" I mean that this can be overridden for individual files, as with the validate option of the xml data loader.

    - - - - -

    XPath engine

    - -

    The xpathEngine setting specifies which XPath engine will FreeMarker use when you access XML data (see XML dataloader). This setting accepts these values:

    - -
      -
    • jaxen: Use Jaxen. For this to work, you need to obtain jaxen.jar (1.1-beta-8 or later!), and make it accessible for FMPP (e.g. copy it into the lib directory of the FMPP installation, or if you use FMPP as Ant task, then into the lib directory of Ant). Jaxen provides richer set of capabilities for FreeMarker templates than Xalan.
    • -
    • xalan: Use Apache Xalan. Xalan is accessible for sure if you are using Sun J2SE 1.4, but not in 1.5.
    • -
    • default: Let FreeMarker choose the XPath engine it prefers. In FreeMarker 2.3 it will be Xalan (if available).
    • -
    • dontSet: Don't set what XPath engine will be used. For most users it is the same as default (see below). This is the default value of the setting.
    • -
    • All other values are interpreted as the full-qualified class name of an XPath engine adapter class, that is, a freemarker.ext.dom.XPathSupport implementation.
    • -
    - -

    If you embed FMPP into your application, then you have to know that XPath engine choosing is a VM level setting (static field) of FreeMarker. Whenever you execute a processing session, FMPP will aggressively set this FreeMarker setting according the xpathEngine FMPP setting. Thus, if you don't want FMPP to interfere with other FreeMarker dependent components in the same VM, you should keep value dontSet.

    - - - -

    XML rendering

    - -

    XML rendering is similar to the typical XSLT usage pattern, if you know that. The source file, for which renderXml processing mode is choosen (see the modes setting), will be parsed as XML file. Then, this XML document will be rendered to one or more output files with a FreeMarker template, which is choosen based on the value of the xmlRenderings setting. The template gets the XML documents with the pp.doc variable. Since the template shouldn't be executed in itself, it should be an ignored file (for example it should be stored in a directory that has an ignoredir.fmpp file). - -

    For an example of this pattern check <FMPP>/docs/examples/xml_rendering.

    - -

    Note: Sometimes you rather want to handle XML files as data than as source files. In this case use data, localData, or pp.loadData with the XML data loader, not XML rendering.

    - -

    The xmlRenderings setting stores a sequence of XML rendering configurations. An XML rendering configuration is a hash that stores the options of an XML rendering. The options are:

    - -
      -
    • Options specify which XML files should be processed with the configuration: -
        -
      • IfSourceIs: Optional, defaults to an empty sequence. This option is a sequence of path patterns (strings), or a single path pattern. FMPP will not render the XML file with this configuration if its source root relative virtual path does not match a pattern in this sequence. If this sequence is empty, FMPP will not consider this condition, that is, it will not exclude any XML files because of their path.
      • - -
      • ifDocumentElementIs: Optional, defaults to an empty sequence. This option is a sequence of element names (strings), or a single element name. FMPP will not render the XML file with this configuration if this sequence doesn't contain the document element (the root element) of the XML file. If this sequence is empty, FMPP will not consider this condition, that is, it will not exclude any XML files because of their document element. The element names can use name-space prefixes. The prefixes and the default name-space of elements can be specified with the xmlns option of the configuration.
      • -
      -
    • - -
    • Options specify how to load the XML file. These are exactly the same as the options of the XML data loader (xmlns, index, ...etc.), except that false value for namespaceAware is not allowed.
    • - -
    • Options for java programmers, to build extra local data based on the loaded XML file. -
        -
      • localDataBuilder: Optional, defaults to an empty sequence. This is a sequence of strings, or a single string. Each string will be evaluated as BeanShell script (once per Settings.execute()), which must return an fmpp.LocalDataBuilder. The aim of these data builders is to do the complex or resource eager parts of the XML processing that you don't want to do in FTL, and expose the results as local data. The data loaders can get the loaded XML document with templateEnvironment.getXmlDocument(), or templateEnvironment.getWrappedXmlDocument(). These data builders will be invoked after the application of the localData setting, and can replace earlier added local variables. They will be executed in the same order as they appear in the sequence.
      • -
      -
    • - -
    • Options specify how to render the XML document to output file: -
        -
      • template: Required if copy is false. This is the source root relative virtual path of a FreeMarker template, which will be invoked to render the output. (The template file itself should be an ignored file, as it doesn't produce output alone.) The template can access the XML document with the pp.doc variable.
      • - -
      • copy: Required if template is not specified, defaults to false. This is a boolean value. If it is true, then the XML document will be copied to the output file (exact copy). In this case the template option can't be used.
      • -
      -
    • -
    - -

    Example:

    - -
    xmlRenderings: [
    -    {
    -        ifDocumentElementIs: product
    -        template: renderer/product.html
    -        xmlns: {D: http://example.com/xmlns/products}
    -    }
    -    {
    -        ifDocumentElementIs: book
    -        template: renderer/book.html
    -        index: {
    -            element: [part, chapter]
    -            attribute: ppFile
    -            numbering: hierarchical
    -            value: '%e_%n.html'
    -        }
    -    }
    -]
    -

    When renderXml processing mode is chosen for a source file (see modes), then the first matching XML rendering configuration of the sequence will be used. A configuration is matching if nor the ifSourceIs, nor the ifDocumentElementIs option excludes the XML file. (Thus, if a configuration doesn't use any of the if... options, it will be used for all source files, unless an earlier configuration matches the source file too.)

    - - - - - -

    FreeMarker links (external includes)

    - -

    - Name: freemarkerLinks
    - Type: hash (of sequence of paths)
    - Default: No default value
    -

    - -

    FreeMarker links is a dirty hack to satisfy a frequent demand: <#include ...>/<#import ...> files that are outside the source root directory, as common FTL macro libraries used in multiple projects.

    - -

    Assume you store your commonly used FreeMarker includes in the c:\user\freemarker\include directory. But, this directory is outside the sourceRoot, so you can't reach it with <#include ...>/<#import ...>. To solve this, add this to the FMPP configuration file:

    - -
    freemarkerLinks: {
    -    inc: c:/user/freemarker/include
    -}
    -

    Now you can include files of that external directory like this:

    - -
    <#include "/@inc/foo.ftl">
    -

    Here, FreeMarker will actually read c:\user\freemarker\include\foo.ftl. The seeming @inc entry in the source root directory (seeming, as there is no such file or directory there in reality) acts as an alias, a transparent link to c:\user\freemarker\include. (Note that in the configuration file I have used slash instead of backslash for convenience.)

    - -

    It is important that link entries (as @inc above) are visible only for the predefined FreeMarker directives that use template paths (in FreeMarker 2.3, these are <#include ...> and <#import ...>), or for user defined directives that internally use those predefined directives. They are not visible for anything else. Thus, they are not visible for the functions and directives of the pp hash, nor FMPP will try to process the @inc directory (since it doesn't see it at all).

    - -

    As you have seen, a link is defined by associating a name (inc in the last example, but you can use anything else you prefer) with a path. You can have more links with different names. The link is visible in the source root (never in its subdirectories) as a directory (or file) of name @name (where name is the link name). Regarding the associated path, the rules are the same as with sourceRoot, outputRoot, ...etc: it is a real path, so if it is relative, then it will be interpreted relatively to the configuration base.

    - -

    For example, assume, that you also have project specific include files, and you store them outside the source root (because you have multiple source roots in your project), in the include subdirectory of the same directory, where you stores the FMPP configuration files for your project. Use this in the FMPP configuration file:

    - -
    freemarkerLinks: {
    -    inc: /home/joe/freemarker/include
    -    projInc: include
    -}
    -

    Note that the path associated with projInc is a relative path, so it will be resolved relatively to the directory of the configuration file (unless you have overridden the configuration base, of course...). Now you can do things like this:

    - -
    <#include "/@projInc/header.html">
    -<#include "/@inc/foo.ftl">
    -<#import "/@projInc/forms.ftl" as f>
    -

    If the configuration file that contains the above is /home/joe/projects/foo/cfg3.fmpp, then <#include '/@projInc/header.html'> will read /home/joe/projects/foo/include/header.html.

    - -

    In the generic case, a FreeMarker link is associated with a list of paths. For example:

    - -
    freemarkerLinks: {
    -    inc: [/home/joe/freemarker/include, /home/kate/freemarker/include]
    -}
    -

    When you use <#include '/@inc/foo.ftl'> in a template, then FMPP will check if /home/joe/freemarker/include/foo.ftl exist, and if not, it will try /home/kate/freemarker/include/foo.ftl.

    - -

    Files that are really in the source root directory have priority over files that are accessible through FreeMarker links. For example, if you invoke <#include '/@inc/foo.ftl'>, and the source root directory has a subdirectory called @inc, and that subdirectory has a file called foo.ftl, then that file will be used, without considering that the @inc in the path possibly refers to a FreeMarker link. If a subdirectory called @inc exists, but it doesn't contain foo.ftl, then the inc link will be used.

    - -

    A FreeMarker link can point to files as well, not only to directories. For example:

    - -
    freemarkerLinks: {
    -    footer: /home/joe/footers/gpl.html
    -}
    -

    and then in a template you can do this:

    - -
    <#include "@footer">
    -

    The merging of the freemarkerLinks settings is differs a bit from the merging of other hash settings: when the two hashes to merge contains the same key (i.e. the same link name), then the lists of paths for that key will be concatenated. For example, if common.fmpp is:

    - -
    freemarkerLinks: {
    -    a: c:/user/fm/libs1
    -    b: [inc1, inc2]
    -}
    -

    and config.fmpp is:

    - -
    inheritConfiguration: common.fmpp
    -...
    -freemarkerLinks: {
    -    a: c:/user/fm/libs2
    -    b: [inc3, inc4]
    -    c: foo
    -}
    -...
    -

    then the resulting setting value is equivalent with:

    - -
    freemarkerLinks: {
    -    a: [c:/user/fm/libs2, c:/user/fm/libs1]
    -    b: [inc3, inc4, inc1, inc2]
    -    c: foo
    -}
    -

    Note that the name of the links doesn't start with @; the @ is used only to refer to the links. To protect users from mistakes regarding this, it is not allowed to start a link name with @.

    - - - - -

    Activating fixes

    - -

    - Name: freemarkerIncompatibleImprovements
    - Type: string (version number)
    - Default: No default value
    -

    - -

    Enables the FreeMarker fixes/improvements that are not 100% backward compatible, and were implemented in the FreeMarker version given in this setting. In older projects using the highest available 2.3.x is usually a good compromise. New projects should use the maximum, which is the version of the FreeMarker used. If this setting is not set then FreeMarker chooses the this version itself, which as of this writing will be 2.3.0.

    - -

    See Configuration(Version) in the FreeMarker API for what fixes/improvements are activated.

    - -

    The format of the setting value is major.minor.micro, where each part is a positive integer without padding 0-s

    - - - - -

    Object wrapping

    - -

    - Name: objectWrapper
    - Type: string (BeanShell expression)
    - Default: "b = new BeansWrapperBuilder(freemarkerIncompatibleImprovements); b.setSimpleMapWrapper(true); return b.build();"
    -

    - -

    The objectWrapper setting is for FreeMarker "experts" who want to use a customized ObjectWrapper. The value of the setting is a BeanShell expression that must result in an object whose class extends the freemarker.ext.beans.BeansWrapper class. The value can be a simple expression like "new com.example.MyWrapper()", or multiple instructions ending with a return statement.

    - -

    The freemarker.template.ObjectWrapper, freemarker.ext.beans.BeansWrapper, and freemarker.ext.beans.BeansWrapperBuilder classes are automatically imported, so you don't have to use full-qualified class name for them. Also, a non-null freemarkerIncompatibleImprovements value is exposed, which corresponds to the effective value of the similarly named FMPP setting.

    - -

    The ObjectWrapper is created before other setting values (or the fmpp.Engine instance for that mater), so the BeanShell expression has no access to any setting values, except to freemarkerIncompatibleImprovements, as it was shown.

    - -

    A subtle detail regarding the default value: The default value shown is actually only used when freemarkerIncompatibleImprovements is at least 2.3.21. Otherwise the default is created directly with old-style new BeansWrapper(). See the FreeMarker API for the otherwise very subtle difference.

    - - - - -

    Template syntax

    - -

    - Name: tagSyntax
    - Type: string
    - Default: angleBracket with FreeMarker 2.3.x, autoDetect with later versions
    -

    - -

    The tagSyntax setting determines the syntax of the templates (angle bracket syntax like <#include "foo"> VS square bracket syntax like [#include "foo"]) that has no ftl directive in it. If the template uses ftl directive (like it starts with <#ftl> or [#ftl]), then the syntax of the ftl tag determines the syntax of the template, and the tagSyntax setting is ignored.

    - -

    The possible values of this setting are angleBracket, squareBracket and autoDetect. The recommended value is autoDetect, which will auto-detect the syntax of each template independently, by choosing the syntax of the first FreeMarker tag in the template. For example when it finds a [@ in the template, it will choose square bracket syntax.

    - - - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/style/fmpptitle.png b/fmpp/docs/style/fmpptitle.png deleted file mode 100644 index e372167..0000000 Binary files a/fmpp/docs/style/fmpptitle.png and /dev/null differ diff --git a/fmpp/docs/style/fonts/icomoon.eot b/fmpp/docs/style/fonts/icomoon.eot deleted file mode 100644 index d360616..0000000 Binary files a/fmpp/docs/style/fonts/icomoon.eot and /dev/null differ diff --git a/fmpp/docs/style/fonts/icomoon.svg b/fmpp/docs/style/fonts/icomoon.svg deleted file mode 100644 index b8aa80b..0000000 --- a/fmpp/docs/style/fonts/icomoon.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fmpp/docs/style/fonts/icomoon.ttf b/fmpp/docs/style/fonts/icomoon.ttf deleted file mode 100644 index bd33c02..0000000 Binary files a/fmpp/docs/style/fonts/icomoon.ttf and /dev/null differ diff --git a/fmpp/docs/style/fonts/icomoon.woff b/fmpp/docs/style/fonts/icomoon.woff deleted file mode 100644 index a52e617..0000000 Binary files a/fmpp/docs/style/fonts/icomoon.woff and /dev/null differ diff --git a/fmpp/docs/style/header-footer-background.png b/fmpp/docs/style/header-footer-background.png deleted file mode 100644 index 0f65d7a..0000000 Binary files a/fmpp/docs/style/header-footer-background.png and /dev/null differ diff --git a/fmpp/docs/style/main.css b/fmpp/docs/style/main.css deleted file mode 100644 index 780bfa7..0000000 --- a/fmpp/docs/style/main.css +++ /dev/null @@ -1,665 +0,0 @@ -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -html { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 10px; - color: #333333; - line-height: 1.42857143; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - text-size-adjust: 100%; - background-image: url(header-footer-background.png); -} -body { - margin: 0; - font-size: 14px; -} -nav { - display: block; -} -a { - color: #168316; - text-decoration: none; - -webkit-transition: color ease-in-out 0.2s; - -moz-transition: color ease-in-out 0.2s; - -o-transition: color ease-in-out 0.2s; - transition: color ease-in-out 0.2s; -} -a:hover { - text-decoration: underline; -} -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - line-height: 1.42857143; - font-weight: bold; -} -h1 { - font-size: 24px; -} -.ie89 h1 { - font-size: 30px; -} -@media (min-width: 768px) { - h1 { - font-size: 30px; - } -} -h2 { - font-size: 21px; -} -.ie89 h2 { - font-size: 24px; -} -@media (min-width: 768px) { - h2 { - font-size: 24px; - } -} -h3 { - font-size: 18px; -} -.ie89 h3 { - font-size: 21px; -} -@media (min-width: 768px) { - h3 { - font-size: 21px; - } -} -h4 { - font-size: 15px; -} -.ie89 h4 { - font-size: 18px; -} -@media (min-width: 768px) { - h4 { - font-size: 18px; - } -} -h5 { - font-size: 14px; -} -.ie89 h5 { - font-size: 16px; -} -@media (min-width: 768px) { - h5 { - font-size: 16px; - } -} -h6 { - font-size: 14px; -} -hr { - height: 0; - margin-top: 18px; - margin-bottom: 18px; - border: 0; - border-top: 1px solid #dddddd; -} -code, -tt, -pre { - font-size: 13px; - font-family: "Droid Sans Mono", Courier, Monaco, Consolas, monospace; - -webkit-font-smoothing: antialiased; -} -tt, -code { - background-color: #f9f9f9; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - padding: 1px 3px; - color: #6D180B; - word-break: break-all; -} -tt a, -code a { - color: #c00; -} -pre { - display: block; - padding: 9px; - margin: 0 0 9px; - word-break: normal; - word-wrap: break-word; - white-space: pre; - background-color: #f9f9f9; - line-height: 1.42857143; - border: 1px solid #dddddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -img { - border: 0; - vertical-align: middle; -} -table { - border: 0; - border-collapse: collapse; -} -td, -th { - padding: 0; -} -.site-header { - border-bottom: 1px solid #dddddd; -} -.site-header .logo { - display: block; -} -.site-header .home-site-header { - text-align: center; - padding-top: 24px; -} -.site-header .home-site-header .social-icons { - background-color: rgba(255, 255, 255, 0.5); - padding: 3px 6px; - border: 1px solid #dddddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - width: 200px; - margin: 12px auto; -} -.site-header .home-site-header .logo { - margin-bottom: 12px; -} -.site-header .home-site-header .logo img { - width: 243px; - height: 70px; - margin: 0 auto; -} -.site-header .inner-site-header { - padding-top: 12px; - padding-bottom: 12px; -} -@media (min-width: 768px) { - .site-header .inner-site-header { - display: -webkit-box; - display: -webkit-flex; - display: -moz-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -moz-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-box-align: end; - -webkit-align-items: flex-end; - -moz-box-align: end; - -ms-flex-align: end; - align-items: flex-end; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - } -} -.ie89 .site-header .inner-site-header { - display: block; - height: 92px; -} -.ie89 .site-header .inner-site-header:before, -.ie89 .site-header .inner-site-header:after { - content: " "; - display: table; -} -.ie89 .site-header .inner-site-header:after { - clear: both; -} -.ie89 .site-header .inner-site-header .header-left { - float: left; - width: 600px; -} -.ie89 .site-header .inner-site-header .header-left .breadcrumbs { - width: 600px; -} -.site-header .inner-site-header .header-right { - text-align: center; - margin-top: 18px; -} -.ie89 .site-header .inner-site-header .header-right { - margin-top: 0; - float: right; -} -.ie89 .site-header .inner-site-header .header-right:before, -.ie89 .site-header .inner-site-header .header-right:after { - content: " "; - display: table; -} -.ie89 .site-header .inner-site-header .header-right:after { - clear: both; -} -.ie89 .site-header .inner-site-header .header-right nav:before, -.ie89 .site-header .inner-site-header .header-right nav:after { - content: " "; - display: table; -} -.ie89 .site-header .inner-site-header .header-right nav:after { - clear: both; -} -.ie89 .site-header .inner-site-header .header-right .pagers { - height: 55px; - width: 250px; - margin-top: 10px; -} -.site-header .inner-site-header .logo img { - width: 121px; - height: 35px; -} -.page-wrapper { - padding-top: 12px; - padding-bottom: 24px; - background-color: #FFF; - min-height: 300px; -} -.content-right a { - word-break: break-word; -} -.site-footer { - padding-top: 24px; - padding-bottom: 24px; - border-top: 1px solid #dddddd; -} -@media (min-width: 768px) { - .site-footer .footer-inner { - display: -webkit-box; - display: -webkit-flex; - display: -moz-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -moz-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-align: start; - -webkit-align-items: flex-start; - -moz-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - } -} -.ie89 .site-footer .footer-inner { - display: block; -} -.ie89 .site-footer .footer-inner:before, -.ie89 .site-footer .footer-inner:after { - content: " "; - display: table; -} -.ie89 .site-footer .footer-inner:after { - clear: both; -} -.ie89 .site-footer .footer-inner .footer-left { - float: left; -} -.ie89 .site-footer .footer-inner .footer-right { - float: right; -} -.site-footer .pagers { - text-align: center; - margin-bottom: 12px; -} -.site-footer .pagers li:last-child a { - margin-left: 12px; -} -.site-footer .generated { - text-align: center; -} -.ie89 .site-footer .generated { - text-align: right; -} -@media (min-width: 768px) { - .site-footer .generated { - text-align: right; - } -} -.site-footer .external-links { - margin-top: 15px; - text-align: center; -} -.ie89 .site-footer .external-links { - text-align: right; -} -@media (min-width: 768px) { - .site-footer .external-links { - text-align: right; - } -} -.site-footer .external-links a { - display: inline-block; - margin-left: 9px; -} -.breadcrumbs { - list-style-type: none; - margin: 12px 0 0 0; - padding: 0; - font-size: 12px; -} -.ie89 .breadcrumbs { - font-size: 14px; -} -@media (min-width: 768px) { - .breadcrumbs { - font-size: 14px; - } -} -.breadcrumbs li { - display: inline-block; - vertical-align: middle; -} -.breadcrumbs li:last-child a { - color: #333333; -} -.breadcrumbs .icon { - display: inline-block; - margin: 0 3px; - position: relative; - top: 1px; - width: 12px; - height: 12px; -} -.ie89 .breadcrumbs .icon { - width: 14px; - height: 14px; -} -@media (min-width: 768px) { - .breadcrumbs .icon { - width: 14px; - height: 14px; - } -} -.pagers { - list-style-type: none; - margin: 0; - background-color: rgba(255, 255, 255, 0.5); - padding: 9px 18px 6px; - border: 1px solid #dddddd; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.ie89 .pagers { - background-color: #f9f9f9; -} -.pagers li { - display: inline-block; - color: #999999; - padding: 0 6px; - font-size: 12px; -} -.pagers li a { - display: block; -} -.pagers li a:hover, -.pagers li a:focus { - text-decoration: none; - color: #333333; -} -.pagers .pager-icon:before { - font-family: 'icomoon'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - display: block; - font-size: 18px; - text-align: center; - margin-bottom: 1px; -} -.pagers .pager-icon.previous:before { - text-align: left; -} -.pagers .pager-icon.next { - margin-right: 12px; -} -.pagers .pager-icon.next:before { - text-align: right; -} -.report-bugs .strong { - color: #cc0000; - font-size: 16px; - padding-left: 19px; -} -.report-bugs .strong:before { - font-family: 'icomoon'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - position: relative; - top: 1px; - display: inline-block; - width: 16px; - height: 16px; - margin-right: 3px; - margin-left: -19px; -} -.toc-header { - font-size: 18px; - margin: 0 0 1em; -} -.toc-header.alphabetical-index { - margin-top: 1em; -} -.content-left:before, -.content-right:before, -.content-left:after, -.content-right:after { - content: " "; - display: table; -} -.content-left:after, -.content-right:after { - clear: both; -} -.content-left > .table-of-contents, -.content-right > .table-of-contents { - float: left; - margin: 0 0 0 15px; - padding: 0 0 0 15px; - border-left: 3px solid #7FBB7F; - list-style-type: none; - min-width: 30%; -} -.content-left > .table-of-contents ul, -.content-right > .table-of-contents ul { - border: 0; - list-style-type: disc; - float: none; -} -.content-left > .table-of-contents a, -.content-right > .table-of-contents a { - display: block; -} -.social-icons { - margin: 0 0 12px; - padding: 0; - list-style-type: none; - text-align: center; -} -@media print { - .social-icons { - display: none; - } -} -.social-icons li { - display: inline-block; -} -.social-icons li:last-child a { - padding-right: 0; -} -.social-icons li a { - display: block; - padding: 3px 6px; -} -.social-icons li a:before { - font-family: 'icomoon'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - margin-right: 3px; - display: inline-block; - width: 15px; - height: 14px; - position: relative; - top: 1px; -} -.social-icons li a:hover { - text-decoration: none; - color: #333333; -} -ul.download-options { - list-style-type: none; - padding-left: 0; - margin-left: 0; -} -ul.download-options li { - padding-left: 2em; - margin-left: 0; -} -ul.download-options li:before { - font-family: 'icomoon'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - display: inline-block; - position: relative; - top: 1px; - margin-right: 7px; - width: 14px; - height: 14px; -} -.site-width { - margin-left: auto; - margin-right: auto; - padding-left: 24px; - padding-right: 24px; -} -.ie89 .site-width { - width: 944px; -} -@media (min-width: 768px) { - .site-width { - width: 720px; - } -} -@media (min-width: 992px) { - .site-width { - width: 944px; - } -} -@media (min-width: 1200px) { - .site-width { - width: 1152px; - } -} -.warning { - color: #cc0000; -} -.clear:before, -.clear:after { - content: " "; - display: table; -} -.clear:after { - clear: both; -} -@font-face { - font-family: 'icomoon'; - src: url('fonts/icomoon.eot?-20325k'); - src: url('fonts/icomoon.eot?#iefix-20325k') format('embedded-opentype'), url('fonts/icomoon.woff?-20325k') format('woff'), url('fonts/icomoon.ttf?-20325k') format('truetype'), url('fonts/icomoon.svg?-20325k#icomoon') format('svg'); - font-weight: normal; - font-style: normal; -} -.icon { - font-family: 'icomoon'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.icon-house:before, -.pagers .pager-icon.home:before { - content: "\e601"; -} -.icon-flag:before, -.pagers .pager-icon.report-bug:before, -.report-bugs .strong:before { - content: "\e60b"; -} -.icon-folder:before, -.pagers .pager-icon.contents:before { - content: "\e604"; -} -.icon-download:before, -ul.download-options li:before { - content: "\e600"; -} -.icon-arrow-left:before, -.pagers .pager-icon.previous:before { - content: "\e605"; -} -.icon-arrow-right:before, -.pagers .pager-icon.next:before { - content: "\e606"; -} -.icon-arrow-right2:before { - content: "\e607"; -} -.icon-github:before, -.social-icons li a.github:before { - content: "\e609"; -} -.icon-twitter:before, -.social-icons li a.twitter:before { - content: "\e60a"; -} diff --git a/fmpp/docs/style/main.min.css b/fmpp/docs/style/main.min.css deleted file mode 100644 index 352488f..0000000 --- a/fmpp/docs/style/main.min.css +++ /dev/null @@ -1 +0,0 @@ -*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:10px;color:#333;line-height:1.42857143;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%;background-image:url(header-footer-background.png)}body{margin:0;font-size:14px}nav{display:block}a{color:#168316;text-decoration:none;-webkit-transition:color ease-in-out .2s;-moz-transition:color ease-in-out .2s;-o-transition:color ease-in-out .2s;transition:color ease-in-out .2s}a:hover{text-decoration:underline}h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.42857143;font-weight:700}h1{font-size:24px}.ie89 h1{font-size:30px}@media (min-width:768px){h1{font-size:30px}}h2{font-size:21px}.ie89 h2{font-size:24px}@media (min-width:768px){h2{font-size:24px}}h3{font-size:18px}.ie89 h3{font-size:21px}@media (min-width:768px){h3{font-size:21px}}h4{font-size:15px}.ie89 h4{font-size:18px}@media (min-width:768px){h4{font-size:18px}}h5{font-size:14px}.ie89 h5{font-size:16px}@media (min-width:768px){h5{font-size:16px}}h6{font-size:14px}hr{height:0;margin-top:18px;margin-bottom:18px;border:0;border-top:1px solid #ddd}code,pre,tt{font-size:13px;font-family:"Droid Sans Mono",Courier,Monaco,Consolas,monospace;-webkit-font-smoothing:antialiased}code,tt{background-color:#f9f9f9;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;padding:1px 3px;color:#6D180B;word-break:break-all}code a,tt a{color:#c00}pre{display:block;padding:9px;margin:0 0 9px;word-break:normal;word-wrap:break-word;white-space:pre;background-color:#f9f9f9;line-height:1.42857143;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}img{border:0;vertical-align:middle}table{border:0;border-collapse:collapse}td,th{padding:0}.site-header{border-bottom:1px solid #ddd}.site-header .logo{display:block}.site-header .home-site-header{text-align:center;padding-top:24px}.site-header .home-site-header .social-icons{background-color:rgba(255,255,255,.5);padding:3px 6px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;width:200px;margin:12px auto}.site-header .home-site-header .logo{margin-bottom:12px}.site-header .home-site-header .logo img{width:243px;height:70px;margin:0 auto}.site-header .inner-site-header{padding-top:12px;padding-bottom:12px}@media (min-width:768px){.site-header .inner-site-header{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:end;-webkit-align-items:flex-end;-moz-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}}.ie89 .site-header .inner-site-header{display:block;height:92px}.ie89 .site-header .inner-site-header:after,.ie89 .site-header .inner-site-header:before{content:" ";display:table}.ie89 .site-header .inner-site-header:after{clear:both}.ie89 .site-header .inner-site-header .header-left{float:left;width:600px}.ie89 .site-header .inner-site-header .header-left .breadcrumbs{width:600px}.site-header .inner-site-header .header-right{text-align:center;margin-top:18px}.ie89 .site-header .inner-site-header .header-right{margin-top:0;float:right}.ie89 .site-header .inner-site-header .header-right:after,.ie89 .site-header .inner-site-header .header-right:before{content:" ";display:table}.ie89 .site-header .inner-site-header .header-right:after{clear:both}.ie89 .site-header .inner-site-header .header-right nav:after,.ie89 .site-header .inner-site-header .header-right nav:before{content:" ";display:table}.ie89 .site-header .inner-site-header .header-right nav:after{clear:both}.ie89 .site-header .inner-site-header .header-right .pagers{height:55px;width:250px;margin-top:10px}.site-header .inner-site-header .logo img{width:121px;height:35px}.page-wrapper{padding-top:12px;padding-bottom:24px;background-color:#FFF;min-height:300px}.content-right a{word-break:break-word}.site-footer{padding-top:24px;padding-bottom:24px;border-top:1px solid #ddd}@media (min-width:768px){.site-footer .footer-inner{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-box-align:start;-ms-flex-align:start;align-items:flex-start}}.ie89 .site-footer .footer-inner{display:block}.ie89 .site-footer .footer-inner:after,.ie89 .site-footer .footer-inner:before{content:" ";display:table}.ie89 .site-footer .footer-inner:after{clear:both}.ie89 .site-footer .footer-inner .footer-left{float:left}.ie89 .site-footer .footer-inner .footer-right{float:right}.site-footer .pagers{text-align:center;margin-bottom:12px}.site-footer .pagers li:last-child a{margin-left:12px}.site-footer .generated{text-align:center}.ie89 .site-footer .generated{text-align:right}@media (min-width:768px){.site-footer .generated{text-align:right}}.site-footer .external-links{margin-top:15px;text-align:center}.ie89 .site-footer .external-links{text-align:right}@media (min-width:768px){.site-footer .external-links{text-align:right}}.site-footer .external-links a{display:inline-block;margin-left:9px}.breadcrumbs{list-style-type:none;margin:12px 0 0;padding:0;font-size:12px}.ie89 .breadcrumbs{font-size:14px}@media (min-width:768px){.breadcrumbs{font-size:14px}}.breadcrumbs li{display:inline-block;vertical-align:middle}.breadcrumbs li:last-child a{color:#333}.breadcrumbs .icon{display:inline-block;margin:0 3px;position:relative;top:1px;width:12px;height:12px}.ie89 .breadcrumbs .icon{width:14px;height:14px}@media (min-width:768px){.breadcrumbs .icon{width:14px;height:14px}}.pagers{list-style-type:none;margin:0;background-color:rgba(255,255,255,.5);padding:9px 18px 6px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.ie89 .pagers{background-color:#f9f9f9}.pagers li{display:inline-block;color:#999;padding:0 6px;font-size:12px}.pagers li a{display:block}.pagers li a:focus,.pagers li a:hover{text-decoration:none;color:#333}.pagers .pager-icon:before{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block;font-size:18px;text-align:center;margin-bottom:1px}.pagers .pager-icon.previous:before{text-align:left}.pagers .pager-icon.next{margin-right:12px}.pagers .pager-icon.next:before{text-align:right}.report-bugs .strong{color:#c00;font-size:16px;padding-left:19px}.report-bugs .strong:before{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:relative;top:1px;display:inline-block;width:16px;height:16px;margin-right:3px;margin-left:-19px}.toc-header{font-size:18px;margin:0 0 1em}.toc-header.alphabetical-index{margin-top:1em}.content-left:after,.content-left:before,.content-right:after,.content-right:before{content:" ";display:table}.content-left:after,.content-right:after{clear:both}.content-left>.table-of-contents,.content-right>.table-of-contents{float:left;margin:0 0 0 15px;padding:0 0 0 15px;border-left:3px solid #7FBB7F;list-style-type:none;min-width:30%}.content-left>.table-of-contents ul,.content-right>.table-of-contents ul{border:0;list-style-type:disc;float:none}.content-left>.table-of-contents a,.content-right>.table-of-contents a{display:block}.social-icons{margin:0 0 12px;padding:0;list-style-type:none;text-align:center}@media print{.social-icons{display:none}}.social-icons li{display:inline-block}.social-icons li:last-child a{padding-right:0}.social-icons li a{display:block;padding:3px 6px}.social-icons li a:before{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-right:3px;display:inline-block;width:15px;height:14px;position:relative;top:1px}.social-icons li a:hover{text-decoration:none;color:#333}ul.download-options{list-style-type:none;padding-left:0;margin-left:0}ul.download-options li{padding-left:2em;margin-left:0}ul.download-options li:before{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;position:relative;top:1px;margin-right:7px;width:14px;height:14px}.site-width{margin-left:auto;margin-right:auto;padding-left:24px;padding-right:24px}.ie89 .site-width{width:944px}@media (min-width:768px){.site-width{width:720px}}@media (min-width:992px){.site-width{width:944px}}@media (min-width:1200px){.site-width{width:1152px}}.warning{color:#c00}.clear:after,.clear:before{content:" ";display:table}.clear:after{clear:both}@font-face{font-family:icomoon;src:url(fonts/icomoon.eot?-20325k);src:url(fonts/icomoon.eot?#iefix-20325k) format('embedded-opentype'),url(fonts/icomoon.woff?-20325k) format('woff'),url(fonts/icomoon.ttf?-20325k) format('truetype'),url(fonts/icomoon.svg?-20325k#icomoon) format('svg');font-weight:400;font-style:normal}.icon{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-house:before,.pagers .pager-icon.home:before{content:"\e601"}.icon-flag:before,.pagers .pager-icon.report-bug:before,.report-bugs .strong:before{content:"\e60b"}.icon-folder:before,.pagers .pager-icon.contents:before{content:"\e604"}.icon-download:before,ul.download-options li:before{content:"\e600"}.icon-arrow-left:before,.pagers .pager-icon.previous:before{content:"\e605"}.icon-arrow-right:before,.pagers .pager-icon.next:before{content:"\e606"}.icon-arrow-right2:before{content:"\e607"}.icon-github:before,.social-icons li a.github:before{content:"\e609"}.icon-twitter:before,.social-icons li a.twitter:before{content:"\e60a"} \ No newline at end of file diff --git a/fmpp/docs/style/none.gif b/fmpp/docs/style/none.gif deleted file mode 100644 index f191b28..0000000 Binary files a/fmpp/docs/style/none.gif and /dev/null differ diff --git a/fmpp/docs/style/poweredby_sq_simple.png b/fmpp/docs/style/poweredby_sq_simple.png deleted file mode 100644 index c942269..0000000 Binary files a/fmpp/docs/style/poweredby_sq_simple.png and /dev/null differ diff --git a/fmpp/docs/style/sflogo.png b/fmpp/docs/style/sflogo.png deleted file mode 100644 index b2a9e99..0000000 Binary files a/fmpp/docs/style/sflogo.png and /dev/null differ diff --git a/fmpp/docs/tdd.html b/fmpp/docs/tdd.html deleted file mode 100644 index 2ed28bb..0000000 --- a/fmpp/docs/tdd.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - -TDD - Textual Data Definition - FMPP - - - - - - - - - - - - - - - -
    -

    TDD - Textual Data Definition

    - -
    - -
    - - -

    Basics

    - -

    TDD is a very simple expression language created for defining hierarchical data (hashes, sequences) with plain text. It is mostly used for configuring FMPP. For example, configuration files use TDD syntax.

    - -

    TDD syntax is identical to the syntax of literals in FTL (FreeMarker Template Language). For example, this data structure:

    - -
    -(root)
    - |
    - +- user = "Big Joe"
    - |
    - +- tall = true
    - |
    - +- animals
    -     |
    -     +- (1st)
    -     |   |
    -     |   +- name = "white mouse"
    -     |   |
    -     |   +- price = 30
    -     |
    -     +- (2nd)
    -     |   |
    -     |   +- name = "black mouse"
    -     |   |
    -     |   +- price = 25
    -     |
    -     +- (3rd)
    -         |
    -         +- name = "green mouse"
    -         |
    -         +- price = 150
    -
    - -

    could be described with this TDD expression:

    - -
    {
    -    "user": "Big Joe",
    -    "tall": true,
    -    "animals": [
    -        {"name": "white mouse", "price": 30},
    -        {"name": "black mouse", "price": 25},
    -        {"name": "green mouse", "price": 150}
    -    ]
    -}
    -

    which is also a legal FTL expression. Please read the FreeMarker Manual about "Specify values directly" if you are not familiar with them. TDD doesn't support any other FTL operators (as variables, built-ins, interpolations, etc.), only the "Specify values directly" part of FTL.

    - -

    TDD syntax allows terser expressions than FTL because of these additional syntactical rules:

    -
      -
    • Strings need not be quoted if they doesn't look like a legal boolean or number value, and they don't contain: -
        -
      • white-space: space, tab, line-break, etc.
      • -
      • Quotation marks or apostrophe-quote: ", '
      • -
      • Separator-like chars: comma (,), semicolon (;). Colon (:) is allowed without quoting the string if the string is not a key in a hash.
      • -
      • Bracket-like chars: (, ), [, ], {, }, <, >
      • -
      • Equals sign (=)
      • -
      • Plus sign (+)
      • -
      -
    • -
    • Line-break can be used instead of comma (,). That is, in practice, you can omit commas that would be at the end of the lines.
    • -
    • If in a hash the value is missing from a key:value pair, then the value defaults to boolean true. -
    - -

    Utilizing these rules, the example TDD expression can be written as:

    - -
    {
    -    user: "Big Joe"
    -    tall
    -    animals: [
    -        {name: "white mouse", price: 30}
    -        {name: "black mouse", price: 25}
    -        {name: "green mouse", price: 150}
    -    ]
    -}
    -

    Back to the strings... Examples of legal unquoted strings:

    -
      -
    • **/foo-bar/baz.txt
    • -
    • C:\windows\system32
    • -
    • 25%
    • -
    • #FF80FF
    • -
    • ?!
    • -
    • 7.txt
    • -
    • 1-2
    • -
    • True
    • -
    -

    Examples of strings where quotation had to be used:

    -
      -
    • "contains space"
    • -
    • "a'b"
    • -
    • "(c)"
    • -
    • "<head>"
    • -
    • "7"
    • -
    • "true"
    • -
    - -

    TDD supports an escape sequence that FTL doesn't: backslash at the end of the line. It is used to break strings into multiple lines in the TDD, without actually introducing line-breaks and indentation in the value of the string. For example here:

    - -
    {
    -    text: 'This is \
    -           a single \
    -           line.'
    -}
    -

    the value of text will be the same as with: - -

    {
    -    text: 'This is a single line.'
    -}
    -

    The exact rule is that if backslash is followed by a line-break (extra horizontal white-space is allowed between the backslash and the line-break), then all characters after the backslash will be removed until the first non-white-space character is reached, or a 2nd line-break is reached.

    - - - - -

    Interpretation modes

    - -

    A text can be interpreted as TDD either in:

    -
      -
    • Single expression mode: this is the basic case.
    • -
    • Hash mode: The text is assumed to describe the name:value pair list of a hash.
    • -
    • Sequence mode: The text is assumed to describe the value list of a sequence.
    • -
    - -

    An example of hash mode are configuration files. There you enter the settings as if you were already between { and }:

    - -
    sourceRoot: src
    -outputRoot: out
    -

    and this will evaluate to a hash. In single expression mode, you could describe the same value with this:

    - -
    {
    -    sourceRoot: src
    -    outputRoot: out
    -}
    -

    An example of sequence mode is when you specify the removeExtensions setting with command-line argument to the command-line tool or as Ant task parameter. For example, when you enter this in the command-line:

    - -
    fmpp -S src -O out --removeExtensions "foo, bar, baaz"
    -

    Don't be confused on the quotation marks here, those are required by the command-line parser of the OS shell, it has nothing to do with TDD. What FMPP gets don't contain the quotation marks, only the text between them. So the TDD expression we are talking about is:

    - -
    foo, bar, baaz
    -

    The same value could be described in single expression mode as:

    - -
    [foo, bar, baaz]
    -

    When to use single expression mode, and when hash mode, and when sequence mode? Hash mode or sequence mode is used when you specify the value of something as discrete text (that is, not as the part of a larger, enclosing TDD expression), and it is known that the value must be hash or sequence respectively. For example, in the --removeExtensions example above, the TDD expression is given in an independent text fragment, and it is known that the removeExtensions setting is a sequence. Compare it with the case, when you specify the same setting value in a configuration file:

    - -
    removeExtensions: [foo, bar, baaz]
    -

    Here, the value is not a discrete text, because it is a fragment of a larger TDD expression (which is, by the way, a hash mode expression). Thus, the value must be specified in single expression mode, regardless that we know that it should be a sequence. Because, if you were allowed to write:

    - -
    removeExtensions: foo, bar, baaz
    -

    then there would be an ambiguity, as it could be also interpreted as:

    - -
    removeExtensions: foo
    -bar: true
    -baaz: true
    -

    (Since, if the value is missing from a key:value pair, then the value defaults to boolean true, and comma can be replaced with line-break) So be sure you don't forget the brackets in configuration files.

    - - - - -

    Hash addition

    - -

    TDD allows you to put hash value directly into another hash value, without specifying key for it. For example:

    - -
    {a: A, b: B,  {c: C, d: D}}
    -

    In this case, when the TDD interpretation passes the {c: C, d: D}, it will add all key:value pairs of it to the enclosing hash. So the final result hash will contain these key:value pairs: a: A, b: B, c: C, d: D.

    - -

    When the hash is added to its parent, it may overwrite keys in that. For example:

    - -
    {a: A1, b: B1, c:C1, {b: B2, c: C2}, {c: C3}}
    -

    will result in a hash that contains these key:value pairs: a:A1, b:B2, c:C3.

    - -

    You may wonder what is this all good for. Hash additions are useful with data loaders that return hashes. Read on...

    - - - - -

    TDD functions

    - -

    TDD has a construct called TDD function that is identical to FTL method calls. The meaning of TDD functions depends on which setting do you use them in. For example, when you use TDD with the data setting, then they are used to invoke data loaders, and their return value is the loaded data. A part form the configuration used in the Quick Tour:

    - -
    data: {
    -    tdd(data/style.tdd)
    -    birds: csv(data/birds.csv)
    -}
    -

    The first function call (tdd(...)) returns the a hash that was built by interpreting the data/style.tdd file. There is no key given for it (like someKey: tdd(...)), so its key:value pairs will be added directly to the data hash (hash addition). The second call (csv(...)) returns a sequence, which will be stored with key birds in the data hash.

    - -

    Another example of the usage TDD functions is when method calls are used with the modes setting. A fragment from a possible configuration file:

    - -
    modes: [copy(**/*.html, **/*.htm), ignore(tmp/)]
    -

    In this use case, you are not interested what kind of values do the function calls return. You just use the function calls for describing groups. It's the internal business of the FMPP core what the function calls return to solve this task.

    - -

    There is no restriction regarding the type of the value a TDD function returns. You may thought that TDD knows only these types: string, number, boolean, hash, sequence. These are the types for which you can specify values directly, but a sequence or a hash can store any type of Java objects as values, not only these. So any type of object can get into hashes or sequences as the return value of TDD function.

    - - - - -

    Comments

    - -

    TDD knows 2 types of comments:

    -
      -
    • FTL comment: These are delimited with <#-- and -->, and can span multiple lines. They can be inserted everywhere where optional white-space could be inserted. FTL comments can't be nested into another FTL comment.
    • - -
    • Shell-script/"properties" style comment: These are lines starting with #, optionally preceded with white-space. The comment spreads until the end of the line. This comment can be inserted everywhere where optional line-break could be inserted.
    • -
    - -

    Comments will not work inside quoted strings, nor nested inside comments. That is, they will count as normal text in these places.

    - -

    Example:

    - -
    # This is a test.
    -# Now "a" will be 1
    -a: 1 <#-- now "a" is 1 -->
    -b <#-- this was the key --> : <#-- now comes the value --> 2
    -  # Comments can be indented.
    -<#--
    -  FTL-style comment
    -  can span over multiple lines.
    --->
    - - -

    Character encoding issues

    - -

    If you load TDD from a file, then FMPP have to use an encoding (charset) to interpret the bytes as text. The default of this encoding depends on how do you load the TDD file:

    -
      -
    • If it is a configuration file: ISO-8859-1 is used.
    • -
    • If it is loaded with tdd data loader as tdd(fileName): sourceEncoding is used.
    • -
    • If it is loaded with data loader tdd as tdd(fileName, encoding): the encoding suggested by the 2nd parameter is used.
    • -
    - -

    A TDD file can specify its own encoding with a special comment, in which case the default of the encoding (see above) is ignored. For example this TDD file will be always interpreted with UTF-8 encoding, doesn't mater how you load it:

    - -
    # encoding: UTF-8
    -some: tdd
    -comes: here
    -

    The encoding comment must be the very first line of the TDD file. FTL-style comment can't be used for this purpose. Extra white-space, or no white-space is OK between the # and encoding, also extra white-space can be present around the colon. Word charset can be used instead of encoding. The words are not case sensitive.

    - -

    The encoding comment works only if the file can be correctly interpreted as US-ASCII until the end of the encoding name. So it will not work for UTF-16, UCS-2, UCS-4, and with EBCDIC based charsets. Note that an UTF-8 BOM at the begining of the file is automatically ignored.

    - - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/tips.html b/fmpp/docs/tips.html deleted file mode 100644 index c96a8ee..0000000 --- a/fmpp/docs/tips.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -Tips and Best Practices - FMPP - - - - - - - - - - - - - - - -
    -

    Tips and Best Practices

    - -
    - -
    - - -

    Finding out the reasons of errors

    - -

    Use a log file (see: logFile) as that will contain the full error stack trace. Also, if you are really lost, you may use temporary pp.warning-s as a poor man's debugger: you can see if a certain line in the template is reached, also you can print the current values of variables.

    - - - - -

    Speeding up processing when you have many files

    - -

    Some tricks:

    -
      -
    • Try to use skipUnchanged setting. For most applications you can safely use it with the static value, and it speeds up things a lot if you have many images or other static files. - -
    • Try to set the quiet setting to true or reallyQuiet, or set echoFormat to terse for the command-line tool. Surprising enough, some terminals scrolls screen slowly, so FMPP has to wait until it can print the next line to the screen. - -
    • Process only the files/directories that actually need reprocessing. You don't have to process the whole source root directory; you can select the set of files and directories that you want to process inside the source root, with the sources setting. -
    - - - -

    Avoid too much programming logic in templates

    -

    FTL (FreeMarker Template Language) is not a general purpose programming language, just a template language. Implementing complex programming logic in it is cumbersome, and defeats the original purpose of templates: to be simple, almost the same as the output. To avoid this, pair BeanShell scripts with the problematic templates, and do the complex calculations in the script file, and then pass the results to the template for displaying. BeanShell is good in calculating data (and in whatever complex algorithms), FTL is good in displaying data. So you use the adequate languages for the subtasks. This can be implemented with the localData setting and its bsh function.

    - - -

    Showing information about something that will be generated further down

    - -

    For example, you have to show a Table of Contents at the top of the page, but the list of headings is not known until the page generation reaches the bottom of the page. In this case, generate the section that contains the headings first, but capture the output in a variable with an assignment directive (as <#assign var>...</#assign>). Then print the top of the page, and then the captured output. Check <FMPP>/docs/examples/capture to see a working example.

    - - - - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/versions.html b/fmpp/docs/versions.html deleted file mode 100644 index 70bdf76..0000000 --- a/fmpp/docs/versions.html +++ /dev/null @@ -1,834 +0,0 @@ - - - - - - - -Version History - FMPP - - - - - - - - - - - - - - - -
    -

    Version History

    - -
    -
    -

    Page contents

    - -
    -
    -
    - - -

    0.9.15

    -

    Date of release: 2014-11-05

    -

    Bug fixes:

    -
      -
    • Fixed an oversight where an Engine static field was accidentally initialized in a non-static initializer, causing problems in multi-threaded environment.
    • -
    • Removed version ranges from Maven dependencies, replacing them with concrete version numbers.
    • -
    • Log files now don't contain the stack trace twice when the processing session is aborted by a file processing error.
    • -
    • Setting values with integer type haven't understood + prefix, like in +1.
    • -
    - -

    New features, improvements:

    -
      -
    • Added JSON data loader. -
    • - Exposed relevant FreeMarker settings added since 2.3.15: - -
    • -
    • The command line tool doesn't "snip" (--8<--) error messages any more, instead, by default, it prints a cause message chain instead of a stack trace on error. This is especially useful as newer FreeMarker versions tend to give more detailed error messages that shouldn't be cut off. Stack traces can be asked with the new printStackTrace setting. The snip setting is now deprecated, and is only an inverted alias to printStackTrace.
    • -
    • Improved console error output quality in general.
    • -
    • The command line tool now detects the actual number of console (terminal) columns and wraps lines accordingly. Earlier it has used 80 columns. This only works if you invoke FMPP with the provided shell script (bin/fmpp or bin/fmpp.bat). Also, it won't work if you have explicitly set the columns setting (like in ~/.fmpprc) as then that will take precedence.
    • -
    • Better java location detection in the UN*X shell script (bin/fmpp) -
    • FMPP license has been changed from BSD to Apache License 2.0. The copyright owner has been changed to be the same as the owners of FreeMarker. The two projects now share the same license and Contributor License Agreement.
    • -
    • - The dependencies of FMPP has been updated/changed: -
        -
      • Attention! The minimum required Java version has been increased from 1.2 to 1.4.
      • -
      • Attention! The minimum required FreeMarker version has been increased from 2.3.15 to 2.3.21.
      • -
      • Removed Oro dependency (lib/oro.jar) as regular expression support is included in Java 1.4.
      • -
      • Updated FreeMarker dependency from 2.3.15 to 2.3.21 (lib/freemarker.jar and FreeMarker Manual).
      • -
      • Updated ImageInfo to version 1.9. It isn't included in fmpp.jar any more, instead it's a regular dependency (lib/imageinfo.jar).
      • -
      • Updated xml-resolver.jar dependency from 1.1 to version 1.2 (note that thus its license changes from Apache License 1.1 to Apache License 2.0)
      • -
      -
    • -
    • Added new constructor, Engine(BeansWrapper beansWrapper, Version fmIncompImprovements), deprecated the earlier Version-less overload.
    • -
    • Removed long deprecated method: Settings.execute(Engine eng). -
    • The project source code was moved from SourceForge.net to GitHub: https://github.com/freemarker/fmpp.
    • -
    • Overall source code structure and Ant build improvements.
    • -
    • Updated Web site and documentation design, also cleaned up the content a bit.
    • -
    - - - -

    0.9.14

    -

    Date of release: 2009-03-15

    - -

    Bug fixes:

    -
      -
    • Fixing bug that caused skipUnchanged to skip a file when the destination was newer than the source. Now it only skips files when the modification date of the source and destination files are exactly the same.
    • -
    • Fixing some TDD parser crashes occurring when parsing invalid TDD.
    • -
    • Preventing obviously useless traversing inside SVN and CVS directories.
    • -
    • Fixed some typos in the documentation.
    • -
    - -

    New features, improvements:

    -
      -
    • FMPP now can create empty directories using one of the two new features (reminder: FMPP creates output directories on-demand before an actual output file is created in them, hence usually it doesn't create empty directories): -
        -
      • If a directory file contains a file named createdir.fmpp then that will ensure that the containing directory will exist in the output as well. The createdir.fmpp file itself will not appear in the output, it's only a marker. -
      • New setting, alwaysCreateDirectories: If this is set to true, all processed directories will produce a corresponding output directory, even when that directory will be empty. -
      - -
    • The XML data loader now supports XInclude-s by setting its xincludeAware option to true. - -
    • To follow the Ant conventions, now sourceRoot can alternatively be specified with the srcdir attribute, and outputRoot with the destdir attribute of the Ant task. - -
    • API: New JavaBean propery in fmpp.Engine and fmpp.setting.Settings: dontTraverseDirectories. It should be set to true by front-ends that explicitly specify the list of all source files and source directories, rather than expecting the Engine to discover them. Till now such front-ends only specified the list of files, so this property wasn't needed. However, to support the new alwaysCreateDirectories setting, now the list of directories should be passed as well, and hence the need for this new property.
    • - -
    • Updated freemarker.jar and the included FreeMarker Manual to 2.3.15.
    • -
    - - -

    0.9.13

    -

    Date of release: 2007-12-16

    - -

    Bug fixes:

    -
      -
    • The skipUnchanged setting haven't had any effect since 0.9.10. Now it works again.
    • - -
    • When detecting the dimensions of certain image files, new lines were printed to the standard output (i.e., to the console).
    • - -
    • The slicedText data loader has ignored the encoding parameter.
    • - -
    • Warning! Incompatible change! The csv, text and slicedText data loaders didn't skipped the BOM (byte order mark) character at the beginning of the file. This was a problem as the Windows Notepad inserts a BOM there when it saves with UTF-8 encoding. This fix is not 100% backward compatible, as someone may indeed wanted to have that BOM.
    • - -
    • API: The fmpp.dataloaders.AbstractTextDataLoader ignored the encoding returned by the parseExtraArguments method.
    • - -
    • API: The fmpp.dataloaders.AbstractTextDataLoader didn't removed the BOM character from the beginning of files.
    • -
    - -

    New features, improvements:

    -
      -
    • The csv data loader has a few new options: normalizeHeaders, trimCells, and emptyValue. More details...
    • - -
    • Warning! Incompatible change! New setting: ignoreSvnFiles. This will ignore directories with name .svn inside the source root directory. This setting is by default on (true), so it's theoretically not backward compatible.
    • - -
    • API: DataLoaderUtil.getStringArrayArgument and getStringArrayOption now have an overload with allowString argument, so that a single item can be easily treated as an array of length 1.
    • - -
    • Updated freemarker.jar and the included FreeMarker Manual to 2.3.11.
    • - -
    • The project has switched from CVS to SVN. The CVS repository is not used anymore.
    • -
    - - - -

    0.9.12

    -

    Date of release: 2007-04-27

    - -

    Bug fixes:

    -
      -
    • Warning! Incompatible change! In TDD files value types were incorrectly forced to string if they were inside an explicitly defined hash (i.e. inside { and }). Like {x: 1, y: false} was interpreted as {x: "1", y: "false"}, that is, both values were strings. From now it is interpreted correctly, so with the above example x will be the number 1 and y will be the boolean false.
    • -
    - -

    New features, improvements:

    -
      -
    • New data loader: tddSequence for loading a TDD file as a TDD sequence (i.e. list) rather than as a TDD hash (i.e. map). More... -
    • Updated freemarker.jar to 2.3.10, and bhs.jar (BeanShell) to 2.0b4 in the distribution pack. -
    - - - -

    0.9.11

    -

    Date of release: 2006-03-15

    - -

    New features, improvements:

    -
      -
    • New setting: tagSyntax. This let you access this new setting of FreeMaker 2.3.5. - -
    • For nightly FMPP builds the build date is now logged in additional to the version number. - -
    • Updated freemarker.jar to 2.3.6, and bhs.jar (BeanShell) to 2.0b1.1 in the distribution pack. -
    - -

    Bug fixes:

    -
      -
    • The Ant task have processed all files of the source root directory if the number of selected file was 0.
    • - -
    • Warning! Incompatible change! When sources was set to any empty list in a configuration file, the whole source root directory was processed in certain cases. From now it will process no files in that case. If you want to process the whole source root directory, don't specify the sources setting at all. - -
    • Warning! Incompatible Java API change! The Settings class was badly assumed that the whole source root directory has to be processed if the sources setting was an empty list. This was incorrect, as in that case simply 0 files should be processed, and processing the whole source directory should occur only if the sources setting was not set at all (it's null when you get it). So, if you want the whole source root directory to be processed, don't set the sources setting at all. If it is already set, you can "unset" it with settings.remove(Settings.NAME_SOURCES).
    • - -
    • The Ant task didn't logged setting errors into the log file.
    • - -
    • The test suite now works with JDK 1.5, if you add xpathSupport.lib to the build.properties. - -
    - - - - -

    0.9.10

    -

    Date of release: 2005-10-23

    - -

    New features, improvements:

    -
      -
    • The pp.newWritableSequence and pp.newWritableHash methods now have an optional parameter, which is the sequence or hash whose items are added to the new writable sequence or hash. This makes pp.copyWritable deprecated, which was not able to create writable sequences/hashes based on non-writable ones.
    • - -
    • New setting: objectWrapper. This let FreeMarker "experts" to create and fully configure the freemarker.template.ObjectWrapper object that FMPP will use.
    • - -
    • Java API: a new fmpp.Engine constructor now let you specify the freemarker.template.ObjectWrapper to use.
    • - -
    • FreeMarker 2.3.4 is included in the distribution. Note the new feature of FreeMarket that let you use [#...], [@...], etc instead of <#...>, <@...>, etc if you start the template with [#ftl].
    • - -
    • <FMPP>/docs/examples/multipage_list was updated to use sequence?chunk(pageSize), instead of complex BeanShell script that was needed before FreeMarker 2.3.3.
    • - -
    • Manual improvements.
    • -
    - -

    Bug fixes:

    -
      -
    • On Windows, fmpp.bat has sometimes build the CLASSPATH badly that ruined the command line call to java.exe and caused it to die with a strange ClassNotFoundError.
    • - -
    • When a file is copied in "copy" processing mode, FMPP now sets the last modification time of the destination file to the last modification time of the source file.
    • - -
    • Warning! Incompatible Java API change! The FMPP engine has used and modified the shared - freemarker.template.ObjectWrapper.BEANS_WRAPPER object, which is dangerous. From now by default it uses its own ObjectWrapper instance. If you have utilized that it uses the shared ObjectWrapper.BEANS_WRAPPER object (not recommended!), then for 100% backward compatibility you have to use the objectWrapper setting with this value:
      - "ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); return ow;"
      - (or if you don't use FMPP settings, do this in Java where you create the engine object: ObjectWrapper ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); Engine eng = new Engine(ObjectWrapper.BEANS_WRAPPER);)
    • -
    - - - -

    0.9.9

    -

    Date of release: 2005-04-12

    - -

    New features, improvements:

    -
      -
    • The csv data loader was improved: -
        -
      • With the new headers option you can specify the header row for a CSV file that doesn't actually have a header row.
      • -
      • With the new replaceHeaders option you can override the header row of a CSV file.
      • -
      • The values returned for the rows are now not only hashes but also the sequences of the cells. -
      -
    • New data loader: slicedText for loading a text file as a sequence of strings. More... -
    • Java API: New class: fmpp.dataloaders.AbstractTextDataLoader, to ease the creation of custom text file data loaders for Java programmers.
    • -
    • Java API: New StringUtil methods: normalizeNewliens, split with trimming.
    • -
    • Warning! Incompatible change! The + operator in TDD files and configuration files is not allowed anymore. This operator was used for adding hashes prior 0.9.0. Since 0.9.0 the preferred (and now required) way of adding hashes is different. For example, assuming that your configuration file is in "properties" format (that is, the extension of the FMPP configuration file is cfg or properties), instead of this:
      - data={a:1, b:2} + properties(data/style.properties) + birds:csv(data/birds.csv)
      - your should write this:
      - data=a:1, b:2, tdd(data/style.tdd), birds:csv(data/birds.csv)
      - More information on hash addition...
    • -
    - -

    Bug fixes:

    -
      -
    • The csv data loader has incorrectly interpreted "\n\r" as a single line-break. -
    • Fixed some mistakes in the Manual and in the JavaDocs. -
    - - -

    0.9.8

    -

    Date of release: 2005-01-28

    - -

    New features, improvements:

    -
      -
    • FreeMarker 2.3.2mod (a stable nightly build after 2.3.2) is included. -
    • FMPP was updated to enable the new output encoding and URL escaping related features of FreeMarker 2.3.1. (The usage of 2.3.2mod is recommended because of a bug fix.) -
    • New setting: urlEscapingCharset -
    • Java API: added static final fields to Engine for reserved engine parameter (setting) value strings: PARAMETER_VALUE_SOURCE, PARAMETER_VALUE_HOST, PARAMETER_VALUE_OUTPUT. Also added the similar missing static fields to the Settings class. -
    - -

    Bug fixes:

    -
      -
    • The reserved "host" output encoding value was not resolved in some rare cases. -
    • The the pp.urlEnc/pp.urlPathEnc functions and the fmpp.util.StringUtil.urlEnc(...)/urlPathEnc(...) methods were malfunctioned with a few charsets, for example with UTF-16, UTF-7, and EBCDIC based charsets. -
    • Warning! Incompatible Java API change! The documentation of fmpp.ProgressListener.notifyProgressEvent(...) forgot to mention regarding the event parameter that: "As new event types can be introduced with new FMPP versions (even if it happens very seldom), a progress listener implementation should survive events that it does not understand. That is, it must not stop with an error, but it should silently ignore the event." Note that there is no new event type in this version.
    • -
    • Many fixes in the Manual and in the the API JavaDocs.
    • -
    • Warning! Incompatible Java API change! The fmpp.util.NullWriter and fmpp.util.NullOutputStream classes has no public constructor anymore. Use their static INSTANCE field to get the singleton.
    • -
    • Fixed test-suite bugs: Windows vs UN*X vs Mac line-breaks, class-path problem in the build.xml.
    • -
    - - -

    0.9.7

    -

    Date of release: 2004-03-01

    - -

    New features, improvements:

    -
      -
    • New setting: freemarkerLinks. This is a dirty hack to satisfy a frequent demand: <#include ...>/<#import ...> files that are outside the source root directory (as FTL macro libraries used by more projects).
    • -
    • Later nightly FreeMarker 2.3 build is included.
    • -
    - -

    Bug fixes:

    -
      -
    • Warning! Incompatible change! From now, native separators (as backslash under Windows) are not tolerated in the paths used in <#import ...> and <#include ...> directives. You must use / there.
    • -
    • Fixes in the Manual and in the the API JavaDocs.
    • -
    - - -

    0.9.6

    -

    Date of release: 2004-01-20

    - -

    New features, improvements:

    -
      -
    • New processing mode: renderXml. When a source file is processed in this mode, it's parsed as XML, and then the parsed XML document is rendered to output file(s) by a FreeMarker template, which is chosen based on the path or the document element of the XML document. -
        -
      • New setting: xmlRenderings. More info...
      • -
      • New pp variable: pp.doc. More info...
      • -
      • Java API: New class: fmpp.XmlRenderingConfiguration. New fmpp.Engine.PMODE_... constant: PMODE_RENDER_XML. New Engine methods to add/clean XML rendering configurations.
      • -
      -
    • - -
    • When template execution dies with error, and it didn't generated any output yet, nor it flushed the output explicitly or by changing output file, then no 0 length output file will be generated.
    • - -
    • New target in the build.xml, qinstall. It's the same as install, but assumes y for all questions.
    • - -
    • Added figures to the Quick Tour chapter.
    • - -
    • Java API: Added a new utility method to Engine: static String getProgressListenerEventName(int event)
    • -
    - - - -

    0.9.5

    -

    Date of release: 2004-01-14

    - -

    New features, improvements:

    -
      -
    • Java API: Improvements to the Settings class: -
        -
      • The API of this class is now as stable as other FMPP API-s, so it is not marked as experimental anymore.
      • -
      • The execute(Engine) method is now deprecated, and will be soon removed. Use execute() instead. If you use Settings, then don't create Engine objects manually anymore, just use the Settings object alone. See an example here...
      • -
      • Methods have been added to deal with progress listeners and engine attributes.
      • -
      -
    • - -
    • Java API: some convenience methods has been added: Settings.set(String, boolean), Settings.set(String, int), Settings.setDefault(String, boolean), Settings.setDefault(String, int), Engine.isXmlSupportAvailable(), TddHashLocalDataLoader(String)
    • - -
    • More API documentation.
    • - -
    • More reliable and helpful install Ant target.
    • - -
    • Terminology change: To prevent confusion, the settings of the fmpp.Engine object (known be people who use FMPP at Java API level) are now called "engine parameters", as the "settings" term is already used since version 0.9.0 for the high level settings seen by usual front-end users.
    • - -
    • Many grammatical mistakes have been fixed in the documentation. Other minor improvements in the Manual.
    • -
    - -

    Bug fixes:

    -
      -
    • A later nightly FreeMarker 2.3 build is included, that fixes various bugs with XML related keys @@markup, @@nested_markup, @@start_tag, and @@attributes_markup. This is mostly important for people who uses data of XHTML format for generating (X)HTML pages.
    • -
    - - - -

    0.9.4

    -

    Date of release: 2004-01-03

    - -

    New features, improvements:

    -
      -
    • New setting: localData -
        -
      • Till now, all source files (all templates) have started with the same data model, the one you have specified with the data setting. With the new localData setting you can add variables to, and override the variables of the common data model, for groups of source files selected by path patterns.
      • -
      • This feature also let you attach a BeanShell script to a template, that can done some complex calculations before template execution, and put the results into the data model for the individual template.
      • -
      • The templateData setting is now deprecated.
      • -
      • Java API changes: New interface fmpp.LocalDataBuilder, deprecates fmpp.TemplateDataModelBuilder.
      • -
      -
    • - -
    • The borders setting supports multiple layers. That is, multiple borders can be used at once for the same file. - -
    • In <@pp.renameOutputFile ... /> you can use the extension parameter instead of name, to change only the extension of the output file. - -
    • Java API: TemplateEnvironment has new methods, most importantly static TemplateEnvironment getCurrentInstance() for accessing the current template environment in FreeMarker transforms/methods.
    • - -
    • Java API: New methods to Engine: Object getData(name) (returns unwrapped original values), Object removeData(name), cleatData() (deprecates misnamed clearSharedVariables()).
    • - -
    • Java API: Engine attribute that implements ProgressListener get notifications about engine events.
    • - -
    • Java API: fmpp.tdd.FunctionCall has public constructor now.
    • - -
    • Warning! Incompatible Java API change! Engine.getData(...) doesn't throw TemplateModelException anymore, because data wrapping is now deferred until the session execution.
    • - -
    • Warning! Incompatible Java API change! Synchronization was removed from Engine. It did the same as if you synchronize on the Engine instance and call the methods anyway...
    • - -
    • Warning! Incompatible Java API change! ProgressListener.notifyProgressEvent(...) is now allowed to throw Exception. - -
    • More API documentation.
    • -
    - -

    Bug fixes:

    -
      -
    • <@pp.renameOutputFile ... /> has malfunctioned when the buffer was already flushed.
    • - -
    • Minor documentation fixes.
    • - -
    • 3rd party libraries BeanShell and ORO were upgraded. The upgrades fix a few bugs.
    • - -
    • Warning! Incompatible Java API change! Package fmpp.listeners were renamed to fmpp.progresslisteners. - -
    • Warning! Incompatible Java API change! Engine.removeAttribue was renamed to Engine.removeAttribute. -
    - - - -

    0.9.3

    -

    Date of release: 2003-12-22

    - -

    New features, improvements:

    -
      -
    • In FreeMarker 2.3: The quotations in FreeMarker error messages are now terser and thus easier to read.
    • - -
    • Various really missing XML related features added (Detailed information...): -
        -
      • New settings: xmlCatalogFiles, xmlCatalogPrefer. With these settings you can setup the OASIS catalogs that will be used for resolving entities in XML files. (See <FMPP>/docs/examples/xml_validating)
      • - -
      • New option to the xml data loader: validate. This specifies if the XML file will be checked for validity.
      • - -
      • New setting: validateXml. This specifies if by default XML files will be checked for validity.
      • - -
      • New setting: xpathEngine. With this setting you can set if you want to use Jaxen or Xalan for XPath-s.
      • -
      -
    • -
    - -

    Bug fixes:

    -
      -
    • In FreeMarker 2.3: A bug that caused template processing to fail with NullPointerException on low memory conditions is now fixed. A bug in Jaxen XPath support that caused NullPointerException-s has been fixed. Etc.
    • - -
    • Warning! Incompatible Java API change! Engine.process doesn't throw sly unchecked fmpp.IllegalConfigurationException-s anymore. Also, fmpp.IllegalConfigurationException is not public from now; it wasn't mentioned in other public API-s anyway.
    • - -
    • FMPP has died with internal error if somebody tried to use XML related features, and XML support was not available.
    • - -
    • Minor documentation fixes.
    • -
    - - -

    0.9.2

    -

    Date of release: 2003-11-12

    - -

    Bug fixes:

    -
      -
    • Warning! Incompatible change! Only Windows users (and the users of other operation systems where paths use something else instead of slash) are affected by this fix. Relative paths in <#include ...> and <#import ...> were badly interpreted relatively to the sourceRoot. Now they are correctly interpreted relatively to the directory of the template file. This bug fix is not backward compatible, if you have accidentally utilized the bad behavior. For example, you have included <sourceRoot>/includes/foo.ftl in a template file which is in not directly in the sourceRoot like this: <#include "includes/foo.ftl">. Now you should replace it with: <#include "/includes/foo.ftl">.
    • - -
    • Minor documentation fixes.
    • -
    - - -

    0.9.1

    -

    Date of release: 2003-11-09

    - -

    New features, improvements:

    -
      -
    • Warning! Incompatible change! Data loader antProperty and antProperties now can convert the property values to numerical, boolean, or data/time/date-time variables. For example, to expose property x as numerical variable, use antProperty(x?n) instead of antProperty(x). This causes backward compatibility problem only if you have Ant property names that ends with one of these: ?n, ?b, ?d, ?t, ?dt, ?s, and you have specified their name as parameter to these data loaders. In this case, append ?s at the end of the parameters. More info...
    • - -
    • Data loader csv now supports columns of type date, time, and date-time. More info...
    • - -
    • Later nightly build of FreeMarker 2.3 is included, that introduces new built-ins: j_string, js_string. These can be used to escape text with Java language or JavaScript string literal escaping rules. Also it contains some minor bug fixes.
    • - -
    • The text hard-wrapper (used by the command-line tool) has some fixes and improvements.
    • - -
    • Added a chapter about writing new front-ends. Here...
    • - -
    • A few minor fixes in the documentation and in the examples.
    • -
    - -

    Bug fixes:

    -
      -
    • The expert setting worked inverted with the Ant task when it decided if you are allowed to use the project base directory as outputRoot.
    • - -
    • The install target of build.xml didn't stopped nicely if the ANT_HOME was not set.
    • -
    - - -

    0.9.0

    -

    Date of release: 2003-10-30 - -

    New features, improvements: -

      -
    • Warning! Incompatible change! The default configuration file format is TDD from now, instead of "Java properties" (to decrease the number of syntaxes user has to use). Files with extension cfg or properties are automatically interpreted as "Java properties" file, so the old fmpp.cfg-s will still work. But if your old configuration file doesn't use extension cfg or properties, then you have to rename it now. Also, note that the default file name for the new (TDD) configuration files is config.fmpp, which has priority over fmpp.cfg when both present in the same directory. More info... - -
    • TDD was substantially revisited. -
        -
      • The TDD syntax has several improvements and also conceptual changes. The revisited TDD is backward compatible with the old. However, I will remove hash unions later, so + will be available for other purposes. To prepare for this future change, just replace + characters with comma (,) in your hash unions. See the chapter about the new TDD... -
          -
        • All FTL string literal features are supported. Escapes, raw strings...
        • -
        • With a new escape sequence, strings can be broken into multiple lines visually, without affecting their value.
        • -
        • Much more character is allowed in unquoted strings.
        • -
        • FTL comments and single line # comments are supported. -
        • TDD files can specify their own encoding (charset) with a special comment in their first line. -
        • Line-break can be used instead of comma to separate items in listings. -
        • The hash union concept was gone. Instead, you can put hashes directly into the enclosing hash. -
        • In hashes the value can be omitted from the key:value pair, in which case it defaults to true. -
        -
      • - -
      • TDD error messages show the error location (line, column, file) and quote the problematic line.
      • - -
      • TDD now uses term "TDD function" instead of "TDD directive".
      • - -
      • Warning! Incompatible Java API change! fmpp.tdd.TddParser was gone, and fmpp.tdd.Interpreter was introduced instead, which has different API.
      • -
      -
    • - -
    • The FMPP Ant task now can load the settings from configuration files, with the new attribute configuration. Thus, now you can store the settings in a single place if you use FMPP both as command-line tool and Ant task. Look at <FMPP>/docs/examples/build.xml and <FMPP>/docs/examples/ant3 to see applications. - -
    • New setting: inheritConfiguration. It is used for "customizing" an existing configuration by overriding some settings in it. See <FMPP>/docs/examples/inherit_cfg. More info... - -
    • Warning! Incompatible change! Setting sources now uses TDD sequence syntax. Thus, you can't separate the files with : or ; anymore, but with comma (,). According to TDD syntax, quote file names that contain problematic characters, e.g.:
      - no/problem/with.it, "but quote this.txt",
      - C:\windows\path, r"C:\quote this win\path"
    • - -
    • Error message creation mechanism was changed. The messages are now more "stupid mechanical", but there is far less chance that some helpful detail is accidentally left out. - -
    • The default values of a few settings of the command-line tool can be customized with .fmpprc file placed into the user home directory or into the FMPP home directory. More info... - -
    • The get data loader function returns the values of other variables in the data model. This can be used to pass previously loaded data to other data loaders as parameters, for example:
      - data: {doc:xml(data/foo.xml), index:com.example.IndexBuilderDataLoader(get(doc))}. More information... - -
    • Data loader eval has an optional 2nd parameter, the hash of variables that will be available when the BeansScript is evaluated. For example:
      - data: eval('...', {foo:properties(foo.properties), items:get(items)})
      - More info.... - -
    • With the new appendLogFile setting you can specify that the log file is continued, rather than restarted for each processing session. - -
    • Warning! Incompatible change! The fmpp file extension is now reserved for the purposes of FMPP. Files with this extension are never processed (they are ignored). If you had to process files of this extension, protect them using double extension as test.fmpp.keepme, and then add the extra extension (keepme in this case) to the removeExtensions setting. - -
    • The quiet setting now accepts values true, false, and reallyQuiet. Integer values are supported for backward compatibility only. - -
    • These settings were renamed: removePostfix to removePostfixes, removeExtension to removeExtensions, replaceExtension to replaceExtensions. This change is backward compatible, because the old names are internally translated. - -
    • New FMPP Ant task attribute: antTaskFailOnError. This tells if the FMPP Ant task should abort the Ant project with error if there were errors during the FMPP processing session. - -
    • Engine.process(File src, File out) now modifies null sourceRoot and/or outputRoot settings for the time of the method call to the parent directories of the source and output files respectively. - -
    • FMPP build information (build date) can be queried with the new method, Engine.getBuildInfo. Also now the command-line tool prints it with --version. - -
    • Improvements to the command-line help, such as new command-line option --long-help. - -
    • Warning! Incompatible Java API change! Engine.process doesn't throw IOException anymore, only ProcessingException. - -
    • Warning! Incompatible Java API change! The built-in DataLoader implementations were moved into new package tdd.dataloaders. - -
    • Warning! Incompatible Java API change! tdd.util.StringUtil.excToStr(Throwable) was removed. - -
    • Revisited documentation and site generator. - -
    • Now mode x is set for bin/* in the tar file. - -
    • Added test suite. (But more test cases should be added...) -
    - -

    Bug fixes: -

      -
    • fmpp.bat was stopped with error if it didn't find Ant! AAARGH! - -
    • A later nightly build of the uncompleted FreeMarker 2.3 is included. This fixes a FreeMarker bug that has caused the first empty line of the template files ignored, when the template has started with empty line. - -
    • Warning! Incompatible change! The FMPP Ant task didn't aborted the Ant project when stopOnError="false", and the were skipped failed processing. Now it does. Note that the old behavior can be emulated using antTaskFailOnError="false". - -
    • pp.locale didn't followed the locale changes made at template execution time with <#setting locale=...>.
    • - -
    • Various other little fixes here and there... But don't be sad. Many exciting new bugs has been added during the refactorings... ;) -
    - - -

    0.8.12

    -

    Date of release: 2003-09-30 -

    New features, improvements: -

      -
    • Warning! Incompatible change! A later nightly build of the uncompleted FreeMarker 2.3 is included. Unfortunately it contains some incompatible changes (Sorry... :( I will not risk nightly FreeMarker builds anymore after 2.3 is out...): -
        -
      • White-space stripping is now more aggressive as before: it always removes leading and trailing white-space if the line only contains FTL tags. (Earlier the white-space was not removed if the tag was <#include ...> or user-defined directive tag with empty directive syntax as <@myMacro/> (or its equivalents: <@myMacro></@myMacro> and <@myMacro></@>). Now white-space is removed in these cases as well.) Also, top-level white-space that separates macro definitions and/or assignments is now ignored. More information... -
      • The return value of freemarker.template.TemplateMethodModel.exec(...) is Object, not TemplateModel. -
      -
    • New pp variable: freemarkerVersion. Also, new fmpp.Engine method: fmpp.Engine.getFreeMarkerVersionNumber(). Also, FreeMarker version number is printed together with FMPP version number everywhere. -
    • Warning! Incompatible Java API change! API change: fmpp.Engine.getVersionNumber() does not throw checked exceptions anymore. -
    • New pp directive: pp.restartOutputFile. This directive empties the output file, but does not delete the file or discards the further output as pp.dropOutputFile does.
    • -
    • Warning! Incompatible change! New setting: "ignore temporary files". This filters out certain typical temporary/backup files (that is, it chooses ignore processing mode for them), unless you explicitly set this setting to false. The old .bak and ~* filter mechanism was removed. Note that this all does not affect the FMPP Ant task. More information... -
    -

    Bug fixes: -

      -
    • With setting "borders", using headers with a template that contains <#ftl ...> resulted on illegal FreeMarker template, as nothing can precede the ftl directive. Now the header is intelligently moved after the ftl directive. -
    • The documentation of pp.set and pp.add was totally confused. -
    • The engine was unable to return the FMPP version number sometimes due class loader issues. -
    • Warning! Incompatible change! Setting "ignore CVS files" had lower priority than the processing mode chooser list. Now it has higher priority. -
    • Warning! Incompatible change! Setting "ignore CVS files" didn't ignored .#?* files. Now it does. -
    - - -

    0.8.11

    -

    Date of release: 2003-08-11 -

    New features, improvements: -

      -
    • Warning! Incompatible change! A later nighly build of the uncompleted FreeMarker 2.3 is included. Most importantly, its XML handling is now much better, but unfortunately has incompatible changes: -
        -
      • Attribute queries such as foo.@bar now return sequences (similarly to child element queries and XPath queries), not single nodes. Because of the rule with node sequences of size 1, it is still good to write ${foo.@bar}, but built-ins such as ?exists, ?if_exists or ?default don't work as before. For example, instead of foo.@bar?default('black'), you now have to write foo.@bar[0]?default('black'). So if you have used existence built-ins with attributes, you have to find those occurrences in the templates and add that [0].
      • - -
      • XML name-space handling has been totally reworked and is absolutely incompatible with the old stuff. Don't worry about this if none of your XML input documents use xmlns.
      • - -
      • Special-keys @@ and @* now return a sequence of attribute nodes instead of the hash of them.
      • -
      -
    • The xml data loader has a new boolean option: namespaceAware. If this is set to false, you can load XML files with the logic as XML has worked before the introduction of name-spaces. -
    • Minor fixes/improvements in the manual. -
    -

    Bug fixes: -

      -
    • The FMPP Ant task stopped with error if you have used nested elements and you have executed multiple "top-level" tasks with the same ant invocation. -
    • The snip function of the command-line tool has snipped the text-flood too late sometimes. -
    - - -

    0.8.10

    -

    Date of release: 2003-07-03 -

    New features, improvements: -

      -
    • Warning! Incompatible change! This release uses a nightly build of the uncompleted FreeMarker 2.3. FreeMarker 2.3 adds several important new features to 2.2.x, but it is not fully backward compatible. Do not forget to read the list of uncompatible changes in the FreeMarker Manual! -
    • antProperties improved: You can give the names of Ant properties you want to expose, as parameters. So if you want to expose only properties foo and bar, then just write antProperties(foo, bar). More info... -
    • New data loader antProperty, to expose the value of a single Ant property. More info... -
    • New data loader xml, which uses the new XML wrapper of FreeMarker. It replaces the old xmlInfoset data loader, which is kept only for backward compatibility. More info... -
    • Some code clean-up (as removing a few unused variables). -
    • From now, freemarker.jar will be checked in to the CVS repository. -
    -

    Bug fixes: -

      -
    • Warning! Incompatible Java API change! In fmpp.util.FreemarkerUtil, FtlVarToCoreJavaObject is now renamed to ftlVarToCoreJavaObject -
    - - -

    0.8.9

    -

    Date of release: 2003-05-02 -

    New features, improvements: -

      -
    • Better error messages: FMPP tools now tend to show the whole cause chain, rather than just the top-level exception. -
    • New data loader: text. This loads a plain text file into a string variable. -
    • New pp variable to retrieve the FMPP Engine version number: pp.version -
    • Easier to build: -
        -
      • Task for getting the latest nightly FMPP. -
      • Fixed the class loading issues of the "docs" task, so the default target is now "build". -
      -
    • The distribution now works with JDK 1.2.2 -
    • Minor additions to the Manual. -
    -

    Bug fixes: -

      -
    • The Ant build was not working without build.properties. -
    • The localized lookup feature of FreeMarker was not disabled, and it could cause confusing effects. -
    • The log file didn't stored the source file path for errors that was logged before the "END OF PROCESSING SESSION" message. -
    - - -

    0.8.8

    -

    Date of release: 2003-04-29 -

    New features, improvements: -

      -
    • Rewritten fmpp.bat; it is now more flexible. -
    • More documentation. No more "Under Construction" logo. -
    • New pp hash methods: outputFileLastModified, sourceFileLastModified, realFileLastModified -
    -

    Bug fixes: -

      -
    • Predefined data loader now didn't used the "time zone" FMPP engine setting. -
    • The "turns" setting was missing from the Manual. -
    • Fixing some typos in the error messages and in the documentation. -
    - - -

    0.8.7

    -

    Date of release: 2003-04-12 -

    New features, improvements: -

      -
    • New date/time related settings of FreeMarker 2.2.1 are exposed now: date format, time format, datetime format, time zone -
    • Date/time related pp variables: now, sessionStart. -
    • Final version of FreeMarker 2.2.1 is included. -
    -

    Bug fixes: -

      -
    • The classpath in fmpp.jar didn't included bsh.jar. -
    - - -

    0.8.6

    -

    Date of release: 2003-04-06 -

    New features, improvements: -

      -
    • New pp method: pp.loadData(dataLoaderName, args...). This can be used to load data into a variable in templates, with the same data loaders as with the "data" setting. More information... -
    • New Engine method: TemplateModel wrap(Object obj) -
    • Newer nightly build of FreeMarker is included (2.2.1). -
    -

    Bug fixes: -

      -
    • Warning! Incompatible Java API change! DataLoader.load(engine, args) now uses List instead of ArrayList for the args. -
    • The install target of build.xml forgot to copy bsh.jar. -
    • Minor fixes in the documentation. -
    - - -

    0.8.5

    -

    Date of release: 2003-03-23 -

    New features, improvements: -

      -
    • New built-in data loader directive: eval(JavaExpression) -
    -

    Bug fixes: -

      -
    • Fixes in the documentation. -
    - - -

    0.8.4

    -

    Date of release: 2003-03-21 -

    New features, improvements: -

      -
    • More documentation. Especially in the documentation of the command-line tool. -
    • New setting: replace extension -
    • Warning! Incompatible change! If the option remove-extension or remove-postfix is specified both in the configuration file and in the command-line, then the two option parameter values will be merged. -
    • Newer nightly build of FreeMarker 2.2 is included. -
    -

    Bug fixes: -

      -
    • The output file name deduction was applied twice in certain situations. -
    - - -

    0.8.3

    -

    Date of release: 2003-03-16 -

    New features, improvements: -

      -
    • bin/fmpp and bin\fmpp.bat now can load the FMPP realted jars from the ANT_HOME. -
    • Added install target to build.xml that copies the jars to the ANT_HOME.
    • -
    • More detailed installing instructions.
    • -
    -

    Bug fixes: -

      -
    • fmpp.FileUtil.compressPath has died with IndexOutOfBounds in rare cases. -
    • rar was missing from the list of static file extensions. -
    - - -

    0.8.2

    -

    Date of release: 2003-03-13 -

    New features, improvements: -

      -
    • Block assignments instead of @capture. For example, instead of <@capture local="foo">...</@capture> you can write <#local foo>...</#local>. -
    • New pp methods to calculate relative paths: pathTo and sourcePathTo.
    • -
    • fmpp.FileUtil.getRelativePath does no require anymore that the starting point is an ascendent directory of the destination. -
    • Newer nightly build of FreeMarker 2.2 is included (supports block assignments + bug fixes). -
    -

    Bug fixes: -

      -
    • fmpp.FileUtil.getRelativePath has returned bad results in some rare situations. -
    - - -

    0.8.1

    -

    Date of release: 2003-03-10 -

    New features, improvements: -

      -
    • Added "ignore CVS files" setting. -
    • Added xml_infoset example. -
    • Simplified build process. -
    • Some minor fixes in the html-s and txt-s. -
    • Newer nightly build of FreeMarker 2.2 is included. -
    • Warning! Incompatible change! ?chop was renamed to ?chop_linebreak (due the changes in the FreeMarker 2.2 CVS head) -
    • Warning! Incompatible change! CVS files (**/.cvsignore and **/CVS/) in the source directory will be ignored by default. -
    -

    Bug fixes: -

      -
    • The Manifest.mf in fmpp.jar was empty. -
    • Last-generated date was incorrect on the HTML pages. -
    - - -

    0.8.0

    -

    Date of release: 2003-03-05 -

    The initial Sourceforge release. - - -

    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/docs/writefrontend.html b/fmpp/docs/writefrontend.html deleted file mode 100644 index 9172386..0000000 --- a/fmpp/docs/writefrontend.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - -Writing New Front-ends - FMPP - - - - - - - - - - - - - - - -
    -

    Writing New Front-ends

    - -
    -
    - -

    Note: I'm talking about writing front-ends here, but of course the same technique can be used to embed FMPP into your application that you couldn't call a front-end.

    - -

    The low-level method is to create an fmpp.Engine object, and then set it up with its methods, and then call its process(...) method to execute a processing session. The API of this object reflects the internal architecture of FMPP. Higher-level concepts as settings or configuration files doesn't exist on this level. So I don't recommend you to work with fmpp.Engine objects directly.

    - -

    The high-level method is to create an fmpp.setting.Settings object, and fill it with the setting values. This object can load configuration files, and its API uses a higher level approach in general. This is the object where FMPP settings are implemented. After you set the setting values (and also you have added progress listeners and engine attributes you wanted), invoke Settings.execute() to execute a processing session.

    - -

    -FMPP architecture
    -
    Figure: The components involved in typical FMPP usage. Red arrow shows direct method invocation (or constructor invocation, or static field access) between the components. The arrow points from the caller towards the called. Dashed lines indicate unimportant or occasional access. - -

    - -

    Note that some settings are not implemented by Settings (as echoFormat, logFile, ...etc.), and should be implemented by the front-end.

    - -

    For more information, please see the API documentation. Also, you can look into the source code of fmpp.tools.CommandLine and fmpp.tools.AntTask.

    - -

    Example: Below is the source code of a very simple command-line front-end. It accepts one argument, the name of the configuration file to use. If that's omitted, it tries to load a configuration file from the current directory.

    - -
    package fmpp.testsuite;
    -
    -import java.io.File;
    -
    -import fmpp.ProcessingException;
    -import fmpp.progresslisteners.ConsoleProgressListener;
    -import fmpp.setting.SettingException;
    -import fmpp.setting.Settings;
    -import fmpp.util.MiscUtil;
    -import freemarker.log.Logger;
    -
    -public class AdhocFrontEnd {
    -    public static void main(String[] args) {
    -        // Parse command-line args
    -        File cfgFile = null;
    -        if (args.length == 0) {
    -            cfgFile = new File("."); // load the cfg. of the the current dir.
    -        } else if (args.length == 1) {
    -            cfgFile = new File(args[0]);
    -        } else {
    -            System.err.println(
    -                    "Usage: java AdhocFrontEnd [configuration-file]");
    -            System.exit(-1);
    -        }
    -
    -        // Shut FreeMarker logger up
    -        try {
    -            Logger.selectLoggerLibrary(Logger.LIBRARY_NONE);
    -        } catch (ClassNotFoundException e) {
    -            throw new RuntimeException(
    -                    "Failed to disable FreeMarker logging.");
    -        }
    -
    -        // Now comes the meat...
    -        try {
    -            Settings ss = new Settings(new File("."));
    -            ss.load(cfgFile);
    -            ss.addProgressListener(new ConsoleProgressListener());
    -            ss.execute();
    -            System.out.println("Done.");
    -        } catch (SettingException e) {
    -            System.err.println(MiscUtil.causeMessages(e));
    -            System.exit(-2);
    -        } catch (ProcessingException e) {
    -            System.err.println(MiscUtil.causeMessages(e));
    -            System.exit(-3);
    -        }
    -    }
    -}
    - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/fmpp/documentation.html b/fmpp/documentation.html deleted file mode 100644 index 372c346..0000000 --- a/fmpp/documentation.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - Redirecting... - - - -
    -
      -
      - Redirecting to the documentation... -
      -
    If nothing happens, click here: docs/index.html -
    - - - \ No newline at end of file diff --git a/fmpp/gulpfile.js b/fmpp/gulpfile.js deleted file mode 100644 index 49cf8fd..0000000 --- a/fmpp/gulpfile.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var path = require('path'); - -var gulp = require('gulp'); -var less = require('gulp-less'); -var rename = require('gulp-rename'); -var minifyCss = require('gulp-minify-css'); -var prefix = require('gulp-autoprefixer'); - -var SRC_DIR = path.join(__dirname, 'src', 'docs', 'style'); -var OUT_DIR = path.join(__dirname, 'build', 'docs', 'style'); - -gulp.task('styles', function() { - gulp.src(path.join(SRC_DIR, 'main.less')) - .pipe(less( )) - - // prefix - .pipe(prefix( { cascade: false, browsers: ['> 0%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1'], } ) ) - .pipe(gulp.dest(OUT_DIR)) - - // minify - .pipe(rename( { suffix: ".min" } )) - .pipe(minifyCss()) - .pipe(gulp.dest( OUT_DIR )) -}); - -gulp.task('default', ['styles']); \ No newline at end of file diff --git a/fmpp/lib/bsh.jar b/fmpp/lib/bsh.jar index 36fe03d..e326510 100644 Binary files a/fmpp/lib/bsh.jar and b/fmpp/lib/bsh.jar differ diff --git a/fmpp/lib/freemarker.jar b/fmpp/lib/freemarker.jar index 75edf6c..8fb169b 100644 Binary files a/fmpp/lib/freemarker.jar and b/fmpp/lib/freemarker.jar differ diff --git a/fmpp/lib/test/junit.jar b/fmpp/lib/test/junit.jar deleted file mode 100644 index c8f711d..0000000 Binary files a/fmpp/lib/test/junit.jar and /dev/null differ diff --git a/fmpp/package.json b/fmpp/package.json deleted file mode 100644 index 964bf35..0000000 --- a/fmpp/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "fmpp", - "version": "0.0.0", - "description": "FreeMarker-based file PreProcessor", - "repository": { - "type": "git", - "url": "https://github.com/freemarker/fmpp" - }, - "homepage": "http://fmpp.sourceforge.net", - "dependencies": { - "gulp": "^3.8.9", - "gulp-autoprefixer": "^1.0.1", - "gulp-less": "^1.3.6", - "gulp-minify-css": "^0.3.11", - "gulp-rename": "^1.2.0" - } -} diff --git a/fmpp/src/docs/LICENSE_ANT.txt b/fmpp/src/docs/LICENSE_ANT.txt deleted file mode 100644 index b279c7a..0000000 --- a/fmpp/src/docs/LICENSE_ANT.txt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 2000-2002 The Apache Software Foundation. All - * rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Ant" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation. For more information on the - * Apache Software Foundation, please see . - * - */ diff --git a/fmpp/src/docs/LICENSE_FREEMARKER.txt b/fmpp/src/docs/LICENSE_FREEMARKER.txt deleted file mode 100644 index 2ac874b..0000000 --- a/fmpp/src/docs/LICENSE_FREEMARKER.txt +++ /dev/null @@ -1,49 +0,0 @@ -Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -============================================================================== -END LICENSE - - -FreeMarker subcomponents with different copyright owners --------------------------------------------------------- - -FreeMarker, both in its source code and binary form (freemarker.jar) -includes a number of files that are licensed by the Apache Software -Foundation under the Apache License, Version 2.0. This is the same -license as the license of FreeMaker, but the copyright owner is the -Apache Software Foundation. These files are: - - freemarker/ext/jsp/web-app_2_2.dtd - freemarker/ext/jsp/web-app_2_3.dtd - freemarker/ext/jsp/web-app_2_4.xsd - freemarker/ext/jsp/web-app_2_5.xsd - freemarker/ext/jsp/web-jsptaglibrary_1_1.dtd - freemarker/ext/jsp/web-jsptaglibrary_1_2.dtd - freemarker/ext/jsp/web-jsptaglibrary_2_0.xsd - freemarker/ext/jsp/web-jsptaglibrary_2_1.xsd - - -Historical notes ----------------- - -FreeMarker 1.x was released under the LGPL license. Later, by -community consensus, we have switched over to a BSD-style license. As -of FreeMarker 2.2pre1, the original author, Benjamin Geer, has -relinquished the copyright in behalf of Visigoth Software Society. - -With FreeMarker 2.3.21 the license has changed to Apache License, -Version 2.0, and the owner has changed from Visigoth Software Society -to three of the FreeMarker 2.X developers, Attila Szegedi, Daniel -Dekany, and Jonathan Revusky. diff --git a/fmpp/src/docs/LICENSE_RESOLVER.txt b/fmpp/src/docs/LICENSE_RESOLVER.txt deleted file mode 100644 index b916c3e..0000000 --- a/fmpp/src/docs/LICENSE_RESOLVER.txt +++ /dev/null @@ -1,14 +0,0 @@ -Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with -this work for additional information regarding copyright ownership. -The ASF licenses this file to You under the Apache License, Version 2.0 -(the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/fmpp/src/docs/ant.html b/fmpp/src/docs/ant.html deleted file mode 100644 index 653394a..0000000 --- a/fmpp/src/docs/ant.html +++ /dev/null @@ -1,203 +0,0 @@ -<@page title="The Ant Task" keywords="ant, ant task"> - -<@sect title="Description"> - -

    If you need the FMPP Ant task in a project xml (<@c>build.xml), use the <@c>taskdef core task:

    - -<@prg> - -

    Then you can use the <@c><fmpp <@r>...> task further down. You may remember the 4th step of <@a href="qtour.html">Quick Tour. This is an Ant equivalent:

    - -<@prg><#noparse> - - - - - - - - - -

    Almost all parameters of the Ant task correspond to the <@a href="settings.html">FMPP settings. If the setting value is of scalar type (as string, boolean, number) then just enter the value simply with Ant-ish syntax, not with TDD syntax. If the setting value is of more tricky type, as hash or sequence, then use <@a href="tdd.html">TDD syntax for it. For hash settings the value is <@a href="tdd.html#modes">hash mode TDD, and for sequence setting it is sequence mode TDD, so the brackets should be omitted, as with <@s>data above.

    - -

    The <@a href="configfile.html#configurationBase">configuration base for the setting values given with Ant parameters is the Ant project base directory. That is, if you enter <@c>sourceRoot="src", then <@c>src is interpreted relatively to the project base directory.

    - -

    There is no parameter that directly corresponds to the <@s>sources setting. The sources are chosen with nested <@c><fileset>-style parameters and nested elements (as <@c>include and <@c>exclude). However, if you use the <@s>outputFile setting, you can't use <@c><fileset>-style stuff, and <@s>sources will be specified with the <@c>sourceFile parameter. - -

    Alternatively, the <@s>data, <@s>localData, <@s>borders, <@s>modes, <@s>turns, <@s>xmlRenderings and <@s>freemarkerLinks settings can be specified with nested elements instead of parameters. For example, this is equivalent with the above example:

    - -<@prg><#noparse> - - - - - - - tdd(data/style.tdd) - birds: csv(data/birds.csv) - - - - - - -

    This can be useful, if the setting value is long. The content of the element can be a CDATA section, which is useful if the setting value contains HTML or XML fragments. Unlike with attributes, Ant property interpolations (<@c>$${"{foo}"}) in the text are not expanded, unless you force that with the <@c>expandProperties attribute of the element (<@c><data expandProperties="yes"><@r>...).

    - -

    About the support and interpretation of FMPP settings:

    -
      -
    • The values of settings <@s>ignoreCvsFiles, <@s>ignoreSvnFiles and <@s>ignoreTemporaryFiles are always set to <@c>false, and there is no Ant task parameter for them. This is so that they don't interfere with Ant's standard <@c>defaultExcludes parameter.
    • -
    • Settings <@s>echoFormat, <@s>printStackTrace, <@s>snip and <@s>columns are ignored, and there is no Ant task parameter for them.
    • -
    • The <@s>quiet setting implements only grades <@c>true and <@c>false. <@c>reallyQuiet is the same as <@c>true.
    • -
    • All <@a href="settings.html#logging">logging related settings are supported.
    • -
    - -

    To access the Ant properties and other Ant specific data in the templates, you can use data loaders such as <@c>antProperty(), <@c>antProperties(), <@c>antProject() and <@c>antTask(). Read the <@a href="dataloader.html">chapter about data loaders for more details.

    - - - - -<@sect title="Parameters"> - -

    The FMPP task accepts the following parameters:

    -
      -
    • <@a href="settings.html">All FMPP settings except <@s>sources, <@s>ignoreCvsFiles, <@s>ignoreSvnFiles, <@s>ignoreTemporaryFiles, <@s>echoFormat, <@s>printStackTrace, <@s>snip and <@s>columns. If the setting value is of scalar type (as string, boolean, number) then just enter the value simply with Ant-ish syntax, not with TDD syntax. If the setting value is of more tricky type, as hash or sequence, then use TDD syntax for it. For hash settings the value is hash mode TDD, and for sequence setting it is sequence mode TDD, so the brackets should be omitted. The <@a href="configfile.html#configurationBase">configuration base for the setting values is the Ant project base directory.
    • - -
    • To follow the Ant conventions, <@c>srcdir and <@c>destdir attribute names can be optionally used instead of <@c>sourceRoot and <@c>outputRoot attribute names. These are just alias names.
    • - -
    • Configuration file handling: -
        -
      • <@c>configuration: Loads a <@a href="configfile.html">configuration file. The setting values given with the parameters has higher precedence.
      • - -
      • <@c>configurationBase: Emulates that <@s>configurationBase meta setting is present in configuration file with the given value.
      • - -
      • <@c>inheritConfiguration: Emulates that <@s>inheritConfiguration meta setting is present in configuration file with the given value.
      • -
      -
    • - -
    • Ant <@c><fileset>-style attributes (see the Ant documentation for more details). Used for specifing the value of the <@s>sources setting: -
        -
      • <@c>dir: The directory that the patterns are relative to. If this attribute is omitted, then the FMPP source root will be used as the base. Note that regardless of the value of this attribute, all source files must be inside the source root. -
      • <@c>casesensitive: Sets case sensitivity of the file names. (Same as the FMPP setting) -
      • <@c>defaultexcludes: Indicates whether default excludes should be used or not (<@c>"yes" or <@c>"no"); default excludes are used when omitted. -
      • <@c>excludes: comma- or space-separated list of patterns of files that must be excluded; no files (except default excludes) are excluded when omitted. -
      • <@c>excludesfile: the name of a file; each line of this file is taken to be an exclude pattern. -
      • <@c>followsymlinks: Shall symbolic links be followed? Defaults to true. -
      • <@c>includes: Comma- or space-separated list of patterns of files that must be included; all files are included when omitted. Note that be default all files of the source root directory are included. -
      • <@c>includesfile: The name of a file; each line of this file is taken to be an include pattern. -
      -
    • - -
    • <@c>sourceFile: It can be used only if the <@s>outputFile setting is specified. It specifies the value of the <@s>sources setting, as a simple string (not a comma separated list) that specifies the path of a single file. <@c><fileset>-style attributes/elements will be ignored.
    • - -
    • <@c>antTaskFailOnError: Specifies if the Ant task should fail if there were errors during the execution of the processing session. Defaults to <@c>true. It has nothing to do with the <@s>stopOnError setting. If this parameter is <@c>true, the Ant task will fail if there were any failed file processing during the processing session, even if it was skipped because <@s>stopOnError was <@c>true (so the session wasn't aborted). If this parameter is <@c>false, then the Ant task will be successful regardless of the failed file processings or other errors during the processing session, even if the processing session was aborted. But, it never suppresses errors occurred during the initialization of the FMPP engine (i.e. errors occurred before the processing session could be stated).
    • -
    - -

    Either the <@c>configuration parameter, or <@c>sourceRoot+<@c>outputRoot parameters, or <@c>sourceFile+<@c>outputFile parameters are required. All other parameters are optional. When you use <@c>configuration, any Ant task parameters can become optional, when the value of the coressponding settings are given in the configuration file.

    - -

    <@e>Attention! When you specify the <@s>sources setting in a configuration file, its value will be added to the set of files and directories that the Ant task itself selects, which is, following the Ant tradition, by default all files and directories inside the source root. Thus, usually you will want to exclude all files in the Ant task, so only those specified in the configuration file will remain: -<@prg> - - - - - - -<@sect title="Nested elements"> - -

    The FMPP task accepts the following nested elements: -

      -
    • Elements for attribute substitution: Using these elements is the same as if you were use the attributes (parameters) with the same name, and with the same value as the nested text (or CDATA section) of the elements. Ant property values (<@c>$${"{foo}"}) are not expanded by default, but you can override this with a <@c>expandProperties="yes" attribute. Note that you etiher give a certain setting with attribute, or with element, but not both. -
        -
      • <@c>data -
      • <@c>localData -
      • <@c>borders -
      • <@c>modes -
      • <@c>turns -
      • <@c>xmlRenderings -
      • <@c>freemarkerLinks -
      -
    • <@c><fileset>-style elements (see the Ant documentation for more details): -
        -
      • <@c>patternset -
      • <@c>include: Note that be default all files inside the source root directory are included. -
      • <@c>exclude -
      • <@c>includesfile -
      • <@c>excludesfile -
      -
    - - - - -<@sect title="Examples"> - -

    Run processing session with the settings stored in <@c><@r><projectBaseDir>/config.fmpp (or <@c>fmpp.cfg):

    -<@prg><#noparse> - - - -

    As the previous, but override <@s>outputEncoding:

    -<@prg><#noparse> - - - -

    Processes all files in <@c>src/www and stores the output in <@c>build/www:

    -<@prg><#noparse> - - - -

    Same as the previous, but processes files with extension <@c>ftl only:

    -<@prg><#noparse> - - - -

    Same as the previous:

    -<@prg><#noparse> - - - - - -

    Run processing session with the settings stored in <@c><@r><projectBaseDir>/src/wwwconfig.fmpp, but process files with extension <@c>ftl only:

    -<@prg><#noparse> - - - -

    Processes a single file:

    -<@prg><#noparse> - - - -

    Exposes Ant properties <@c>foo, <@c>bar and <@c>baaz for the templates:

    -<@prg><#noparse> - - - -

    Just to show something more complex...:

    -<@prg><#noparse> - - ', '', **/*.ftl) - ]]> - - bgColor: white - fgColor: black - antProps: antProperties() - - - - - - - diff --git a/fmpp/src/docs/bsh.html b/fmpp/src/docs/bsh.html deleted file mode 100644 index c4b8410..0000000 --- a/fmpp/src/docs/bsh.html +++ /dev/null @@ -1,12 +0,0 @@ -<@page title="BeanShell language" keywords="BSH, BeanShell"> - -

    From the BeanShell documentation: "BeanShell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. BeanShell executes standard Java statements and expressions but also extends Java into the scripting domain with common scripting language conventions and syntax." So if you know Java programming language, and already used some scripting languages, you will find it quite easy to learn and use. For more information, please visit: http://www.beanshell.org/

    - -

    In FMPP, BeanShell is used for: -

      -
    • Creating Java objects to be used in setting values. For example when the <@s>data setting used together with the <@c>eval data loader. -
    • Pre-processing data for individual templates. See the <@s>localData setting and its <@c>bsh function. -
    • Accessing Java classes and objects from FTL templates, using the <@c>pp.loadData directive with the <@c>eval data loader. -
    - - diff --git a/fmpp/src/docs/checklinks_T3.ftl b/fmpp/src/docs/checklinks_T3.ftl deleted file mode 100644 index ffe9419..0000000 --- a/fmpp/src/docs/checklinks_T3.ftl +++ /dev/null @@ -1,13 +0,0 @@ -<@pp.dropOutputFile/> - -<#list pp.s.hrefs as href> - <#if !pp.outputFileExists(href.file)> - <@pp.warning message='Broken link "${href.href}" in "${href.source}": target file not found.' /> - <#else> - <#if href.anchor != '' && !href.file?starts_with('freemarker/') && !href.file?starts_with('api/')> - <#if !pp.s.anchors[href.file + '#' + href.anchor]??> - <@pp.warning message='Broken link "${href.href}" in "${href.source}": target anchor not found in the target file.' /> - - - - \ No newline at end of file diff --git a/fmpp/src/docs/commandline.html b/fmpp/src/docs/commandline.html deleted file mode 100644 index fd98f48..0000000 --- a/fmpp/src/docs/commandline.html +++ /dev/null @@ -1,378 +0,0 @@ -<@page title="The Command-line Tool" keywords="command-line tool"> - -<@sect title="Basic usage" anchor="cmdln_basics"> - -

    FMPP can work in two modes: as a recursive directory processor, or as single file processor.

    - -

    When you're using it as recursive directory processor, it needs a source root directory and an output root directory. It processes all files inside the source root (including the files in its subdirectories), and writes the processed files into the output root directory with similar path as in the source root (that is, the output of <@c><@r><source-root>/foo/bar.txt will be <@c><@r><output-root>/foo/bar.txt. If <@c>/home/me/sample-project/src is the source root and <@c>/home/me/sample-project/out is the output root, then you issue:

    - -<@prg>fmpp -S /home/me/sample-project/src -O /home/me/sample-project/out - -

    It's possible to tell FMPP to process only certain files and/or directories of the source root directory:

    - -<@prg>fmpp -S /home/me/sample-project/src -O /home/me/sample-project/out index.html foo/bar.txt somedir - -

    Note that these paths are interpreted relatively to the source root directory, not to the current working directory.

    - -

    When you use FMPP as single file processor, you specify a single input file, and then an output file with the <@c>-o option. It's the <@c>-o option is what triggers single file mode.

    - -<@prg>fmpp /home/me/file-to-process.txt -o /home/me/processed-file.txt - -

    In single file mode, the source root and output root directory defaults to the directory of source and output files respectively. (It has significance for example if the source file wants to include another file), but you can override them with the <@c>-S and <@c>-O switches. The source file and output file path is always interpreted relatively to the current working directory.

    - -

    It's often more convenient and manageable to use a project configuration file instead of entering everything as command-line arguments. For example, create file <@c>config.fmpp with this content:

    - -<@prg> -sourceRoot: src -outputRoot: out -logFile: fmpp.log -modes: [ ignore(tmp/), copy(**/*.dwg, bin/) ] -data: { - contact: me@example.com - clients: csv(data/clients.csv) -} - - -

    then use it as:

    - -<@prg>fmpp -C /home/me/sample-project/config.fmpp - -

    or since <@c>config.fmpp is the default configuration file name, you can simply issue:

    - -<@prg>fmpp -C /home/me/sample-project - -

    or if you are in the same directory as <@c>config.fmpp then just issue:

    - -<@prg>fmpp - -

    Note that paths in the configuration file are resolved relatively to the configuration file's directory, so it doesn't mater where do you invoke it from. Also note that you can override the settings stored in the configuration file with the command line:

    - -<@prg>fmpp -C /home/me/sample-project/config.fmpp -O other/destination - -

    Much of what should be known about FMPP is not specific to its command line interface, so look around in the Table of Contents for more information!

    - - - - -<@sect title="Command-line argument syntax primer" anchor="cmdln_syntax_primer"> - -

    This section is for users who are not too familiar with using the command-line. No FMPP specific information can be found here, so you may <@a href="#fmpp_cmdline">skip to the next section.

    - -

    The exact command-line syntax depends on what shell do you use (sh, csh, DOS shell, etc.), because the shell is responsible to split the command-line to an executable name and a list of arguments. FMPP just gets the list from the shell.

    - -

    Most shells will parse this command-line:

    - -<@prg>test -f t 1.txt 2.txt - -

    as the executable name is <@c>test, and the list of arguments is:

    - -
      -
    1. <@c>-f -
    2. <@c>t -
    3. <@c>1.txt -
    4. <@c>2.txt -
    - -

    As you may guess, the arguments are delimited by the spaces. If you want to put spaces into the value of arguments, in most shells you should use quotation marks:

    - -<@prg>test -f t -D "x:1, y:2" - -

    Here, the list of arguments will be:

    - -
      -
    1. <@c>-f -
    2. <@c>t -
    3. <@c>-D -
    4. <@c>x:1, y:2 -
    - -

    The shell has removed the quotation marks. Thus, command-line tools like FMPP will not know that there were quotation marks, as they just gets the above list from the shell.

    - -

    With shells as sh, you can use apostrophe-quotes (<@c>') instead of quotation marks. In Windows/DOS shell you can use quotation marks (<@c>") only.

    - -

    You have to quote the argument if you use characters that are reserved by the shell for other purposes. For example <@c>> and <@c>| is reserved in most shells. <@c>&, <@c>; and <@c>( is reserved in sh. Also, if you use an UN*X shell, sometimes you need to quote arguments that contain <@c>*, <@c>? or <@c>~, because otherwise the shell interprets the argument as a path, and replaces that with the list of matching files.

    - -

    Most shells understand partially quoted arguments. For example:

    - -<@prg>test -D"x:1, y:2" - -

    will be interpreted as:

    - -
      -
    1. <@c>-Dx:1, y:2 -
    - -

    A tricky situation is when you want to use quotation marks in an argument value. To prevent this situations use apostrophe-quotes instead of plain quotes and vice versa. For example:

    - -<@prg>test -D"x:'red led', y:2" - -

    or (will not work in Windows/DOS shell!):

    - -<@prg>test -D'x:"red led", y:2' - - - - -<@sect title="FMPP command-line argument syntax" anchor="fmpp_cmdline"> - -

    The FMPP command-line tool uses similar argument syntax to usual UN*X command-line tools, such as <@c>ls. UN*X users should be able to use the tool even without reading this section.

    - -

    This is a possible FMPP command-line:

    - -<@prg>fmpp -C mycfg.fmpp -q --case-sensitive products index.html - -

    The FMPP command-line tool interprets command-line arguments as either:

    -
      -
    • Option, as <@c>-q, <@c>--case-sensitive and <@c>-C mycfg.fmpp -
    • Non-option, as <@c>products and <@c>index.html -
    - -

    An option always starts with dash (<@c>-), or with double dash. (<@c>--), followed by the name of the option (e.g. <@c>q, <@c>C, <@c>case-sensitive). If the option requires parameter, then it is followed by the parameter to the option (as <@c>mycfg.fmpp in <@c>-C mycfg.fmpp), which counts as the part of the option, not as non-option.

    - -

    If the option uses single dash, then the name of the option is exactly 1 character long; this is called short form. If the option uses double dash, then the name can be arbitrary long; this is called long form. All options have long form, and many options have both long and short form versions, which are equivalent (for example <@c>-q and <@c>--quiet). Short form options can be grouped together, for example you can write
    <@c>-qxs
    instead of
    <@c>-q -x -s

    - -

    Some options require a parameter. To demonstrate the syntactical rules with examples, here are the valid ways to give <@c>cp852 as parameter to option <@c>-E alias <@c>--source-encoding:

    - -
      -
    • <@c>-E cp852: here the parameter was the next argument after the option -
    • <@c>-Ecp852: here I have utilized that a short option name is always 1 character long, and thus, since <@c>-E require parameter, the rest of this argument will be interpreted as the parameter of the option. (Note, that because if this, grouping (as <@c>-qxs) will not work if an option in the group, other than the very last option, requires parameter.) The next argument of the command-line will not be interpreted as parameter to <@c>-E. -
    • <@c>-E=cp852: This is similar to the latest, but the option name and parameter value is separated with <@c>= -
    • <@c>--source-encoding cp852 -
    • <@c>--source-encoding=cp852 -
    - -

    I didn't show the combinations like <@c>-E="cp852", as the usage of quotation marks is shell dependent. See <@a href="#cmdln_syntax_primer">the section about using the command-line for more information.

    - -

    The order in which options occur in the command-line argument list is not significant.

    - -

    Options are case sensitive. This means that <@c>-c and <@c>-C are not the same.

    - -

    Any argument that does not start with dash and is not directly after an option that needs parameter, is a non-option. In FMPP, non-options are used to list the name of the files or directories that you want to process; see more about this later. The position of a non-option in the argument list relatively to the options is not significant. That is, these command-line argument lists are equivalent:

    - -
      -
    • <@c>-C mycfg.fmpp -q products index.html -
    • <@c>products index.html -C mycfg.fmpp -q -
    • <@c>products -C mycfg.fmpp index.html -q -
    - -

    Sometimes it happens that a non-option should start with dash (for example, because the name of the file you want to refer to starts with dash). In this case you can use a special character sequence, <@c>-- followed by no option name, to indicate that all subsequent arguments are non-options:

    - -<@prg> -fmpp -Cmycfg.fmpp -- -this-is-a-non-option - - - - - -<@sect title="Invoking the command-line tool"> - -

    The command-line tool can be invoked with the <@c>fmpp shell script (<@fmppPath path="bin/fmpp" /> or <@fmppPath path="bin/fmpp.bat" />), assuming you have <@a href="installing.html#commandLineTool">installed it properly.

    - -

    When you invoke this tool, it will immediately run a processing session, with the settings you have set with its arguments (see later how), and then terminates. (With some command-line options, however, it will do something else, as with <@c>-h it just prints help.)

    - - - - -<@sect title="Specifying settings in the command-line"> - -

    Most command-line options specify <@a href="settings.html">FMPP settings. The option name is the name of the setting, but with lower case dashed form (as <@c>source-root) instead of the usual mixed case form (as <@c>sourceRoot). The value of the setting is given as the parameter of the option. The <@a href="configfile.html#configurationBase">configuration base for the values is the current working directory (i.e. the directory you are in).

    - -

    Example: Runs a processing session with <@s>sourceRoot set to <@c>src and <@s>outputRoot set to <@c>out (so this will process all files in the <@c>src directory, and store the output in the <@c>out directory):

    - -<@prg>fmpp --source-root src --output-root out - -

    For the most frequently used settings there is short option name too. For example, this is equivalent with the previous example:

    - -<@prg>fmpp -S src -O out - -

    If the setting value is of scalar type (as string, boolean, number) then just enter the value simply as is, not with TDD syntax. If the setting value is of more tricky type, as hash or sequence, then you use TDD syntax for it. For hash settings the value is a <@a href="tdd.html#modes">hash mode TDD, and for sequence setting it is sequence mode TDD, so the brackets should be omitted. For example:

    - -<@prg>fmpp -S src -O out -D "online:false, tdd(data/style.tdd)" --replaceExtensions "ftl, html" - -

    Note that the quotation marks were needed only for the command-line parser of the shell (see earlier on this page), so they are not visible for FMPP.

    - -

    Boolean settings (and <@s>quiet) are specified with parameterless options:

    - - - - - - - - - - - - - - - - - - - - - - - -
    Command-line option - Meaning -
    Setting name - Value -
    <@c>-s, <@c>--stop-on-error - <@s>stopOnError - <@c>true -
    <@c>-c, <@c>--continue-on-error - <@s>stopOnError - <@c>false -
    <@c>--case-sensitive - <@s>caseSensitive - <@c>true -
    <@c>--ignore-case - <@s>caseSensitive - <@c>false -
    <@c>--ignore-cvs-files - <@s>ignoreCvsFiles - <@c>true -
    <@c>--dont-ignore-cvs-files - <@s>ignoreCvsFiles - <@c>false -
    <@c>--ignore-svn-files - <@s>ignoreSvnFiles - <@c>true -
    <@c>--dont-ignore-svn-files - <@s>ignoreSvnFiles - <@c>false -
    <@c>--ignore-temporary-files - <@s>ignoreTemporaryFiles - <@c>true -
    <@c>--dont-ignore-temporary-files - <@s>ignoreTemporaryFiles - <@c>false -
    <@c>--print-stack-trace - <@s>printStackTrace - <@c>true -
    <@c>--dont-print-stack-trace - <@s>printStackTrace - <@c>false -
    <@c>-x, <@c>--expert - <@s>expert - <@c>true -
    <@c>--not-expert - <@s>expert - <@c>false -
    <@c>--append-log-file - <@s>appendLogFile - <@c>true -
    <@c>--dont-append-log-file - <@s>appendLogFile - <@c>false -
    <@c>-q, <@c>--quiet - <@s>quiet - <@c>true -
    <@c>-v, <@c>--verbose - <@s>quiet - <@c>false -
    <@c>-Q, <@c>--really-quiet - <@s>quiet - <@c>reallyQuiet -
    - -

    Example:

    - -<@prg>fmpp -S src -O out --dont-ignore-cvs-files -cqx - -

    where the last few options mean: <@s>ignoreCvsFiles is <@c>false, <@s>stopOnError is <@c>false, <@s>quiet is <@c>true, <@s>expert is <@c>true.

    - -

    The value of the <@s>sources setting can be given as the non-option arguments to the tool. For example, to process only files <@c>index.html and directory <@c>products of the source root:

    - -<@prg>fmpp -S src -O out index.html products - -

    Notes for Windows users:

    -
      -
    • In paths you can optionally use slash (<@c>/) instead of backslash (<@c>\) anywhere.
    • -
    • You can't use <@c>* and <@c>? in paths (except in settings that explicitly want <@a href="pathpattern.html">path patterns, e.g. <@s>modes)
    • -
    - - - - -<@sect title="Using configuration files"> - -

    With option <@c>--configuration or <@c>-C you can load a configuration file. As you may know it <@a href="configfile.html">from the chapter about configuration files, it is enough to give the directory of the configuration file, if the file uses one of the standard names. Example:

    - -<@prg>fmpp -C works/project1 - -

    If you don't use option <@c>--configuration/<@c>-C, <@c>fmpp will look for a configuration file in the current working directory, and if it finds one with standard name, it will load that automatically. To prevent this, use <@c>--configuration/<@c>-C with <@c>none parameter (as <@c>-C none).

    - - -

    Settings loaded from the configuration file have lower priority than settings given as command-line arguments. For example, here you add an extra variable to the <@s>data specified in the configuration file, or if variable <@c>online was already created there then replace its value:

    - -<@prg>fmpp -C works/project1 -D online:true - -

    Options <@c>configurationBase and <@c>inheritConfiguration can be used to emulate that settings <@s>configurationBase and <@s>inheritConfiguration are present with the given value in the configuration file.

    - - - - -<@sect title="Global options" anchor="fmpprc"> - -

    The default of some settings that can't influence the output files can be set in a configuration file called <@c>.fmpprc. This file is searched in these directories, in this order:

    -
      -
    1. In your home directory.
    2. -
    3. On Windows, in the directory pointed by the <@c>HOME environment variable.
    4. -
    5. In the directory pointed by the <@c>FMPP_HOME environment variable. This is usually automatically set to the directory where you have installed FMPP.
    6. -
    - -

    Only the first <@c>.fmpprc found will be loaded.

    - -

    The settings you can set in the <@c>.fmpprc are:

    -
      -
    • <@s>appendLogFile
    • -
    • <@s>columns
    • -
    • <@s>echoFormat
    • -
    • <@s>printStackTrace -
    • <@s>quiet
    • -
    • <@s>snip: Deprecated, now just an inverted alias of <@s>printStackTrace
    • -
    - - - - -<@sect title="Supported front-end dependent settings"> - -

    All <@a href="settings.html#logging">logging related settings are supported.

    - -

    All recommended <@s>echoFormat-s are supported, but <@c>verbose is the same as <@c>normal. It depends on the terminal implementation you use, but <@c>terse echo format can substantially speed up the processing session if you have many files.

    - -

    All <@s>quiet values are supported.

    - - - - -<@sect title="List of all options"> - -

    The complete list of command-line options with brief description is included further below in the output of <@c>fmpp -h. -Almost all options correspond to FMPP settings; see the <@a href="settings.html">complete descriptions of FMPP settings here.

    - -
    -${pp.loadData('eval', '
    -    StringWriter sw = new StringWriter();
    -    PrintWriter pw = new PrintWriter(sw);
    -    
    -    r = fmpp.tools.CommandLine.execute(
    -        new String[]{"-h", "--columns", "110"},
    -        pw,
    -        new PrintWriter(fmpp.util.NullWriter.INSTANCE));
    -    if (r != 0) {
    -        throw new Exception("CommandLine.execute exited with code " + r);
    -    }
    -    
    -    pw.close();
    -    return sw.toString();
    -')}
    -
    - - - - diff --git a/fmpp/src/docs/configfile.html b/fmpp/src/docs/configfile.html deleted file mode 100644 index 5b95fba..0000000 --- a/fmpp/src/docs/configfile.html +++ /dev/null @@ -1,106 +0,0 @@ -<@page title="Configuration Files" keywords="configuration file"> - -<@sect title="Basics"> - -

    Configuration files are text files that store setting values. They can use two syntaxes (two formats):

    -
      -
    • <@a href="tdd.html">TDD: This is the preferred format.
    • -
    • <@a href="properties.html">Java "Properties": This is mostly supported for backward compatibility with the FMPP 0.8.X series.
    • -
    - -

    The syntax that a configuration file uses is detected with the file extension. For "properties" configuration files, the file extension must be <@c>cfg or <@c>properties. For TDD files, the preferred file extension is <@c>fmpp, but it can be anything but <@c>cfg and <@c>properties.

    - -

    When you want to load a configuration file, you specify the path of the file for the front-end somehow (read <@a href='frontends.html'>the documentation of the front-end). But if the configuration file name is one of these standard names:

    -
      -
    • <@c>config.fmpp
    • -
    • <@c>fmpp.cfg
    • -
    - -

    then it is enough to give the path of the directory that contains the configuration file. (<@c>config.fmpp has higher priority if both file is present.)

    - - - - -<@sect title="The configuration base" anchor="configurationBase"> - -

    The configuration base is the directory used as base for resolving relative <@a href="overview.html#realPath">real paths in setting values. Be default, the configuration base is the directory that contains the configuration file. For example, if <@c>/home/me/project1/config.fmpp contains <@c>sourceRoot: src, then the <@s>sourceRoot will be <@c>/home/me/project1/src.

    - -

    The configuration base can be changed with the <@s>configurationBase meta setting. For example, if in the previous example <@c>config.fmpp contains <@c>configurationBase: ../project2, then the <@s>sourceRoot will be <@c>/home/me/project2/src. The <@s>configurationBase setting applies only for the setting values specified in the same file it is stored in.

    - -

    Not all relative paths in settings are resolved relatively to the <@s>configurationBase. Relative <@a href="overview.html#virtualPath">virtual paths, for example, are relative to the <@s>sourceRoot or <@s>outputRoot. Relative paths of data files passed to data loaders are relative to the <@s>dataRoot.

    - -

    If the setting value comes not from a configuration file (such as from a command-line argument), then the front-end specifies what the configuration base is for that setting value (see the documentation of the front-end).

    - - - - -<@sect title="Configuration inheritance" anchor="inheritance"> - -

    A configuration file can inherit setting values from another configuration file, with the <@s>inheritConfiguration meta setting. When the FMPP core loads a configuration file, and it finds <@s>inheritConfiguration setting in it, it will automatically load that configuration file too, and then merge its settings with the settings loaded from the inheriting (the first) configuration file. The settings stored in the inheriting configuration file have higher priority than the settings stored in the inherited configuration file. Thus, if both file contains the same setting, then the value stored in the inheriting file will be used, or it will be merged with the other value if the setting supports merging.

    - -

    The above description is applicable recursively. That is, an inherited configuration file can inherit another configuration file, and that can inherit yet another configuration file, and so on.

    - -

    <@a href="settings.html#metaSettings">Meta settings (as <@s>inheritConfiguration and <@s>configurationBase) are never inherited. They influence only the file where they are actually present.

    - -

    A possible usage of configuration inheritance is to customize a common configuration file. See: <@example path='inherit_config' />.

    - - - - -<@sect title="Configuration files with TDD syntax"> - -

    These files start in TDD hash mode. For example:

    - -<@prg> -sourceRoot: src -outputRoot: out -data: {tdd(data/style.tdd), birds:csv(data/birds.csv)} -removeExtensions: [ftl, t2] -datetimeFormat: "MMM d, yyyy hh:mm a zzz" -caseSensitive - - -

    According the TDD syntax, values of type sequence (as <@s>removeExtensions) was put into square brackets. However, for sequence settings, if the sequence would contain exactly 1 element, then you can just give that element directly:

    - -<@prg> -removeExtensions: ftl - - -

    and the value will be automatically converted to a sequence that contains the a single string <@c>ftl, as it is known that <@s>removeExtensions must be a sequence. This is a feature of the setting handling mechanism, not TDD, so don't try to use this trick elsewhere.

    - -

    TDD configuration files always use ISO-8859-1 encoding, if there is no other encoding suggested in the file with <@a href="tdd.html#encoding">TDD's encoding comment.

    - -

    For more information about TDD, please read <@a href="tdd.html">the chapter about TDD.

    - - - - -<@sect title='Configuration files with "properties" syntax'> - -

    <@e>Attention: "properties" configuration files must use <@c>cfg or <@c>properties file extension.

    - -

    This is the previous example configuration file with "properties" format:

    - -<@prg> -sourceRoot = src -outputRoot = out -data = tdd(data/style.tdd), birds:csv(data/birds.csv) -removeExtensions = ftl, t2 -datetimeFormat = MMM d, yyyy hh:mm a zzz -caseSensitive - - -

    The differences to TDD configuration files are:

    -
      -
    • It uses <@a href="properties.html">"properties" syntax...
    • -
    • The values do not use TDD syntax, except for composite types as hashes and sequences. For example, the value of <@s>datetimeFormat is not quoted (in TDD it was, as the string contains spaces and coma), it is just entered directly.
    • -
    • The <@c>{ and <@c>} for the <@s>data hash and the <@c>[ and <@c>] for the <@s>removeExtensions sequence is omitted. This is because the value of a hash setting is parsed as hash mode TDD, and the value of a sequence setting is parsed as sequence mode TDD, so the brackets are implied.
    • -
    • For boolean settings, empty-string is considered as <@c>true (see the line that sets <@s>caseSensitive).
    • -
    • Setting names can be written with lower case dashed form (as <@s check=false>output-root) instead of mixed case (as <@s>outputRoot). This is for backward compatibility with FMPP 0.8.X, where configuration files were use to store options to the command-line tool. The two forms can be used mixed in the same configuration file.
    • -
    - -

    Otherwise "properties" configuration files work in the same way as TDD configuration files. For example, they can inherit an other configuration file. It is not a problem if a "properties" configuration file inherits TDD configuration file or the opposite.

    - - - - diff --git a/fmpp/src/docs/dataloader.html b/fmpp/src/docs/dataloader.html deleted file mode 100644 index dc4d1e3..0000000 --- a/fmpp/src/docs/dataloader.html +++ /dev/null @@ -1,604 +0,0 @@ -<@page title="Data Loaders" keywords="data loader"> - -<@sect title="Introduction"> - -

    Data loaders are Java objects that load data from certain type of data source, such as a CSV file or MySQL data-base, and expose the data as variables for the templates. For example, a data loader was invoked in the <@a href="qtour.html">Quick Tour when you have written <@c>csv(data/birds.csv).

    - -

    Data loaders are typically invoked: -

      -
    • ... by <@a href="tdd.html">TDD functions used in the <@s>data setting -
    • ... by TDD functions used in the <@s>localData setting -
    • ... by the <@a href="pphash.html#key_loadData">pp.loadData method used in FreeMarker templates -
    - - - - -<@sect title="Predefined data loaders"> - -

    Data loaders that load data directly from files will want you to give the path of the file as parameter. There you have to give <@a href="overview.html#realPath">real path. If you give a relative path, then it will be interpreted relatively to the <@s>dataRoot, which defaults to the <@s>sourceRoot if you didn't specified it. The data files can be outside the <@s>dataRoot directory; it is used only as a base directory.

    - -<@note>I have not written a database/SQL/JDBC data loader yet... Of coruse, you can write a such data loader yourself. Contributions are welcome! - -<@dataLoader name="csv"> - <@param name="path" type="string">The path of the CSV file. - <@param name="options" type="hash" optional=true>The list of valid options: -
      -
    • <@c>separator: The character that separates the columns. Defaults to <@c>";". It can be any character. It also understands the string <@c>"tab", which means that the separtor character will be the tab character.
    • - -
    • <@c>encoding: The charset used for reading CSV file. Defaults to the value of the <@s>sourceEncoding setting.
    • - -
    • <@c>trimCells: Specifies if all cells will be trimmed (boolean). Trimming means the removal of all leading and trailing white-space. Defaults to no trimming (in which case only header cells are trimmed). <@e>For tables directly entered by humans (like in Excel) it is strongly recommended to turn this on. - -
    • <@c>decimalSeparator: Alternative character used for the decimal dot in the CSV files. The dot will be always assumed as decimal separator, except if <@c>groupingSeparator is set to dot. Note that this option has significance only if you use <@c>:n (or <@c>:number) in the headers, so the data loader has to interpret the text as numbers.
    • - -
    • <@c>groupingSeparator: The character used for grouping symbol in the CSV file (as the coma in $20,000,000). Be default, grouping is not allowed. Note that this option has significance only if you use <@c>:n (or <@c>:number) in the headers.
    • - -
    • <@c>altTrue: Alternative word interpreted as boolean true. Note that this option has significance only if you use <@c>:b (or <@c>:boolean) in the headers, so the data loader has to parse the text as booleans.
    • - -
    • <@c>altFalse: Alternative word interpreted as boolean false. Note that this option has significance only if you use <@c>:b (or <@c>:boolean) in the headers.
    • - -
    • <@c>emptyValue: A string or a sequence of strings which define the values that are equal to an empty cell. For example, if this is <@c>["-", "N/A"], then cells whose content is a minus sign or N/A will look like they were left empty. The comparison is case-sensitive. The header row is not affected by this option. - -
    • <@c>dateFormat: The pattern used for parsing date-only values. Note that this option has significance only if you use <@c>:d (or <@c>:date) in the headers.
    • - -
    • <@c>timeFormat: The pattern used for parsing time-only values. Note that this option has significance only if you use <@c>:t (or <@c>:time) in the headers.
    • - -
    • <@c>dateTimeFormat: The pattern used for parsing date-time values. Note that this option has significance only if you use <@c>:dt (or <@c>:dateTime) in the headers.
    • - -
    • <@c>normalizeHeaders: Specifies if the header names coming from the file will be normalized - or should be left as is (boolean). Normalization means: -
        -
      1. Remove the part between the first <@c>"(" and last - <@c>")", before the header is parsed for column type - identifier (like <@c>":n"; column type identifiers are discussed somewhere later). -
      2. After the type identifier was extracted and removed, the cell value is trimmed. (Note that this happens even if this option is off.) -
      3. Then it's converted to lower case. -
      4. Then the following characters are replaced with <@c>"_": - space, comma, semicolon, colon.
      5. Then all <@c>"__" - and <@c>"___" and so on is replaced with a single - <@c>"_". -
      - For example, <@c>"Price, old (category: A, B, F): n" will be normailzed to <@c>"price_old", and the column type identifier will be <@c>n. -
    • - -
    • <@c>headers: Use this if the CSV file has no header row, that is, if the first row doesn't store column names. The option value must be a sequence of strings. Each item in the sequence corresponds to a cell value of the imaginary (actually missing) header row, and will be parsed on the same way as a real header row would be.
    • - -
    • <@c>replaceHeaders: Use this if the CSV file does have a header row, but you don't like/trust the content of it. The rules are the same as with the <@c>header option, except of course that it replaces the existing header row.
    • -
    - - -

    Examples (with TDD syntax):

    -
      -
    • <@c>csv(data/foo.txt) -
    • <@c>csv(data/foo.txt, {separator:tab, encoding:UTF-8}) -
    • <@c>csv(data/foo.txt, {separator:',', encoding:ISO-8859-2, headers:[name, size:n, lastModified:dt]}) -
    - -

    The <@c>csv data loader parses CSV (Column Separated Values) file, or other file of similar formats (as tab divided text, comma separated values), and returns it as a sequence. The sequence is the list of the table rows, and each row is a hash, where you can access the cells with the column name. The column names (headers) are stored in the first row of the CSV file (unless you use the <@c>headers option), so this row is not part of the result sequence.

    - -

    For example, if this is the CSV file:

    - -<@prg> -name;color;price -rose;red;10 -rose;yellow;15 -tulip;white;6 - - -

    and you load it into the variable <@c>flowers, then you can print it as:

    - -<@prg><#noparse> - -<#list flowers as flower> -
    ${flower.name}${flower.color}${flower.price} - -
    - - -

    and the output will be:

    - -<@prg><#noparse> - -
    rosered10 -
    roseyellow15 -
    tulipwhite6 -
    - - -

    The rows are not only hashes, but also sequences, so instead of the column name you can use the 0 based column index. Thus the above template could be written like this as well, just it is less readable:

    - -<@prg><#noparse> - -<#list flowers as flower> -
    ${flower[0]}${flower[1]}${flower[2]} - -
    - - -

    and actually then it would be simpler to write:

    - -<@prg><#noparse> - -<#list flowers as flower> - <#list flower as cell>
    ${cell} - -
    - - -

    The values (cells) in the CSV file will be always exposed as string variables, unless you specify a different type in the header cells directly. To specify the type, type a colon after the column name, and a type identifier. The type identifier can be: <@c>n (or <@c>number) or <@c>b (or <@c>boolean) or <@c>d (or <@c>date) or <@c>t (or <@c>time) or <@c>dt (or <@c>dateTime) or <@c>s (or <@c>string). For example, if you want to expose the price column as number, and not as string (so you can do arithmetic with it, or use the number formatting facilities), then the CSV file would be:

    - -<@prg> -name;color;price:n -rose;red;10 -rose;yellow;15 -tulip;white;6 - - -

    Numerical values must use dot (<@c>.) as decimal separator, and no grouping, unless you change these with the <@c>decimalSeparator and/or <@c>groupingSeparator options.

    - -

    Boolean values must be one of <@c>true, <@c>yes, <@c>y, <@c>1, <@c>false, <@c>no, <@c>n, <@c>0, or the words defined be the <@c>altTrue and <@c>altFalse options. Upper- and lower-case letters are not distinguished.

    - -

    Date, time and date-time values use common SQL format with optional time zone, as <@c>"2003-06-25", <@c>"22:30:08", <@c>"2003-06-25 10:30:08 PM", <@c>"2003-06-25 10:30:08 PM GMT+02:00". But if you use option <@c>dateFormat, <@c>timeFormat, or <@c>datetimeFormat, then that format has to be used for dates, times, and date-times respectively. If the time zone is not given in a value, the value of the <@s>timeZone setting is used.

    - -

    The variable returned by the <@c>csv data loader is not only a sequence, but also a hash at the same time, that contains one key: <@c>headers. This is a sequence that stores the column names.

    - -<@prg><#noparse> -<#list flowers.headers as h> -- ${h} - - - -

    will print:

    - -<@prg> -- name -- color -- price - - -

    Note that only the name of the column is returned, not the type identifier stuff (as <@c>:n).

    - - - -<@dataLoader name="json"> - <@param name="path" type="string">The path of the JSON file. - <@param name="charset" type="string" optional=true>The charset used for reading the JSON file. Defaults to the <@s>sourceEncoding setting. - -

    Examples (with TDD syntax):

    -
      -
    • <@c>json(data/foo.json) -
    • <@c>json(data/foo.json, UTF-8) -
    - -

    This data loader parses a JSON file. The JSON file must contain a single top-level JSON value of any type, like a JSON array, or a JSON object, or a JSON string, etc. Example file content (this contains a JSON array on the top-level):

    - -<@prg> -[ - { - "name": "Jean Test", - "maidenName": "Jean Test", - "age": 20, - "skills": [ "HTML", "CSS" ], - "testResults": { "a": 10.5, "b": 20, "c": 30 }, - "decided": true - }, - { - "name": "José Test", - "maidenName": null, - "age": 30, - "skills": [ "Ruby", "C++", "Cuda" ], - "testResults": { "a": 20, "b": 30, "c": 40 }, - "decided": false - } -] - - -

    Assuming you have loaded the above JSON into the <@c>applicants variable, you could print the name and age of all applicants, and print their skills in nested listing like this:

    - -<@prg><#noparse> -<#list applicants as applicant> - ${applicant.name} (age: ${applicant.age}) - <#list applicant.skills as skill> - - ${skill} - - - - -

    That is, JSON arrays will be FTL (FreeMarker Template Language) sequences, JSON objects will be FTL hashes, JSON strings will be FTL strings, JSON numbers will be FTL numbers, JSON boolean will be FTL boolean. JSON null-s will be FTL undefined variables (Java <@c>null-s), so for <@c>applicants[1].maindenName FreeMarker would give an undefined variable error, and you need to write something like <@c>applicants[1].maindenName!'N/A' instead.

    - -

    The loaded JSON will also act as an FTL node tree (and advanced FreeMarker feature), similarly to an XML. This means, among others, that you can get the parent of a value. The parent of a value is its containing array or object:

    - -<@prg><#noparse> -<#-- We just pick some skill for the example below: --> -<#assign skill = applicants[0].skills[0]> -<#-- Now let's say we only have the skill variable, and we don't know - how was it get. We can still get whose skill it was: --> -${skill} is the skill of ${skill?parent?parent.name}, -<#-- skill?parent is the array, the parent of that is the JSON object --> - - -

    More details about the node nature:

    -
      -
    • The <@c>?node_type of a value will be the name of the JSON type, like <@c>"string", <@c>"array", <@c>"object", etc.
    • -
    • If a value is the right-side of a key-value pair in a JSON object, its <@c>?node_name will be the value of the key (like <@c>"name", <@c>"age", etc.). Otherwise, it will be <@c>"unnamed" + capital node type, like <@c>"unnamedString".
    • -
    • When traversing the tree with <@c><#visit <@r>...>/<@c><#recurse>, or using <@c>?children, JSON <@c>null-s will appear as existing nodes with <@c>?node_type <@c>"null" and no FTL type other than node (thus they are unprintable, uncomparable, unlistable, etc.).
    • -
    - -

    See <@fma>the FreeMarker Manual for more about nodes and the related directives and built-ins!

    - - - - -<@dataLoader name="text"> - <@param name="path" type="string">The path of the text file. - <@param name="charset" type="string" optional=true>The charset used for reading text file. Defaults to the <@s>sourceEncoding setting. - -

    Examples (with TDD syntax):

    -
      -
    • <@c>text(C:/autoexec.bat) -
    • <@c>text(C:/autoexec.bat, CP850) -
    - -

    This data loader loads a plain text file, and returns that as a string.

    - - -<@dataLoader name="slicedText"> - <@param name="path" type="string">The path of the text file. - <@param name="options" type="hash" optional=true>The list of valid options: -
      -
    • <@c>separator: The string that slices the text file into items, that is, the string between two adjoining items. It defaults to <@c>"\n", so each line of the text will be an item. Examples: If you want the items to be separated with empty lines, then you should write <@c>"\n\n" (this is what is between two items if you imagine it). Of course in this case the items can contain single line-breaks (but not multiple consequent line breaks), not like in the default case. If you want to separate the items with a <@c>"---" that is considered as separator only if it's alone in a line (not in the middle of a line) then the separator should be <@c>"\n---\n". If you simply want to separate the items with semicolon then the separator should be <@c>";" (in this case you certainly want to use the <@c>trim option described below). There is some "magic" involved in the handling of line-breaks: 1.: no mater if you are using UN*X, DOS/Windows or Mac line-breaks in the <@c>separator option and in the text file, they will be considered to be equal, 2.: when the text file is searched for a multi-line separator string, those evil invisible extra spaces and tabs at the end of the lines will be tolerated.
    • -
    • <@c>trim: If it's <@c>true, then each item will be trimmed individually, that is, the leading and trailing white space will be removed from them. Defaults to <@c>false.
    • -
    • <@c>dropEmptyLastItem: If it's <@c>true then the last item will be removed from the result if it's a 0 length string (after trimming, if the <@c>trim option is <@c>true). Defaults to <@c>true, so if the text file ends with a separator or the text file is empty, you will not get a needless empty item.
    • -
    • <@c>encoding: The charset used for reading text file. Defaults to the value of the <@s>sourceEncoding setting.
    • -
    - - -

    Examples (with TDD syntax):

    -
      -
    • <@c>slicedText(data/foo.txt)
    • -
    • <@c>slicedText(data/foo.txt, {separator:\n---\n, encoding:UTF-8})
    • -
    • <@c>slicedText(data/foo.txt, {separator:';', trim})
    • -
    - -

    This data loader loads a text file and slices it to items (strings) by cutting out all occurences of the separator string specified with the <@c>separator option. The result is a sequence of strings.

    - -

    For example, if this is the <@c>data/stuff.txt file:

    -<@prg> -This is the first item. - -Still the first item... - ---8<-- - -The items are separated with this: ---8<-- -just don't forget to surround it with -empty lines. - ---8<-- - -This is the last item. - - -

    and it's loaded in the configuration file like: - -<@prg> -data: { - stuff: slicedText(data/stuff.txt, {separator:"\n\n--8<--\n\n"}) -} -<#-- " --> - -

    then the output of this template file

    - -<@prg><#noparse> -<#escape x as x?html> - -<#list stuff as i> -
    -${i}
    -
    - - - - - -

    will be this:

    - -<@prg> - -
    -This is the first item.
    -
    -Still the first item...
    -
    -
    -The items are separated with this:
    ---8<--
    -just don't forget to surround it with
    -empty lines.
    -
    -
    -This is the last item.
    -
    - - - -

    Note the double <@c>\n-s in the separator that causes the data loader to treat <@c>"–8<--" as separator only if it is surrounded with empty lines.

    - - - -<@dataLoader name="tdd"> - <@param name="path" type="string">The path of the TDD file. - <@param name="charset" type="string" optional=true>The charset used for reading TDD file. Defaults to the <@s>sourceEncoding setting. - -

    Examples (with TDD syntax):

    -
      -
    • <@c>tdd(data/foo.tdd) -
    • <@c>tdd(data/foo.tdd, ISO-8859-5) -
    - -

    This data loader parses a <@a href="tdd.html">TDD file. The loaded TDD is interpreted in <@a href="tdd.html#modes">hash mode, and TDD functions will invoke data loaders, exactly like with the <@s>data setting.

    - -

    See <@example 'tdd' /> for a concrete example.

    - - - -<@dataLoader name="tddSequence"> - <@param name="path" type="string">The path of the TDD file. - <@param name="charset" type="string" optional=true>The charset used for reading TDD file. Defaults to the <@s>sourceEncoding setting. - -

    This is like the <@a href="#key_tdd"><@c>tdd dataloader, except that it interprets the file as a <@a href="tdd.html">TDD sequence (TDD "sequence mode"), rather than as a TDD hash. So the result will be a sequence (a list), not a hash.

    - - -<@dataLoader name="properties"> - <@param name="path" type="string">The path of the "properties" file. - -

    Loads a <@a href="properties.html">"properties" file. The result is a hash.

    - - - -<@dataLoader name="xml"> - <@param name="path" type="string">The path of the XML file. - <@param name="options" type="hash" optional=true>Options. See later... - - <@note>Sometimes XML files are rather source files (as the HTML-s and the JPG in the <@a href="qtour.html">Quick Tour) than data files (as <@c>data/birds.tdd in the Quick Tour), just you need to invoke a template to render them to their final form (e.g. to HTML pages). If this is the case, you should use <@c>renderXml processing mode (<@a href="settings.html#key_modes">see here...), not XML data loader. An example that uses this approach is <@example 'xml_rendering' />. - -

    Loads an XML file. This uses the built-in XML wrapper of FreeMarker 2.3 and later; please read <@fma href="xgui.html">FreeMarker Manual/XML Processing Guide for more information about the usage of the returned variable.

    - -

    Notes:

    -
      -
    • Comment nodes will be removed by default (see option <@c>removeComments below). -
    • Processing instruction well be keep by default (see option <@c>removePIs below). -
    • CDATA sections count as plain text nodes. -
    • There are no adjacent text nodes in the node tree; adjacent text nodes will be joined. -
    - -

    The example <@example 'xml_try'/> is a good tool to understand this data loader and its options.

    - -

    Options:

    -
      -
    • <@c>removeComments: Optional, defaults to <@c>true: Specifies if XML comment nodes will be removed from the node tree. - -
    • <@c>removePIs: Optional, defaults to <@c>false: Specifies if XML processing instruction nodes will be removed from the node tree. - -
    • <@c>validate: Optional, defaults to the value of the <@s>validateXml setting: Specifies if the XML file should be validated (checked agains the DTD). If it's true, and the XML is not valid, then the data loading fails. - -
    • <@c>namespaceAware: Optional, defaults to <@c>true: Specifies if the XML parsing should be XML name-space aware or not. If the parsing is not name-space aware, colons in element and attribute names will not be considered as name-space prefix delimiters, so the "local name" of the node will contain the colon and the name-space prefix before that. - -
    • <@c>xincludeAware: Optional, defaults to <@c>false: Basically, it specifies whether the XML parsing should replace the XInclude-s with the included content. For most practical purposes you should set it to <@c>true (but due to backward-compatibility issues it defaults to <@c>false). Note that for setting this successfully to <@c>true you need at least Java 5. - -
    • <@c>xmlns: Optional. This is a hash that maps prefixes to XML name-space URI-s. The prefixes can be used in the other options. This option has no impact outside the XML data loader invocation, so the prefixes will not be available in the templates. The XML name-space for prefixless elements (with other words, the default name-space) is "no name-space" initially, but it can be changed by assigning name-space URI to the reserved prefix <@c>D (similar as if you use <@c>xmlns="<@r>..." in an XML document). - -
    • <@c>index: Adds attributes to element nodes, that can be helpful when later you process the XML with the templates. We say on this, that you index the elements. Well, it's hard to explain... :) Look at the output of example <@example 'xml_try'/>; the <@c>id attributes were added by this option, they are not present in the XML file. Also you can easily try other aspects of indexing with that example. The value of this option is a hash that contains the indexing options, or a sequence of hashes if you want to do more indexing successively. The hash accepts these subvariables (sub-options): - -
        -
      • <@c>element: Required. The name of the XML element or elements to index. If this is a string, then it selects a single element only. If this is a sequence, then it must be the sequence of element names that it selects. To use name-space prefixes, see option <@c>xmlns. - -
      • <@c>attribute: Optional, defaults to <@c>id. This is the name of the XML attribute that will be added to the indexed elements (the indexed elements are the elements selected by the sub-option <@c>element). If the element has this attribute already, then the original value of the attribute will be kept. To use name-space prefixes, see option <@c>xmlns. - -
      • <@c>numbering: Optional, defaults to <@c>sequential: The rule for the numbering of the indexed elements. The number is used in the attribute values; see option <@c>value. This must be one of the following strings: -
          -
        • <@c>sequential: The number for the first indexed element is 1, for the second indexed element is 2, etc. The element numbering is done in the "document order", that is, in the order in which the first character of the XML representation of each node occurs (after expansion of general entities). -
        • <@c>hierarchical: Similar to sequential numbering, but, for example, if we have an indexed element that got number <@c>2, then indexed elements nested into this element will get numbers <@c>2_1, <@c>2_2, <@c>2_3, etc. The indexed elements that are nested into the element numbered as <@c>2_1, will get numbers <@c>2_1_1, <@c>2_1_2, <@c>2_1_3, etc. For example, look at the output file names in <@example 'xml_rendering'/>; they are generated with the hierarchical indexing of the <@c>part and <@c>chapter elements. Or use <@example 'xml_try'/> to try it. -
        - -
      • <@c>value: Optional, defaults to <@c>'ppi_%n': A string that describes the format of index values. All character will go directly into the value, except that <@c>% is used for place holders. The valid place holders are: -
          -
        • <@c>'%n': This will be replaced with the value generated based on the value of option <@c>numbering. -
        • <@c>'%e': This will be replaced with the name (local, prefixless name) of the element -
        • <@c>'%%': This will be replaced with a single <@c>%. -
        -
      -
    - - - -<@dataLoader name="eval"> - <@param name="expression" type="string">Expression in BeansShell language. - <@param name="variables" type="hash" optional=true>Values that will be visible for the expression as variables. - -

    Evaluates a BeanShell expression, or runs a more complex BeanShell script and uses its <@c>return-ed value.

    -

    You can use the predefined variable <@c>engine to access the current FMPP engine instance.

    - -

    Examples (with TDD syntax):

    -
      -
    • <@c>eval('System.getProperties()') -
    • <@c>eval('fmpp.Engine.getVersionNumber()') -
    • <@c>eval('
      -     f = engine.getSourceRoot().getParentFile();
      -     if (f == null) {
      -         return new String[]{};
      -     } else {
      -         return f.list();
      -     }
      - ') -
    • In a configuration file:
      - <@c>width: 100 -
      height: 50 -
      area: eval('a * b', {a:get(width), b:get(height)}) -
    - - - -<@dataLoader name="htmlUtils"> -

    The returned hash contains custom directives that help HTML template development.

    - -

    Currently it contains only 1 directive: <@c>img. This is used as HTML <@c>img element, but the <@c>width and <@c>height attributes are calculated automatically (unless these attributes are specified in the template). Also, the processing will stop with error, if the image file pointed by the <@c>src attribute is missing.

    - -

    Example: If you have loaded the hash into the <@c>html variable, then you can do this in a template:

    - -<@prg><#noparse> -<@html.img src="falcon.png" alt="Falcon" /> - - -

    and the output will be something like this (depending on the concrete dimensions of the image):

    - -<@prg><#noparse> -Falcon - - -

    See also the example in <@example 'img_dims' />.

    - -

    Directive <@c>img accepts any extra parameters (attributes). The extra parameters will be printed as the attributes of the HTML <@c>img element. - - - - -<@dataLoader name="xhtmlUtils"> - -

    This is the same as <@c>htmlUtils, but it is for XHTML output.

    - - - - -<@dataLoader name="now"> - <@param name="options" type="hash" optional=true>The supported options are: -
      -
    • <@c>locale: The locale (language) used for displaying the date. It defaults to the "locale" setting of the FMPP engine. The value of the option is a usual java locale strings, such as <@c>en_GB, <@c>fr, <@c>ar_SA, ...etc. To see the complete list of locale codes, call the command line FMPP tool:
      <@c>fmpp --print-locales -
    • <@c>date: The format of the date (year, month, day) part of the date: <@c>short, <@c>medium, <@c>long, <@c>default. The exact meaning of these formats are locale dependent, and it is defined by the Java platform implementation. You can't use this option together with the <@c>pattern option. -
    • <@c>time: The format of the time (hour, minute, second, millisecond) part of the date: <@c>short, <@c>medium, <@c>long, <@c>default. The exact meaning of these formats are locale dependent, and it is defined by the Java platform implementation. You can't use this option together with the <@c>pattern option. -
    • <@c>pattern: A pattern that specifies the formatting of the date. -
    • <@c>zone: The time zone you would like to use ford displaying the date. Defaults to the "time zone" FMPP engine setting. The zone is given with a string, for example: <@c>GMT, <@c>GMT+02, <@c>GMT-02 or <@c>GMT+02:30. -
    - - -

    Note: FreeMarker now has a <@c>.now variable, so you don't need this data loader any more. You can print the current date and time with <@c>${'$'}{.now} (or <@c>${'$'}{.now?date} or <@c>${'$'}{.now?time}), and the format and zone is specified by the global <@s>datetimeFormat (or <@s>dateFormat or <@s>timeFormat) and <@s>timeZone FMPP settings.

    - -

    Examples (with TDD syntax): -

      -
    • <@c>now() -
    • <@c>now({pattern:"EEEE, MMMM dd, yyyy, hh:mm:ss a '('zzz')'"}) -
      This will print something like: Tuesday, April 08, 2003, 09:24:44 PM (GMT+02) -
    • <@c>now({date:short, time:short, zone:GMT}) -
    - -

    This data loader loads the current date and time from the system clock, and produces a string from it. Since FreeMarker has introduced native date/time value support, it is maybe better to use <@a href="pphash.html#key_sessionStart"><@c>pp.sessionStart or <@a href="pphash.html#key_now"><@c>pp.now instead of this data loader.

    - - -<@dataLoader name="get"> - <@param name="varName" type="string">The name of the variable. - <@param name="subVarName" type="string" optional=true>The name of the sub-variable. - <@param name="subSubVarName" type="string" optional=true>...etc. You can specify any number of parameters. - -

    This data loader returns the value of a variable that was already put into the <@s>data hash. For example:

    - -<@prg> -data: { - a: 123 - b: get(a) -} - - -

    Here the value of <@c>b will be the same as the value of <@c>a, which is <@c>123. You can retrieve the value of subvariables with additional parameters:

    - -<@prg> -data: { - a: { - x: 123 - y: { - q:234 - } - } - b: get(a, x) - c: get(a, y, q) -} - - -

    Here <@c>b will be <@c>123, <@c>c will be <@c>234.

    - -

    The <@c>get data loader was introduced so that data loaders can get the values loaded by other data loaders previously. For example:

    - -<@prg> -data: { - doc: xml(data/foo.xml) - index: com.example.MyIndexBuilderDataLoader(get(doc)) -} - - -

    The <@c>get data loader sees the variables that were already put into the hash in the same enclosing <@s>data/<@s>localData hash TDD expression where it is called, but it doesn't see values that are put into the data model elsewhere, as in other (inherited or inheriting) configuration files. However, if you use <@c>get in the <@s>localData setting, it will also see the session level data (see <@s>data).

    - - - -<@dataLoader name="antProperty"> - <@param name="properyName" type="string">The name of the Ant property. - <@param name="defaultValue" type="any" optional=true>The value returned if the Ant property does not exist. - -

    This data loader returns the value of an Ant property. If no Ant property with the given name exists, it will return nothing (i.e. will not add new variable to the shared data model), or it will return the value of the second parameter if you use that. - -

    The values of Ant properties are strings. But sometimes you want to see a property as numerical variable, or as boolean variable, etc. If the property name you give as data loader parameter ends with <@c>?n, then the string will be converted to number variable, and the <@c>?n itself will not count as the part of the actual property name. The complete list of postfixes:

    -
      -
    • <@c>?n: Convert to number. The string value must follow Java language number format, that is, the decimal separator is always dot (<@c>.).
    • -
    • <@c>?b: Convert to boolean. Valid values are: <@c>true, <@c>false, <@c>yes, <@c>no, <@c>y, <@c>n, <@c>0, <@c>1. Upper- and lowercase letters are considered as equivalent.
    • -
    • <@c>?d: Convert to date. Use common SQL format with optional time zone, as <@c>"2003-06-25 GMT". If the time zone is omitted, the value of the <@s>timeZone setting is used.
    • -
    • <@c>?t: Convert to time. Use common SQL format with optional time zone, as <@c>"22:05:30 GMT-02:00". The usage of AM/PM is also supported, e.g. <@c>"10:05:30 PM". If the time zone is omitted, then the value of the <@s>timeZone setting is used.
    • -
    • <@c>?dt: Convert to date-time. The date and time format is the same as with <@c>?d and <@c>?t, e.g. <@c>"2003-06-25 10:05:30 PM GMT".
    • -
    • <@c>?s: Keep the property as string. This can be useful if the actual property name ends with a prefix, so you must protect it against misinterpretation: <@c>foo?t?s.
    • -
    - -

    To see a concrete example, look at <@example 'ant2' />.

    - -

    This data loader will work only if you execute FMPP as Ant task.

    - - - -<@dataLoader name="antProperites"> - <@param name="properyName1" type="string" optional=true>The name of an Ant property to expose. - <@param name="properyName2" type="string" optional=true>The name of another Ant property to expose. - <@param name="properyNameN" type="string" optional=true>...etc. You can specify any number of Ant parameters. - -

    Returns the set of all Ant properties, or the set of selected ant properties, as a hash. - -

    If you use this data loader without parameters, then it returns the hash of <@e>all Ant properties. To see a concrete example, look at <@example 'ant' />.

    - -

    You can also give the name of properties to expose as parameters. For example if you want to put only the Ant properties <@c>foo and <@c>bar into the shared data model, then you write: <@c>antProperties(foo, bar). Parameters that refer to not existing Ant properties will be silently ignored. The same postfixes (as <@c>?n) are supported as with <@a href="#key_antProperty"><@c>antProperty.

    - -

    To see a concrete example, look at <@example 'ant2' />.

    - -

    This data loader will work only if you execute FMPP as Ant task.

    - - - -<@dataLoader name="antProject"> -

    Returns the current Ant project object (<@c>org.apache.tools.ant.Project). See the example in <@example 'ant' />.

    -

    This data loader will work only if you execute FMPP as Ant task.

    - - - -<@dataLoader name="antTask"> -

    Returns the current Ant task object (<@c>org.apache.tools.ant.Task). See the example in <@example 'ant' />.

    -

    This data loader will work only if you execute FMPP as Ant task.

    - - - - - -<@sect title="Custom data loaders"> - -

    If you want to write custom data loader, you have to write a Java class that implements the <@c>fmpp.tdd.DataLoader interface (see in the <@a href="api/index.html">API documentation). Then, if the class is available in the class path, or if you drop its jar into the <@c>lib directory of the FMPP installation, you can call it similarly as a predefined data loader, just you use the full-qualified class name as the data loader name. For example:
    <@c>com.example.fmpp.SQLDataLoader("SELECT * FROM products").

    - -

    <@e>If you have written a data loader that can be useful for other FMPP users, I will be happy to make it available on the FMPP home page for download. So if you want to contribute with your data loader, drop me a mail (<@myEmail />) or write to the mailing list. Thank you!

    - - - - diff --git a/fmpp/src/docs/examples/README.txt b/fmpp/src/docs/examples/README.txt deleted file mode 100644 index e36930f..0000000 --- a/fmpp/src/docs/examples/README.txt +++ /dev/null @@ -1,95 +0,0 @@ -FMPP Examples -============= - -How to try them ---------------- - -To run the examples, the command-line FMPP tool must be installed (see -the FMPP Manual). Then, go to the directory of the example, and simply -issue the fmpp command there. Or, you can run the example without -entering into its directory with: fmpp -C the/example/directory - -The above does not apply for the Ant examples (their name starts with -"ant"). To run those, FMPP must be installed for Ant (see the FMPP -Manual). Then, go to the directory of the example, and simply issue the -ant command there. Or, you can run the example without -entering into its directory with: ant -f the/example/directory/build.xml - -The output will be created in the out subdirectory of the example. - -The build.xml in this directory: if you run it with Ant, it will run all -examples. In this case, the command-line FMPP tool need not be -installed. - - -List of examples ----------------- - -qtour_step... The examples used in the Manual/Quick Tour chapter. - 1 - The idea of bulk processing - 2 - Data loading basics. Interpolations. - 3 - Data loading from multiple sources. Directives. - 4 - Multiple output files from single source file - -capture Generates Table of Contents on the top of the page - based on the headers used further down, using - block assignments to resolve the x-dependency. - -border Uses headers and footers to automate including, - interpolation escaping, and to convert *.c files - to HTML files. - -session Demonstrates session variables and turns with the - generation of an index page that contains links to - the other generated pages. - -img_dims Shows HTML with calculated image dimensions. - -csv Detects the columns of a CSV file. - Uses typed columns (numerical colum, boolean column). - -check_links Uses a macro instead of HTML that sends - warning if the link is broken. - -tdd Loads data model from a tdd file. - -xml XML data loader basics. - If you use earlier J2SE version than 1.4, the you have - to install some JAXP 1.2+ implementation. Say, Crimson. - -xml2 Product catalog that uses two related XML-s as data source. - FreeMarker requires XPath support for this example; see the - FMPP Manual/Installing for more information about XPath - availability. - -xml_try You can play with xml data loader options here, and examine - XML wrapping in general: It displays the resulting node - tree. - -xml_validating Demonstrates the usage of OASIS catalogs (public ID - resolution), validation, and the usage of XML name spaces - through the processing of an XHTML document. - -xml_rendering Renders XML source files to HTML-s, using "renderXml" - processing mode. Also demonstrates features as indexing, - declarative XML processing, XPath expressions. - -eval Demonstrates eval (BeanShell) data loader. - -inherit_config Demonstrates the usage of configuration inheritance. - -local_data Demonstrates the usage of the localData setting. - -ant Uses FMPP as Ant task: Basics. - You can't use the command-line tool here. - -ant2 Uses FMPP as Ant task: More property data loaders. - You can't use the command-line tool here. - -ant3 Uses FMPP as Ant task: Executes qtour_step4 with - changed text color. - -multipage_list Lists a sequence on multiple pages, like a Google search - result. Demonstrates the usage of BeanShell calculated local - data to prevent template overcomplication. Kinf of MVC style - separation. \ No newline at end of file diff --git a/fmpp/src/docs/examples/ant/build.xml b/fmpp/src/docs/examples/ant/build.xml deleted file mode 100644 index 9bf9c8a..0000000 --- a/fmpp/src/docs/examples/ant/build.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/ant/src/test.txt b/fmpp/src/docs/examples/ant/src/test.txt deleted file mode 100644 index b15806d..0000000 --- a/fmpp/src/docs/examples/ant/src/test.txt +++ /dev/null @@ -1,5 +0,0 @@ -Hello property: ${hello} -Basedir property: ${basedir} -Project name: ${proj.name} -Target name: ${task.target.name} -${true} \ No newline at end of file diff --git a/fmpp/src/docs/examples/ant2/build.xml b/fmpp/src/docs/examples/ant2/build.xml deleted file mode 100644 index d184e7c..0000000 --- a/fmpp/src/docs/examples/ant2/build.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - antProperties(p1, p2, x?n, test?b, time?t, thisWillBeIgnored) - wombat1: antProperty(p3) - wombat2: antProperty(p4) - wombat3: antProperty(p4, 'P4?') - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/ant2/src/test.txt b/fmpp/src/docs/examples/ant2/src/test.txt deleted file mode 100644 index 90bf9da..0000000 --- a/fmpp/src/docs/examples/ant2/src/test.txt +++ /dev/null @@ -1,10 +0,0 @@ -p1: ${p1!"not found"} -p2: ${p2!"not found"} -p3: ${p3!"not found"} -wombat1: ${wombat1!"not found"} -wombat2: ${wombat2!"not found"} -wombat3: ${wombat3!"not found"} - -x + 1: ${x + 1} -<#if test>It's a test.<#else>It's not a test. -time: ${time} \ No newline at end of file diff --git a/fmpp/src/docs/examples/ant3/build.xml b/fmpp/src/docs/examples/ant3/build.xml deleted file mode 100644 index dc1998b..0000000 --- a/fmpp/src/docs/examples/ant3/build.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/border/config.fmpp b/fmpp/src/docs/examples/border/config.fmpp deleted file mode 100644 index c657f57..0000000 --- a/fmpp/src/docs/examples/border/config.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -borders: [ - border( - "<#include '/include/test.ftl'><#escape x as x?html>" - "" - *.html - ) - border( - "<@pp.renameOutputFile name=pp.outputFileName+'.html'/>
    <@html_escape><#noparse>"
    -        "
    " - *.c - ) -] \ No newline at end of file diff --git a/fmpp/src/docs/examples/border/src/include/ignoredir.fmpp b/fmpp/src/docs/examples/border/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/border/src/include/test.ftl b/fmpp/src/docs/examples/border/src/include/test.ftl deleted file mode 100644 index bb86337..0000000 --- a/fmpp/src/docs/examples/border/src/include/test.ftl +++ /dev/null @@ -1 +0,0 @@ -<#assign test = "Hello"> \ No newline at end of file diff --git a/fmpp/src/docs/examples/border/src/test.c b/fmpp/src/docs/examples/border/src/test.c deleted file mode 100644 index dd6d393..0000000 --- a/fmpp/src/docs/examples/border/src/test.c +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include "futil_i.h" - -zxz_ec_t -zxz_f_child_path_can_match(zxz_bool_t *pbMatches, - const char *sPath, const char *sPattern) -{ - zxz_ec_t ec; - int i; - char *sNew = NULL; - - i = strlen(sPath); - if (i != 0 && sPath[i-1] != ZXZ_CFGM_PATH_SEPARATOR_CHR - && sPath[i-1] != ZXZ_CFGM_PATH_SEPARATOR2_CHR) { - sNew = malloc(i+2); /* <-- +sNew */ - strcpy(sNew, sPath); - sNew[i] = ZXZ_CFGM_PATH_SEPARATOR_CHR; - sNew[i+1] = '\0'; - sPath = sNew; - } - ec = zxz_f_path_matches_ex(pbMatches, sPath, sPattern, FALSE, 1); - free(sNew); /* <-- -sNew */ - return ec; -} diff --git a/fmpp/src/docs/examples/border/src/test.html b/fmpp/src/docs/examples/border/src/test.html deleted file mode 100644 index 975bb9f..0000000 --- a/fmpp/src/docs/examples/border/src/test.html +++ /dev/null @@ -1,3 +0,0 @@ -${test} -

    ${"a < b & c"} -

    A C program \ No newline at end of file diff --git a/fmpp/src/docs/examples/build.xml b/fmpp/src/docs/examples/build.xml deleted file mode 100644 index 5d7bfa2..0000000 --- a/fmpp/src/docs/examples/build.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/capture/config.fmpp b/fmpp/src/docs/examples/capture/config.fmpp deleted file mode 100644 index 925102e..0000000 --- a/fmpp/src/docs/examples/capture/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp \ No newline at end of file diff --git a/fmpp/src/docs/examples/capture/src/include/ignoredir.fmpp b/fmpp/src/docs/examples/capture/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/capture/src/include/page.ftl b/fmpp/src/docs/examples/capture/src/include/page.ftl deleted file mode 100644 index 87c7d11..0000000 --- a/fmpp/src/docs/examples/capture/src/include/page.ftl +++ /dev/null @@ -1,24 +0,0 @@ -<#assign h1Counter = 0> -<#assign contents = pp.newWritableSequence()> - -<#macro h1> - <#local title><#nested> - <#assign h1Counter = h1Counter + 1> - <@pp.add seq=contents value={"anchor":h1Counter, "title":title} /> - -

    ${title}

    - - -<#macro page> - <#local output> - <#nested> - - Contents: - -
    - ${output} - \ No newline at end of file diff --git a/fmpp/src/docs/examples/capture/src/test.html b/fmpp/src/docs/examples/capture/src/test.html deleted file mode 100644 index af44b9d..0000000 --- a/fmpp/src/docs/examples/capture/src/test.html +++ /dev/null @@ -1,100 +0,0 @@ -<#include "/include/page.ftl"> -<@page> - -<@h1>Foo - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -<@h1>Bar - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -<@h1>Baaz - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

    Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/check_links/config.fmpp b/fmpp/src/docs/examples/check_links/config.fmpp deleted file mode 100644 index 925102e..0000000 --- a/fmpp/src/docs/examples/check_links/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp \ No newline at end of file diff --git a/fmpp/src/docs/examples/check_links/src/good_target.html b/fmpp/src/docs/examples/check_links/src/good_target.html deleted file mode 100644 index 2f9031f..0000000 --- a/fmpp/src/docs/examples/check_links/src/good_target.html +++ /dev/null @@ -1 +0,0 @@ -Hi! \ No newline at end of file diff --git a/fmpp/src/docs/examples/check_links/src/include/a.ftl b/fmpp/src/docs/examples/check_links/src/include/a.ftl deleted file mode 100644 index 2a07d93..0000000 --- a/fmpp/src/docs/examples/check_links/src/include/a.ftl +++ /dev/null @@ -1,13 +0,0 @@ -<#macro a href> - <#-- remove anchor link ending --> - <#local x = href?index_of('#')> - <#if x != -1> - <#local href = href?substring(0, x)> - - <#-- check existence --> - <#if !pp.sourceFileExists(href)> - <@pp.warning message="Broken link in " + pp.sourceFile + ": " + href /> - - <#-- print HTML --> - <#nested><#t> - \ No newline at end of file diff --git a/fmpp/src/docs/examples/check_links/src/include/ignoredir.fmpp b/fmpp/src/docs/examples/check_links/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/check_links/src/index.html b/fmpp/src/docs/examples/check_links/src/index.html deleted file mode 100644 index 7fafe7f..0000000 --- a/fmpp/src/docs/examples/check_links/src/index.html +++ /dev/null @@ -1,3 +0,0 @@ -<#include "/include/a.ftl"> -

    <@a href="good_target.html">Working link -

    <@a href="bad_target.html">Broken link \ No newline at end of file diff --git a/fmpp/src/docs/examples/csv/config.fmpp b/fmpp/src/docs/examples/csv/config.fmpp deleted file mode 100644 index 94e53b0..0000000 --- a/fmpp/src/docs/examples/csv/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: {csv: csv(data/test.csv)} \ No newline at end of file diff --git a/fmpp/src/docs/examples/csv/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/csv/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/csv/src/data/test.csv b/fmpp/src/docs/examples/csv/src/data/test.csv deleted file mode 100644 index a17bb9e..0000000 --- a/fmpp/src/docs/examples/csv/src/data/test.csv +++ /dev/null @@ -1,5 +0,0 @@ -name;protected:b;price:n;entered:dt -arctic-tern;yes;10000;2003-01-25 03:10:06 -house-sparrow;no;50;2003-02-15 01:20:30 PM -hoachim;yes;; -sakeret;yes;200000;2002-12-18 20:45:00 \ No newline at end of file diff --git a/fmpp/src/docs/examples/csv/src/test.html b/fmpp/src/docs/examples/csv/src/test.html deleted file mode 100644 index bfe6d97..0000000 --- a/fmpp/src/docs/examples/csv/src/test.html +++ /dev/null @@ -1,8 +0,0 @@ -<#setting number_format=",##0.00"> -<#setting datetime_format="MMM dd, yyyy hh:mm:ss a"> - - <#list csv.headers as h><#list csv.headers as h>
    ${h} -<#list csv as row> -
    ${(row[h]!"N/A")?string} - -
    \ No newline at end of file diff --git a/fmpp/src/docs/examples/eval/config.fmpp b/fmpp/src/docs/examples/eval/config.fmpp deleted file mode 100644 index 122ca80..0000000 --- a/fmpp/src/docs/examples/eval/config.fmpp +++ /dev/null @@ -1,7 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - props: eval('System.getProperties()') - exampleDir: eval('engine.getSourceRoot().getParentFile().getParentFile().list()') -} \ No newline at end of file diff --git a/fmpp/src/docs/examples/eval/src/test.html b/fmpp/src/docs/examples/eval/src/test.html deleted file mode 100644 index defa5ae..0000000 --- a/fmpp/src/docs/examples/eval/src/test.html +++ /dev/null @@ -1,17 +0,0 @@ -<#escape x as x?html> - -

    System properties: -

      -<#list props?keys?sort as k> -
    • ${k} = ${props[k]} - -
    - -

    Example dir: -

      -<#list exampleDir?sort as f> -
    • ${f} - -
    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/ignoredir.fmpp b/fmpp/src/docs/examples/ignoredir.fmpp deleted file mode 100644 index 7562186..0000000 --- a/fmpp/src/docs/examples/ignoredir.fmpp +++ /dev/null @@ -1 +0,0 @@ -Not copied as part of the FMPP documentation generation. \ No newline at end of file diff --git a/fmpp/src/docs/examples/img_dims/config.fmpp b/fmpp/src/docs/examples/img_dims/config.fmpp deleted file mode 100644 index 8bb1c12..0000000 --- a/fmpp/src/docs/examples/img_dims/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: {h:htmlUtils()} \ No newline at end of file diff --git a/fmpp/src/docs/examples/img_dims/src/falcon.png b/fmpp/src/docs/examples/img_dims/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/docs/examples/img_dims/src/falcon.png and /dev/null differ diff --git a/fmpp/src/docs/examples/img_dims/src/index.html b/fmpp/src/docs/examples/img_dims/src/index.html deleted file mode 100644 index dc24945..0000000 --- a/fmpp/src/docs/examples/img_dims/src/index.html +++ /dev/null @@ -1,12 +0,0 @@ -

    All calcualted: -<@h.img src="falcon.png" alt="Falcon" /> - -

    Width calculated: -<@h.img src="falcon.png" alt="Falcon" height=20/> - - -

    Height calculated: -<@h.img src="falcon.png" alt="Falcon" width=20/> - -

    Nothing calculated: -<@h.img src="falcon.png" alt="Falcon" height="20" width="20"/> diff --git a/fmpp/src/docs/examples/inherit_config/README.txt b/fmpp/src/docs/examples/inherit_config/README.txt deleted file mode 100644 index 605ed9d..0000000 --- a/fmpp/src/docs/examples/inherit_config/README.txt +++ /dev/null @@ -1,14 +0,0 @@ -This example shows how to "customize" another configuration file, that -is, how to make configuration variations without actually editing or -copy/pasting the common configuration file. - -In this example, config_red.fmpp and config_dark.fmpp executes a -slightly modified version of config.fmpp. To try them type: - - fmpp -C config_red.fmpp - -and - - fmpp -C config_dark.fmpp - -respectively. \ No newline at end of file diff --git a/fmpp/src/docs/examples/inherit_config/config.fmpp b/fmpp/src/docs/examples/inherit_config/config.fmpp deleted file mode 100644 index 6830455..0000000 --- a/fmpp/src/docs/examples/inherit_config/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: {backgroundColor:#C0C0FF, textColor:blue} \ No newline at end of file diff --git a/fmpp/src/docs/examples/inherit_config/config_dark.fmpp b/fmpp/src/docs/examples/inherit_config/config_dark.fmpp deleted file mode 100644 index 00fbceb..0000000 --- a/fmpp/src/docs/examples/inherit_config/config_dark.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -inheritConfiguration: config.fmpp -data: {backgroundColor:black} \ No newline at end of file diff --git a/fmpp/src/docs/examples/inherit_config/config_red.fmpp b/fmpp/src/docs/examples/inherit_config/config_red.fmpp deleted file mode 100644 index 8842538..0000000 --- a/fmpp/src/docs/examples/inherit_config/config_red.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -inheritConfiguration: config.fmpp -data: {textColor:red} \ No newline at end of file diff --git a/fmpp/src/docs/examples/inherit_config/src/index.html b/fmpp/src/docs/examples/inherit_config/src/index.html deleted file mode 100644 index 9205087..0000000 --- a/fmpp/src/docs/examples/inherit_config/src/index.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    Test. - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/config.fmpp b/fmpp/src/docs/examples/local_data/config.fmpp deleted file mode 100644 index 638d145..0000000 --- a/fmpp/src/docs/examples/local_data/config.fmpp +++ /dev/null @@ -1,29 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp - -modes: ignore(**/*.bsh) - -data: { - bgColor: green - author: Anonymous -} - -localData: [ - # Run the attached BeanShell script for HTML-s, if there is one available. - case(**/*.htm, **/*.html, bsh({ignoreMissing})) - - # Independently of the above, - # set "bgColor" to "yellow" when processing the files of the "sub" folder: - # except for the files in "sun/sky/**", where use "blue". - # But, never override the "bgColor" if the file name starts with "foo" - layer() - case(**/foo*, {}) - case(sub/sky/**, {bgColor: blue}) - case(sub/**, sub2/**, {bgColor: yellow}) - - # Independently of all above, set the "author"... - layer() - case(**/*_j.*, {author: Joe}) - case(**/*_a.*, {author: Amy}) -] \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/index.html b/fmpp/src/docs/examples/local_data/src/index.html deleted file mode 100644 index 05f62c1..0000000 --- a/fmpp/src/docs/examples/local_data/src/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - -

    Test

    -

    Other pages: -

    - -

    Here it is the config file used: -
    -
    ${pp.loadData('text', '../config.fmpp')?html}
    -
    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/1.html b/fmpp/src/docs/examples/local_data/src/sub/1.html deleted file mode 100644 index 32f023d..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/1.html +++ /dev/null @@ -1,8 +0,0 @@ - - -

    1

    -

    Author: ${author} -

    x: ${x} -

    y: ${y} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/1.html.bsh b/fmpp/src/docs/examples/local_data/src/sub/1.html.bsh deleted file mode 100644 index 14c8e0f..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/1.html.bsh +++ /dev/null @@ -1,4 +0,0 @@ -res = new HashMap(); -res.put("x", "Just for test: " + templateEnvironment.getData("author")); -res.put("y", "Blah for 1..."); -return res; \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/2.html b/fmpp/src/docs/examples/local_data/src/sub/2.html deleted file mode 100644 index cd7fba9..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    2

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/3_j.html b/fmpp/src/docs/examples/local_data/src/sub/3_j.html deleted file mode 100644 index b89c36c..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/3_j.html +++ /dev/null @@ -1,8 +0,0 @@ - - -

    3_j

    -

    Author: ${author} -

    x: ${x} -

    y: ${y} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/3_j.html.bsh b/fmpp/src/docs/examples/local_data/src/sub/3_j.html.bsh deleted file mode 100644 index cb052d2..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/3_j.html.bsh +++ /dev/null @@ -1,4 +0,0 @@ -res = new HashMap(); -res.put("x", "Just for test: " + templateEnvironment.getData("author")); -res.put("y", "Blah for 3_j..."); -return res; \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/food.html b/fmpp/src/docs/examples/local_data/src/sub/food.html deleted file mode 100644 index e817607..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/food.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    Food

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/sky/1.html b/fmpp/src/docs/examples/local_data/src/sub/sky/1.html deleted file mode 100644 index 960b8d4..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/sky/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    1

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/sky/2.html b/fmpp/src/docs/examples/local_data/src/sub/sky/2.html deleted file mode 100644 index cd7fba9..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/sky/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    2

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/sky/3_a.html b/fmpp/src/docs/examples/local_data/src/sub/sky/3_a.html deleted file mode 100644 index 6734b3f..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/sky/3_a.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    3_a

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/subsub/1.html b/fmpp/src/docs/examples/local_data/src/sub/subsub/1.html deleted file mode 100644 index 960b8d4..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/subsub/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    1

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub/subsub/2.html b/fmpp/src/docs/examples/local_data/src/sub/subsub/2.html deleted file mode 100644 index cd7fba9..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub/subsub/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    2

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub2/1.html b/fmpp/src/docs/examples/local_data/src/sub2/1.html deleted file mode 100644 index 960b8d4..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub2/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    1

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/local_data/src/sub2/2.html b/fmpp/src/docs/examples/local_data/src/sub2/2.html deleted file mode 100644 index cd7fba9..0000000 --- a/fmpp/src/docs/examples/local_data/src/sub2/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

    2

    -

    Author: ${author} - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/multipage_list/config.fmpp b/fmpp/src/docs/examples/multipage_list/config.fmpp deleted file mode 100644 index ea19e9d..0000000 --- a/fmpp/src/docs/examples/multipage_list/config.fmpp +++ /dev/null @@ -1,35 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - foos: [ - {name:"qweqwe", url:"http://qweqwe.com"} - {name:"asdasd", url:"http://asdasd.com"} - {name:"cvbcvbcv", url:"http://cvbcvbcvb.com"} - {name:"iopiopi", url:"http://iopiopo.com"} - {name:"bmbnmbm", url:"http://bnmnbmb.com"} - {name:"uiouioui", url:"http://uiouiouio.com"} - {name:"bvnbvnbv", url:"http://bvnbvnbvnbv.com"} - {name:"hghjghjghjg", url:"http://hghjghjghjg.com"} - {name:"werwer", url:"http://werwerr.com"} - {name:"mnmbnbm", url:"http://mbnmbnmb.com"} - {name:"gfhfghgfgfh", url:"http://fghgfhgfhg.com"} - {name:"asdasas", url:"http://asdasdasd.com"} - {name:"yuuiyiyu", url:"http://yuiyuiyui.com"} - {name:"rtytryytr", url:"http://rttryytr.com"} - {name:"kjhkjhk", url:"http://khjkhjkhjk.com"} - {name:"rrrrr", url:"http://rrrrr.com"} - {name:"ddfdgfgf", url:"http://ddffdg.com"} - {name:"jhjhhgjh", url:"http://jghjjhj.com"} - {name:"zzzzzzzz", url:"http://zzzzzzzz.com"} - {name:"zxzxxzzx", url:"http://zzxzxzxzx.com"} - {name:"cvvcvvcv", url:"http://ccvvcvcvcv.com"} - {name:"bnvvbnvb", url:"http://vbnvbnnvbnb.com"} - {name:"asdsadasd", url:"http://asdasdasd.com"} - {name:"vvvvvv", url:"http://vvvvvvv.com"} - {name:"ssssss", url:"http://sssss.com"} - {name:"qqqqqqq", url:"http://qqqqqq.com"} - {name:"xxxxxxx", url:"http://xxxxx.com"} - {name:"vvvvv", url:"http://vvvvv.com"} - {name:"aaaaaaa", url:"http://aaaaaaaa.com"} - ] -} diff --git a/fmpp/src/docs/examples/multipage_list/src/result.html b/fmpp/src/docs/examples/multipage_list/src/result.html deleted file mode 100644 index 8c371fc..0000000 --- a/fmpp/src/docs/examples/multipage_list/src/result.html +++ /dev/null @@ -1,56 +0,0 @@ -<#escape x as x?html> -<@pp.dropOutputFile /> -<#assign pages = foos?chunk(5)> -<#assign entryIndex = 0> -<#list pages as page> - <@pp.changeOutputFile name="result${page_index+1}.html" /> - - - Results - page ${page_index+1} of ${pages?size} - - -

    Results

    - - <#list page as entry> - <#assign entryIndex = entryIndex + 1> -

    ${entryIndex}. ${entry.name?cap_first}: ${entry.url} - - -


    - Pages:   - <#if page_index != 0> - <<  - <#else> - <<  - - <#list 0..pages?size-1 as i> - <#if i != page_index> - ${i+1} - <#else> - ${i+1} - - <#if i_has_next>| - - <#if page_index != pages?size-1> -  >> - <#else> -  >> - - - - - -<#if pages?size == 0> - <@pp.changeOutputFile name="result1.html" /> - - - Results - No foos - - -

    Results

    -

    Sorry, no foos available.

    - - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step1/config.fmpp b/fmpp/src/docs/examples/qtour_step1/config.fmpp deleted file mode 100644 index 1a65d4c..0000000 --- a/fmpp/src/docs/examples/qtour_step1/config.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -sourceRoot: src -outputRoot: out \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step1/src/falcon.png b/fmpp/src/docs/examples/qtour_step1/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/docs/examples/qtour_step1/src/falcon.png and /dev/null differ diff --git a/fmpp/src/docs/examples/qtour_step1/src/index.html b/fmpp/src/docs/examples/qtour_step1/src/index.html deleted file mode 100644 index cc440b0..0000000 --- a/fmpp/src/docs/examples/qtour_step1/src/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Index - - -

    Index

    -

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step1/src/subdir/something.html b/fmpp/src/docs/examples/qtour_step1/src/subdir/something.html deleted file mode 100644 index fd4daec..0000000 --- a/fmpp/src/docs/examples/qtour_step1/src/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

    Something else

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step2/config.fmpp b/fmpp/src/docs/examples/qtour_step2/config.fmpp deleted file mode 100644 index d9978be..0000000 --- a/fmpp/src/docs/examples/qtour_step2/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -data: tdd(data/style.tdd) \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step2/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/qtour_step2/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/qtour_step2/src/data/style.tdd b/fmpp/src/docs/examples/qtour_step2/src/data/style.tdd deleted file mode 100644 index 2151f44..0000000 --- a/fmpp/src/docs/examples/qtour_step2/src/data/style.tdd +++ /dev/null @@ -1,2 +0,0 @@ -bgColor: #FFFFE0 -textColor: #000000 \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step2/src/falcon.png b/fmpp/src/docs/examples/qtour_step2/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/docs/examples/qtour_step2/src/falcon.png and /dev/null differ diff --git a/fmpp/src/docs/examples/qtour_step2/src/index.html b/fmpp/src/docs/examples/qtour_step2/src/index.html deleted file mode 100644 index e539e0b..0000000 --- a/fmpp/src/docs/examples/qtour_step2/src/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Index - - -

    Index

    -

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step2/src/subdir/something.html b/fmpp/src/docs/examples/qtour_step2/src/subdir/something.html deleted file mode 100644 index a1949bc..0000000 --- a/fmpp/src/docs/examples/qtour_step2/src/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

    Something else

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step3/config.fmpp b/fmpp/src/docs/examples/qtour_step3/config.fmpp deleted file mode 100644 index 0957840..0000000 --- a/fmpp/src/docs/examples/qtour_step3/config.fmpp +++ /dev/null @@ -1,6 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - tdd(data/style.tdd) - birds: csv(data/birds.csv) -} \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step3/src/data/birds.csv b/fmpp/src/docs/examples/qtour_step3/src/data/birds.csv deleted file mode 100644 index 3105e8c..0000000 --- a/fmpp/src/docs/examples/qtour_step3/src/data/birds.csv +++ /dev/null @@ -1,4 +0,0 @@ -name;description;favoriteFood -arctic-tern;Flies very long distances all years.;sardine -house-sparrow;Don't you say you don't know it...;sunflower -sakeret;Great hunter of the sky.;pigeon \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step3/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/qtour_step3/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/qtour_step3/src/data/style.tdd b/fmpp/src/docs/examples/qtour_step3/src/data/style.tdd deleted file mode 100644 index 2151f44..0000000 --- a/fmpp/src/docs/examples/qtour_step3/src/data/style.tdd +++ /dev/null @@ -1,2 +0,0 @@ -bgColor: #FFFFE0 -textColor: #000000 \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step3/src/falcon.png b/fmpp/src/docs/examples/qtour_step3/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/docs/examples/qtour_step3/src/falcon.png and /dev/null differ diff --git a/fmpp/src/docs/examples/qtour_step3/src/index.html b/fmpp/src/docs/examples/qtour_step3/src/index.html deleted file mode 100644 index f5a58f4..0000000 --- a/fmpp/src/docs/examples/qtour_step3/src/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - Index - - -

    Index

    -

    Birds: -

      - <#list birds as bird> -
    • ${bird.name?cap_first}: ${bird.description} - Favorite food: ${bird.favoriteFood} - -
    -
    -

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step3/src/subdir/something.html b/fmpp/src/docs/examples/qtour_step3/src/subdir/something.html deleted file mode 100644 index a1949bc..0000000 --- a/fmpp/src/docs/examples/qtour_step3/src/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

    Something else

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step4/config.fmpp b/fmpp/src/docs/examples/qtour_step4/config.fmpp deleted file mode 100644 index 0957840..0000000 --- a/fmpp/src/docs/examples/qtour_step4/config.fmpp +++ /dev/null @@ -1,6 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - tdd(data/style.tdd) - birds: csv(data/birds.csv) -} \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step4/src/bird.html b/fmpp/src/docs/examples/qtour_step4/src/bird.html deleted file mode 100644 index 670719a..0000000 --- a/fmpp/src/docs/examples/qtour_step4/src/bird.html +++ /dev/null @@ -1,16 +0,0 @@ -<@pp.dropOutputFile /> -<#list birds as bird> -<@pp.changeOutputFile name=bird.name+".html" /> - - - ${bird.name?cap_first} - - -

    ${bird.name?cap_first}

    - -

    ${bird.description}

    - -

    Favorite food: ${bird.favoriteFood}

    - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step4/src/data/birds.csv b/fmpp/src/docs/examples/qtour_step4/src/data/birds.csv deleted file mode 100644 index 3105e8c..0000000 --- a/fmpp/src/docs/examples/qtour_step4/src/data/birds.csv +++ /dev/null @@ -1,4 +0,0 @@ -name;description;favoriteFood -arctic-tern;Flies very long distances all years.;sardine -house-sparrow;Don't you say you don't know it...;sunflower -sakeret;Great hunter of the sky.;pigeon \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step4/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/qtour_step4/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/qtour_step4/src/data/style.tdd b/fmpp/src/docs/examples/qtour_step4/src/data/style.tdd deleted file mode 100644 index 2151f44..0000000 --- a/fmpp/src/docs/examples/qtour_step4/src/data/style.tdd +++ /dev/null @@ -1,2 +0,0 @@ -bgColor: #FFFFE0 -textColor: #000000 \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step4/src/falcon.png b/fmpp/src/docs/examples/qtour_step4/src/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/docs/examples/qtour_step4/src/falcon.png and /dev/null differ diff --git a/fmpp/src/docs/examples/qtour_step4/src/index.html b/fmpp/src/docs/examples/qtour_step4/src/index.html deleted file mode 100644 index b4668ed..0000000 --- a/fmpp/src/docs/examples/qtour_step4/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - Index - - -

    Index

    -

    Birds: -

    -
    -

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/qtour_step4/src/subdir/something.html b/fmpp/src/docs/examples/qtour_step4/src/subdir/something.html deleted file mode 100644 index a1949bc..0000000 --- a/fmpp/src/docs/examples/qtour_step4/src/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

    Something else

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/session/config.fmpp b/fmpp/src/docs/examples/session/config.fmpp deleted file mode 100644 index 013c036..0000000 --- a/fmpp/src/docs/examples/session/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -turns: turn(2, index.html) \ No newline at end of file diff --git a/fmpp/src/docs/examples/session/src/01_foo.html b/fmpp/src/docs/examples/session/src/01_foo.html deleted file mode 100644 index 078bb05..0000000 --- a/fmpp/src/docs/examples/session/src/01_foo.html +++ /dev/null @@ -1,6 +0,0 @@ -<#include "/include/page.ftl"> -<@page title="Foo"> - -

    Blah blah blah - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/session/src/02_bar.html b/fmpp/src/docs/examples/session/src/02_bar.html deleted file mode 100644 index d7f4607..0000000 --- a/fmpp/src/docs/examples/session/src/02_bar.html +++ /dev/null @@ -1,6 +0,0 @@ -<#include "/include/page.ftl"> -<@page title="Bar"> - -

    Blah blah blah - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/session/src/03_baaz.html b/fmpp/src/docs/examples/session/src/03_baaz.html deleted file mode 100644 index d942675..0000000 --- a/fmpp/src/docs/examples/session/src/03_baaz.html +++ /dev/null @@ -1,6 +0,0 @@ -<#include "/include/page.ftl"> -<@page title="Baaz"> - -

    Blah blah blah - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/session/src/04_wombat.html b/fmpp/src/docs/examples/session/src/04_wombat.html deleted file mode 100644 index 81b1ae6..0000000 --- a/fmpp/src/docs/examples/session/src/04_wombat.html +++ /dev/null @@ -1,6 +0,0 @@ -<#include "/include/page.ftl"> -<@page title="Wombat"> - -

    Blah blah blah - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/session/src/include/ignoredir.fmpp b/fmpp/src/docs/examples/session/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/session/src/include/page.ftl b/fmpp/src/docs/examples/session/src/include/page.ftl deleted file mode 100644 index 25fdcfb..0000000 --- a/fmpp/src/docs/examples/session/src/include/page.ftl +++ /dev/null @@ -1,17 +0,0 @@ -<#escape x as x?html> - -<#macro page title> - <#if !pp.s.contents??> - <@pp.set hash=pp.s key="contents" value=pp.newWritableSequence() /> - - <@pp.add seq=pp.s.contents value={"link":pp.outputFile, "title":title} /> - - ${title} - - -

    ${title}

    - <#nested> - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/session/src/index.html b/fmpp/src/docs/examples/session/src/index.html deleted file mode 100644 index e9c3c5a..0000000 --- a/fmpp/src/docs/examples/session/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ -<#escape x as x?html> - -Index - -

    Index

    - <#assign pages = pp.s.contents?sort_by("link")> - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/tdd/config.fmpp b/fmpp/src/docs/examples/tdd/config.fmpp deleted file mode 100644 index 1fb8ea0..0000000 --- a/fmpp/src/docs/examples/tdd/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: tdd(data/test.tdd) \ No newline at end of file diff --git a/fmpp/src/docs/examples/tdd/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/tdd/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/tdd/src/data/test.tdd b/fmpp/src/docs/examples/tdd/src/data/test.tdd deleted file mode 100644 index ffefb40..0000000 --- a/fmpp/src/docs/examples/tdd/src/data/test.tdd +++ /dev/null @@ -1,7 +0,0 @@ -user:"Big Joe", -tall -animals:[ - {name:"white mouse", price:30}, - {name:"black mouse", price:25}, - {name:"green mouse", price:150} -] \ No newline at end of file diff --git a/fmpp/src/docs/examples/tdd/src/index.html b/fmpp/src/docs/examples/tdd/src/index.html deleted file mode 100644 index 4e8efb2..0000000 --- a/fmpp/src/docs/examples/tdd/src/index.html +++ /dev/null @@ -1,10 +0,0 @@ -

    Hello ${user}!

    - -

    Our offers: -

      - <#list animals as animal> -
    • ${animal.name?cap_first} for ${animal.price} credits - -
    - -

    Note that we know that you are <#if !tall>not tall, ${user}.

    \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml/config.fmpp b/fmpp/src/docs/examples/xml/config.fmpp deleted file mode 100644 index a095251..0000000 --- a/fmpp/src/docs/examples/xml/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: {doc: xml(data/test.xml)} \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/xml/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/xml/src/data/test.xml b/fmpp/src/docs/examples/xml/src/data/test.xml deleted file mode 100644 index 4375656..0000000 --- a/fmpp/src/docs/examples/xml/src/data/test.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Preface blah blah... - And preface blah blah... - - - Blah blah blah... - And blah blah blah... - - - Foo blah blah... - And foo blah blah... - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml/src/test.html b/fmpp/src/docs/examples/xml/src/test.html deleted file mode 100644 index 66b913c..0000000 --- a/fmpp/src/docs/examples/xml/src/test.html +++ /dev/null @@ -1,7 +0,0 @@ -

    ${doc.book.@title}

    -<#list doc.book.chapter as ch> -

    ${ch.@title}

    - <#list ch.para as p> -

    ${p}

    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml2/config.fmpp b/fmpp/src/docs/examples/xml2/config.fmpp deleted file mode 100644 index fa29ced..0000000 --- a/fmpp/src/docs/examples/xml2/config.fmpp +++ /dev/null @@ -1,7 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - prodXml: xml(data/products.xml, {index: {element: product, value: '%n'}}) - manuXml: xml(data/manufacturers.xml) -} \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml2/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/xml2/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/xml2/src/data/manufacturers.xml b/fmpp/src/docs/examples/xml2/src/data/manufacturers.xml deleted file mode 100644 index d1db011..0000000 --- a/fmpp/src/docs/examples/xml2/src/data/manufacturers.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - Foo Incorporated -
    3 Traktor Road, Budapest, 1234, Hungary
    - 45-456-7461 - http://www.foo.hu/ -
    - - Acmee Incorporated -
    5 Kili Street, Tarawa, Kiribati
    - http://www.acmee.com/ - bounche@acmee.com -
    - - Batman International -
    77 Cash Square, Palo Alto, California 94531, U.S.A
    - 07-798-456-985 - http://www.batmaninternational.com/ - devnul@batmaninternational.com -
    -
    \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml2/src/data/products.xml b/fmpp/src/docs/examples/xml2/src/data/products.xml deleted file mode 100644 index a389a11..0000000 --- a/fmpp/src/docs/examples/xml2/src/data/products.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - K8 Widget - 500 - Foo Incorporated - This is a standard widget with highly durable thingamy. - - - Giant/S2 Widget - 2500 - Acmee Incorporated - This is an extra-large widget. - - - Micro Widget - 800 - Acmee Incorporated - This widget can even fit into your suitcase. - - - CXC Widget - 350 - Batman International - I have no idea... this is just a stupid example, OK? - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml2/src/index.html b/fmpp/src/docs/examples/xml2/src/index.html deleted file mode 100644 index 1953250..0000000 --- a/fmpp/src/docs/examples/xml2/src/index.html +++ /dev/null @@ -1,19 +0,0 @@ -<#escape x as x?html> - - - Product Catalog - - - -

    Product Catalog

    - -

    The available products are: - -

      -<#list prodXml.products.product?sort_by('name') as p> -
    • ${p.name} - -
    - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml2/src/product.html b/fmpp/src/docs/examples/xml2/src/product.html deleted file mode 100644 index b40cf35..0000000 --- a/fmpp/src/docs/examples/xml2/src/product.html +++ /dev/null @@ -1,36 +0,0 @@ -<@pp.dropOutputFile /> -<#list prodXml.products.product as p> -<@pp.changeOutputFile name="product_${p.@id}.html" /> -<#escape x as x?html> - - - ${p.name} - - - -

    ${p.name}

    - -

    Price: $${p.price} - -

    Description: -
    ${p.description} -

    - -

    Manufacturer: -
    Name: ${p.manufacturer} -<#assign m = manuXml.manufacturers['manufacturer[name="${p.manufacturer}"]']> -<#if m?has_content> - <#if m.address?has_content>
    Address: ${m.address} - <#if m.phone?has_content>
    Phone: ${m.phone} - <#if m.homepage?has_content>
    Homepage: ${m.homepage} - <#if m.email?has_content>
    Email: ${m.email} -<#else> - <@pp.warning message="Referenced manufacturer not found: ${p.manufacturer}" /> - - -


    -Back... - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/config.fmpp b/fmpp/src/docs/examples/xml_rendering/config.fmpp deleted file mode 100644 index 21fc6ef..0000000 --- a/fmpp/src/docs/examples/xml_rendering/config.fmpp +++ /dev/null @@ -1,19 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -xmlRenderings: [ - { - ifDocumentElementIs: product - template: renderer/product.html - } - { - ifDocumentElementIs: book - template: renderer/book.html - index: { - element: [part, chapter] - attribute: ppFile - numbering: hierarchical - value: '%e_%n.html' - } - } -] \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/src/bigwidget.xml b/fmpp/src/docs/examples/xml_rendering/src/bigwidget.xml deleted file mode 100644 index 72b8a0d..0000000 --- a/fmpp/src/docs/examples/xml_rendering/src/bigwidget.xml +++ /dev/null @@ -1,8 +0,0 @@ - - big widget - $15 - - This is an extra large widget, manufactured with a technology - developed by the NASA. - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/src/example1.xml b/fmpp/src/docs/examples/xml_rendering/src/example1.xml deleted file mode 100644 index f37601d..0000000 --- a/fmpp/src/docs/examples/xml_rendering/src/example1.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - -

    This is an example "book" that demonstrates FreeMarker and FMPP.

    -
    - - - -

    A paragraph with emphasized and marked sections.

    - - A quotation with emphasized and marked sections. - -

    A emphasized section with a marked section in it.

    -
    - - -

    Blah...

    -

    Blah blah...

    -
    -
    - - -

    Blah blah blah...

    -

    Blah blah blah blah...

    -
    - - -

    Blah blah blah blah blah...

    -

    Blah blah blah blah blah blah...

    -
    - - -

    Blah blah blah blah blah blah blah...

    -

    Blah blah blah blah blah blah blah blah...

    -
    -
    -
    \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/src/example2.xml b/fmpp/src/docs/examples/xml_rendering/src/example2.xml deleted file mode 100644 index d63a0b9..0000000 --- a/fmpp/src/docs/examples/xml_rendering/src/example2.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - -

    Yet another example book.

    -
    - - - -

    So you have seen that you can have more books...

    -
    -
    -
    \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/src/index.html b/fmpp/src/docs/examples/xml_rendering/src/index.html deleted file mode 100644 index 8154588..0000000 --- a/fmpp/src/docs/examples/xml_rendering/src/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - XML rendering example - - -

    XML rendering example

    -

    The "books": -

    -

    The "products": -

    - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/src/normalwidget.xml b/fmpp/src/docs/examples/xml_rendering/src/normalwidget.xml deleted file mode 100644 index fcb0753..0000000 --- a/fmpp/src/docs/examples/xml_rendering/src/normalwidget.xml +++ /dev/null @@ -1,7 +0,0 @@ - - normal widget - $5 - - This is a standard widget, with great quality pink painting. - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/src/renderer/book.html b/fmpp/src/docs/examples/xml_rendering/src/renderer/book.html deleted file mode 100644 index 8c155ae..0000000 --- a/fmpp/src/docs/examples/xml_rendering/src/renderer/book.html +++ /dev/null @@ -1,155 +0,0 @@ -<#-- -Renders a "book" XML to multiple HTML files. -This is a rather complex stuff... check the product.html first. ---> -<#escape x as x?html> -<@pp.dropOutputFile /> - -<#-- Calculating the prefix of output file names --> -<#assign prefix = pp.sourceFileName> -<#assign prefix = prefix?substring(0, prefix?last_index_of('.'))> -<#assign prefix = prefix + '_'> - -<#-- Calculate the ordered list of HTML pages, used for the nav. bar. --> -<#assign pages = pp.doc["//*[@ppFile != '']"]> - -<#-- Render the HTML pages --> -<#recurse pp.doc> - - -<#-- - *********************************************************************************** - Node handlers - *********************************************************************************** ---> - -<#macro book> - <@pp.nestOutputFile name="${prefix}index.html"> - <@Html title="${.node.@title}"> -

    Table of Contents

    -
      - <#list .node.part as part> -
    • ${part.@title} - <#local cs = part.chapter> - <#if cs?has_content> - - - -
    - <#recurse> - - - - -<#macro part> - <@pp.nestOutputFile name=prefix+.node.@ppFile> - <@Html title="${.node.@title}"> - <#local cs = .node.chapter> - <#if cs?has_content> -

    Part Contents

    - - - <#recurse> - - - - -<#macro chapter> - <@pp.nestOutputFile name=prefix+.node.@ppFile> - <@Html title="${.node.@title}"> - <#recurse> - - - - -<#macro p> -

    <#recurse>

    - - -<#macro quote> -
    <#recurse>
    - - -<#macro e> - <#recurse><#t> - - -<#macro mark> - <#recurse><#t> - - -<#macro @text> - ${.node}<#t> - - - -<#-- - *********************************************************************************** - Other macros - *********************************************************************************** ---> - -<#macro Html title> - - - ${title} - - - <@NavBar /> -
    -

    ${title}

    - <#nested> -
    - <@NavBar /> - - - - -<#macro NavBar> - <#local nodeName = .node?node_name> - <#if nodeName == 'book'> - Prev | Up | Next | ToC | Home - <#else> - <#local ppFile = .node.@ppFile> - <#local max = pages?size - 1> - <#list 0..max as i> - <#if pages[i].@ppFile == ppFile> - <#local idx = i> - <#break> - - - <#if idx != 0> - Prev<#t> - <#else> - Prev<#t> - - | - <#list .node?ancestors as a> - <#if a.@ppFile[0]??> - Up<#t> - <#break> - <#elseif a?node_name == 'book'> - Up<#t> - <#break> - - - | - <#if idx != max> - Next - <#else> - Next<#t> - - | - ToC | Home - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/src/renderer/ignoredir.fmpp b/fmpp/src/docs/examples/xml_rendering/src/renderer/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/xml_rendering/src/renderer/product.html b/fmpp/src/docs/examples/xml_rendering/src/renderer/product.html deleted file mode 100644 index 832fb06..0000000 --- a/fmpp/src/docs/examples/xml_rendering/src/renderer/product.html +++ /dev/null @@ -1,20 +0,0 @@ -<#-- -Renders a "product" XML to a HTML files. ---> -<#escape x as x?html> -<@pp.renameOutputFile extension="html" /> -<#assign prod = pp.doc.product> - - - Product: ${prod.name?cap_first} - - -

    ${prod.name?cap_first}

    -

    Price: only ${prod.price} -

    Description:
    - ${prod.description} -


    - Back... - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_rendering/src/smallwidget.xml b/fmpp/src/docs/examples/xml_rendering/src/smallwidget.xml deleted file mode 100644 index d23985c..0000000 --- a/fmpp/src/docs/examples/xml_rendering/src/smallwidget.xml +++ /dev/null @@ -1,8 +0,0 @@ - - small widget - $10 - - Always wanted a small widget, but never found it? - Now, then this one is for You! - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_try/config.fmpp b/fmpp/src/docs/examples/xml_try/config.fmpp deleted file mode 100644 index 735bdd4..0000000 --- a/fmpp/src/docs/examples/xml_try/config.fmpp +++ /dev/null @@ -1,12 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - doc:xml( - data/test.xml - { - removeComments: false - index: {element: [part, chapter, para], value: '%n'} - } - ) -} \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_try/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/xml_try/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/xml_try/src/data/test.xml b/fmpp/src/docs/examples/xml_try/src/data/test.xml deleted file mode 100644 index 24836d7..0000000 --- a/fmpp/src/docs/examples/xml_try/src/data/test.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - A - - - - A - B - - - A - B - - - - - A - B - C - - - A - B - C - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_try/src/index.html b/fmpp/src/docs/examples/xml_try/src/index.html deleted file mode 100644 index 8b5883a..0000000 --- a/fmpp/src/docs/examples/xml_try/src/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - - XML Tree Dump - - <@pp.setOutputEncoding encoding="UTF-8" /> - - - -

    XML Tree Dump

    - -<@dumpXml doc /> - -

    Legend: -

      -
    • <foo bar="123">: Element node -
    • "Blah blah": Text node -
    • <?foo bar ?>: Processing instruction node -
    • <!-- Blah blah -->: Comment node -
    • foo: Other node -
    - - - -<#function showXmlSource s> - <#return s?xml?xml?replace(" ", r" ")?replace('\n', '&#xA;')?replace('\r', '&#xD;')> - - -<#-- -Prints an XML node tree as colored HTML. ---> -<#macro dumpXml node> -
      - <@dumpXml_internal node /> -
    - - -<#macro dumpXml_internal node> - <#local type = node?node_type> - <#if type == 'element'> -
  • <<#rt> - <#if node?node_namespace?? && node?node_namespace != ''> - '${node?node_namespace}':<#t> - - ${node?node_name}<#t> - <#list node.@@ as att> - ${' '}<#t> - <#if att?node_namespace?? && att?node_namespace != ''> - '${att?node_namespace}':<#t> - - ${att?node_name}="${showXmlSource(att)}"<#t> - - ><#lt> - <#elseif type == 'text'> -
  • "${showXmlSource(node)}"<#lt> - <#elseif type == 'pi'> - <#local nodeName = node?node_name> -
  • <?${nodeName?substring(4)} ${showXmlSource(node)}?><#lt> - <#elseif type == 'comment'> -
  • <!-- ${node} --><#lt> - <#else> -
  • ${node?node_type}<#lt> - - <#if node?children?size != 0> -
      - <#list node?children as c> - <@dumpXml_internal c /><#t> - -
    - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_validating/config.fmpp b/fmpp/src/docs/examples/xml_validating/config.fmpp deleted file mode 100644 index 96ec9ec..0000000 --- a/fmpp/src/docs/examples/xml_validating/config.fmpp +++ /dev/null @@ -1,8 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - doc: xml(data/test.xhtml) -} -xmlCatalogFiles: dtds/catalog.xml -validateXml \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_validating/dtds/catalog.xml b/fmpp/src/docs/examples/xml_validating/dtds/catalog.xml deleted file mode 100644 index c180196..0000000 --- a/fmpp/src/docs/examples/xml_validating/dtds/catalog.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_validating/dtds/xhtml-lat1.ent b/fmpp/src/docs/examples/xml_validating/dtds/xhtml-lat1.ent deleted file mode 100644 index ffee223..0000000 --- a/fmpp/src/docs/examples/xml_validating/dtds/xhtml-lat1.ent +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/src/docs/examples/xml_validating/dtds/xhtml-special.ent b/fmpp/src/docs/examples/xml_validating/dtds/xhtml-special.ent deleted file mode 100644 index ca358b2..0000000 --- a/fmpp/src/docs/examples/xml_validating/dtds/xhtml-special.ent +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/src/docs/examples/xml_validating/dtds/xhtml-symbol.ent b/fmpp/src/docs/examples/xml_validating/dtds/xhtml-symbol.ent deleted file mode 100644 index 63c2abf..0000000 --- a/fmpp/src/docs/examples/xml_validating/dtds/xhtml-symbol.ent +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/src/docs/examples/xml_validating/dtds/xhtml1-transitional.dtd b/fmpp/src/docs/examples/xml_validating/dtds/xhtml1-transitional.dtd deleted file mode 100644 index 1b99c61..0000000 --- a/fmpp/src/docs/examples/xml_validating/dtds/xhtml1-transitional.dtd +++ /dev/null @@ -1,1201 +0,0 @@ - - - - - -%HTMLlat1; - - -%HTMLsymbol; - - -%HTMLspecial; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/src/docs/examples/xml_validating/src/data/ignoredir.fmpp b/fmpp/src/docs/examples/xml_validating/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/examples/xml_validating/src/data/test.xhtml b/fmpp/src/docs/examples/xml_validating/src/data/test.xhtml deleted file mode 100644 index f73cf96..0000000 --- a/fmpp/src/docs/examples/xml_validating/src/data/test.xhtml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - Test - - - -

    Test

    -

    p1

    -

    p2

    -

    p3

    - - - \ No newline at end of file diff --git a/fmpp/src/docs/examples/xml_validating/src/test.txt b/fmpp/src/docs/examples/xml_validating/src/test.txt deleted file mode 100644 index be308fa..0000000 --- a/fmpp/src/docs/examples/xml_validating/src/test.txt +++ /dev/null @@ -1,16 +0,0 @@ -<#ftl ns_prefixes={'D':'http://www.w3.org/1999/xhtml'}> -<#-- Note: Prefix D is a reserver in FreeMarker, and stands for Default --> - -Title: -${doc.html.head.title} - -Paragraphs: -<#list doc.**.p as p> -- ${p} - - -Paragraphs where class is "foo": -<#-- Note that in XPath expressions you must use explicit prefix --> -<#list doc['//D:p[@class="foo"]'] as p> -- ${p} - \ No newline at end of file diff --git a/fmpp/src/docs/figures/fmpparch.png b/fmpp/src/docs/figures/fmpparch.png deleted file mode 100644 index fbfe283..0000000 Binary files a/fmpp/src/docs/figures/fmpparch.png and /dev/null differ diff --git a/fmpp/src/docs/figures/qtour_step1.png b/fmpp/src/docs/figures/qtour_step1.png deleted file mode 100644 index 7e37afa..0000000 Binary files a/fmpp/src/docs/figures/qtour_step1.png and /dev/null differ diff --git a/fmpp/src/docs/figures/qtour_step1_src.png b/fmpp/src/docs/figures/qtour_step1_src.png deleted file mode 100644 index 14c11e8..0000000 Binary files a/fmpp/src/docs/figures/qtour_step1_src.png and /dev/null differ diff --git a/fmpp/src/docs/figures/qtour_step2.png b/fmpp/src/docs/figures/qtour_step2.png deleted file mode 100644 index ec0d321..0000000 Binary files a/fmpp/src/docs/figures/qtour_step2.png and /dev/null differ diff --git a/fmpp/src/docs/figures/qtour_step4.png b/fmpp/src/docs/figures/qtour_step4.png deleted file mode 100644 index 01f02bc..0000000 Binary files a/fmpp/src/docs/figures/qtour_step4.png and /dev/null differ diff --git a/fmpp/src/docs/ftl.html b/fmpp/src/docs/ftl.html deleted file mode 100644 index 3af23aa..0000000 --- a/fmpp/src/docs/ftl.html +++ /dev/null @@ -1,5 +0,0 @@ -<@page title="FTL - FreeMarker Template Language" keywords="FTL"> - -

    This is the syntax used for the template files. Please read the <@fma href="dgui_template_overallstructure.html">FreeMarker Manual about this.

    - - diff --git a/fmpp/src/docs/include/ignoredir.fmpp b/fmpp/src/docs/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/include/page.ftl b/fmpp/src/docs/include/page.ftl deleted file mode 100644 index 349061a..0000000 --- a/fmpp/src/docs/include/page.ftl +++ /dev/null @@ -1,331 +0,0 @@ -<@pp.ignoreOutput> - -<#-- -"page" macro and its private helpers. ---> - -<#escape x as x?html> - -<#macro page title keywords toc=true> - <#assign P_sectLevel = 0> - <#assign P_sectId = 0> - <#assign P_sects = pp.newWritableSequence()> - <#assign P_index = pp.newWritableSequence()> - <#assign P_settings_in_context = pp.newWritableSequence()> - - <#local navCtx = page_buildNavigationContext(title)> - - <@pp.restartOutputFile /> - <#compress> - - - - - - - - <#if !navCtx.isTheIndexPage> - ${title} - FMPP - - <#else> - - - FMPP: Text file preprocessor (HTML preprocessor) - - - - - - - - <#-- @todo: move seo tags to separate macro --> - <#local baseUrl = "http://fmpp.sourceforge.net"><#-- @todo: this should come from build settings --> - - - - <#if navCtx.prevLink?has_content> - - - <#if navCtx.nextLink?has_content> - - - - - - - - - - - - - <@page_header navCtx=navCtx title=title /> - -
    -
    - -

    ${title}

    - - <#local needHr = false> - <#if toc> - <#local content> - <#nested> - -
    - <#if (P_index?size != 0 || P_sects?size != 0 || needHr)> -
    - <#if P_sects?size != 0> - <@.namespace.toc title="Page contents"> - <#list P_sects as sect> - <@toci href="#" + sect.id title=sect.title/> - - - <#local needHr = true> - - <#if P_index?size != 0> -

    Alphabetical index of keys:

    -
      - <#list P_index?sort_by("title") as e> -
    • ${e.title} - -
    - <#local needHr = true> - - <#if needHr> - <#--><@hr/>--> - -
    - -
    - <#noescape>${content} -
    -
    - <#else> -
    - <#nested> -
    - - <#compress> -
    -
    - - - - - - <#assign P_reportBugPrinted = false> - - - -<#--- - @param navCtx - @param title ---> -<#macro page_header navCtx title> - <#compress> - - - - - -<#macro page_pagers navCtx bugReportingIcon=true> - <#if navCtx.showPagerButtons || !navCtx.isTheIndexPage || (bugReportingIcon && !P_reportBugPrinted?default(false))> - - - - -<#macro page_breadcrumbs navCtx> - <#if navCtx.page_breadcrumbs?size == 0> - <#stop "Couldn't find page_breadcrumbs path to: " + pp.outputFileName> - - <#t> - - -<#function page_getBreadcrumbsTo targetFile cur=manualFiles parentPath=[]> - <#if !cur?is_sequence> <#-- leaf node --> - <#if cur == targetFile> - <#return parentPath + [ { 'file': cur, 'title': pp.s.manualFileTitles[cur] } ]> - <#else> - <#-- Not found under cur: --> - <#return []> - - <#elseif cur[0].file == targetFile> <#-- non-leaf node == target --> - <#return parentPath + [ cur[0] ]> - - - <#list cur[1..] as child> - <#local path = page_getBreadcrumbsTo(targetFile, child, parentPath + [ cur[0] ])> - <#if path?size != 0> - <#-- Found it: --> - <#return path> - - - <#-- Not found under cur: --> - <#return []> - - -<#function page_buildNavigationContext title> - <#local tocLink = ""> - <#local prevLink = ""> - <#local nextLink = ""> - - <#local showPagerButtons = false> - <#list flattenedManualFiles as f> - <#if pp.outputFile = f> - <#local showPagerButtons = true> - <#if !pp.s.manualFileTitles??> - <@pp.set hash=pp.s key="manualFileTitles" value=pp.newWritableHash()/> - - <@pp.set hash=pp.s.manualFileTitles key=f value=title/> - <#if f_index != 0> - <#local prevLink = pp.home + flattenedManualFiles[f_index - 1]> - - <#if f_has_next> - <#local nextLink = pp.home + flattenedManualFiles[f_index + 1]> - - <#local tocLink = pp.home + "manual.html"> - <#break> - - - - <#return { - 'isTheIndexPage': pp.outputFileName == "index.html", - 'isContentsPage': pp.outputFileName == "manual.html", - 'showPagerButtons': showPagerButtons, - 'tocLink': tocLink, - 'prevLink': prevLink, - 'nextLink': nextLink, - 'page_breadcrumbs': page_getBreadcrumbsTo(pp.outputFileName) - }> - - -<#macro page_social> - <#local socialLinks = [ - { - "url": "https://github.com/freemarker/fmpp", - "class": "github", - "title": "Github" - }, { - "url": "https://twitter.com/freemarker", - "class": "twitter", - "title": "Twitter" - } - ]> - - <#t> - - - - - \ No newline at end of file diff --git a/fmpp/src/docs/include/site.ftl b/fmpp/src/docs/include/site.ftl deleted file mode 100644 index cbc3984..0000000 --- a/fmpp/src/docs/include/site.ftl +++ /dev/null @@ -1,343 +0,0 @@ -<@pp.ignoreOutput> -<#escape x as x?html> - -<#assign P_titleColor = "#000000"> -<#assign P_font = "Arial, sans-serif"> - -<#include "page.ftl"> - -<#macro figure src alt> - <#local label><#nested> - <#if label?length != 0> -

    - - <@html.img src="${pp.home}figures/${src}" alt=alt /><#t> - <#if label?length != 0> -
    <#lt> -
    Figure: <#noescape>${label} -

    - - - -<#macro sect title anchor=''> - <#assign P_sectLevel = P_sectLevel + 1> - <#assign P_sectId = P_sectId + 1> - <#if anchor = ''> - <#local anchor = "sect" + P_sectId> - - <#if P_sectLevel = 1> - <@pp.add seq=P_sects value={"title":title, "id":anchor} /> - <@.namespace.anchor anchor /> -

    <#rt> - <#if title?starts_with('ex:')> - <@title[3..(title?length-1)]?interpret /><#t> - <#else> - ${title}<#t> - -

    <#lt> - <#nested> - <@pp.clear seq=P_settings_in_context /> - <#elseif P_sectLevel = 2> - <@.namespace.anchor anchor /> -

    <#rt> - <#if title?starts_with('ex:')> - <@title[3..(title?length-1)]?interpret /><#t> - <#else> - ${title}<#t> - -

    <#lt> - <#nested> - <#else> - <#stop "@sect is nested too deeply."> - - <#assign P_sectLevel = P_sectLevel - 1> - - -<#macro anchor id> - <#if id != ''> - <#if !pp.s.anchors??> - <@pp.set hash=pp.s key="anchors" value=pp.newWritableHash() /> - - <@pp.set hash=pp.s.anchors key='${pp.outputFile}#${id}' value=true /> - <#lt> - - - -<#-- Draws a 100% width horizontal line with the given color. Do not use inside another table (IE 5)... --> -<#macro hr> -
    - - -<#macro c><#nested> - -<#macro r><#nested> - -<#macro e><#nested> - -<#macro note>

    Note: <#nested>

    - -<#macro s check=true> - <#local name> - <#nested> - - <#if check && !stdSettings[name]??> - <#stop 'This is not a standard setting: ${name} ' /> - - <#if check> - <#local link = true> - <#list P_settings_in_context as s> - <#if s = name> - <#local link = false> - <#break> - - - <#else> - <#local link = false> - - <#if link><#t> - ${name}<#t> - <#if link><#t> - - -<#macro prg escape=true> - <#local body><#nested> -
    <#t>
    -    <#if !escape>
    -      <#noescape>${body?chop_linebreak}<#t>
    -    <#else>
    -      ${body?chop_linebreak}<#t>
    -    
    -  
    <#t> - - -<#macro toc title=''> - <#if title != ''> -

    ${title}

    - -
      - <#nested> -
    -
    - - -<#macro toci href title> - <#if href=''> -
  • ${title}<#nested>
  • - <#else> -
  • ${title}<#nested>
  • - - - -<#macro setting name type default merging clShort='' deprecated='' antAltAtt=''> - <#if !stdSettings[name]??> - <#stop 'No such standard setting exists: ${name}'> - - <@_index name /> - <@pp.add seq=P_settings_in_context value=name /> -

    - Name: ${name}
    - <#if deprecated?length != 0> - Deprecated! <@deprecated?interpret />
    - - Type: ${type}
    - Default: <#rt> - <#if default != ''> - <#if default?starts_with('ex:')> - <@default[3..(default?length - 1)]?interpret />
    <#lt> - <#else> - <@c>${default}
    <#lt> - - <#else> - No default value
    <#lt> - - <#if !(type?starts_with('string') || type?starts_with('integer') || type?starts_with('boolean'))> - <#if !(type?starts_with('sequence') || type?starts_with('hash'))> - <#stop "Unknown setting type: ${type}"> - - <#-- - Merging: ${merging?string('yes', 'no')}
    <#lt> - --> - <#if !merging> - <#stop "The \"Merging\" field was hidden because all collection-like types " - + "were merged till now. If it has changed, you have to review the " - + "documentation and this part of site.ftl. The problematic setting was: " - + name> - - - <#if clShort != ''> - Command-line short name: ${clShort}
    <#lt> - - <#if antAltAtt != ''> - Ant task attribute name alternative: ${antAltAtt}
    <#lt> - -

    - - -<#macro variable name type nestedContent=false result='' anchor='' deprecated=''> - <@_checkType type /> - <@_index name /> - <@sect title=name anchor=anchor> - <#if deprecated != ''> - Deprecated: <@deprecated?interpret />
    - - Type: ${type} - <#assign P_params = pp.newWritableSequence()> - <#local body><#nested> - <#if (type = 'directive' || type = 'method')> - <#if type="directive"> -
    Supports nested content: ${nestedContent?string("yes", "no")} - <#else> -
    Result type: ${result} - -
    Parameters: - <#if P_params?size != 0> - <#if type="directive"> -
      - <#list P_params as param> -
    • ${param.name}<#if param.default != ''>=${param.default}: - ${param.type}. - <#noescape>${param.desc} - -
    - <#else> -
      - <#list P_params as param> -
    1. ${param.name}: ${param.type}<#if param.optional>, optional. - <#noescape>${param.desc} - -
    - - <#else> - none - - - <#noescape>${body} - - - -<#macro dataLoader name> - <@_index name=name /> - <@sect title=name> - <#assign P_params = pp.newWritableSequence()> - <#local body><#nested> - Parameters: - <#if P_params?size != 0> -
      - <#list P_params as param> -
    1. ${param.name}: ${param.type}<#if param.optional>, optional. - <#noescape>${param.desc} - -
    - <#else> - none
    - - <#noescape>${body} - - - -<#macro param name type optional=false default=''> - <#local body><#nested> - <@pp.add seq=P_params value={ - "name":name, "type":type, "desc":body, <#-- common --> - "optional":optional, <#-- methods only --> - "default":default} <#-- directives only --> - /> - - -<#macro _index name> - <#if !P_indexId??> - <#assign P_indexId = 1> - <#else> - <#assign P_indexId = P_indexId + 1> - - <#assign id = "key_" + name?replace(' ', '_')?replace('.', '_')> - <@pp.add seq=P_index value={"id":id, "title":name}/> - <@anchor id /> - - -<#macro _checkType type> - <#if !(type = 'directive' || type = 'method' || type = 'string' || type = 'number' || type='boolean' - || type = 'hash' || type = 'sequence' || type = 'writable hash' || type = 'writable sequence' - || type = 'date' || type = 'date (date only)' || type = 'date (time only)' - || type = 'date (date+time)' - || type = 'any' || type = 'node') - > - <#stop 'Bad variable type: ' + type> - - - -<#macro a href rel=""> - rel="${rel}"><#nested><#t> - <#if !pp.s.hrefs??> - <@pp.set hash=pp.s key="hrefs" value=pp.newWritableSequence()/> - - <#local x = href?index_of('#')> - <#if x != -1> - <#if x != 0> - <#local file = href[0..x-1]> - <#else> - <#local file = ''> - - <#local anchor = href[(x+1)..(href?length - 1)]> - <#if file?length = 0> - <#local file = pp.outputFileName> - - <#else> - <#local file = href> - <#local anchor = ''> - - <@pp.add - seq=pp.s.hrefs - value={"source":pp.sourceFile, "href":href, "file":pp.outputRootRelativePath(file), "anchor":anchor} - /> - - -<#macro reportBugs> -
    -

    Please report bugs you find! Any programming, documentation content or grammatical mistakes (even minor typos). Thank you!

    -

    Use the bug reporting Web page,
    - or e-mail: <@myEmail />

    - -

    Please report FreeMarker bugs at the FreeMarker bug reporting Web page, not for me. If you are not sure if you have found a FreeMarker or FMPP bug, just report it as an FMPP bug.

    -
    - - <#assign P_reportBugPrinted = true> - - -<#macro myEmail plainText=false> - <#if plainText> - ddekanyREMOVETHIS@freemail.hu (delete the "REMOVETHIS"!)<#t> - <#else> - ddekanyREMOVETHIS@freemail.hu (delete the "REMOVETHIS"!)<#t> - - - -<#macro fmppPath path=''> - <@c><@r><FMPP><#if path != ''>/${path}<#t> - - -<#macro example path=''> - <#if path != ''> - <@fmppPath path="docs/examples/${path}" /> - <#else> - <@fmppPath path="docs/examples" /> - - - -<#macro nbc>Warning! Incompatible change! - -<#macro nbca>Warning! Incompatible Java API change! - -<#macro attc>Attention! - -<#macro url href rel=""> rel="${rel}">${href} - -<#macro fma href=''> - <#if href = ''> - <#local href='index.html'> - - <@a href="${pp.home}freemarker/${href}" rel="nofollow"><#nested><#t> - - - - \ No newline at end of file diff --git a/fmpp/src/docs/index.html b/fmpp/src/docs/index.html deleted file mode 100644 index 3d9c5c4..0000000 --- a/fmpp/src/docs/index.html +++ /dev/null @@ -1,134 +0,0 @@ -<@page title="FMPP - FreeMarker-based file PreProcessor" keywords="homepage"> - -<@sect title="What is FMPP?"> -

    FMPP is a general-purpose text file preprocessing tool that uses FreeMarker templates. It process entire directories recursively. It can be used for generating complete static websites, source code, configuration files, etc. It can insert data from sources like CSV, XML, and JSON into the generated files. (You can add new kind of data sources in Java.) <@a href="qtour.html">See the Tutorial for a more concrete introduction.

    - -

    FMPP can be used with UN*X-style command-line interface, or as Ant task, or can be embedded into your application using its Java API.

    - -

    FMPP was written in Java, thus it runs on all modern platforms (Windows, "Linux", OS X, etc.).

    - -

    FMPP is Free software under Apache License 2.0. <@a href="license.html">See license...

    - - <@sect title="Features"> -

    A quick list of FMPP capabilities:

    -
      -
    • FreeMarker as the preprocessor language: -
        -
      • All the usual template constructs, such as include, if/else/elseif, loop.
      • -
      • Macros with named arguments and nested content (body).
      • -
      • Variables (global, or local for a macro call)
      • -
      • Complex expressions using string, arithmetical and logical operations.
      • - Extensible with custom functions. -
      • Automatic and manual escaping (HTML, XML, custom function)
      • -
      • Transforming (filtering) blocks of output; extensible with custom transformations in Java.
      • -
      • Capturing block of output into a variable.
      • -
      • Charset aware, internally uses UNICODE.
      • -
      • Number and date/time formatting with masks (patterns). Locale sensitive formatting.
      • -
      -
    • -
    • Bulk file processing: -
        -
      • Process entire directories recursively.
      • -
      • Different file processing mode can be chosen for each file, based on path patterns (as file extension): execute file as template, or parse it as XML and then render it to output with a template, or binary-copy it, or ignore it.
      • -
      • Can ignore bad source files and log the error message into a text file.
      • -
      • Can guarantee that certain files will be processed later than others.
      • -
      -
    • -
    • You can expose data from arbitrary data sources be writing extensions in Java. - Currently out-of-the-box supported data sources: -
        -
      • XML file
      • -
      • CSV and tab-separated text file
      • -
      • JSON file
      • -
      • Java "properties" file
      • -
      • Ant properties, Ant project and target information
      • -
      • System clock
      • -
      • Plain text file
      • -
      -
    • -
    • Other highlighted features: -
        -
      • Output splitting: a single source file can generate multiple output files (including 0 output files).
      • -
      • Automatic file inclusion, automatic escaping, and whatnot that can be done with automatically inserted headers and footers, chosen based on path patterns.
      • -
      • Generate HTML <img>-s with calculated width and height.
      • -
      • Calculate the relative path to the home directory, or to any other file.
      • -
      • Rendering (transforming) XML files with FreeMarker templates. (Similar to the typical XSLT usage pattern.)
      • -
      • Query the size/existence of source files.
      • -
      • Query output encoding (charset).
      • -
      • URL-escaping (with the actual output charset).
      • -
      -
    • -
    - - - - -<@sect title="Documentation"> - <#if online> -

    This on-line documentation is for FMPP version ${pp.version} + FreeMarker ${pp.freemarkerVersion}. - The full documentation of the version you are using can be found in the <@c>docs directory of the installed FMPP.

    - -
      -
    • <@a href="manual.html"><@e>FMPP Manual
    • -
    • <@a href="api/index.html">FMPP Java API
    • -
    • <@fma>FreeMarker Manual
    • -
    • <@fma href="api/index.html">FreeMarker Java API
    • -
    - - -<@sect title="Download"> -<#if online> - <#macro downloadLink fileName> - <#t> - ${fileName}<#t> - <#local rfile=basedir + pp.slash + "build/dist" + pp.slash + fileName /> - <#if pp.realFileExists(rfile)> - (${(pp.realFileSize(rfile)/1024/1024)?string("#0.0")} M) - <#else> - <#stop 'File to download missing: ${rfile}'> - - - -

    The latest released version is FMPP ${pp.version} (comes with FreeMarker ${pp.freemarkerVersion}, but <@a href="installing.html#updatingFreeMarker">you can replace it with a later version).

    - -

    Downloads include "binaries", all documentation, and source code.

    - -
      <#t> -
    • <@downloadLink "fmpp_" + pp.version + ".tar.gz" />
    • <#t> -
    • or <@downloadLink "fmpp_" + pp.version + ".zip" />
    • <#t> -
    <#t> - -

    Installation instructions are <@a href="installing.html">here, in the Manual.

    - -

    FMPP is a Java application so it requires Java to be installed on your machine (version 1.4 or later).

    - -

    The FMPP Ant task (ignore if you don't know what Ant is) requires Ant 1.5.1 or later.

    - -

    <@a href="versions.html">Change log (version history)...

    -<#else> -

    To download the latest release, please visit the FMPP homepage: <@url href="http://fmpp.sourceforge.net/" />

    - - -

    For <@e>text editor and IDE plug-ins and other FreeMarker template-related tools, please visit the FreeMarker homepage: http://freemarker.org/ (mirror: http://freemarker.sourceforge.net/)

    - - -<@sect title="Contact"> - -

    Ask for <@e>help or provide suggestions:

    -
      -
    • on the mailing list (The preferred way. Low traffic.):
    • -
        -
      • Subscribe/unsubscribe: <@url href="http://lists.sourceforge.net/mailman/listinfo/fmpp-open" />
      • -
      • News group interface: <@url href="nntp://news.gmane.org/gmane.comp.text.fmpp" />
      • -
      • Web interface (read only): <@url href="http://news.gmane.org/thread.php?group=gmane.comp.text.fmpp" />
      • -
      - -
    • on the SourceForge.net Web forum: <@url href="http://sourceforge.net/forum/forum.php?forum_id=254571" />
    • -
    • with private e-mail: <@myEmail />
    • -
    - - <@reportBugs /> - - - - \ No newline at end of file diff --git a/fmpp/src/docs/installing.html b/fmpp/src/docs/installing.html deleted file mode 100644 index f7a5e97..0000000 --- a/fmpp/src/docs/installing.html +++ /dev/null @@ -1,84 +0,0 @@ -<@page title="Installing" keywords="installing, install, setup"> - -<@sect title="Warning!"> -

    Please understand that FMPP, as a bulk file processor, may generates high amount of output files, and <@e>overwrites all files with the same names as the names of output files without warning. It's a practical decision comes from the usage pattern of the tool. So watch where will the output files go.

    - -

    Also note that, according <@a href="license.html">the license, the author does not take responsibly if the usage of FMPP causes harm for you somehow.

    - - -<@sect title="Pre-requirements"> -
      -
    • Java must be installed on your machine (version 1.4 or later). Note that Java is available for free, and on various platforms (Windows, OS X, "Linux", etc.), so FMPP works on many platforms. -
    • If you want to use the FMPP Ant task, you need Ant 1.5.1 or later. If you don't know what's Ant then don't worry, you will not need it. -
    - - -<@sect title="Extracting"> -

    Extract the downloaded archive file (<@c>fmpp_<@r>X.<@r>X.<@r>X.tar.gz or <@c>fmpp_<@r>X.<@r>X.<@r>X.zip) into the directory where you prefer to store FMPP. For Windows users it is typically <@c>C:\fmpp or <@c>C:\Program Files\fmpp, for UN*X users it is typically <@c>~/opt/fmpp or <@c>/opt/fmpp or <@c>/usr/lib/fmpp (where <@c>fmpp is the extracted <@c>fmpp_<@r>X.<@r>X.<@r>X directory after renaming). From now on I will refer to this directory as <@c><@r><FMPP_HOME>.

    - -

    - - - -<@sect title="Setup the command-line tool" anchor="commandLineTool"> - -<@sect title="On Windows"> -

    The steps are:

    -
      -
    1. Extract the downloaded archive file (<@c>fmpp_${pp.version}.tar.gz or <@c>fmpp_${pp.version}.zip) into <@c>C:\Program Files\fmpp (note that "Program Files" may be shown in a localized form, like "Programme") or <@c>C:\fmpp or wherever you prefer to. From now on I will refer to this directory as <@c><@r><FMPP_HOME>
    2. -
    3. For convenience, add <@c><@r><FMPP_HOME>/bin to the <@c>PATH environment variable. (How? Google: set path windows)
    4. -
    5. Check if <@c>fmpp.bat isn't present in <@c>C:\Windows (or in another directory in the <@c>PATH) from an earlier installation. Delete it if it does.
    6. -
    7. Check if the <@c>JAVA_HOME environment variable is set correctly (should point to your Java installation directory, not its <@c>bin subdirectory), or else that the intended version of the <@c>java executable is in the <@c>PATH.
    8. -
    9. To check that everything works, open a command line window and issue: <@c>fmpp --version
    10. -
    - -

    Note: Because of the limitations of <@c>.bat files, you may get error messages as "The input line is too long". To solve this, install FMPP in a more "shallow" directory, so that the path to the FMPP related files will be shorter.

    - - - -<@sect title="On UN*X (Linux, FreeBSD, OS X, etc.)"> -

    The steps are:

    -
      -
    1. Extract the downloaded archive file (<@c>fmpp_${pp.version}.tar.gz or <@c>fmpp_${pp.version}.zip) into the <@c>/usr/lib/fmpp or <@c>/opt/fmpp directory (conventions vary by distribution), or wherever you prefer to. From now on I will refer to this directory as <@c><@r><FMPP_HOME>. -
    2. -
    3. For convenience, create a soft link somewhere in the <@c>PATH, like <@c>sudo ln -s <@r><FMPP_HOME>/bin/fmpp /usr/bin/fmpp.
    4. -
    5. Issue <@c>which fmpp to see if it's not shadowed by an earlier installation elsewhere.
    6. -
    7. Check if the intended version of the <@c>java executable is in the <@c>PATH, or else that the <@c>JAVA_HOME environment variable is set correctly (should point to your Java installation directory, not its <@c>bin subdirectory).
    8. -
    9. To check that everything works, open a command line window and issue: <@c>fmpp --version
    10. -
    - - -<@sect title="Notes"> -
      -
    • If there's a <@c>FMPP_HOME environment variable, it <@c><@r><FMPP_HOME>\bin\fmpp.bat and <@c><@r><FMPP_HOME>\bin\fmpp will use that directory instead of its own grandparent directory.
    • -
    • You can run FMPP without the provided shell scripts directly with the <@c>java command, like <@c>java -jar <@r><FMPP_HOME>/lib/fmpp.jar. (You can also put all required jar-s and class directories into the <@c>CLASSPATH and then issue <@c>java fmpp.tools.CommandLine.) Note though that you will lose console width detection with these approaches.
    • -
    • You can move the jars into the <@c>lib subdirectory of Ant (if you want to use the Ant task anyway). If you do this, the command line tool need Ant be installed on a "standard" location (like <@c>C:\Program Files\ant), or <@c>ANT_HOME must be correctly set.
    • -
    - - - - - -<@sect title="Setup the Ant task"> - -

    If you want to use FMPP as Ant task, copy the required jar files from <@c><@r><FMPP_HOME>/lib into the <@c>lib directory of your Ant installation (issuing <@c>ant install from <@c><@r><FMPP_HOME> will do this for you), or ensure that the jars are in the <@c>CLASSPATH environment variable. Then, whenever you need the FMPP task in a project, add this line to your <@c>build.xml:

    - -<@prg> - -

    And then you can use the <@c><fmpp <@r>...> task. - - - -<@sect title="Installing optional parts and custom extensions"> - -

    For the command-line tool, simply drop the jar file that contains the required classes into the <@c><@r><FMPP_HOME>/lib directory (or, into the Ant <@c>lib directory, if you store <@c>fmpp.jar there only). For the Ant task, either ensure that the required jars are in the <@c>CLASSPATH, or drop the jars into the <@c>lib directory of your Ant installation.

    - - - -<@sect title="Updating FreeMarker" anchor="updatingFreeMarker"> - -

    You can replace the included FreeMarker version with a later version. Download the latest backward compatible FreeMarker release, and overwrite <@c><@r><FMPP_HOME>/lib/freemarker.jar with the <@c>freemarker.jar of the FreeMarker release. (Of course, if you are using the FMPP Ant task, you may need to replace the <@c>freemarker.jar in the <@c>lib directory of the Ant installation too.)

    - - - - \ No newline at end of file diff --git a/fmpp/src/docs/license.html b/fmpp/src/docs/license.html deleted file mode 100644 index e47a362..0000000 --- a/fmpp/src/docs/license.html +++ /dev/null @@ -1,3 +0,0 @@ -<@page title="License" keywords="licence"> -
    ${license?chop_linebreak}
    - diff --git a/fmpp/src/docs/manualtocs_T2.html b/fmpp/src/docs/manualtocs_T2.html deleted file mode 100644 index 6693b36..0000000 --- a/fmpp/src/docs/manualtocs_T2.html +++ /dev/null @@ -1,47 +0,0 @@ -<#-- Generates the Table of Contents pages for the FMPP Manual --> - -<@pp.dropOutputFile/> - -<@generateTocPage manualFiles, true /> - -<#macro generateTocPage seq, mainToc=false> - <#local tocDesc = seq[0]> - <@pp.nestOutputFile name=pp.home+tocDesc.file> - <@page title=tocDesc.title keywords=tocDesc.keywords?if_exists> - <#if tocDesc.preToc??> - <@tocDesc.preToc?interpret /> - - <#if mainToc> - <@recursiveToc seq[1..], 'Table of Contents' /> - <#else> - <@recursiveToc seq[1..], 'Chapter Contents' /> - - <#if tocDesc.postToc??> - <@tocDesc.postToc?interpret /> - - - - - <#list seq as subseq> - <#if subseq?is_sequence> - <@generateTocPage subseq /> - - - - -<#macro recursiveToc seq title=''> - <@toc title> - <#list seq as f> - <#if f?is_sequence> - <@toci href=pp.home+f[0].file title=f[0].title> - <@recursiveToc f[1..f?size - 1] /> - - <#else> - <#if !pp.s.manualFileTitles[f]??> - <#stop "Missing file or file didn't used <@page>: ${f}"> - - <@toci href=pp.home+f title=pp.s.manualFileTitles[f] /> - - - - diff --git a/fmpp/src/docs/overview.html b/fmpp/src/docs/overview.html deleted file mode 100644 index dc56460..0000000 --- a/fmpp/src/docs/overview.html +++ /dev/null @@ -1,111 +0,0 @@ -<@page title="Concepts and Terminology" keywords="overview"> - -

    Read the <@a href="qtour.html">Tutorial before this, otherwise you won't understand this chapter.

    - - -<@sect title="FMPP core and front-ends"> - -

    FMPP consist of the FMPP core, and the front-ends wrapping that. Front-ends provide interface by which you can communicate with the FMPP core. For example the command-line tool (that we have used previously) is a front-end that provides command-line interface. The FMPP Ant task is another front-end that provides Ant task interface. A graphical front-end could be written too. But whatever front-end you use, you (indirectly) use the FMPP core. So most of the documentation is about the FMPP core, which basically encapsulates all abilities of FMPP.

    - -

    Note that the FMPP core wraps FreeMarker, the template engine.

    - -

    For more info see <@a href="writefrontend.html">the chapter about writing front-ends.

    - - - - -<@sect title="Settings" anchor="settings"> - -

    Settings are variables that describe for the FMPP core what and how to do. Examples of settings you have already met: <@s>sourceRoot, <@s>outputRoot, <@s>data. Front-ends basically do nothing else, just set the settings of the core, and then "trigger" the core to do the job. So if you know <@a href='settings.html'>all settings, then basically you know everything FMPP can do.

    - -

    It's a good practice to store the settings of your project in <@a href='configfile.html'>configuration files (as <@c>config.fmpp was). As the FMPP core understand them, you can use them with all front-ends. Configuration files use a simple FMPP specific language, <@a href='tdd.html'>TDD.

    - - - - -<@sect title="File processing and related terms"> - -

    <@e>Processing a file is the act of the generation of the output file (or files) based on a source file. This may means the execution of the file as FreeMarker template, or binary-copying the file, processing the file as XML, or, in extreme case, create no output the file (say, for a <@c>.bak file). The path of the output file relatively to the <@s>outputRoot will be the same as the path of the corresponding source file relatively to the <@s>sourceRoot (at least initially; the template can change the output file path on-the-fly).

    - -

    Term <@e>processing mode refers to how a certain file is processed. In the Quick Tour, the HTML files were processed in "execute" mode, and the image file was processed in "copy" mode. You can find all details about processing modes <@a href='settings.html#processingMode'>here.

    - -

    <@e>Processing session: This is the course of batch processing the (selected) files of the source directory. For example, all <@c>fmpp call in the Quick Tour did a processing session.

    - -

    Strictly speaking, FMPP only processes files, not directories. It looks for source files in the sub-directories of the source root directory recursively, and when an output file has to be created, its missing parent directories will be created automatically. Any setting that deals with processing things is applicable only to files, not to directories (with some exceptions, like <@s>alwaysCreateDirectories).

    - -

    FMPP doesn't use the term "processing" for data files like <@c>data/style.tdd or <@c>data/birds.csv was in the tutorial. A data file isn't processed like a template file (or an image file), it does not produce output file itself. Instead, it can be loaded into a variable for later usage in templates.

    - - - - -<@sect title="Data, data loader" anchor="data"> - -

    In FMPP context <@e>data means data coming from data sources as XML file, CSV file, MySQL database, etc. In the Quick Tour, <@c>data/style.tdd and <@c>data/birds.csv are data files. Files that are processed to produce output files, as the HTML-s and the image are not data files.

    - -

    The FreeMarker templates see the "data" as variables. This set of variables is called <@e>the data model with FreeMarker terminology. The data model is shared, visible for all templates. During output generation the template may creates new variables for temporary calculations, but those variables are not part of the data model, and will gone when the template execution is finished. Templates can't modify the data model, so all templates get the same data model, which was filled with the <@s>data setting at the very beginning of the processing session.

    - -

    <@e>Data loaders are objects that load and interpret data from certain type of data source, so FMPP can expose the data as variables for the templates. For example, in the Quick Tour we have used data loader <@c>csv that interprets CSV files. When the data source is file based, you use paths as data <@c>data/birds.csv. Relative paths are relative to the directory dictated by the <@s>dataRoot setting, which is be default the same as <@s>sourceRoot. Data loaders are described in more details <@a href="dataloader.html">here.

    - - - - -<@sect title="The pp hash"> - -

    The data model always contains a <@a href="#hash">hash with name <@c>pp (stands for PreProcessor). This hash contains directives and methods and other variables that templates can use to control output generation, do path calculations, and do various other FMPP specific operations. You can find the description of the <@c>pp hash <@a href="pphash.html">here.

    - - - - -<@sect title="Virtual paths" anchor="virtualPath"> - -

    FMPP works with 3 file systems: the real file system, and 2 virtual file systems:

    -
      -
    • <@e>source file system: The root directory of this file system is the <@s>sourceRoot directory. Template files usually see this file system, as when they <@c><#include <@r>...> other template files. All files that FMPP processes must be inside this file system, thus inside the source root directory.
    • - -
    • <@e>output file system: The root directory of this file system is the <@s>outputRoot directory. In templates, directives that control output file names and paths (as <@c><@pp.changeOutputFile <@r>...>) use this file system. It is guaranteed that all output files will be inside this file system, thus inside the output root directory.
    • -
    - -

    Most directives/methods in templates that require path parameters use one of the virtual file systems. These paths are called <@e>virtual paths. Virtual paths always use UN*X style format, so they always use slash (<@c>/), not back-slash (<@c>\). Absolute virtual paths (as <@c>/foo/bar) always start from the virtual file system root (not from the root of the real file-system). You can't leave this root, not even with tricky path as <@c>/... Relative virtual paths (as <@c>foo/bar or <@c>../foo/bar) are resolved relatively to:

    -
      -
    • If they are used in built-in FreeMarker directives (as <@c><#include <@r>...> or <@c><#import <@r>...>): the directory of the currently executing template.
    • -
    • If they are used in other directives to refer to source files: the directory of the currently processed source file.
    • -
    • If they are used in directives to refer to output files: the directory of the currently written output file.
    • -
    - -

    Note that the <@s>dataRoot setting (used by data loaders) just specifies a base directory, not a virtual file system root. So you can leave it with <@c>..-s.

    - - - - -<@sect title="Real paths" anchor="realPath"> - -

    Paths that navigate in the real file system (not in a <@a '#virtualPath'>virtual file systems) are called <@e>real paths. Real paths always use the native path format of the host operating system. However, Windows users can and should use slash (<@c>/) instead of backslash (<@c>\), to keep UN*X compliance, and to avoid escaping issues.

    - -

    Real paths are used in these cases:

    -
      -
    • For setting values that store a path (or paths), such as <@s>sourceRoot and <@s>outputRoot. Relative paths in these settings are resolved relatively to the, so called, <@e>configuration base (unless explicitly stated otherwise for a certain setting). If the setting value comes from a configuration file, then it is the directory that contains the configuration file (however, this can be overridden with the <@s>configurationBase setting). If the value comes from other source (such as from a command-line argument), then the front-end specifies what the configuration base is for that setting value (see the documentation of the front-end). - -
    • For data loaders that load files, as <@c>csv(data/birds.csv). If the path is relative, then it is relative to the <@s>dataRoot, which defaults to the <@s>sourceRoot. Note that the usage of <@c>/ instead of the native path separator (as backslash) is always allowed and recommended here. - -
    • As the parameter to some <@c>pp directives/methods that explicitly state this. -
    - -

    In other cases FMPP uses <@a href="#virtualPath">virtual paths. - - - - -<@sect title="Adopted FreeMarker type names"> - -

    FMPP adopts some of FreeMarker's terms regarding the type names, to decrease confusion:

    -
      -
    • String: text. -
    • Boolean: logical value. It can be <@c>true or <@c>false. -
    • Number: Number... maybe decimal, maybe whole. You often will also see term "integer", which means whole number. -
    • <@e>Sequence: You may know this with name list, or array, or vector. It is a list of values of any type. The items in the list are indexed with integers, starting from 0. -
    • <@anchor id="hash" /><@e>Hash: You may know this with name dictionary, or map, or associative array. This is a set of name-value pairs. The names are unique strings in the hash, so they identify the values associated with them. As it used to be said, they are "keys". -
    - - - - diff --git a/fmpp/src/docs/pathpattern.html b/fmpp/src/docs/pathpattern.html deleted file mode 100644 index 3325fb1..0000000 --- a/fmpp/src/docs/pathpattern.html +++ /dev/null @@ -1,18 +0,0 @@ -<@page title="Path Patterns" keywords="Path Pattern"> - -

    Probably you have already used commands like <@c>dir *.txt (or <@c>ls *.txt on UN*X). This lists all files in the current directory where the name of the file ends with <@c>.txt. The <@c>*.txt stuff is called a path pattern.

    - -

    With FMPP you also use path patterns to select certain files, say, in the <@s>modes setting, to tell FMPP which files to copy as is, and which files to execute as template. A path pattern looks like a path, but it can contain some special parts:

    -
      -
    • <@c>*: matches zero or more characers, except slash (<@c>/). For example <@c>a*c matches to <@c>abc, <@c>axyzc and <@c>ac, but not <@c>a/c. -
    • <@c>?: matches exactly one characer, except slash (<@c>/). For example <@c>a?c matches to <@c>abc, but not <@c>axyzc or <@c>ac or <@c>a/c. -
    • <@c>**: This matches zero or more directories of the path. For example <@c>a/**/c matches to <@c>a/b/c, <@c>a/b/xyz/c and <@c>a/c. Another example: <@c>**/*.gif matches to <@c>foo.gif, <@c>a/foo.gif and , <@c>a/b/foo.gif. Also, if you use <@c>** at the end of the pattern, then it match with all file names as well. Thus, <@c>foo/** will match all files inside <@c>foo, such as <@c>foo/bar.txt or <@c>foo/sub/bar.txt. Furthermore, if the pattern ends with <@c>/, then it is considered as shorthand for <@c>/**, so <@c>foo/ is the same as <@c>foo/**. -
    - -

    If your operating system use something else instead of <@c>/ (as <@c>\ on Windows), FMPP will internally convert the native paths to UN*X format, so do not worry about this. Just use slash in the patterns. (Or, in fact, you can even use the native "slash" in patterns, just it is not a good practice in general.)

    - -

    Note that pattern as <@c>*.gif will match only the GIF files in the current directory. If you want to match all GIF files of the subdirectories (and sub-subdirectories, etc.) as well, use <@c>**/*.gif. - -

    The meaning of "current directory" in FMPP depends on the concrete situation where you use the path. In most cases where you will use path patterns (as with the <@s>modes setting) it will be the source root directory. Also, the meaning of "root directory" is depends on where you use the path. That is, absolute path <@c>/foo.txt maybe means <@c>foo.txt in the source root directory (this is the typical), or in the output root directory, or in the real root directory of the file system, etc.

    - - diff --git a/fmpp/src/docs/pphash.html b/fmpp/src/docs/pphash.html deleted file mode 100644 index 90c5a4c..0000000 --- a/fmpp/src/docs/pphash.html +++ /dev/null @@ -1,549 +0,0 @@ -<@page title="The pp Hash" keywords="pp hash"> - -

    The pp hash is a variable that is always present in the data model. This contains the built-in, standard variables of FMPP.

    - -<@note>For more information about variable types, directives, etc. in general, please read the <@fma href="index.html">FreeMarker Manual. - -<@sect title="Information about the source"> - -<@variable name="sourceFile" type="string"> -

    The path of the current source file (includes the file name), relatively to the source root directory. It does not start with slash. Uses UN*X path format.

    - - - -<@variable name="sourceDirectory" type="string"> -

    The path of the directory of the current source file, relatively to the source root directory. It is finished with a slash, except if the directory is the source root directory itself, in which case the result is an empty (0 length) string. The result never starts with slash. Uses UN*X path format.

    - - -<@variable name="sourceFileName" type="string"> -

    The filename of the current source file.

    - - -<@variable name="sourceEncoding" type="string"> -

    The encoding (charset) of the source file, e.g. <@c>ISO-8859-1. It is always a concrete charset name, never <@c>host.

    - - -<@variable name="sourceRoot" type="string"> -

    The absolute real path of the source root directory, finished with a "native slash" (i.e. maybe a backslash). As it is a real path, it uses the native path format.

    - - -<@variable name="realSource" type="string"> -

    The absolute real path of the current source file. As it is a real path, it uses the native path format.

    - - -<@variable name="realSourceDirectory" type="string"> -

    The absolute real path of the directory of the current source file, finished with a "native slash" (i.e. maybe a backslash). As it is a real path, it uses the native path format.

    - - - - - -<@sect title="Information about the output"> - -

    Note that as the output file name and directory, and the output encoding can be changed during the execution of template, the value of these variables can change during the execution of the template, to reflect the current situation.

    - -<@variable name="outputFile" type="string"> -

    The path of the current output file (includes the file name), relatively to the output root directory. It does not start with slash. Uses UN*X path format.

    - - -<@variable name="outputDirectory" type="string"> -

    The path of the directory of the current output file, relatively to the output root directory. It is finished with a slash, except if the directory is the output root directory itself, in which case the result is an empty (0 length) string. The result never starts with slash. Uses UN*X path format.

    - - -<@variable name="outputFileName" type="string"> -

    The filename of the current output file.

    - - -<@variable name="outputEncoding" type="string"> -

    The encoding (charset) of the output file, e.g. <@c>ISO-8859-1. It is always a concrete charset name, never <@c>host or <@c>source.

    - - -<@variable name="outputRoot" type="string"> -

    The absolute real path of the output root directory, finished with a "native slash" (i.e. maybe a backslash). As it is a real path, it uses the native path format.

    - - -<@variable name="realOutput" type="string"> -

    The absolute real path of the current output file. As it is a real path, it uses the native path format.

    - - -<@variable name="realOutputDirectory" type="string"> -

    The absolute real path of the directory of the current output file, finished with a "native slash" (i.e. maybe a backslash). As it is a real path, it uses the native path format.

    - - - - - -<@sect title="Changing the output file"> - -<@variable name="changeOutputFile" type="directive"> - <@param name="name" type="string"> - The new <@a href="overview.html#virtualPath">virtual path of the output file. The path can point into a different directory than the directory of the current output file. - - <@param name="append" type="boolean" default="false"> - If this is true, then if a file with the same name as the name of the new output file already exists, it will be continued, rather then overwritten. If the file does not already exist, then this parameter has no effect. - - -

    Closes the current output file, and starts a new output file with the new name. All further output goes into the new file. If the name of the new output file is the same as the current output file, then nothing happens.

    - -

    A word of warning: Don't forget that the path that you specifiy is interpreted relatively to the <@e>current output file. So using a relative path like <@c>products/${'$'}{productName}.html ( instead of an absolute path like <@c>/shop/products/${'$'}{productName}.html) inside a loop is most certainly not what you want, because then 2nd product will go into the <@c>/shop/products/products/${'$'}{productName}.html directory, the 3rd into <@c>/shop/products/products/products/${'$'}{productName}.html, and so on. Of course this problem doesn't occur if the relative path is just a file name, like <@c>${'$'}{productName}.html.

    - - -<@variable name="renameOutputFile" type="directive"> - <@param name="name" type="string" optional=true> - The new <@a href="overview.html#virtualPath">virtual path of the output file. The path can point into a different directory than the directory of the current output file. - - <@param name="extension" type="string" optional=true> - Replaces the extension (the part after the last dot in the file name) of the current output file, with the value of this parameter. If the file name has no extension (there is no dot in it), then a dot and the new extension is added to the end of the file name. (The parameter value should never contain the starting dot.) - - -

    Changes the name of the current output file, or moves the output file if neccessary. If a file with the same name already exists, this will overwrite that file without warning. If the new name is the same as the name of the current output file, then nothing happens.

    - -

    Either the <@c>name or the <@c>extension parameter must be specified. You can't use both together. - - -<@variable name="dropOutputFile" type="directive"> -

    Deletes the current output file, and drops all further output that would go into this file. Call this directive at the beginning of templates that need to be processed, but you don't want any output files from them. (Of course, you can call this directive even at the end of the template, just that's slower...)

    -

    Note that this directive can be neutralized with directive <@c>pp.restartOutputFile.

    - - -<@variable name="restartOutputFile" type="directive"> -

    Empties the current output file (but doesn't delete the file). The next character sent to the output will be the first character of the output file. Also, the charset of the output file can be safely set, exactly like if you were at the beginning of the output file creation.

    -

    Note that this directive neutralizes the effect of directive <@c>pp.dropOutputFile.

    - - -<@variable name="nestOutputFile" type="directive" nestedContent=true> - <@param name="name" type="string"> - The new <@a href="overview.html#virtualPath">virtual path (includes the file name) of the output file. The path can point into a different directory than the directory of the current output file. - - <@param name="append" type="boolean" default="false"> - If this is true, then if a file with the same name as the name of the new output file already exists, it will be continued, rather then overwritten. If the file does not already exist, then this parameter has no effect. - - -

    This is similar to <@c>changeOutputFile, but it writes only the content generated in its nested content into the new file, and then it restores things, so the output will go into the same output file as before the calling of the directive. For example:

    - - <@prg><#noparse> -The 1st line of the original file. -<@pp.nestOutputFile name="new.txt"> - The 1st line of new.txt. - -The 2nd line of the original file. -<@pp.nestOutputFile name="new.txt" append=true> - The 2nd line of new.txt. - -The 3rd line of the original file. - - -

    A file can be nested into itself. For example:

    - - <@prg><#noparse> -<@pp.nestOutputFile name='1.txt'> - The 1st line of 1.txt - <@pp.nestOutputFile name='2.txt'> - The 1st line of 2.txt - <@pp.nestOutputFile name='1.txt'> - The 2nd line of 1.txt - - The 2nd line of 2.txt - - The 3rd line of 1.txt - - - -

    Note that <@c>append=true was not needed for adding the 2nd line to the <@c>1.txt, since the directive just switched back to the already opened <@c>1.txt.

    - - - -<@variable name="setOutputEncoding" type="directive"> - <@param name="encoding" type="string"> - The name of the charset, e.g. <@c>ISO-8859-2. It understands the special values <@c>source and <@c>host. - - -

    Sets the encoding of the output. This will die with error if the output file is already partially written to the disk. Thus, if you want to change the output encoding, do it as early as possible. FMPP buffers the output for the output file in the memory until the buffer size reaches 160 characters, but after that it starts to flush the buffer to the disk. Also, directives that change the current output file may flush the buffer. When you start a new file (say, with <@c>changeOutputFile), it starts a new buffer in the memory, so you can set the encoding of the new file.

    - - - - - -<@sect title="Utilities for paths"> - -<@variable name="pathTo" type="method" result="string"> - <@param name="destination" type="string"> - The <@a href="overview.html#virtualPath">virtual path in the output file system to the destination file or directory. The destination file or directory need not exist. - - -

    This method returns the relative virtual path that leads from the directory of the current output file, to the destination file or directory. For example, if you want to create a link that points to <@c><@r><outputroot>/products/index.html, then you can write:

    - - <@prg><#noparse> -Product index - - -

    and the link will always point to that file, does not mater where the file that contains the above link is.

    - -

    The returned path never starts with <@c>/; it is always a relative path.

    - -

    If the destination path is finished with slash, then, and only then, the resulting path will be also finished with slash, except if the only character in the result would be that slash, in which case the result will be an empty (0 length) string instead.

    - - - -<@variable name="home" type="string"> -

    Same as what <@c>pp.pathTo('/') would return. That is, the virtual path to the output root directory, from the current output file. It is finished with a slash, except if the current output file is directly in the output root directory, in which case the result is an empty (0 length) string. The result never starts with slash. So the possible values are something like: <@c>../../

    - -

    Example: The <@c>src will always point to the file in the <@c>img directory of the output root, does not mater if you move the HTML file in the directory hierarchy:

    - - <@prg><#noparse> -Logo - - - -<@variable name="outputRootRelativePath" type="method" result="string"> - <@param name="file path" type="string"> - The <@a href="overview.html#virtualPath">virtual output path to convert. The output file pointed by the path need not exist. - -

    Converts a virtual output path to a virtual output path that is relative to the output root directory. The resulting path will not start with slash.

    - - -<@variable name="sourceRootRelativePath" type="method" result="string"> - <@param name="file path" type="string"> - Same as the parameter of <@a href="#key_outputRootRelativePath">outputRootRelativePath, but it uses the the source file system. - -

    Same as <@a href="#key_outputRootRelativePath">outputRootRelativePath, but it uses the source root directory and the current source file respectively.

    - - -<@variable name="sourcePathTo" type="method" result="string"> - <@param name="destination" type="string"> - Same as the parameter of <@a href="#key_pathTo">pathTo, but it uses the source file system. - -

    Same as <@a href="#key_pathTo">pathTo, but it uses the source root directory and the current source file respectively.

    - - -<@variable name="slash" type="string"> -

    The platform dependent slash character used in native paths. This will be backslash (<@c>\) on Windows.

    - - -<@variable name="urlEnc" type="method" result="string"> - <@param name="string to encode" type="string"> - The string to encode. - - -

    <@e>Deprecated: use the <@c>url built-in of FreeMarker instead. For example: <@c><#noparse>${"a+b/c"?url}.

    - -

    Encodes a string with URL encoding. For example the result of <@c>pp.urlEnc("a+b/c") will be <@c>a%2Bb%2Fc, if the output charset is an US-ASCII based charset.

    - - -<@variable name="urlPathEnc" type="method" result="string"> - <@param name="string to encode" type="string"> - The string to encode. - - -

    Same as FreeMarker's <@c>url built-in (<@c>?url), except that it does not encode slash characters. For example the result of <@c>pp.urlPathEnc("new products/bálna.html") will be <@c>new%20products/b%E1lna.html, if the output charset is ISO-8859-1.

    - - - - - -<@sect title="Utilities for files"> - -<@variable name="sourceFileSize" type="method" result="number"> -<@param name="file path" type="string"> - The <@a href="overview.html#virtualPath">virtual path of the file in the source file system. - - -

    Returns the size of the file in bytes. If the file does not exist, it returns 0.

    - - -<@variable name="sourceFileLastModified" type="method" result="date (date+time)"> -<@param name="file path" type="string"> - The <@a href="overview.html#virtualPath">virtual path of the file in the source file system. - - -

    Tells the last modification date+time of file. If the file does not exist, it raises an error.

    - - -<@variable name="sourceFileExists" type="method" result="boolean"> -<@param name="file path" type="string"> - The <@a href="overview.html#virtualPath">virtual path of the file in the source file system. - - -

    Tells if the file exists or not.

    - - -<@variable name="outputFileSize" type="method" result="number"> -<@param name="file path" type="string"> - The <@a href="overview.html#virtualPath">virtual path of the file in the output file system. - - -

    Returns the size of the file in bytes. If the file does not exist, it returns 0.

    - - -<@variable name="outputFileLastModified" type="method" result="date (date+time)"> -<@param name="file path" type="string"> - The <@a href="overview.html#virtualPath">virtual path of the file in the output file system. - - -

    Tells the last modification date+time of file. If the file does not exist, it raises an error.

    - - -<@variable name="outputFileExists" type="method" result="boolean"> -<@param name="file path" type="string"> - The <@a href="overview.html#virtualPath">virtual path of the file in the output file system. - - -

    Tells if the file exists or not.

    - - -<@variable name="realFileSize" type="method" result="number"> -<@param name="file path" type="string"> - The real path (native path) of the file. The file can be outside all root directories. FMPP passes the resolving of relative paths to the host OS, so it is not defined by FMPP what the end result will be. In general, it is better to use absolute paths here.
    - <@e>Windows users: According to the syntactical rules of FTL, you must use double backslashes in string literals: <@c>"C:\\work\\foo\\bar.txt", or use raw strings: <@c>r"C:\work\foo\bar.txt". Also, according to the Windows API rules, you can simply use slash: <@c>"C:/work/foo/bar.txt", which is probably the best solution. - - -

    Returns the size of the file in bytes. If the file does not exist, it returns 0.

    - - -<@variable name="realFileLastModified" type="method" result="date (date+time)"> -<@param name="file path" type="string"> - The real path (native path) of the file. The rules are the same as with <@a href="#key_realFileSize">realFileSize. - - -

    Tells the last modification date+time of file. If the file does not exist, it raises an error.

    - - -<@variable name="realFileExists" type="method" result="boolean"> -<@param name="file path" type="string"> - The real path (native path) of the file. The rules are the same as with <@a href="#key_realFileSize">realFileSize. - - -

    Tells if the file exists or not.

    - - - - - - -<@sect title="Writable hashes and sequences"> - -

    Writable sequences and hashes are an FMPP specific extension to FreeMarker, as FreeMarker does not support the modification of sequences and hashes. (This has good reasons in the on-the-fly dynamic page generation segment that FreeMarker mostly targets, but it can be a problem in extreme FreeMarker applications as FMPP.) To read the variables of these sequences and hashes, you can use the same expressions as with plain sequences and hashes. But, to modify the contents of them, you have to use the directives described below, since predefined directives as <@c><#assign <@r>...> can't modify subvariables. Unfortunately, sequence addition, sub-sequence operator (like <@c>seq[5..10]) and <@c>?reverse do not copy the original sequence, just wraps it (for efficiency), so the resulting sequence will change if the original sequence is changed later (this is basically an abnormal aliasing effect). The same problem exists with the result of hash addition; it just wraps the two hashes, so the resulting hash will magically change if you modify the hashes you have added earlier. As a work-around, after you did the above problematic operations, either be sure you will not modify the objects that were used as input, or create a copy of the result like: <@c><#assign b = pp.newWritableSequence(a[5..10])> and <@c><#assign c = pp.newWritableHash(hashA + hashB)>). Of course this is easy to miss... so rather try to build the data model so you will not need to modify collections. Keeping templates simple and moving complex calculations out to custom <@a href='dataloader.html'>data loaders or BeanShell scripts (see the <@c>bsh function of <@s>localData <@a href='settings.html#data'>here...) is advisable anyway.

    - -

    Note that only the sequences that were made with the <@c>newWritableSequence method are writable. Also, only the hashes that were made with the <@c>newWritableHash method are writable. You can't modify plain sequences or hashes with the below directives.

    - -

    Also note that writable sequences and hashes suffer from the effect called aliasing (that most programmers will find natural). This effect, explained with an example, looks like this:

    - -<@prg><#noparse> -<#assign a = pp.newWritableSequence()> -<@pp.add seq=a value="red" /> -<#assign b = a> -<@pp.add seq=b value="green" /> -a: <#list a as i>${i} -b: <#list b as i>${i} - - -

    Here the output will be:

    - -<@prg> -a: red green -b: red green - - -

    That is, FreeMarker variables just store a reference (pointer) to the sequence or hash, not the sequence or hash itself. So both <@c>a and <@c>b points to the same single sequence object, which floats somewhere in the memory. This fact becomes significant because you modify that object, otherwise you wouldn't notice it. To create individual copies, use <@a href="#key_newWritableSequence"><@c>newWritableSequence or <@a href="#key_newWritableHash"><@c>newWritableHash, for example:.

    - -<@prg><#noparse> -<#assign a = pp.newWritableSequence()> -<@pp.add seq=a value="red" /> -<#assign b = pp.newWritableSequence(a)> -<@pp.add seq=b value="green" /> -a: <#list a as i>${i} -b: <#list b as i>${i} - - -

    Here <@c>b is a new sequence whose initial content is the same as the content of <@c>a. Thus, the output will be:

    - -<@prg> -a: red -b: red green - - -<@variable name="newWritableSequence" type="method" result="writable sequence"> -<@param name="initial content" optional=true type="sequence" /> -

    Creates a new empty writable sequence. However, if called with parameter then adds the items in the parameter sequence to this new sequence (known as "shallow copy" among programmers). Example:

    - -<@prg><#noparse> -<#assign a = pp.newWritableSequence()> -<#assign b = pp.newWritableSequence(['red', 'green', 'blue'])> -${a?size} -${b?size} - - -

    The output will be:

    - -<@prg><#noparse> -0 -3 - - - - -<@variable name="newWritableHash" type="method" result="writable hash"> -<@param name="initial content" optional=true type="hash" /> -

    Creates a new empty writable hash. However, if called with parameter then adds the items in the parameter hash to this new hash (known as "shallow copy" among programmers). Example:

    - -<@prg><#noparse> -<#assign a = pp.newWritableHash()> -<#assign b = pp.newWritableHash({'red':'FE0000', 'green':'10F000', 'blue':'0007FF'})> -${a?size} -${b?size} - - -

    The output will be:

    - -<@prg><#noparse> -0 -3 - - - -<@variable name="copyWritable" type="method" result="writable hash or writable sequence" deprecated='Use <@a href="#key_newWritableSequence"><@c>newWritableSequence and <@a href="#key_newWritableHash"><@c>newWritableHash instead.'> -

    Copies a writable hash or sequence. (It is used to prevent aliasing effect. The result is a "shallow copy" of the original hash or sequence.)

    - - -<@variable name="add" type="directive"> - <@param name="seq" type="writable sequence">The sequence to modify. - <@param name="index" type="number" default="seq?size">The index where you want to insert the subvariable into the sequence. The index of the first subvariable is 0. - <@param name="value" type="any">The new value of the subvariable. - -

    Inserts a new subvariable into the sequence, at the specified index. Shifts the subvariable currently at that position (if any) and any subsequent subvariables to the right (adds one to their indices). If you do not use the <@c>index parameter, or if its value is 1 higher than the index of the last subvariable, then it appends the new subvariable at the end of the sequence.

    - - -<@variable name="set" type="directive"> - <@param name="seq" type="writable sequence">The sequence to modify. - <@param name="index" type="number">The index of subvariable to set. The index of the first subvariable is 0. - <@param name="hash" type="writable hash">The hash to modify. - <@param name="key" type="string">The name of the subvariable that you want to add to the hash, or that you want to replace. - <@param name="value" type="any">The value of the new subvariable. - -

    This can be used for two purposes, depending on if you use the <@c>seq or the <@c>hash parameter:

    -
      -
    • For sequences: Sets an already existing subvariable of the sequence or hash. The index must be the index of an existing subvariable, or an error will occur. - -
    • For hashes: Adds a new subvariable to the hash with the name specified with the <@c>key parameter, or replaces the subvariable with the same name if that already exists. -
    - - - -<@variable name="remove" type="directive"> - <@param name="seq" type="writable sequence">The sequence to modify. - <@param name="index" type="number">The index of the subvariable to remove. - <@param name="hash" type="writable hash">The hash to modify. - <@param name="key" type="string">The name of the subvariable that you want to remove from the hash. - -

    This can be used for two purposes, depending on if you use the <@c>seq or the <@c>hash parameter:

    -
      -
    • For sequences: Removes the subvariable on the specified index, and shifts any subsequent subvariables to the left (subtracts one from their indices). The <@c>index must denote an existing subvariable, or an error will be raised. - -
    • For hashes: Removes the subvariable with the name specified with the <@c>key parameter, or does nothing if no such subvariable exists. -
    - - -<@variable name="clear" type="directive"> - <@param name="seq" type="writable sequence">The sequence to clear. - <@param name="hash" type="writable hash">The hash to clear. - -

    Removes all subvariables of the sequence or hash.

    - - - - - -<@sect title="Miscellaneous"> - -<@variable name="warning" type="directive"> - <@param name="message" type="string">The warning message. - -

    Issues a warning message. It depends on the concrete front-end in use and the settings, but usually the message will be displayed on the screen and/or will be added to the log file. The processing will not stop if you issue a warning. To stop processing with error message you should use <@c><#stop "<@r>message">.

    - - -<@variable name="ignoreOutput" type="directive" nestedContent=true> -

    All text generated inside the nested content of this directive will be thrown away.

    - - -<@variable name="locale" type="string"> -

    The currently used locale in the usual format. For example: <@c>ar_SA, <@c>ar_IQ, <@c>en_US, <@c>en_UK, <@c>es_ES, ...etc. - - -<@variable name="loadData" type="method" result="any" anchor="loadData"> - <@param name="loader name" type="string"> - The name of the data loader. - - <@param name="arguments..." type="any"> - The arguments to the data loader. These are 0 or more arguments. - - -

    Loads data using <@a href="dataloader.html">data loaders, and returns the loaded data as the result of the method call. For example this:

    - - <@prg><#noparse> -<#assign foo = pp.loadData('csv', 'foo.txt', {'separator':',', 'encoding':'UTF-8'})> - - -

    does something similar as when you use the below in an FMPP configuration file:

    - - <@prg> -data: {foo:csv(foo.txt, {separator:',', encoding:UTF-8})} - - -

    The difference is that with the <@c>pp.loadData, you load the data on demand, and into a temporary variable that will be available only for a single template processing.

    - -

    The <@c>get data loader can't be invoked with this method. - - -<@variable name="now" type="date (date+time)"> -

    Returns the current date and time.

    - -

    For example this:

    - - <@prg><#noparse> -Current date and time: ${pp.now} -Current time: ${pp.now?time} -Current date: ${pp.now?date} -Current day of week: ${pp.now?string("EEEE")} -<#setting datetime_format="yyyy-MM-dd HH:mm:ss zzzz"> -Current date and time: ${pp.now} - - -

    will output something like this:

    - - <@prg> -Current date and time: Apr 12, 2003 5:28:50 PM -Current time: 5:28:50 PM -Current date: Apr 12, 2003 -Current day of week: Saturday -Current date and time: 2003-04-12 17:28:50 Central European Summer Time - - -

    For more information about using date/time values, please read the <@fma>FreeMarker Manual.

    - - -<@variable name="sessionStart" type="date (date+time)"> -

    Returns the date and time of the processing session starting.

    - - -<@variable name="s" type="writable hash"> -

    Stands for "shared". This is a writable hash that keeps its content during the whole processing session. That is, if you add a subvariable to it during the execution of a template, then that subvariable will be visible for all templates processed later in the same session. An example of the usage of <@c>pp.s can be found in <@example 'session' />

    - - -<@variable name="doc" type="node"> -

    This variable exists only while an XML file is processed in <@c>renderXml processing mode (see the documentation of the <@s>modes setting). This variable stores the source file (the XML file) as a node variable that corresponds to the W3C DOM document object.

    - -

    An example that uses <@c>renderXml processing mode and <@c>pp.doc is <@example 'xml_rendering' />

    - - -<@variable name="version" type="string"> -

    This is the version number of the FMPP engine.

    - - -<@variable name="freemarkerVersion" type="string"> -

    This is the version number of the FreeMarker the FMPP engine currently uses.

    - - - - - - diff --git a/fmpp/src/docs/properties.html b/fmpp/src/docs/properties.html deleted file mode 100644 index 6fc86ee..0000000 --- a/fmpp/src/docs/properties.html +++ /dev/null @@ -1,64 +0,0 @@ -<@page title='"Properties" Files' keywords="properties"> - -

    This is a standard format widely used in the Java world to specify set of name-value pairs, where all name is unique (a key).

    - -

    Name-value pairs are specified with <@c><@r>name=<@r>value format, and each such pair is in its own line. For example:

    - -<@prg> -bgColor=blue -textColor=white -copyright=Copyright (c) 2003, Big Joe All rights reserved. - - -

    If the last character on the line is backslash (<@c>\), then the next line is treated as a continuation of the current line; the <@c>\ and line break are simply discarded, and any leading whitespace (space, tab, etc.) characters on the continuation line are also discarded and are not part of the value. It is useful if the line would be too long for conveniently reading/editing it:

    - -<@prg> -copyright=Copyright (c) 2003, \ - Big Joe \ - All rights reserved. - - -

    Note that if you accidentally put a space after the <@c>\, then it will not work.

    - -

    In the name or value, Java language escape sequences <@c>\t, <@c>\n, <@c>\r, <@c>\f, <@c>\\, <@c>\", <@c>\', and <@c>\u<@r>xxxx are recognized and converted to single characters. Any other escape sequence will be converted to the character after the backlash (e.g. <@c>\x will be converted to <@c>x). Note that because of the special meaning of backslash, to put a backslash into the name or value, you have to write two backslashes (<@c>\\).

    - -<@prg> -aNativeWindowsPath=C:\\My Documents\\test -someText=First line\nSecond line\nThrid line - - -

    Whitespace is ignored after and before the <@c>=, so you can write:

    - -<@prg> -bgColor = blue -textColor = white - - -

    Alternatively, you can use colon or just whitespace to separate the name and value:

    - -<@prg> -bgColor: blue -textColor white - - -

    Thus, if the name contains <@c>=, <@c>: or whitespace, it must be escaped:

    - -<@prg> -this\ is\ the\ name = something -C\: = /mnt/win - - -

    Empty lines of the file, and the lines that start with <@c># or <@c>!, will be ignored. This can be used for commenting:

    - -<@prg> -# colors -bgColor=blue -textColor=white - -# other text -copyright=Copyright (c) 2003, Big Joe All rights reserved. - - -

    "properties" files always use ISO-8859-1 charset. If you have to enter a character that is not in the ISO-8859-1 repertoire, you have to use the <@c>\u<@r>xxxx escape (where <@c><@r>xxxx is the hexadecimal UCS code of the character).

    - - diff --git a/fmpp/src/docs/qtour.html b/fmpp/src/docs/qtour.html deleted file mode 100644 index 9da7d7b..0000000 --- a/fmpp/src/docs/qtour.html +++ /dev/null @@ -1,158 +0,0 @@ -<@page title="Tutorial" keywords="tutorial"> - -

    This chapter is a quick, practical, but rough introduction to FMPP.

    - -<@sect title="Step 1: Process a directory"> - -

    The basic idea is that you have <@e>source root directory and an <@e>output root directory. The source root directory contains the files to process, and the output root directory will contain the processed files. Processing the file either means that FMPP will execute the file as FreeMarker template, or that it will copy the file as is (in the case of image files, archive files, etc.). (In fact there are other seldom used processing modes as well, like <@a href="settings.html#xmlRendering">XML rendering.)

    - -

    To see an example, go to the <@example 'qtour_step1' /> directory. Here we have a directory called <@c>src:

    - -

    <@figure src="qtour_step1_src.png" alt="Quick tour step 1 src" />

    - -

    Also, you will find <@c>config.fmpp in the <@c>qtour_step1 directory. This file contains the settings for FMPP, and now contains this:

    - -<@prg> -sourceRoot: src -outputRoot: out - - -

    If you issue <@c>fmpp command from the command-line while you are in the <@c>qtour_step1 directory, then FMPP will process the <@c>src directory and places the output into the <@c>out directory. On the console you will see something like:

    - -<@prg> -Note: Using the config.fmpp in the working directory. -- Executing: index.html -- Copying: falcon.png -- Executing: subdir\something.html - -*** DONE *** - -2 executed + 1 copied = 3 processed -0 failed, 0 warning(s) -Time elapsed: 0.234 seconds - - -

    and the newly created <@c>out directory will contain exactly the same files and subdirectories as <@c>src. - -

    <@figure src="qtour_step1.png" alt="Quick tour step 1 diagram" />

    - -

    The above messages suggest that the PNG file was copied, while the two HTML-s were executed:

    -
      -
    • "Copying" means that the file is copied as is, without changing even a bit compared to the original file (binary copy). -
    • "Executing" means that the file is interpreted by FreeMarker as template file, and the content of the output file is generated by FreeMarker. Template files are plain text files that can contain special parts, which are instructions to FreeMarker. Since in this first example the HTML files don't contain any such special parts, the output files will be identical to the original HTML-s. -
    - - - -<@sect title="Step 2: Pulling data from a data source"> - -

    If you look into the two HTML-s of <@c>qtour_step1/src, you see that both contains this line:

    - -<@prg> - -

    Assume you want to store these colors in a single centralized place, so if you change them, all pages will change. For this, you have to tell FMPP what <@e>data to expose for the templates. For now, tell FMPP to load data from a TDD file. A TDD file is a simple text file that stores name-value pairs. (It happens to be the same format that <@c>config.fmpp uses, but it's just accidental coincidence. You could load data from other type of data source in the same way.) If you go to the <@example 'qtour_step2'/> directory, you will find <@c>style.tdd in <@c>src/data that contains this:

    - -<@prg> -bgColor: #FFFFE0 -textColor: #000000 - - -

    Both line in both HTML-s has been changed to:

    - -<@prg><#noparse> - - - -

    The two <@c>${"$"}{<@r>...}-s are instructions to FreeMarker that insert the value of a variable. When I'm saying that FMPP exposes data for the templates, then it simply means that it creates variables for the templates, based on some data source. We tell FMPP to load data from <@c>data/style.tdd file before it starts to process the files, in the <@c>config.tdd of the <@c>qtour_step2 directory:

    - -<@prg> -sourceRoot: src -outputRoot: out -data: tdd(data/style.tdd) - - -

    If you issue an <@c>fmpp command in the <@c>qtour_step2 directory, and look into the result in the <@c>out directory, then you will see that the <@c>${"$"}{<@r>...}-s in the HTML files are replaced with the actual colors.

    - -

    <@figure src="qtour_step2.png" alt="Quick tour step 2 diagram" />

    - -

    It is important that the <@c>data directory was not copied into the output (the files in it were not "executed" or "copied"). This is because <@c>src/data contains a file with name <@c>ignoredir.fmpp, and the presence of this file instructs FMPP not to process the directory.

    - - - -<@sect title="Step 3: Even more data"> - -

    You can use any number of data sources, not only a single file. In <@example 'qtour_step3'/> I have added one more data source: <@c>data/birds.csv. CSV is a primitive format often used to exchange data among spread sheet applications and other applications. <@c>bird.csv stores a table with "name", "description" and "favoriteFood" columns. I want to use the content of this table in the generated HTML pages later, so let load this table into variable <@c>birds, in <@c>config.fmpp:

    - -<@prg> -sourceRoot: src -outputRoot: out -data: { - tdd(data/style.tdd) - birds: csv(data/birds.csv) -} - - -

    Here FMPP creates variables for the templates from multiple data sources (<@c>data/style.tdd, <@c>data/birds.csv).

    - -

    The <@c>index.html now contains some new lines, that fetch the data form the CSV file via the <@c>birds variable, and print a list from it. The <@c><#<@r>...> tags are instructions to FreeMarker (see in the <@fma>FreeMarker Manual):

    - -<@prg><#noparse> -
      -<#list birds as bird> -
    • ${bird.name?cap_first}: ${bird.description} - Favorite food: ${bird.favoriteFood} - -
    - - -

    The output of the above template lines will be something like:

    - -<@prg> -
      -
    • Arctic-tern: Flies very long distances all years. - Favorite food: sardine -
    • House-sparrow: Don't you say you don't know it... - Favorite food: sunflower -
    • Sakeret: Great hunter of the sky. - Favorite food: pigeon -
    - - -

    Note that the template uses <@c>birds variable independently of the actual file format (CSV) behind it. You could replace the CSV with whatever data source that can be interpreted as table (as a database table) and the templates could be the same, only the <@c>config.fmpp has to be adjusted. (However, FMPP supports only a few data source types out of the box yet, so maybe you have to write/obtain extension Java classes for it.)

    - -

    You can find more information about data and data loading <@a href="overview.html#data">here.

    - - - -<@sect title="Step 4: Multiple output files from the same source file"> - -

    Let's say you want to create separate HTML pages for each birds, rather than listing all information about them on the index page, and you want only link to those pages on <@c>index.html. <@example 'qtour_step4'/> does this. The index page had trivial changes to generate the links. The interesting is that we have a new file, <@c>bird.html. This single file is the template for all bird pages, and will generate a separate HTML file for each birds:

    - -

    <@figure src="qtour_step4.png" alt="Quick tour step 4 diagram" />

    - -

    The <@c>bird.html looks as this:

    - -<@prg><#noparse> -<@pp.dropOutputFile /> -<#list birds as bird> -<@pp.changeOutputFile name=bird.name+".html" /> - - - ${bird.name?cap_first} - - -

    ${bird.name?cap_first}

    - -

    ${bird.description}

    - -

    Favorite food: ${bird.favoriteFood}

    - - - - - -

    The <@c><@<@r>...> tags are instructions to FreeMarker (see the <@fma>FreeMarker Manual). The <@a href='pphash.html'><@e>pp variable is defined by FMPP, and is always there, automatically. It stores the built-in variables of FMPP, e.g. directives as <@c>dropOutputFile above. <@c><@pp.dropOutputFile /> instructs FMPP to drop the current output file, so we will not have <@c>bird.html in the output directory. <@c><@pp.changeOutputFile <@r>.../> instructs FMPP to start a new output file with the given name. So <@c>bird.html will produce 3 output files (one output file for each row of the table): <@c>arctic-tern.html, <@c>house-sparrow.html, and <@c>sakeret.html.

    - - - - \ No newline at end of file diff --git a/fmpp/src/docs/reportbug.html b/fmpp/src/docs/reportbug.html deleted file mode 100644 index 8f8c534..0000000 --- a/fmpp/src/docs/reportbug.html +++ /dev/null @@ -1,4 +0,0 @@ -<@page title="Reporting bugs" keywords="bug, bugs, report"> -<@reportBugs /> -

    Back where you come from...

    - diff --git a/fmpp/src/docs/robots.txt b/fmpp/src/docs/robots.txt deleted file mode 100644 index ef7885c..0000000 --- a/fmpp/src/docs/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: /freemarker \ No newline at end of file diff --git a/fmpp/src/docs/settings.html b/fmpp/src/docs/settings.html deleted file mode 100644 index b147348..0000000 --- a/fmpp/src/docs/settings.html +++ /dev/null @@ -1,916 +0,0 @@ -<@page title="Settings" keywords="settings, options, engine"> - -<@sect title="Things you must know about settings"> - -

    The basic definition of the "setting" term is <@a href="overview.html#settings">here... - - <@sect title="The common characteristics of settings"> - -

    The characteristics of a setting can be described with these attributes: -

      -
    • <@e>Name: The name of the setting. This name is used in configuration files. Also, front-ends used to use this or similar name for the setting in their user interface.
    • - -
    • <@e>Type: The type of the value, such as string, integer, boolean, sequence or hash. If you specify the values in a configuration file, then the TDD syntax clearly specifies what syntax to use for which types. For the front-end specific user interface, it depends on the concrete front-end how you face with types. But, if the front-end wants you to enter the value for a single setting as simple text, then you have to enter scalar values (string, integer and boolean) as is (without any TDD quotation), but you have to use TDD syntax for non-scalar types as sequences and hashes. For setting that are sequences, <@a href="tdd.html#modes">sequence mode TDD is used (i.e. no <@c>[ and <@c>] needed), and for setting that are hashes hash mode TDD is used (i.e. no <@c>{ and <@c>} needed).
    • - -
    • <@e>Default: If the value of the setting was not set, the processing session will use this value. If the setting has no default value that doesn't mean that you are required to specify a value for it.
    • -
    - -

    Notes:

    -
      -
    • Settings of type "string (path)" are <@a href="overview.html#realPath">real paths.
    • -
    • All settings are optional, unless explicitly noted otherwise.
    • -
    - - - - <@sect title="The merging of setting values"> - -

    Setting values can be specified in multiple layers. For example, it is possible that a setting is specified in the configuration file, and then again with a command-line argument of the command-line tool.

    - -

    Setting layers has a priority order, for example, the setting layer defined by the command-line arguments has higher priority than the setting layer defined by the configuration file. When the value of the same setting is specified in two layers, then the value that comes from the layer with higher priority overrides the setting value comes from the lower layer. If the type of the setting is not map or sequence, then this simply means that the value from the higher layer will be used, and the other value will be totally hidden. But if the setting type is sequence or hash, then the sequence values will be merged:

    -
      -
    • When sequences are merged, the two sequences are concatenated, and the sequence with the higher priority will start the new concatenated sequence.

    • - -
    • When hashes are merged, the union of the two hashes is constructed, and for clashing keys the values in the hash with higher priority will be used. The type of the value of the hash items is not considered when the merging happens, simply the item from the higher priority hash will be used in the resulting hash. Thus, hash merging is not "deep", becasue the value of clashing items with hash values are not merged. For example, if you merge <@c>{x:{v:1}, y:2} with <@c>{x:{w:2}}, then the result will be <@c>{x:{w:2}, y:2}, and not <@c>{x:{v:1, w:2}, y:2}.

    • -
    - -

    Logically, the rules described in this section can be applied for more than two layers of settings as well.

    - - - - - -<@sect title="Directories"> -<@setting name="sourceRoot" type="string (path)" default="" merging=false clShort="S" antAltAtt="srcdir" /> -<@setting name="outputRoot" type="string (path)" default="" merging=false clShort="O" antAltAtt="destdir" /> -<@setting name="dataRoot" type="string (path)" default="ex:the value of <@s\gsourceRoot -<@setting name="alwaysCreateDirectories" type="boolean" default="false" merging=false antAltAtt="alwaysCreateDirs" /> - -

    In the typical use case FMPP processes all files in the directory specified by <@s>sourceRoot, and writes the result into the directory specified by the <@s>outputRoot directory. These two root directories serve as the root directory of two virtual file systems that store the source files and the output files respectively. This means that all files that FMPP processes must be inside the source root directory (except data files - see later), and it is guaranteed that all output files will be inside the output root directory (as far as you do not by-pass FMPP intentionally with custom extensions). You can't leave the roots by moving upward with <@c>..-s. Also, when you refer to files or directories in the templates as the parameters of predefined directives, absolute paths like <@c>/example.html are interpreted relatively to the source or output root directories (except if the parameter deals with data files - see later).

    - -

    Note that both the source root and the output root must be defined before starting a processing session (but a front-end may assings a default value to them). Also, if you use the <@s>outputFile setting these two settings always have a default value.

    - -

    The directory specified by <@s>dataRoot is interesting for <@a href="dataloader.html">data loaders only. If a data loader gets a relative path, then it should interpret that relatively to the data root directory. If it gets an absolute path, it should interpret that as is. As you can see from this, data root directory does not try to mimic a file system root as the other two root directories. Data loaders can reach files outside the data root directory.

    - -

    By default, the data root is the same as the source root. This encourages the practice where you store the data files in the, say, <@c>data subdirectory of the source root, and then mark that directory with a <@c>ignoredir.fmpp file (file content is irrelevant), so FMPP will not process the content of the directory. Thus, you keep all input together: data sources, templates and static files (as images).

    - -

    By default, no empty subdirectories will be created in the output root directory. More precisely, directories are created only on demand, when actual output files have to be created in them, hence normally you don't have empty directories in the output. However, this behavior can be changed with <@c>alwaysCreateDirectories; with that setting set to <@c>true, each source directory will produce a corresponding output directory (unless it contains an <@c>ignoredir.fmpp file). Also, if a source directory contains a file named <@c>createdir.fmpp (file content is irrelevant) then the corresponding output directory will be created, regardless of the <@c>alwaysCreateDirectories setting (unless, again, <@c>ignoredir.fmpp is also present)

    - -

    It is possible to tell FMPP to process only certain files and directories of the source root, not all of them; see the <@s>sources setting.

    - - - -<@sect title="Source and output files"> -<@setting name="sources" type="sequence (of paths)" default="" merging=true /> -<@setting name="outputFile" type="string (path)" default="" clShort="o" merging=false /> - -

    Be default FMPP processes all files in the source root directory. But if you use the <@s>sources setting, FMPP will process only the files and/or directories listed there. Relative paths in this setting are resolved relatively to the source root directory, not to the configuration base (unless you use <@s>outputFile setting).

    - -

    If you use the <@s>outputFile setting, then FMPP switches to single file mode. In this mode, it will process only 1 files, and store its output in the file specified by the <@s>outputFile setting. You must use <@s>sources, and it must list exactly 1 file. If a relative path is given in the <@s>sources, it is resolved relatively to configuration base, not to the source root. If you didn't specified <@s>outputRoot or <@s>sourceRoot, it will default to the parent directory of the output file or source file respectively.

    - -

    The user interface of front-ends tend to require you to use some special way to specify the value <@s>sources setting. Please read the <@a href="frontends.html">documentation of the front-end you use about this. Note that configuration files are front-end independent, so there you always simply set <@s>sources be assigning value to the <@c>sources key.

    - - - -<@sect title="Text encoding issues"> -<@setting name="sourceEncoding" type="string" default="ISO-8859-1" clShort="E" merging=false /> -<@setting name="outputEncoding" type="string" default="source" merging=false /> -<@setting name="urlEscapingCharset" type="string" default="output" merging=false /> - -

    People use different encodings to store text in binary form, often referred as charsets. Examples of charsets are: <@c>ISO-8859-1, <@c>ISO-8859-2, <@c>CP852, <@c>CP1250, <@c>Shift_JIS, <@c>UTF-8. FMPP internally uses UNICODE everywhere, but when it has to read a text file or write a text file, it must deal with charsets to correctly decode/encode the text. -To read text files, FMPP uses the source encoding. This is be default ISO-8859-1. Also, a FreeMarker template has the ability to tell its own encoding with <@c><#ftl encoding="<@r>something">, and this overrides the source encoding for the individual template file.

    - -

    To write text files, FMPP uses the output encoding. This is be default holds the special value <@c>source, which means that FMPP will use the encoding of the source text file (template file). If you change the value of the setting to a concrete charset, such as UTF-8, then text files will be always written with that encoding. However, templates can set the encoding of the output file with <@c><@pp.setOutputEncoding encoding="<@r>something"/>, and this overrides the encoding dictated by the settings.

    - -

    The <@s>urlEscapingCharset specifes the name of the charset (encoding) used for URL escaping. It defaults to <@c>output, which means that the output encoding will be used for URL escaping. URL escaping happens for example when you use FreeMarker's <@c>url built-in (e.g. <@c><a href="foo.cgi?id=<#noparse>${id?url}">) or the <@a href="pphash.html#key_urlPathEnc"><@c>pp.urlPathEnc method.

    - -

    All of these settings understands the special charset <@c>host, which means the default encoding of the host operating system.

    - -

    The set of supported charsets (and their preciese names) depends on the Java platfrom implementation you run FMPP on.

    - - - - -<@sect title="Processing mode choosing" anchor="processingMode"> -<@setting name="modes" type="sequence (of function calls)" default="ex:empty" clShort="M" merging=true /> -<@setting name="ignoreCvsFiles" type="boolean" default="true" merging=false /> -<@setting name="ignoreSvnFiles" type="boolean" default="true" merging=false /> -<@setting name="ignoreTemporaryFiles" type="boolean" default="true" merging=false /> - -

    When FMPP has to process a file, it has to decide how to process that. That is, it has to choose a "processing mode" for the file. The processing mode can be one of:

    -
      -
    • execute: Execute the file as FreeMarker template (FTL) -
    • copy: Copy the file as is. Uses binary copy; charset does not mater here. -
    • renderXml: Parse the file as XML, and then render the XML document to output file(s) using a FreeMarker template. The template file is choosen for the XML file based on the <@s>xmlRenderings setting. For more information <@a href="settings.html#xmlRendering">read about XML rendering... -
    • ignore: Skip the file. -
    - -

    First, if the <@s>ignoreCvsFiles setting is true, and the file name is <@c>.cvsignore or matches <@c>.#?*, or the file is inside a sub-directory of the source root that is called <@c>CVS, then it chooses the "ignore" processing mode. Also, if the <@s>ignoreSvnFiles setting is true, and the file is inside a sub-directory of the source root that is called <@c>.svn, then it chooses the "ignore" processing mode (note that it doesn't ignore conflict files, i.e., <@c>*.mine and <@c>*.r<@r>number). Also, if <@s>ignoreTemporaryFiles setting is true, and the file name matches <@c>?*~ or <@c>~?* or <@c>#?*# or <@c>%?*% or <@c>_.?*, or the extension (the part after the last dot in the file name) after converting to lowercase matches <@c>bak or <@c>~* or <@c>*~ then it chooses the "ignore" processing mode. Note that the FMPP Ant task always sets these settings to <@c>false, so it does not interfere with the <@c>defaultExcludes parameter of Ant.

    - -

    Then, the processing mode is chosen with a sequence of <@a href="pathpattern.html">path patterns, which is defined by the <@s>modes setting. The first path pattern in the sequence that matches the <@a href="overview.html#virtualPath">virtual path of the file, chooses the processing mode. If no matching path were found, then FMPP chooses the processing mode automatically:

    -
      -
    • If the file extension after converting to lowercase is <@c>xml and the <@s>xmlRenderings is not an empty sequence, then it chooses the "renderXml" mode. -
    • If the file extension after converting to lowercase is one of: <#list [ - "jpg", "jpeg", "gif", "png", "swf", "bmp", "pcx", "tga", "tiff", - "ico", - "zip", "gz", "tgz", "jar", "ace", "bz", "bz2", "tar", "arj", - "rar", "lha", "cab", "lzh", "taz", "tz", "arc", - "exe", "com", "msi", "class", "dll", - "doc", "xls", "pdf", "ps", "chm", - "avi", "wav", "mp3", "mpeg", "mpg", "wma", "mov", "fli"]?sort as ext - ><@c>${ext}<#if ext_has_next>, , then it chooses the "copy" processing mode. -
    • Otherwise it chooses the "execute" processing mode. -
    -

    The <@s>modes setting is a list of TDD functions, where the function name is either <@c>execute, <@c>copy, <@c>renderXml, or <@c>ignore. The arguments to the functions are one or more path patterns of virtual paths in the source file system. For example this (in a configuration file):

    -<@prg> -modes: [ - ignore(**/tmp/) - copy(foo/**/*.html, foo/**/*.htm) - execute(**/*.html, **/*.htm, **/*.xhtml) - copy(**/*) -] - -

    will produce this processing mode chooser sequence:

    - -
    Path patternProcessing mode -
    <@c>**/tmp/ignore -
    <@c>foo/**/*.htmlcopy -
    <@c>foo/**/*.htmcopy -
    <@c>**/*.htmlexecute -
    <@c>**/*.htmexecute -
    <@c>**/*.xhtmlexecute -
    <@c>**/*copy -
    - -

    Note that processing modes are only applicable to files, not to directories. Say, you can't tell FMPP to ignore a directory, but to ignore all files in the directory (as <@c>**/tmp/ above). The end result will be that the directory will not be created, as it contains no output file.

    - - - - -<@sect title="Header and footer choosing"> -<@setting name="borders" type="sequence (of function calls)" default="ex:empty" merging=true /> - -

    With these settings you can insert a header before templates, and insert a footer after templates (templates = files processed in "execute" processing mode). The insertion of header and footer happens only in the memory of the computer, and does not modify the source files. This can be used to add common headers and footers to the templates without actually typing them again and again. Also, you can change the header/footer of many templates at once.

    - -

    The intent of headers and footers is not to show something at the top and bottom of pages. Rather it is to insert FTL directives that import or include commonly used macros, or to place the page inside a directive block, as <@c><#escape <@r>...><@r>...</#escape>. For concrete examples please see <@example 'border' />.

    - -<@note>Unfortunately the inserted header displace the error locations (column, row) in the error messages (I can't fix it in FMPP; FreeMarker improvements are needed to address this). However, if the header doesn't contain line-break, then this unwanted effect is limited to the first line of the template. So it's strongly recommended to not use line-break in headers. - -

    Footers and headers are chosen with similar mechanism to processing modes (see <@s>modes). There are two independent sequence of path-pattern to text entry mappings (so called "choosers"), one for choosing headers, and one for choosing footers. When FMPP loads a template file, it checks if the <@a href="overview.html#virtualPath">virtual path of the file matches to an entry in the header chooser sequence, and if so, it uses the header specified in the first such entry. Also, it does the same with the sequence of footers choosers, to choose a footer.

    - -

    There is a single setting to build both sequences at once: <@s>borders. You give a sequence of <@c>header, <@c> footer and <@c>border functions in it. The first argument to <@c>header and <@c> footer functions is the text of header and footer respectively, and the further arguments are the path patterns of virtual paths in the source file system. If you omit the path patterns, that's the same as if you give <@c>** (i.e. match all files). <@c>border is convenience function: <@c>border(<@r>a, <@r>b, <@r>paths...) is equivalent with <@c>header(<@r>a, <@r>paths...), footer(<@r>b, <@r>paths...). Example:

    -<@prg><#noparse> -header("<#import '/lib/css.ftl' as css>", **/*.css) -border("<#escape x as x?html>", "", **/*.html, **/*.htm) - -

    This build these sequences:

    -
      -
    • Header chooser sequence: - -
      Path patternHeader -
      <@c>**/*.css<@c><#import '/lib/css.ftl' as c> -
      <@c>**/*.html<@c><#escape x as x?html> -
      <@c>**/*.htm<@c><#escape x as x?html> -
      -
    • -
    • Footer chooser sequence: - -
      Path patternFooter -
      <@c>**/*.html<@c></#escape> -
      <@c>**/*.htm<@c></#escape> -
      -
    • -
    - -

    Only the first matching entry of the sequence is used for a file, the later entries are ignored. But sometimes you want to choose multiple headers/footers for the same file. In that case, you can define multiple independent sequences, so said, layers. Layers are separated with <@c>layer(). For example, modify the above example, so it imports <@c>/lib/common.ftl at the top for all files, without disabling the other headers/footers:

    - -<@prg><#noparse> -# The 1st (implicit) layer starts here -header("<#import '/lib/common.ftl' as c>", **/*.css, **/*.html, **/*.htm), -layer() -# The 2nd layer starts here -header("<#import '/lib/css.ftl' as css>", **/*.css), -border("<#escape x as x?html>", "", **/*.html, **/*.htm) - - -

    Here we have two independent header chooser sequences, so both CSS and HTLM files will import <@c>lib/common.ftl, and in additional CSS files will import <@c>lib/css.ftl, and HTML files will use an escape block. You can have any number of layers.

    - -

    A header chosen from an earlier layer will be used earlier in the template file than headers chosen from later layers. A footer chosen from an earlier layer will be used later in the template file than footers chosen from later layers. For example:

    - -<@prg> -borders: [ - border('L1(', ')L1') - layer() - border('L2{', '}L2') - layer() - border('L3[', ']L3') -] - - -

    If the content of a template file is <@c>content, its output will be:

    - -<@prg> -L1(L2{L3[content]L3}L2)L1 - - - - - -<@sect title="Output file name deduction"> -<@setting name="removeExtensions" type="sequence (of strings)" default="ex:empty" clShort="R" merging=true /> -<@setting name="removePostfixes" type="sequence (of strings)" default="ex:empty" merging=true /> -<@setting name="replaceExtensions" type="sequence (of strings)" default="ex:empty" merging=true /> - -

    Initially the name of the output file is the same as the name of the source file. These two settings allow you to change the output filename somewhat, be removing parts of source file name. - -

    The precise meaning of the settings:

    -
      -
    • <@s>removeExtensions: If the source file name ends with an exension in this sequence, then it will be removed from the output file name. For example, if <@c>t is in the sequence (note that there is no dot before the <@c>t), then the output file for <@c>example.html.t will be <@c>example.html. The extension to remove can contain dots (as <@c>tar.gz).
    • - -
    • <@s>removePostfixes: If the source file name before the first dot ends with a string in this sequence, then it will be removed from the output file name. For example, if <@c>_t is in the sequence, then the output file for <@c>example_t.html will be <@c>example.html. If the file name does not contains dot, then it still works: <@c>example_t will become to <@c>example.
    • - -
    • <@s>replaceExtensions: This sequence is used to replace the file extensions with another extensions. For example, if the sequence is this:
      - <@c>ftl, html, xftl, xml
      - then the <@c>ftl extension will be replaced with <@c>html (i.e. the output file name for source file <@c>foo.ftl will be <@c>foo.html), and the <@c>xftl extension will be replaced with <@c>xml. The 1st, 3rd, 5th, etc. sequence elements are the old extensions, and the 2nd, 4th, 6th, etc. sequence elements are the new extensions, so <@c>html extension will not be replaced with <@c>xftl. Also, only one extension replacement will occur for the same file name, so in the case of
      - <@c>x, y, y, z
      - <@c>x will not become to <@c>z.
    • - -
    -

    The settings are applied in the order as they appear above. Each setting is applied only once on the same file name. - -

    Note that output file name deduction is only apply to files, not to directories.

    - - - - -<@sect title="Skipping unchanged files"> -<@setting name="skipUnchanged" type='string' default="none" clShort="-U" merging=false /> - -

    This setting specifies that the processing of which source files can be skipped, if the source file was not modified after the last modification time of the output file. The value of setting can be one of:

    -
      -
    • <@c>none: Don't skip unchanged files. -
    • <@c>all: Skip all unmodified files. <@e>Warning! It has the problem that if the data that the template displays was changed, or a file that is <@c><#include <@r>...>-d or <@c><#import <@r>...>-d by the template was changed, it will not re-generate the output, since the template file itself was not changed. -
    • <@c>static: Skip only unmodified files that will be simply copied anyway (the files where the <@s>modes chooses "copy" processing mode). Process all other files. This is the recommended setting for most projects. -
    -

    If the output does not exist, the source file will be always processed.

    - -

    This feature will not work for templates that rename or drop the original output file during the template execution, since FMPP will believe in the next processing session that the output file for those files is missing, and thus it will process them again.

    - - - - -<@sect title="Turn choosing"> -<@setting name="turns" type="sequence (of function calls)" default="ex:empty sequence" merging=true /> - -

    When FMPP has to process multiple files in the same processing session (for example, when you process a whole directory), then the order in which the files will be processed, is undefined. This is a problem in certain use cases, where it must be ensured that certain files will be processed later than others. For example, if a page contains the alphabetic index of keywords occur in other pages, then that page must be processed for the last, because the information is collected during the processing of the other pages. This is what turns are about: to guarantee the order of the processing of files.

    - -

    The processing session is divided up into, so called, turns. Turns are identified with the turn number, which is simply the order of the turn. The session starts with turn 1, then comes turn 2, and then comes turn 3, ...etc. FMPP puts all files that will be processed into exactly one of the turns, based on the turn chooser sequence.

    - -

    The turn chooser sequence is a sequence of path-pattern -> turn-number pairs. For each source file, the <@a href="overview.html#virtualPath">virtual path of the source file is compared with these <@a href="pathpattern.html">path patterns, and the first pattern of the sequence that matches determines the turn in which the file will be processed. If there is no matching pattern in the sequence for the file, then the file will be processed in turn 1.

    - -

    For example, if <@c>config.fmpp contains this line: - -<@prg> -turns: [turn(3, main_idx.html), turn(2, **/*_idx.html)] - - -

    then all files where the file name ends with <@c>_idx.html will be processed in turn 2, except <@c>main_idx.html, which will be processed in turn 3. All other files will be processed in turn 1.

    - -

    There is no upper limit of the turn number (except a technically limit, somewhere near 2 thousand million). Simply, the last turn will be the turn with the highest number, which is mentioned in the turn chooser sequence, or 1, if the sequence is empty. The first turn is always the turn 1. It is not a problem if a turn contains no file processing.

    - -

    See <@example 'session' /> for a working example, or the FMPP task call in the <@c>build.xml.

    - - - - -<@sect title="Data model building" anchor="data"> -<@setting name="data" type="hash" default="" clShort="D" merging=true /> -<@setting name="localData" type="sequence" default=""merging=true /> -<@setting name="templateData" type="string (Java class name)" default="" merging=false deprecated="Use <@s\glocalData - -

    As you may <@fma href="dgui_quickstart_basics.html">know from the FreeMarker manual, FreeMarker generates the output by merging a template with a data model, and the data model is a hash variable, the root hash. With FMPP terminology, it is usually just referred as "the data". In FMPP, the population of the root hash happens in two places:

    -
      -
    1. Session level data: Once per processing session, at the very beginning of it (before any file processing is stared), the root hash is filled with variables based on the <@s>data setting. This is what happened in the <@a href="qtour.html">Quick Tour, when we have loaded the colors and the table of birds. These variables will be constant during the whole session, and visible for all templates. They must not be modified while the processing session is executing, even if you find a technical way to do that. Note that <@fma href='dgui_misc_var.html'>FreeMarker uses multiple variable layers, so you doesn't modify these variables with <@c><#assign <@r>...> or <@c><#global <@r>...>, just hide them for the time of the template execution, which is OK (the effect will not be visible for the files processed later). - -
    2. Local data (file processing level data): For each processed file, just before FMPP starts to proccess the file, some extra variables are put into the root hash that are specific for that file. These variables will be present in the root hash only while that file is being processed (hence "local data"), so the next file processing will start with the original session level data in the root hash again. The local data is built in three steps, in this order: -
        -
      1. Variables created based on the <@s>localData setting. (See details <@a href="#localData">later...) -
      2. Deprecated: User written Java object of class specified by <@s>templateData adds an arbitrary set of variables. This feature is deprecated and will be removed later. -
      3. The FMPP core adds the <@a href="pphash.html"><@c>pp hash. -
      - Variable added later will overwrite the variable of similar name added earlier. Also, variable that is local data will hide (seemingly overwrite) the variable of similar name that is session level data. -
    3. -
    - -

    From the view point of FreeMarker templates, variables that are part of the session level data and the part of the local data are not different. They are equal parts of the data model.

    - -<@sect title="ex:More about the <@s\gdata - -

    When you use <@a href="tdd.html">TDD syntax for defining the hash for <@s>data, TDD function calls are interpreted as <@a href="dataloader.html">data loader invocations. For reminder, here is the relevant part of <@c>config.fmpp from <@example path="qtour_step4" />:

    - -<@prg> -data: { - tdd(data/style.tdd) - birds: csv(data/birds.csv) -} - - -

    TDD syntax makes it possible to enter values directly as well, without using data loaders. For example, you could directly enter the "birds" table with TDD (altoguh it is not too convenient): - -<@prg> -data: { - tdd(data/style.tdd) - birds: [ - { - name: arctic-tern - description: "Flies very long distances all years." - favoriteFood: sardine - } - { - name: house-sparrow - description: "Don't you say you don't know it..." - favoriteFood: sunflower - } - { - name: sakeret - description: "Great hunter of the sky." - favoriteFood: pigeon - } - ] -} - - <#-- more about data --> - -<@sect title="ex:More about the <@s\glocalData - -

    Let's start with a simple example. We have a variable <@c>bgColor in the session level data with value <@c>green. We want to override this with value <@c>yellow for the source files that are in directory <@c>sub (or in its subdirectories, ...etc.):

    - -<@prg> -data: { - bgColor: green -} - -localData: [ - case(sub/**, {bgColor: yellow}) -] - - -

    Complicate it a bit... now set the <@c>bgColor if the file is in directory <@c>sub or <@c>sub2:

    - -<@prg> -localData: [ - case(sub/**, sub2/**, {bgColor: yellow}) -] - - -

    Now do the same as earlier, except for files that are in directory <@c>sub/sky, where the <@c>bgColor is always <@c>blue:

    - -<@prg> -localData: [ - case(sub/sky/**, {bgColor: blue}) - case(sub/**, sub2/**, {bgColor: yellow}) -] - - -

    The rule is that the first <@c>case(<@r>...) where one of the path patterns matches the source file path, will specify the local data (given as the last parameter), and the further <@c>case(<@r>...)-s are ignored. There can be any number of <@c>case(<@r>...)-s listed (note that <@c>localData is a sequence), and a <@c>case(<@r>...) can have any number of path patterns (but 0).

    - -

    Tricky example: do the same as earlier, but don't override the color if the file name starts with <@c>foo:

    - -<@prg> -localData: [ - case(**/foo*, {}) - case(sub/sky/**, {bgColor: blue}) - case(sub/**, sub2/**, {bgColor: yellow}) -] - - -

    Assume you want to set variable <@c>author to <@c>Joe for all files where the file name contains <@c>_j., and to <@c>Amy for all files contains <@c>_a.. But, you want to do this independently of the <@c>bgColor business. In this case you have to use layers:

    - -<@prg> -localData: [ - # The 1st (implicit) layer starts here - case(**/foo*, {}) - case(sub/sky/**, {bgColor: blue}) - case(sub/**, sub2/**, {bgColor: yellow}) - layer() - # The 2nd layer starts here - case(**/*_j.*, {author: Joe}) - case(**/*_a.*, {author: Amy}) -] - - -

    The rule is that layers are separated with a <@c>layer() function call. You can have any number of layers. The <@c>case(<@r>...)-list of each layer will be searched for the first match independently. If more layers put the same variable into the data model, the higher layer (earlier layer) wins (hence "layers"). Layers are calculated starting with the lowest layer. Note that to ease setting merging, layers that doesn't contain any <@c>case(<@r>...)-s are removed automatically.

    - -

    The last parameter of the case can be:

    -
      -
    • Arbitrary TDD hash (as in the examples above). This behaves as the value of the <@s>data setting, so you can use any number of key-value pairs, and invoke data loaders. The value of hash is calculated at most once per processing session, when it is first needed. For the subsequent file processings where the same <@c>case(<@r>...) is choosen, the calculated value is reused, so the data loaders don't re-load the external resources. If the <@c>case(<@r>...) is never chosen during the session, the value of the TDD hash is not calculated at all.
    • - -
    • A TDD function call. The supported functions are: -
        -
      • <@c>bsh: Deduces the path of a BeanShell script file from the source file path, and executes that script to create local data. The path of the script file will be the same as the path of the source file, except that the file name part is modified according the options described later. The script must return a <@c>java.util.Map, which stores the variables (keys are the names of the variables, associated values are the values of the variables) that will be added to the local data. The following variables are accessible for the scripts: <@c>engine, the <@c>fmpp.Engine instance, and <@c>templateEnvironment, the <@c>fmpp.TemplateEnvironment instance. There is 1 parameter to this function (optional), a hash that can store the following options (each is optional): -
          -
        • <@c>ending: The string appended at the end of the source file name. Can't be 0 length string. It defaults to <@c>.bsh.
        • -
        • <@c>removeExtension: Sets if the extension from the source file name should be removed before appending the <@c>ending. The extension is the part after the last dot of the file name. The dot itself is also removed. Defaults to <@c>false.
        • -
        • <@c>ignoreMissing: Set if it will be ignored if no script file found for the source file (and the source file will be processed normally), rather than aborting the processing of the file with error. Defaults to <@c>false.
        • -
        • <@c>encoding: The encoding of the script files. If it is not set then the value of the <@s>sourceEncoding setting will be used.
        • -
        -
      • -
      -
    • - -
    • A string. In this case the string will be interpreted as BeanShell script that must evaluate to an object that implements <@c>fmpp.LocalDataBuilder. This let Java programmers to implement custom local data strategies. See <@a href="api/index.html">the API documentation for more information. (The predefined strategies above are also implemented with this interface internally.)
    • -
    - -

    Finally, let see an example of the usage of the <@c>bsh function: It will execute a BeanShell script file for each HTML to add local data. For example, the script file for source file <@c>foo/bar.html should be <@c>foo/bar.html.bsh. If there is no script for the HTML file, it will not consider that as an error.

    - -<@prg> -modes: ignore(**/*.bsh) -localData: [ - case(**/*.htm, **/*.html, bsh({ignoreMissing})) -] - - -

    A possible <@c>.bsh file, that adds local variables <@c>x and <@c>y:

    - -<@prg> -res = new HashMap(); -res.put("x", "Just for test: " + templateEnvironment.getData("author")); -res.put("y", "Blah..."); -return res; - - -

    For a working example see <@example 'local_data' />.

    - - <#-- more about localData --> - - - - -<@sect title="Locale"> -<@setting name="locale" type="string (locale)" default="en_US" clShort="A" merging=false /> - -

    Set the locale (language, country) used in templates. It has significance because different countries write numbers differently, sort text differently, etc.

    - -

    The value is a string which consist of a language code (lowercase two-letter ISO-639 code) plus optional county code (uppercase two-letter ISO-3166 code) separated from the language code with underscore, and if we have specified the country then an optional variant code (not standardized) separated from the country with underscore. Examples of valid values: <@c>en, <@c>en_US, <@c>en_US_MAC. FreeMarker will try to use the most specific available locale, so if you specify <@c>en_US_MAC but that is not known, then it will try <@c>en_US, and then <@c>en, and then the default locale of the computer.

    - -

    Also, the special value <@c>host can be used to ask FMPP to use the default locale of the host operating system. However, for most applications it is not recommended to depend on the host locale, since then the output will depend on where you run the generation (and not on what people will use the output).

    - -

    If you don't know what your locale string would be, use the <@c>--print-locales option of the command-line tool. Note that unfortunately, the codes printed here are far the superset of locales that Sun's Java platform implementation actually correctly handles.

    - -

    Note that the initial value of the setting is <@c>en_US, because it is the locale that formats things similarly as a programmer would expect.

    - - - - -<@sect title="Number format"> -<@setting name="numberFormat" type="string" default="0.############" merging=false /> - -

    This specifies the default format of numbers when FreeMarker has to convert numbers to strings. For example, if you change this setting to <@c>0.00 then:

    - -<@prg><#noparse>${1}, ${1.1}, ${1.245} - -

    will print (if the locale setting is <@c>en_US):

    - -<@prg>1.00, 1.10, 1.25 - -

    Note that you can override the effect of this setting in the templates with <@c><#setting number_format="<@r>something">, also you can override this for each interpolations with <@c>?string("<@r>something").

    - -

    The syntax and semantic of the format string is as <@c>java.text.DecimalFormat defines it. For convenience I quote a part from the documentation of <@c>java.text.DecimalFormat:

    - - -

    Pattern Syntax -

    - pattern     := pos_pattern{';' neg_pattern}
    - pos_pattern := {prefix}number{suffix}
    - neg_pattern := {prefix}number{suffix}
    - number      := integer{'.' fraction}{exponent}
    - prefix      := '\u0000'..'\uFFFD' - special_characters
    - suffix      := '\u0000'..'\uFFFD' - special_characters
    - integer     := min_int | '#' | '#' integer | '#' ',' integer
    - min_int     := '0' | '0' min_int | '0' ',' min_int
    - fraction    := '0'* '#'*
    - exponent    := 'E' '0' '0'*
    -  
    - Notation:
    -   X*       0 or more instances of X
    -   { X }    0 or 1 instances of X
    -   X | Y    either X or Y
    -   X..Y     any character from X up to Y, inclusive
    -   S - T    characters in S, except those in T
    - 
    - -

    Special Pattern Characters - -

    Many characters in a pattern are taken literally; they are matched during - parsing and output unchanged during formatting. Special characters, on the - other hand, stand for other characters, strings, or classes of characters. - They must be quoted, unless noted otherwise, if they are to appear in the - prefix or suffix as literals. - -

    The characters listed here are used in non-localized patterns. Localized - patterns use the corresponding characters taken from this formatter's - DecimalFormatSymbols object instead, and these characters lose - their special status. Two exceptions are the currency sign and quote, which - are not localized. - -

    - - - - - - - - - - - -
    SymbolLocationLocalized?Meaning
    0NumberYDigit -
    #NumberYDigit, zero shows as absent
    .NumberYDecimal separator or monetary decimal separator
    -NumberYMinus sign
    ,NumberYGrouping separator
    ENumberY - Separates mantissa and exponent in scientific notation. - Need not be quoted in prefix or suffix.
    ;Subpattern boundaryY - Separates positive and negative subpatterns
    %Prefix or suffixYMultiply by 100 and show as percentage
    \u2030Prefix or suffixY - Multiply by 1000 and show as per mille
    ¤
    (\u00A4)
    Prefix or suffixN - Currency sign, replaced by currency symbol. If - doubled, replaced by international currency symbol. - If present in a pattern, the monetary decimal separator - is used instead of the decimal separator.
    'Prefix or suffixN - Used to quote special characters in a prefix or suffix, - for example, "'#'#" formats 123 to - "#123". To create a single quote - itself, use two in a row: "# o''clock".
    - - - - -<@sect title="Boolean format"> -<@setting name="booleanFormat" type="string" default="true,false" merging=false /> - -

    This setting specifies how boolean values will be converted to text or from text inside FreeMarker templates (not in <@a href="dataloader.html">data loaders). Note that by default doing something like <@c>${'$'}{myBoolean} is an error, because FreeMarker denies using <@c>"true,false" for implicit boolean to text conversion; write <@c>${'$'}{myBoolean?c} where you want <@c>true and <@c>false as is in the output.

    - -

    This setting directly correspond to the FreeMarker setting with similar name, so find the full documentation there: -<@fma "ref_directive_setting.html#topic_date_format_settings">FreeMarker settings.

    - -

    Example: <@c>"Yes,No" means that <@c>${'$'}{myBoolean?c} will print <@c>Yes or <@c>No. - - - - -<@sect title="Date/time format"> -<@setting name="dateFormat" type="string" default="" merging=false /> -<@setting name="timeFormat" type="string" default="" merging=false /> -<@setting name="datetimeFormat" type="string" default="" merging=false /> -<@setting name="timeZone" type="string" default="" merging=false /> -<@setting name="sqlDateAndTimeTimeZone" type="string" default="" merging=false /> - -

    These settings specify how date/time/date-time values will be converted to text or from text inside FreeMarker templates (not in <@a href="dataloader.html">data loaders, unless said otherwise).

    - -

    These settings directly correspond to the FreeMarker settings with similar name, so find their full documentation there: -<@fma "ref_directive_setting.html#topic_date_format_settings">FreeMarker settings.

    - -

    Examples of <@s>datetimeFormat-s: <@c>"dd.MM.yyyy HH:mm:ss" (where <@c>HH means 0-23 hours) or <@c>"MM/dd/yyyy hh:mm:ss a" (where <@c>a means AM or PM, if the current language is English), <@c>"iso" (ISO 8601:2004 format), <@c>"xs" (XML Schema format). - -

    Examples of <@s>timeZone-s: <@c>"GMT", <@c>"GMT+2", <@c>"GMT-1:30", <@c>"CET", <@c>"PST", <@c>"America/Los_Angeles", <@c>"JVM default" - -

    When a format setting isn't set, the default format of the current locale (country) will be used, which are specified by the Java installation you run FMPP on. If the <@s>timeZone isn't set, the time zone of the host computer will be used (specified by the Operating System).

    - - - -<@sect title="Handling errors"> -<@setting name="stopOnError" type="boolean" default="true" clShort="s, c" merging=false /> - -

    Be default when FMPP encounters problem during the processing of a source file, it terminates the whole processing session with the error. It can be annoying if you have many bad files, because you have to restart the whole session and wait until the session reaches another bungled template (or other kind of problematic source file), again and again, until you have fixed all of them. If you change this setting to <@c>false, FMPP will not stop on the errors, just skips the problematic source file and continues the processing session with the next source file. You should use <@s>logFile together in this case, so you can later digest all problems occured during the processing session.

    - -

    Note that this settings will only suppress errors that occur during the processing of source files. It will not suppress errors like, for example, bad data files (unless it's loaded in a template with <@c>pp.data) or invalid setting values.

    - - - - -<@sect title="Expert mode"> -<@setting name="expert" type="boolean" default="false" clShort="x" merging=false /> - -

    This setting is to enable suspicious situations, when the engine or the tool suspects that you have miss-configured something, and thus an accidental data loss can happen. It is recommended to leave this setting false, until it actually blocks something that you want to do.

    - -

    Please note that overwriting a file in general is a normal situation for FMPP; no expert mode required to do that.

    - - - -<@sect title="Case sensitive path comparison"> -<@setting name="caseSensitive" type="boolean" default="false" merging=false /> - -

    This setting tells if FMPP should differentiate upper- and lower-case letters when it compares paths for equality, or when it matches paths to path patterns. Regardless of this setting, FMPP always tries to keep the case of file names (i.e. the output of <@c>Foo.txt will be <@c>Foo.txt, and not <@c>foo.txt or <@c>FOO.TXT), as far as the host operating system does not prevent this.

    - - - -<@sect title="Logging" anchor="logging"> -<@setting name="logFile" type="string (path)" default="" clShort="L" merging=false /> -<@setting name="appendLogFile" type="boolean" default="" merging=false /> - -

    If these settings are supported or not, depends on the front-end you use. If a setting is not supported, the front-end must silently ignore it.

    - -

    If the <@s>logFile setting is set, the front-end should record information about the processing session into the file, such as the warning messages and errors occurred.

    - -

    If <@s>appendLogFile is <@c>false, then already existing log file (possibly left from the previous processing session) is deleted and restarted. This is the recommended default behavior, however a front-end may chooses something different. If <@s>appendLogFile is <@c>true, then old log file should be continued.

    - -

    Please read the documentation of <@a href="frontends.html">the front-end you use for the precise behavior of these settings.

    - - - - -<@sect title="Showing the progress and other messages"> -<@setting name="quiet" type="string" default="" clShort="q, v, Q" merging=false /> -<@setting name="echoFormat" type="string" default="" clShort="F" merging=false /> -<@setting name="columns" type="integer" default="" merging=false /> -<@setting name="printStackTrace" type="boolean" default="false" merging=false /> -<@setting name="snip" type="boolean" default="true" merging=false /> - -

    If these settings are supported or not, depends on the front-end you use. If a setting is not supported, the front-end must silently ignore it.

    - -

    The <@s>quiet setting tells the front-end if how much should it show the progress of the processing session on the screen. The accepted values are <@c>true, <@c>false (of type string or boolean), and <@c>reallyQuiet. Also, empty string is equivalent with <@c>true. (Values <@c>-1, <@c>0, <@c>1 are also supported for backward compatibility.) The precise meaning of values is front-end specific.

    - -

    The <@s>echoFormat setting specifies how to display the progress of the processing session on the screen. The meaning of values and the set of understood values are front-end specific, but values <@c>verbose, <@c>normal, <@c>terse and <@c>quiet should be understood, also the shorthands of them: <@c>v, <@c>n, <@c>t and <@c>q. The front-end must not stop with error if it doesn't understand the value that comes from a configuration file.

    - -

    The <@s>columns setting specifies the number of columns on the console (terminal), which is used for text wrapping. This is only applicable if you are using a command line interface for FMPP (or something similar). If you are using the provided shell script to invoke the command line interface, that will try to auto-detect the actual value (since 0.9.15), so you shouldn't set this setting, unless the auto-detection gives incorrect result.

    - -

    The <@s>printStackTrace setting specifies if the front-end should print stack trace to the screen on error, or a terser error description. <@s>snip is deprecated, and now it's just the inverted alias of <@s>printStackTrace.

    - -

    Please read the documentation of <@a href="frontends.html">the front-end you use for the precise behavior of these settings.

    - - - -<@sect title="Meta settings" anchor="metaSettings"> -<@setting name="configurationBase" type="string (path)" default="" merging=false /> -<@setting name="inheritConfiguration" type="string (path)" default="" merging=false /> - -

    These settings influence the interpretation of the configuration file they are stored in. Although front-ends may support the specification of these settings outside configuration files, with the front-end specific interface, the meta setting specified in this way is used to emulate that the setting is present in the configuration file the front-end loads.

    - -

    The <@s>configurationBase setting sets the <@a href="configfile.html#configurationBase">configuration base for the setting values stored in the same configuration file. If the <@s>configurationBase itself is a relative path, then it is resolved relatively to the directory of the configuration file.

    - -

    If <@s>inheritConfiguration is present in a configuration file, then the configuration will <@a href="configfile.html#inheritance">inherit the configuration file pointed by the value of this setting. If <@s>inheritConfiguration is a relative path, then it is resolved relatively to the configuration base, which is already overridden by <@s>configurationBase if that's persent in the configuration file.

    - - - - -<@sect title="XML related settings" anchor="xml"> - -<@setting name="xmlCatalogFiles" type="sequence (of paths)" default="" merging=true /> -<@setting name="xmlCatalogPrefer" type="string" default="public" merging=false /> -<@setting name="validateXml" type="boolean" default="false" merging=false /> -<@setting name="xpathEngine" type="string" default="dontSet" merging=false /> -<@setting name="xmlRenderings" type="sequence (of hashes)" default="ex:empty" merging=true /> - -<@sect title="Catalogs"> - -

    Catalog files are (primarily) used to map public identifiers (and system identifiers) to local files. For example, you want to load an XML file that starts with this:

    - -<@prg> - - - - -

    Whenever you try to load this XML file, the XML parser will need the DTD requested by the DOCTYPE, so it will try to download it from <@c>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd (and all other files the DTD will refer to), which is obviously a bad joke. The standard solution is that you obtain the DTD file (and the further files it refers to) and store it locally on your computer, and also you write a catalog file that maps public identifiers (as <@c>-//W3C//DTD XHTML 1.0 Transitional//EN) to the local paths of the files. Then, you have to specify the catalog file(s) for FMPP with the <@s>xmlCatalogFiles setting.

    - -

    FMPP supports the "widely known" catalog formats: OASIS plain text TR9401 catalog files, OASIS XML Catalogs, and XCatalogs. Delegate entries are supported. Don't panic if you can't undestand a word of it! :) Just look at <@example 'xml_validating' />. For most people it's enough to know (copy-paste...) what (s)he sees there. If you still need more information, please visit the Web page of the OASIS Entity Resolution Technical Committee: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=entity.

    - -

    The meaning of <@s>xmlCatalogPrefer should be clean if you are familiar with OASIS catalogs. If you are not, just left it unchanged. The allowed values of this setting are <@c>system, <@c>public, and <@c>globalDefault.

    - -

    Both catalog related settings has a global (Java virtual machine level) default. Please find the documentation of <@c>org.apache.xml.resolver package on the Internet about this. In the case of <@s>xmlCatalogFiles, the global default will be appended at the end of the list of catalog files. In the case of <@s>xmlCatalogPrefer, the global default is used when the value of the setting is <@c>globalDefault. Attention! If you don't use the <@s>xmlCatalogFiles FMPP setting, then the catalog feature is disabled, so you must specify this setting (even an empty sequence) to use the global defaults.

    - - - - -<@sect title="Validation"> - -

    The <@s>validateXml setting specifies if, by default, XML files are validated (i.e. checked against the DTD) or not. With "by default" I mean that this can be overridden for individual files, as with the <@c>validate option of the <@a href="dataloader.html#key_xml">xml data loader.

    - - - - -<@sect title="XPath engine"> - -

    The <@s>xpathEngine setting specifies which XPath engine will FreeMarker use when you access XML data (see <@a href="dataloader.html#key_xml">XML dataloader). This setting accepts these values:

    - -
      -
    • <@c>jaxen: Use Jaxen. For this to work, you need to obtain <@c>jaxen.jar (1.1-beta-8 or later!), and make it accessible for FMPP (e.g. copy it into the <@c>lib directory of the FMPP installation, or if you use FMPP as Ant task, then into the <@c>lib directory of Ant). Jaxen provides richer set of capabilities for FreeMarker templates than Xalan.
    • -
    • <@c>xalan: Use Apache Xalan. Xalan is accessible for sure if you are using Sun J2SE 1.4, but not in 1.5.
    • -
    • <@c>default: Let FreeMarker choose the XPath engine it prefers. In FreeMarker 2.3 it will be Xalan (if available).
    • -
    • <@c>dontSet: Don't set what XPath engine will be used. For most users it is the same as <@c>default (see below). This is the default value of the setting.
    • -
    • All other values are interpreted as the full-qualified class name of an XPath engine adapter class, that is, a <@c>freemarker.ext.dom.XPathSupport implementation.
    • -
    - -

    If you embed FMPP into your application, then you have to know that XPath engine choosing is a VM level setting (static field) of FreeMarker. Whenever you execute a processing session, FMPP will aggressively set this FreeMarker setting according the <@s>xpathEngine FMPP setting. Thus, if you don't want FMPP to interfere with other FreeMarker dependent components in the same VM, you should keep value <@c>dontSet.

    - - - -<@sect title="XML rendering" anchor="xmlRendering"> - -

    XML rendering is similar to the typical XSLT usage pattern, if you know that. The source file, for which <@c>renderXml processing mode is choosen (see the <@s>modes setting), will be parsed as XML file. Then, this XML document will be rendered to one or more output files with a FreeMarker template, which is choosen based on the value of the <@s>xmlRenderings setting. The template gets the XML documents with the <@a href="pphash.html#key_doc"><@c>pp.doc variable. Since the template shouldn't be executed in itself, it should be an ignored file (for example it should be stored in a directory that has an <@c>ignoredir.fmpp file). - -

    For an example of this pattern check <@example 'xml_rendering'/>.

    - -<@note>Sometimes you rather want to handle XML files as data than as source files. In this case use <@s>data, <@s>localData, or <@a href="pphash.html#key_loadData"><@c>pp.loadData with the <@a href="dataloader.html#key_xml">XML data loader, not XML rendering. - -

    The <@s>xmlRenderings setting stores a sequence of XML rendering configurations. An XML rendering configuration is a hash that stores the options of an XML rendering. The options are:

    - -
      -
    • Options specify which XML files should be processed with the configuration: -
        -
      • <@c>IfSourceIs: Optional, defaults to an empty sequence. This option is a sequence of path patterns (strings), or a single path pattern. FMPP will not render the XML file with this configuration if its source root relative virtual path does not match a pattern in this sequence. If this sequence is empty, FMPP will not consider this condition, that is, it will not exclude any XML files because of their path.
      • - -
      • <@c>ifDocumentElementIs: Optional, defaults to an empty sequence. This option is a sequence of element names (strings), or a single element name. FMPP will not render the XML file with this configuration if this sequence doesn't contain the document element (the root element) of the XML file. If this sequence is empty, FMPP will not consider this condition, that is, it will not exclude any XML files because of their document element. The element names can use name-space prefixes. The prefixes and the default name-space of elements can be specified with the <@c>xmlns option of the configuration.
      • -
      -
    • - -
    • Options specify how to load the XML file. These are exactly the same as the options of the <@a href="dataloader.html#key_xml">XML data loader (<@c>xmlns, <@c>index, ...etc.), except that <@c>false value for <@c>namespaceAware is not allowed.
    • - -
    • Options for java programmers, to build extra local data based on the loaded XML file. -
        -
      • <@c>localDataBuilder: Optional, defaults to an empty sequence. This is a sequence of strings, or a single string. Each string will be evaluated as BeanShell script (once per <@c>Settings.execute()), which must return an <@c>fmpp.LocalDataBuilder. The aim of these data builders is to do the complex or resource eager parts of the XML processing that you don't want to do in FTL, and expose the results as local data. The data loaders can get the loaded XML document with <@c>templateEnvironment.getXmlDocument(), or <@c>templateEnvironment.getWrappedXmlDocument(). These data builders will be invoked after the application of the <@s>localData setting, and can replace earlier added local variables. They will be executed in the same order as they appear in the sequence.
      • -
      -
    • - -
    • Options specify how to render the XML document to output file: -
        -
      • <@c>template: Required if <@c>copy is <@c>false. This is the source root relative virtual path of a FreeMarker template, which will be invoked to render the output. (The template file itself should be an ignored file, as it doesn't produce output alone.) The template can access the XML document with the <@a href="pphash.html#key_doc"><@c>pp.doc variable.
      • - -
      • <@c>copy: Required if <@c>template is not specified, defaults to <@c>false. This is a boolean value. If it is <@c>true, then the XML document will be copied to the output file (exact copy). In this case the <@c>template option can't be used.
      • -
      -
    • -
    - -

    Example:

    - -<@prg><#noparse> -xmlRenderings: [ - { - ifDocumentElementIs: product - template: renderer/product.html - xmlns: {D: http://example.com/xmlns/products} - } - { - ifDocumentElementIs: book - template: renderer/book.html - index: { - element: [part, chapter] - attribute: ppFile - numbering: hierarchical - value: '%e_%n.html' - } - } -] - - -

    When <@c>renderXml processing mode is chosen for a source file (see <@s>modes), then the first matching XML rendering configuration of the sequence will be used. A configuration is matching if nor the <@c>ifSourceIs, nor the <@c>ifDocumentElementIs option excludes the XML file. (Thus, if a configuration doesn't use any of the <@c>if<@r>... options, it will be used for all source files, unless an earlier configuration matches the source file too.)

    - - - - - - -<@sect title="FreeMarker links (external includes)"> -<@setting name="freemarkerLinks" type="hash (of sequence of paths)" default="" merging=true /> - -

    FreeMarker links is a dirty hack to satisfy a frequent demand: <@c><#include ...>/<@c><#import ...> files that are outside the source root directory, as common FTL macro libraries used in multiple projects.

    - -

    Assume you store your commonly used FreeMarker includes in the <@c>c:\user\freemarker\include directory. But, this directory is outside the <@s>sourceRoot, so you can't reach it with <@c><#include ...>/<@c><#import ...>. To solve this, add this to the FMPP configuration file:

    - -<@prg><#noparse> -freemarkerLinks: { - inc: c:/user/freemarker/include -} - - -

    Now you can include files of that external directory like this:

    - -<@prg><#noparse> -<#include "/@inc/foo.ftl"> - - -

    Here, FreeMarker will actually read <@c>c:\user\freemarker\include\foo.ftl. The seeming <@c>@inc entry in the source root directory (seeming, as there is no such file or directory there in reality) acts as an alias, a transparent link to <@c>c:\user\freemarker\include. (Note that in the configuration file I have used <@a 'overview.html#realPath'>slash instead of backslash for convenience.)

    - -

    It is important that link entries (as <@c>@inc above) are visible only for the predefined FreeMarker directives that use template paths (in FreeMarker 2.3, these are <@c><#include ...> and <@c><#import ...>), or for user defined directives that internally use those predefined directives. They are not visible for anything else. Thus, they are not visible for the functions and directives of the <@c>pp hash, nor FMPP will try to process the <@c>@inc directory (since it doesn't see it at all).

    - -

    As you have seen, a link is defined by associating a name (<@c>inc in the last example, but you can use anything else you prefer) with a path. You can have more links with different names. The link is visible in the source root (never in its subdirectories) as a directory (or file) of name <@c>@<@r>name (where <@c><@r>name is the link name). Regarding the associated path, the rules are the same as with <@s>sourceRoot, <@s>outputRoot, ...etc: it is a <@a 'overview.html#realPath'>real path, so if it is relative, then it will be interpreted relatively to the <@a 'overview.html#realPath'>configuration base.

    - -

    For example, assume, that you also have project specific include files, and you store them outside the source root (because you have multiple source roots in your project), in the <@c>include subdirectory of the same directory, where you stores the FMPP configuration files for your project. Use this in the FMPP configuration file:

    - -<@prg><#noparse> -freemarkerLinks: { - inc: /home/joe/freemarker/include - projInc: include -} - - -

    Note that the path associated with <@c>projInc is a relative path, so it will be resolved relatively to the directory of the configuration file (unless you have overridden the configuration base, of course...). Now you can do things like this:

    - -<@prg><#noparse> -<#include "/@projInc/header.html"> -<#include "/@inc/foo.ftl"> -<#import "/@projInc/forms.ftl" as f> - - -

    If the configuration file that contains the above is <@c>/home/joe/projects/foo/cfg3.fmpp, then <@c><#include '/@projInc/header.html'> will read <@c>/home/joe/projects/foo/include/header.html.

    - -

    In the generic case, a FreeMarker link is associated with a list of paths. For example:

    - -<@prg><#noparse> -freemarkerLinks: { - inc: [/home/joe/freemarker/include, /home/kate/freemarker/include] -} - - -

    When you use <@c><#include '/@inc/foo.ftl'> in a template, then FMPP will check if <@c>/home/joe/freemarker/include/foo.ftl exist, and if not, it will try <@c>/home/kate/freemarker/include/foo.ftl.

    - -

    Files that are really in the source root directory have priority over files that are accessible through FreeMarker links. For example, if you invoke <@c><#include '/@inc/foo.ftl'>, and the source root directory has a subdirectory called <@c>@inc, and that subdirectory has a file called <@c>foo.ftl, then that file will be used, without considering that the <@c>@inc in the path possibly refers to a FreeMarker link. If a subdirectory called <@c>@inc exists, but it doesn't contain <@c>foo.ftl, then the <@c>inc link will be used.

    - -

    A FreeMarker link can point to files as well, not only to directories. For example:

    - -<@prg><#noparse> -freemarkerLinks: { - footer: /home/joe/footers/gpl.html -} - - -

    and then in a template you can do this:

    - -<@prg><#noparse> -<#include "@footer"> - - -

    The merging of the <@s>freemarkerLinks settings is differs a bit from the merging of other hash settings: when the two hashes to merge contains the same key (i.e. the same link name), then the lists of paths for that key will be concatenated. For example, if <@c>common.fmpp is:

    - -<@prg><#noparse> -freemarkerLinks: { - a: c:/user/fm/libs1 - b: [inc1, inc2] -} - - -

    and <@c>config.fmpp is:

    - -<@prg><#noparse> -inheritConfiguration: common.fmpp -... -freemarkerLinks: { - a: c:/user/fm/libs2 - b: [inc3, inc4] - c: foo -} -... - - -

    then the resulting setting value is equivalent with:

    - -<@prg><#noparse> -freemarkerLinks: { - a: [c:/user/fm/libs2, c:/user/fm/libs1] - b: [inc3, inc4, inc1, inc2] - c: foo -} - - -

    Note that the name of the links doesn't start with <@c>@; the <@c>@ is used only to refer to the links. To protect users from mistakes regarding this, it is not allowed to start a link name with <@c>@.

    - - - - -<@sect title='Activating fixes' anchor="freemarkerIncompatibleImprovements"> -<@setting name="freemarkerIncompatibleImprovements" type="string (version number)" default="" merging=false /> - -

    Enables the FreeMarker fixes/improvements that are not 100% backward compatible, and were implemented in the FreeMarker version given in this setting. In older projects using the highest available <@c>2.3.<@r>x is usually a good compromise. New projects should use the maximum, which is the version of the FreeMarker used. If this setting is not set then FreeMarker chooses the this version itself, which as of this writing will be <@c>2.3.0.

    - -

    See <@a href="freemarker/api/freemarker/template/Configuration.html#Configuration-freemarker.template.Version-"><@c>Configuration(Version) in the FreeMarker API for what fixes/improvements are activated.

    - -

    The format of the setting value is <@c><@r>major.<@r>minor.<@r>micro, where each part is a positive integer without padding 0-s

    - - - - -<@sect title="Object wrapping" anchor="objectWrapping"> -<@setting name="objectWrapper" type="string (BeanShell expression)" default='"b = new BeansWrapperBuilder(freemarkerIncompatibleImprovements); b.setSimpleMapWrapper(true); return b.build();"' merging=false /> - -

    The <@s>objectWrapper setting is for FreeMarker "experts" who want to use a customized <@c>ObjectWrapper. The value of the setting is a BeanShell expression that must result in an object whose class extends the <@c>freemarker.ext.beans.BeansWrapper class. The value can be a simple expression like <@c>"new com.example.MyWrapper()", or multiple instructions ending with a <@c>return statement.

    - -

    The <@c>freemarker.template.ObjectWrapper, <@c>freemarker.ext.beans.BeansWrapper, and <@c>freemarker.ext.beans.BeansWrapperBuilder classes are automatically imported, so you don't have to use full-qualified class name for them. Also, a non-<@c>null <@c>freemarkerIncompatibleImprovements value is exposed, which corresponds to the effective value of the similarly named FMPP setting.

    - -

    The <@c>ObjectWrapper is created before other setting values (or the <@c>fmpp.Engine instance for that mater), so the BeanShell expression has no access to any setting values, except to <@s>freemarkerIncompatibleImprovements, as it was shown.

    - -

    A subtle detail regarding the default value: The default value shown is actually only used when <@s>freemarkerIncompatibleImprovements is at least <@c>2.3.21. Otherwise the default is created directly with old-style <@c>new BeansWrapper(). See the FreeMarker API for the otherwise very subtle difference.

    - - - - -<@sect title="Template syntax" anchor="templateSyntax"> -<@setting name="tagSyntax" type="string" default='ex:<@c>angleBracket with FreeMarker 2.3.x, <@c>autoDetect with later versions' merging=false /> - -

    The <@s>tagSyntax setting determines the syntax of the templates (angle bracket syntax like <@c><#include "foo"> VS square bracket syntax like <@c>[#include "foo"]) that has no <@c>ftl directive in it. If the template uses <@c>ftl directive (like it starts with <@c><#ftl> or <@c>[#ftl]), then the syntax of the <@c>ftl tag determines the syntax of the template, and the <@s>tagSyntax setting is ignored.

    - -

    The possible values of this setting are <@c>angleBracket, <@c>squareBracket and <@c>autoDetect. The recommended value is <@c>autoDetect, which will auto-detect the syntax of each template independently, by choosing the syntax of the first FreeMarker tag in the template. For example when it finds a <@c>[@ in the template, it will choose square bracket syntax.

    - - - - - \ No newline at end of file diff --git a/fmpp/src/docs/style/README-BUILD.txt b/fmpp/src/docs/style/README-BUILD.txt deleted file mode 100644 index 04118f5..0000000 --- a/fmpp/src/docs/style/README-BUILD.txt +++ /dev/null @@ -1,6 +0,0 @@ -You should store all files that are about the visual design here, such as -images that aren't part of the content (i.e, that aren't figures), fonts, -style sheets, and js that controls the UI. - -For style sheets use LESS instead of CSS. The *.less files are converted -to CSS by the Ant build according to "gulpfile.js". \ No newline at end of file diff --git a/fmpp/src/docs/style/fmpptitle.png b/fmpp/src/docs/style/fmpptitle.png deleted file mode 100644 index e372167..0000000 Binary files a/fmpp/src/docs/style/fmpptitle.png and /dev/null differ diff --git a/fmpp/src/docs/style/fonts/README-BUILD.txt b/fmpp/src/docs/style/fonts/README-BUILD.txt deleted file mode 100644 index d727801..0000000 --- a/fmpp/src/docs/style/fonts/README-BUILD.txt +++ /dev/null @@ -1,5 +0,0 @@ -These "icomoon" fonts were generated with https://icomoon.io/app/, from a -selection from the Entypo font (http://www.entypo.com/). - -"selection.json" stores the IcoMoon App selection, and is only stored here -for reproducibility. It's not used for anything. \ No newline at end of file diff --git a/fmpp/src/docs/style/fonts/icomoon.eot b/fmpp/src/docs/style/fonts/icomoon.eot deleted file mode 100644 index d360616..0000000 Binary files a/fmpp/src/docs/style/fonts/icomoon.eot and /dev/null differ diff --git a/fmpp/src/docs/style/fonts/icomoon.svg b/fmpp/src/docs/style/fonts/icomoon.svg deleted file mode 100644 index b8aa80b..0000000 --- a/fmpp/src/docs/style/fonts/icomoon.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fmpp/src/docs/style/fonts/icomoon.ttf b/fmpp/src/docs/style/fonts/icomoon.ttf deleted file mode 100644 index bd33c02..0000000 Binary files a/fmpp/src/docs/style/fonts/icomoon.ttf and /dev/null differ diff --git a/fmpp/src/docs/style/fonts/icomoon.woff b/fmpp/src/docs/style/fonts/icomoon.woff deleted file mode 100644 index a52e617..0000000 Binary files a/fmpp/src/docs/style/fonts/icomoon.woff and /dev/null differ diff --git a/fmpp/src/docs/style/fonts/selection.json b/fmpp/src/docs/style/fonts/selection.json deleted file mode 100644 index 28b2b2d..0000000 --- a/fmpp/src/docs/style/fonts/selection.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "IcoMoonType": "selection", - "icons": [ - { - "icon": { - "paths": [ - "M961.024 527.36l-410.829-411.187c-20.992-21.811-55.347-21.811-76.339 0l-410.88 411.187c-21.043 21.76-13.21 39.629 17.408 39.629h85.658v315.802c0 22.784 0.973 41.421 42.189 41.421h199.424v-316.826h208.64v316.826h209.357c31.437 0 32.307-18.586 32.307-41.421v-315.802h85.606c30.566 0 38.451-17.818 17.459-39.629z" - ], - "attrs": [], - "tags": [ - "house", - "home", - "building" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 34, - "order": 1, - "prevSize": 20, - "code": 58881, - "name": "house", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 34 - }, - { - "icon": { - "paths": [ - "M946.483 239.616c-584.090 233.83-347.494-395.52-800.512-64.205l-94.771 33.997 187.699 737.792h103.373l-91.904-361.37c404.173-338.842 240.538 369.203 718.643-325.478 11.11-16.128-3.738-28.262-22.528-20.736z" - ], - "attrs": [], - "tags": [ - "flag", - "report" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 41, - "order": 12, - "prevSize": 20, - "code": 58891, - "name": "flag", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 41 - }, - { - "icon": { - "paths": [ - "M976.384 358.4h-928.768c-47.104 0-49.51 22.938-46.899 50.995l42.24 461.21c2.56 28.058 9.216 50.995 56.269 50.995h825.6c48.026 0 53.709-22.938 56.269-50.995l42.24-461.21c2.509-28.058 0.205-50.995-46.95-50.995zM942.285 245.76c-5.632-22.528-33.536-40.96-61.901-40.96h-348.877c-28.416 0-68.045-16.23-88.166-36.147l-30.515-30.106c-20.070-19.917-59.75-36.147-88.115-36.147h-166.707c-28.365 0-54.17 22.886-57.293 50.893l-14.95 133.427h866.867l-10.342-40.96z" - ], - "attrs": [], - "tags": [ - "folder", - "category", - "directory" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 159, - "order": 5, - "prevSize": 20, - "code": 58884, - "name": "folder", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 159 - }, - { - "icon": { - "paths": [ - "M990.208 693.453l-163.021-109.67h-100.506l174.080 133.53h-181.504c-5.222 0-9.882 2.662-12.288 6.81l-41.779 114.432-306.381-0-41.83-114.432c-2.304-4.147-7.066-6.81-12.288-6.81h-181.453l174.131-133.53h-100.557l-162.97 109.67c-24.269 14.49-38.758 47.923-32.256 74.189l28.723 157.389c6.502 26.317 35.379 47.872 64.051 47.872h835.226c28.774 0 57.6-21.555 64.102-47.872l28.723-157.389c6.605-26.317-7.936-59.699-32.205-74.189zM778.291 364.646h-169.011v-262.144h-194.56v262.144h-168.96l266.24 249.856 266.291-249.856z" - ], - "attrs": [], - "tags": [ - "download", - "archive", - "store", - "save" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 163, - "order": 13, - "prevSize": 20, - "code": 58880, - "name": "download" - }, - "setIdx": 0, - "iconIdx": 163 - }, - { - "icon": { - "paths": [ - "M511.232 849.92v-195.994l359.27 0.051v-284.262h-359.27v-195.635l-388.25 337.971z" - ], - "attrs": [], - "tags": [ - "arrow-left", - "left", - "previous" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 193, - "order": 3, - "prevSize": 20, - "code": 58885, - "name": "arrow-left", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 193 - }, - { - "icon": { - "paths": [ - "M512.768 174.080v195.994l-359.27-0.051v284.262h359.27v195.635l388.25-337.971z" - ], - "attrs": [], - "tags": [ - "arrow-right", - "right", - "next" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 196, - "order": 4, - "prevSize": 20, - "code": 58886, - "name": "arrow-right", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 196 - }, - { - "icon": { - "paths": [ - "M438.426 231.219c21.402 20.89 230.502 240.435 230.502 240.435 11.469 11.162 17.152 25.754 17.152 40.346s-5.683 29.184-17.152 40.346c0 0-209.101 219.546-230.502 240.384-21.402 20.89-59.853 22.323-82.739 0-22.835-22.272-24.627-53.35 0-80.64l191.898-200.090-191.846-200.090c-24.627-27.341-22.835-58.419 0-80.691 22.835-22.272 61.338-20.89 82.688-0z" - ], - "attrs": [], - "tags": [ - "arrow-right", - "right", - "next" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 208, - "order": 10, - "prevSize": 20, - "code": 58887, - "name": "arrow-right2", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 208 - }, - { - "icon": { - "paths": [ - "M674.816 579.072c-36.762 0-66.56 41.267-66.56 92.109 0 50.893 29.798 92.16 66.56 92.16s66.56-41.267 66.56-92.16c-0.051-50.893-29.85-92.109-66.56-92.109zM906.547 339.251c7.578-18.688 7.936-124.928-32.461-226.611 0 0-92.774 10.138-233.062 106.445-29.44-8.141-79.258-12.186-129.024-12.186-49.818 0-99.584 4.096-129.075 12.186-140.237-96.307-232.96-106.445-232.96-106.445-40.397 101.683-40.090 207.923-32.461 226.611-47.514 51.61-76.544 113.562-76.544 198.195 0 367.923 305.254 373.811 382.31 373.811 17.459 0 52.173 0.051 88.781 0.102 36.608-0.051 71.322-0.102 88.678-0.102 77.107 0 382.31-5.888 382.31-373.811 0-84.634-28.979-146.586-76.493-198.195zM513.434 866.048h-2.816c-193.126 0-343.552-23.040-343.552-210.739 0-44.954 15.923-86.682 53.555-121.293 62.925-57.702 169.267-27.136 289.997-27.136 0.461 0 0.973 0 1.434-0.051 0.512 0 0.973 0.051 1.382 0.051 120.73 0 227.123-30.566 289.997 27.136 37.632 34.611 53.504 76.339 53.504 121.293 0 187.699-150.323 210.739-343.501 210.739zM349.235 579.072c-36.762 0-66.56 41.267-66.56 92.109 0 50.893 29.798 92.16 66.56 92.16s66.56-41.267 66.56-92.16c0-50.893-29.798-92.109-66.56-92.109z" - ], - "attrs": [], - "tags": [ - "github", - "social" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 238, - "order": 7, - "prevSize": 20, - "code": 58889, - "name": "github", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 238 - }, - { - "icon": { - "paths": [ - "M983.040 219.802c-34.714 15.411-71.936 25.754-111.053 30.464 39.936-23.91 70.605-61.798 84.992-106.906-37.325 22.118-78.694 38.246-122.675 46.899-35.277-37.581-85.504-61.030-141.107-61.030-106.752 0-193.28 86.528-193.28 193.229 0 15.155 1.69 29.901 5.018 44.032-160.614-8.038-303.053-84.992-398.336-201.933-16.691 28.518-26.266 61.747-26.266 97.178 0 67.072 34.15 126.208 86.016 160.87-31.693-1.024-61.491-9.677-87.552-24.166 0 0.819 0 1.587 0 2.406 0 93.645 66.662 171.725 155.034 189.542-16.179 4.403-33.28 6.758-50.944 6.758-12.442 0-24.525-1.178-36.352-3.43 24.576 76.8 96 132.659 180.531 134.195-66.15 51.866-149.453 82.739-240.026 82.739-15.616 0-30.976-0.922-46.080-2.714 85.504 54.835 187.085 86.835 296.294 86.835 355.482 0 549.888-294.502 549.888-549.939 0-8.346-0.154-16.691-0.563-24.986 37.786-27.238 70.502-61.286 96.461-100.045z" - ], - "attrs": [], - "tags": [ - "twitter", - "social" - ], - "grid": 20 - }, - "attrs": [], - "properties": { - "id": 244, - "order": 8, - "prevSize": 20, - "code": 58890, - "name": "twitter", - "ligatures": "" - }, - "setIdx": 0, - "iconIdx": 244 - } - ], - "height": 1024, - "metadata": { - "name": "icomoon" - }, - "preferences": { - "showGlyphs": true, - "showQuickUse": true, - "showQuickUse2": true, - "showSVGs": true, - "fontPref": { - "prefix": "icon-", - "metadata": { - "fontFamily": "icomoon" - }, - "metrics": { - "emSize": 1024, - "baseline": 6.25, - "whitespace": 50 - } - }, - "imagePref": { - "prefix": "icon-", - "png": true, - "useClassSelector": true, - "classSelector": ".icon" - }, - "historySize": 100, - "showCodes": true, - "search": "" - } -} \ No newline at end of file diff --git a/fmpp/src/docs/style/header-footer-background.png b/fmpp/src/docs/style/header-footer-background.png deleted file mode 100644 index 0f65d7a..0000000 Binary files a/fmpp/src/docs/style/header-footer-background.png and /dev/null differ diff --git a/fmpp/src/docs/style/lib/base.less b/fmpp/src/docs/style/lib/base.less deleted file mode 100644 index caee0ca..0000000 --- a/fmpp/src/docs/style/lib/base.less +++ /dev/null @@ -1,145 +0,0 @@ -* { - box-sizing: border-box; -} - -html { - font-family: @font-family-base; - font-size: 10px; - color: @text-color; - line-height: @line-height-base; - text-size-adjust: 100%; - background-image: url(header-footer-background.png); -} - -body { - margin: 0; - font-size: @font-size-base; -} - -nav { - display: block; -} - -a { - color: @link-color; - text-decoration: none; - - transition: color ease-in-out .2s; - - &:hover { - text-decoration: underline; - } -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: @font-family-base; - line-height: @line-height-base; - font-weight: bold; -} - -h1 { - font-size: 24px; - - .desktop-and-old-ie({ - font-size: 30px; - }); -} - -h2 { - font-size: 21px; - - .desktop-and-old-ie({ - font-size: 24px; - }); -} - -h3 { - font-size: 18px; - - .desktop-and-old-ie({ - font-size: 21px; - }); -} - -h4 { - font-size: 15px; - - .desktop-and-old-ie({ - font-size: 18px; - }); -} - -h5 { - font-size: 14px; - - .desktop-and-old-ie({ - font-size: 16px; - }); -} - -h6 { font-size: 14px; } - -hr { - height: 0; - margin-top: 18px; - margin-bottom: 18px; - border: 0; - border-top: 1px solid @border-gray; -} - -code, -tt, //@ todo: check if is still used -pre { - font-size: @font-size-base - 1; - font-family: @font-family-monospace; - -webkit-font-smoothing: antialiased; -} - -tt, -code { - background-color: @bg-gray; - border-radius: 4px; - padding: 1px 3px; - color: #6D180B; - word-break: break-all; - - a { - color: #c00; - } -} - -pre { - display: block; - padding: 9px; - margin: 0 0 9px; - - word-break: normal; - word-wrap: break-word; - white-space: pre; - - background-color: @bg-gray; - line-height: 1.42857143; - border: 1px solid @border-gray; - border-radius: 4px; -} - -img { - border: 0; - vertical-align: middle; -} - -// tables -table { - border: 0; - border-collapse: collapse; -} - -td, -th { - padding: 0; -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/components/breadcrumbs.less b/fmpp/src/docs/style/lib/components/breadcrumbs.less deleted file mode 100644 index cf730e9..0000000 --- a/fmpp/src/docs/style/lib/components/breadcrumbs.less +++ /dev/null @@ -1,37 +0,0 @@ -.breadcrumbs { - list-style-type: none; - margin: 12px 0 0 0; - padding: 0; - font-size: @font-size-small; - - .desktop-and-old-ie({ - font-size: @font-size-base; - }); - - - li { - display: inline-block; - vertical-align: middle; - - &:last-child { - a { - color: @text-color; - } - } - - } - - .icon { - display: inline-block; - margin: 0 3px; - position: relative; - top: 1px; - width: 12px; - height: 12px; - - .desktop-and-old-ie({ - width: 14px; - height: 14px; - }); - } -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/components/download-options.less b/fmpp/src/docs/style/lib/components/download-options.less deleted file mode 100644 index 9153c95..0000000 --- a/fmpp/src/docs/style/lib/components/download-options.less +++ /dev/null @@ -1,25 +0,0 @@ -ul.download-options { - - list-style-type: none; - padding-left: 0; - margin-left: 0; - - li { - padding-left: 2em; - margin-left: 0; - - &:before { - .icon(); - display: inline-block; - position: relative; - top: 1px; - margin-right: 7px; - width: 14px; - height: 14px; - } - - &:extend(.icon-download all); - - } - -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/components/pagers.less b/fmpp/src/docs/style/lib/components/pagers.less deleted file mode 100644 index 3818682..0000000 --- a/fmpp/src/docs/style/lib/components/pagers.less +++ /dev/null @@ -1,70 +0,0 @@ -.pagers { - - list-style-type: none; - margin: 0; - - .ie89 & { - background-color: @bg-gray; - } - - background-color: rgba(255, 255, 255, 0.5); - padding: 9px 18px 6px; - border: 1px solid @border-gray; - border-radius: 4px; - - li { - display: inline-block; - color: @text-gray; - padding: 0 6px; - font-size: 12px; - - a { - display: block; - - &:hover, - &:focus { - text-decoration: none; - color: @text-color; - } - } - } - - .pager-icon { - &:before { - .icon(); - display: block; - font-size: @font-size-large; - text-align: center; - margin-bottom: 1px; - } - - &.previous { - &:extend(.icon-arrow-left all); - - &:before { - text-align: left; - } - } - - &.next { - margin-right: 12px; - &:extend(.icon-arrow-right all); - - &:before { - text-align: right; - } - } - - &.contents { - &:extend(.icon-folder all); - } - - &.home { - &:extend(.icon-house all); - } - - &.report-bug { - &:extend(.icon-flag all); - } - } -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/components/report-bugs.less b/fmpp/src/docs/style/lib/components/report-bugs.less deleted file mode 100644 index d7e0f25..0000000 --- a/fmpp/src/docs/style/lib/components/report-bugs.less +++ /dev/null @@ -1,23 +0,0 @@ - -.report-bugs { - - .strong { - color: @text-warning; - font-size: 16px; - padding-left: 19px; - - &:before { - .icon(); - position: relative; - top: 1px; - display: inline-block; - width: 16px; - height: 16px; - margin-right: 3px; - margin-left: -19px; // icon width + margin-right - } - - &:extend(.icon-flag all); - } -} - diff --git a/fmpp/src/docs/style/lib/components/social-icons.less b/fmpp/src/docs/style/lib/components/social-icons.less deleted file mode 100644 index 8380e30..0000000 --- a/fmpp/src/docs/style/lib/components/social-icons.less +++ /dev/null @@ -1,50 +0,0 @@ -.social-icons { - margin: 0 0 12px; - padding: 0; - - list-style-type: none; - - text-align: center; - - // hide in print view - @media print { - display: none; - } - - li { - display: inline-block; - - &:last-child a { - padding-right: 0; - } - - a { - display: block; - padding: 3px 6px; - - &:before { - .icon(); - margin-right: 3px; - display: inline-block; - width: 15px; - height: 14px; - position: relative; - top: 1px; - } - - &.twitter { - &:extend(.icon-twitter all); - } - - &.github { - &:extend(.icon-github all); - } - - &:hover { - text-decoration: none; - color: @text-color; - } - - } - } -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/components/table-of-contents.less b/fmpp/src/docs/style/lib/components/table-of-contents.less deleted file mode 100644 index a7d0a7d..0000000 --- a/fmpp/src/docs/style/lib/components/table-of-contents.less +++ /dev/null @@ -1,40 +0,0 @@ -.toc-header { - font-size: @font-size-large; - margin: 0 0 1em; - - &.alphabetical-index { - margin-top: 1em; - } -} - - -.content-left, -.content-right { - .clearfix(); - - > .table-of-contents { - float: left; - margin: 0 0 0 15px; - padding: 0 0 0 15px; - - border-left: 3px solid #7FBB7F; - list-style-type: none; - min-width: 30%; - - ul { - border: 0; - list-style-type: disc; - float: none; - } - - a { - display: block; - - &:visited { - //color: @link-visited - } - } - } -} - - diff --git a/fmpp/src/docs/style/lib/icons.less b/fmpp/src/docs/style/lib/icons.less deleted file mode 100644 index d81a370..0000000 --- a/fmpp/src/docs/style/lib/icons.less +++ /dev/null @@ -1,55 +0,0 @@ -@font-face { - font-family: 'icomoon'; - src: url('@{icon-font-path}/icomoon.eot?-20325k'); - src: url('@{icon-font-path}/icomoon.eot?#iefix-20325k') format('embedded-opentype'), - url('@{icon-font-path}/icomoon.woff?-20325k') format('woff'), - url('@{icon-font-path}/icomoon.ttf?-20325k') format('truetype'), - url('@{icon-font-path}/icomoon.svg?-20325k#icomoon') format('svg'); - font-weight: normal; - font-style: normal; -} - -.icon { - font-family: 'icomoon'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - font-size: inherit; - text-rendering: auto; - - // Better Font Rendering =========== - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-house:before { - content: "\e601"; -} -.icon-flag:before { - content: "\e60b"; -} -.icon-folder:before { - content: "\e604"; -} -.icon-download:before { - content: "\e600"; -} -.icon-arrow-left:before { - content: "\e605"; -} -.icon-arrow-right:before { - content: "\e606"; -} -.icon-arrow-right2:before { - content: "\e607"; -} -.icon-github:before { - content: "\e609"; -} -.icon-twitter:before { - content: "\e60a"; -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/ignoredir.fmpp b/fmpp/src/docs/style/lib/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/docs/style/lib/layout/content.less b/fmpp/src/docs/style/lib/layout/content.less deleted file mode 100644 index dfeeffd..0000000 --- a/fmpp/src/docs/style/lib/layout/content.less +++ /dev/null @@ -1,12 +0,0 @@ -.page-wrapper { - padding-top: 12px; - padding-bottom: 24px; - background-color: #FFF; - min-height: 300px; -} - -.content-right { - a { - word-break: break-word; - } -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/layout/footer.less b/fmpp/src/docs/style/lib/layout/footer.less deleted file mode 100644 index 333e9e1..0000000 --- a/fmpp/src/docs/style/lib/layout/footer.less +++ /dev/null @@ -1,63 +0,0 @@ -.site-footer { - padding-top: 24px; - padding-bottom: 24px; - border-top: 1px solid @border-gray; - - .footer-inner { - - @media (min-width: @screen-sm-min) { - display: flex; - justify-content: space-between; - flex-wrap: wrap; - align-items: flex-start; - } - - .ie89 & { - display: block; - .clearfix(); - } - - .footer-left { - .ie89 & { - float: left; - } - } - - .footer-right { - .ie89 & { - float: right; - } - } - } - - .pagers { - text-align: center; - margin-bottom: 12px; - - li:last-child a { - margin-left: 12px; - } - } - - .generated { - text-align: center; - - .desktop-and-old-ie({ - text-align: right; - }); - } - - .external-links { - margin-top: 15px; - text-align: center; - - .desktop-and-old-ie({ - text-align: right; - }); - - a { - display: inline-block; - margin-left: 9px; - } - } -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/layout/header.less b/fmpp/src/docs/style/lib/layout/header.less deleted file mode 100644 index 21956e3..0000000 --- a/fmpp/src/docs/style/lib/layout/header.less +++ /dev/null @@ -1,89 +0,0 @@ -.site-header { - border-bottom: 1px solid @border-gray; - - .logo { - display: block; - } - - .home-site-header { - text-align: center; - padding-top: 24px; - - .social-icons { - - background-color: rgba(255, 255, 255, 0.5); - padding: 3px 6px; - border: 1px solid @border-gray; - border-radius: 4px; - width: 200px; - margin: 12px auto; - } - - .logo { - margin-bottom: 12px; - - img { - width: 243px; - height: 70px; - margin: 0 auto; - } - } - } - - .inner-site-header { - padding-top: 12px; - padding-bottom: 12px; - - @media (min-width: @screen-sm-min) { - display: flex; - justify-content: space-between; - align-items: flex-end; - flex-wrap: wrap; - } - - .ie89 & { - display: block; - .clearfix(); - height: 92px; - } - - .header-left { - .ie89 & { - float: left; - width: 600px; - - .breadcrumbs { - width: 600px; - } - } - } - - .header-right { - text-align: center; - margin-top: 18px; - - .ie89 & { - margin-top: 0; - float: right; - .clearfix(); - - nav { - .clearfix(); - } - - .pagers { - height: 55px; - width: 250px; - margin-top: 10px; - } - } - } - - .logo { - img { - width: 121px; - height: 35px; - } - } - } -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/mixins.less b/fmpp/src/docs/style/lib/mixins.less deleted file mode 100644 index 45797c5..0000000 --- a/fmpp/src/docs/style/lib/mixins.less +++ /dev/null @@ -1,29 +0,0 @@ -.clearfix() { - &:before, - &:after { - content: " "; - display: table; - } - &:after { - clear: both; - } -} - -.desktop-and-old-ie(@rules) { - - .ie89 & { - @rules(); - } - - @media (min-width: @screen-sm-min) { - @rules(); - } - -} - - -.list-unstyled() { - margin: 0; - padding: 0; - list-style-type: none; -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/utilities.less b/fmpp/src/docs/style/lib/utilities.less deleted file mode 100644 index c7487a7..0000000 --- a/fmpp/src/docs/style/lib/utilities.less +++ /dev/null @@ -1,33 +0,0 @@ -// determines the max-width of the site at various resolutions -.site-width { - margin-left: auto; - margin-right: auto; - - padding-left: @gutter-width; - padding-right: @gutter-width; - - .ie89 & { - width: @container-md; - } - - @media (min-width: @screen-sm-min) { - width: @container-sm; - } - - @media (min-width: @screen-md-min) { - width: @container-md; - } - - @media (min-width: @screen-lg-min) { - width: @container-lg; - } -} - - -.warning { - color: @text-warning; -} - -.clear { - .clearfix(); -} \ No newline at end of file diff --git a/fmpp/src/docs/style/lib/variables.less b/fmpp/src/docs/style/lib/variables.less deleted file mode 100644 index 1cffbd6..0000000 --- a/fmpp/src/docs/style/lib/variables.less +++ /dev/null @@ -1,48 +0,0 @@ -@icon-font-path: "fonts"; - -// font sizes -@font-size-small: 12px; -@font-size-base: 14px; -@font-size-large: 18px; - -// line height -@line-height-base: 1.428571429; // 20/14 -@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px - -// text colors -@text-color: #333; -@text-warning: #c00; -@text-gray: #999; - -@link-color: #168316; -@link-hover-color: @link-color; -@link-visited: #800080; //for table of contents - -// font families -@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -@font-family-monospace: "Droid Sans Mono", Courier, Monaco, Consolas, monospace; -@font-family-base: @font-family-sans-serif; - -// borders -@border-gray: #ddd; - -// bgs -@bg-gray: #f9f9f9; - -// gutter -@gutter-width: 24px; - -// breakpoints -@screen-sm-min: 768px; -@screen-md-min: 992px; -@screen-lg-min: 1200px; - -@screen-xs-max: (@screen-sm-min - 1); -@screen-sm-max: (@screen-md-min - 1); -@screen-md-max: (@screen-lg-min - 1); - -// container widths -@container-sm: @screen-sm-min - (@gutter-width * 2); -@container-md: @screen-md-min - (@gutter-width * 2); -@container-lg: @screen-lg-min - (@gutter-width * 2); \ No newline at end of file diff --git a/fmpp/src/docs/style/main.less b/fmpp/src/docs/style/main.less deleted file mode 100644 index 222c1fa..0000000 --- a/fmpp/src/docs/style/main.less +++ /dev/null @@ -1,22 +0,0 @@ -@import (reference) "lib/variables.less"; -@import (reference) "lib/mixins.less"; - -// base styles for elements -@import "lib/base.less"; - -// page structure -@import "lib/layout/header.less"; -@import "lib/layout/content.less"; -@import "lib/layout/footer.less"; - -// components -@import "lib/components/breadcrumbs.less"; -@import "lib/components/pagers.less"; -@import "lib/components/report-bugs.less"; -@import "lib/components/table-of-contents.less"; -@import "lib/components/social-icons.less"; -@import "lib/components/download-options.less"; - -// generic utilities -@import "lib/utilities.less"; -@import "lib/icons.less"; \ No newline at end of file diff --git a/fmpp/src/docs/style/none.gif b/fmpp/src/docs/style/none.gif deleted file mode 100644 index f191b28..0000000 Binary files a/fmpp/src/docs/style/none.gif and /dev/null differ diff --git a/fmpp/src/docs/style/poweredby_sq_simple.png b/fmpp/src/docs/style/poweredby_sq_simple.png deleted file mode 100644 index c942269..0000000 Binary files a/fmpp/src/docs/style/poweredby_sq_simple.png and /dev/null differ diff --git a/fmpp/src/docs/style/sflogo.png b/fmpp/src/docs/style/sflogo.png deleted file mode 100644 index b2a9e99..0000000 Binary files a/fmpp/src/docs/style/sflogo.png and /dev/null differ diff --git a/fmpp/src/docs/tdd.html b/fmpp/src/docs/tdd.html deleted file mode 100644 index 669d87e..0000000 --- a/fmpp/src/docs/tdd.html +++ /dev/null @@ -1,294 +0,0 @@ -<@page title="TDD - Textual Data Definition" keywords="TDD"> - -<@sect title="Basics"> - -

    TDD is a very simple expression language created for defining hierarchical data (hashes, sequences) with plain text. It is mostly used for configuring FMPP. For example, <@a href="configfile.html">configuration files use TDD syntax.

    - -

    TDD syntax is identical to the syntax of literals in FTL (FreeMarker Template Language). For example, this data structure:

    - -
    -(root)
    - |
    - +- user = "Big Joe"
    - |
    - +- tall = true
    - |
    - +- animals
    -     |
    -     +- (1st)
    -     |   |
    -     |   +- name = "white mouse"
    -     |   |
    -     |   +- price = 30
    -     |
    -     +- (2nd)
    -     |   |
    -     |   +- name = "black mouse"
    -     |   |
    -     |   +- price = 25
    -     |
    -     +- (3rd)
    -         |
    -         +- name = "green mouse"
    -         |
    -         +- price = 150
    -
    - -

    could be described with this TDD expression:

    - -<@prg> -{ - "user": "Big Joe", - "tall": true, - "animals": [ - {"name": "white mouse", "price": 30}, - {"name": "black mouse", "price": 25}, - {"name": "green mouse", "price": 150} - ] -} - - -

    which is also a legal FTL expression. Please read <@fma href="dgui_template_exp.html#dgui_template_exp_direct" >the FreeMarker Manual about "Specify values directly" if you are not familiar with them. TDD doesn't support any other FTL operators (as variables, built-ins, interpolations, etc.), only the "Specify values directly" part of FTL.

    - -

    TDD syntax allows terser expressions than FTL because of these additional syntactical rules:

    -
      -
    • Strings need not be quoted if they doesn't look like a legal boolean or number value, and they don't contain: -
        -
      • white-space: space, tab, line-break, etc.
      • -
      • Quotation marks or apostrophe-quote: <@c>", <@c>'
      • -
      • Separator-like chars: comma (<@c>,), semicolon (<@c>;). Colon (<@c>:) is allowed without quoting the string if the string is not a key in a hash.
      • -
      • Bracket-like chars: <@c>(, <@c>), <@c>[, <@c>], <@c>{, <@c>}, <@c><, <@c>>
      • -
      • Equals sign (<@c>=)
      • -
      • Plus sign (<@c>+)
      • -
      -
    • -
    • Line-break can be used instead of comma (<@c>,). That is, in practice, you can omit commas that would be at the end of the lines.
    • -
    • If in a hash the value is missing from a key:value pair, then the value defaults to boolean <@c>true. -
    - -

    Utilizing these rules, the example TDD expression can be written as:

    - -<@prg> -{ - user: "Big Joe" - tall - animals: [ - {name: "white mouse", price: 30} - {name: "black mouse", price: 25} - {name: "green mouse", price: 150} - ] -} - - -

    Back to the strings... Examples of legal unquoted strings:

    -
      -
    • <@c>**/foo-bar/baz.txt
    • -
    • <@c>C:\windows\system32
    • -
    • <@c>25%
    • -
    • <@c>#FF80FF
    • -
    • <@c>?!
    • -
    • <@c>7.txt
    • -
    • <@c>1-2
    • -
    • <@c>True
    • -
    -

    Examples of strings where quotation had to be used:

    -
      -
    • <@c>"contains space"
    • -
    • <@c>"a'b"
    • -
    • <@c>"(c)"
    • -
    • <@c>"<head>"
    • -
    • <@c>"7"
    • -
    • <@c>"true"
    • -
    - -

    TDD supports an escape sequence that FTL doesn't: backslash at the end of the line. It is used to break strings into multiple lines in the TDD, without actually introducing line-breaks and indentation in the value of the string. For example here:

    - -<@prg> -{ - text: 'This is \ - a single \ - line.' -} - - -

    the value of <@c>text will be the same as with: - -<@prg> -{ - text: 'This is a single line.' -} - - -

    The exact rule is that if backslash is followed by a line-break (extra horizontal white-space is allowed between the backslash and the line-break), then all characters after the backslash will be removed until the first non-white-space character is reached, or a 2nd line-break is reached.

    - - - - -<@sect title="Interpretation modes" anchor="modes"> - -

    A text can be interpreted as TDD either in:

    -
      -
    • Single expression mode: this is the basic case.
    • -
    • Hash mode: The text is assumed to describe the name:value pair list of a hash.
    • -
    • Sequence mode: The text is assumed to describe the value list of a sequence.
    • -
    - -

    An example of hash mode are <@a href="configfile.html">configuration files. There you enter the settings as if you were already between <@c>{ and <@c>}:

    - -<@prg> -sourceRoot: src -outputRoot: out - - -

    and this will evaluate to a hash. In single expression mode, you could describe the same value with this:

    - -<@prg> -{ - sourceRoot: src - outputRoot: out -} - - -

    An example of sequence mode is when you specify the <@s>removeExtensions setting with command-line argument to the <@a href="commandline.html">command-line tool or as Ant task parameter. For example, when you enter this in the command-line:

    - -<@prg> -fmpp -S src -O out --removeExtensions "foo, bar, baaz" - - -

    Don't be confused on the quotation marks here, those are required by the command-line parser of the OS shell, it has nothing to do with TDD. What FMPP gets don't contain the quotation marks, only the text between them. So the TDD expression we are talking about is:

    - -<@prg> -foo, bar, baaz - - -

    The same value could be described in single expression mode as:

    - -<@prg> -[foo, bar, baaz] - - -

    When to use single expression mode, and when hash mode, and when sequence mode? Hash mode or sequence mode is used when you specify the value of something as discrete text (that is, not as the part of a larger, enclosing TDD expression), and it is known that the value must be hash or sequence respectively. For example, in the <@c>--removeExtensions example above, the TDD expression is given in an independent text fragment, and it is known that the <@s>removeExtensions setting is a sequence. Compare it with the case, when you specify the same setting value in a configuration file:

    - -<@prg> -removeExtensions: [foo, bar, baaz] - - -

    Here, the value is not a discrete text, because it is a fragment of a larger TDD expression (which is, by the way, a hash mode expression). Thus, the value must be specified in single expression mode, regardless that we know that it should be a sequence. Because, if you were allowed to write:

    - -<@prg> -removeExtensions: foo, bar, baaz - - -

    then there would be an ambiguity, as it could be also interpreted as:

    - -<@prg> -removeExtensions: foo -bar: true -baaz: true - - -

    (Since, if the value is missing from a key:value pair, then the value defaults to boolean <@c>true, and comma can be replaced with line-break) So be sure you don't forget the brackets in configuration files.

    - - - - -<@sect title="Hash addition" anchor="hashAddition"> - -

    TDD allows you to put hash value directly into another hash value, without specifying key for it. For example:

    - -<@prg> -{a: A, b: B, {c: C, d: D}} - - -

    In this case, when the TDD interpretation passes the <@c>{c: C, d: D}, it will add all key:value pairs of it to the enclosing hash. So the final result hash will contain these key:value pairs: <@c>a: A, <@c>b: B, <@c>c: C, <@c>d: D.

    - -

    When the hash is added to its parent, it may overwrite keys in that. For example:

    - -<@prg> -{a: A1, b: B1, c:C1, {b: B2, c: C2}, {c: C3}} - - -

    will result in a hash that contains these key:value pairs: <@c>a:A1, <@c>b:B2, <@c>c:C3.

    - -

    You may wonder what is this all good for. Hash additions are useful with data loaders that return hashes. Read on...

    - - - - -<@sect title="TDD functions"> - -

    TDD has a construct called TDD function that is identical to FTL method calls. The meaning of TDD functions depends on which <@a href="overview.html#settings">setting do you use them in. For example, when you use TDD with the <@s>data setting, then they are used to invoke data loaders, and their return value is the loaded data. A part form the configuration used in the <@a href="qtour.html">Quick Tour:

    - -<@prg> -data: { - tdd(data/style.tdd) - birds: csv(data/birds.csv) -} - - -

    The first function call (<@c>tdd(<@r>...)) returns the a hash that was built by interpreting the <@c>data/style.tdd file. There is no key given for it (like <@c>someKey: tdd(<@r>...)), so its key:value pairs will be added directly to the <@s>data hash (<@a href="#hashAddition">hash addition). The second call (<@c>csv(<@r>...)) returns a sequence, which will be stored with key <@c>birds in the <@s>data hash.

    - -

    Another example of the usage TDD functions is when method calls are used with the <@s>modes setting. A fragment from a possible configuration file:

    - -<@prg> -modes: [copy(**/*.html, **/*.htm), ignore(tmp/)] - - -

    In this use case, you are not interested what kind of values do the function calls return. You just use the function calls for describing groups. It's the internal business of the FMPP core what the function calls return to solve this task.

    - -

    There is no restriction regarding the type of the value a TDD function returns. You may thought that TDD knows only these types: string, number, boolean, hash, sequence. These are the types for which you can specify values directly, but a sequence or a hash can store any type of Java objects as values, not only these. So any type of object can get into hashes or sequences as the return value of TDD function.

    - - - - -<@sect title="Comments"> - -

    TDD knows 2 types of comments:

    -
      -
    • FTL comment: These are delimited with <@c><#-- and <@c>-->, and can span multiple lines. They can be inserted everywhere where optional white-space could be inserted. FTL comments can't be nested into another FTL comment.
    • - -
    • Shell-script/"properties" style comment: These are lines starting with <@c>#, optionally preceded with white-space. The comment spreads until the end of the line. This comment can be inserted everywhere where optional line-break could be inserted.
    • -
    - -

    Comments will not work inside quoted strings, nor nested inside comments. That is, they will count as normal text in these places.

    - -

    Example:

    - -<@prg><#noparse> -# This is a test. -# Now "a" will be 1 -a: 1 <#-- now "a" is 1 --> -b <#-- this was the key --> : <#-- now comes the value --> 2 - # Comments can be indented. -<#-- - FTL-style comment - can span over multiple lines. ---> - - - - -<@sect title="Character encoding issues" anchor="encoding"> - -

    If you load TDD from a file, then FMPP have to use an encoding (charset) to interpret the bytes as text. The default of this encoding depends on how do you load the TDD file:

    -
      -
    • If it is a configuration file: <@c>ISO-8859-1 is used.
    • -
    • If it is loaded with <@c>tdd data loader as <@c>tdd(<@r>fileName): <@s>sourceEncoding is used.
    • -
    • If it is loaded with data loader <@c>tdd as <@c>tdd(<@r>fileName, <@r>encoding): the encoding suggested by the 2nd parameter is used.
    • -
    - -

    A TDD file can specify its own encoding with a special comment, in which case the default of the encoding (see above) is ignored. For example this TDD file will be always interpreted with UTF-8 encoding, doesn't mater how you load it:

    - -<@prg> -# encoding: UTF-8 -some: tdd -comes: here - - -

    The encoding comment must be the very first line of the TDD file. FTL-style comment can't be used for this purpose. Extra white-space, or no white-space is OK between the <@c># and <@c>encoding, also extra white-space can be present around the colon. Word <@c>charset can be used instead of <@c>encoding. The words are not case sensitive.

    - -

    The encoding comment works only if the file can be correctly interpreted as US-ASCII until the end of the encoding name. So it will not work for UTF-16, UCS-2, UCS-4, and with EBCDIC based charsets. Note that an UTF-8 BOM at the begining of the file is automatically ignored.

    - - - - diff --git a/fmpp/src/docs/tips.html b/fmpp/src/docs/tips.html deleted file mode 100644 index d50efb3..0000000 --- a/fmpp/src/docs/tips.html +++ /dev/null @@ -1,34 +0,0 @@ -<@page title="Tips and Best Practices" keywords="tips, best practices"> - -<@sect title="Finding out the reasons of errors"> - -

    Use a log file (see: <@s>logFile) as that will contain the full error stack trace. Also, if you are really lost, you may use temporary <@c>pp.warning-s as a poor man's debugger: you can see if a certain line in the template is reached, also you can print the current values of variables.

    - - - - -<@sect title="Speeding up processing when you have many files"> - -

    Some tricks:

    -
      -
    • Try to use <@s>skipUnchanged setting. For most applications you can safely use it with the <@c>static value, and it speeds up things a lot if you have many images or other static files. - -
    • Try to set the <@s>quiet setting to <@c>true or <@c>reallyQuiet, or set <@s>echoFormat to <@c>terse for the command-line tool. Surprising enough, some terminals scrolls screen slowly, so FMPP has to wait until it can print the next line to the screen. - -
    • Process only the files/directories that actually need reprocessing. You don't have to process the whole source root directory; you can select the set of files and directories that you want to process inside the source root, with the <@s>sources setting. -
    - - - -<@sect title="Avoid too much programming logic in templates"> -

    FTL (FreeMarker Template Language) is not a general purpose programming language, just a template language. Implementing complex programming logic in it is cumbersome, and defeats the original purpose of templates: to be simple, almost the same as the output. To avoid this, pair BeanShell scripts with the problematic templates, and do the complex calculations in the script file, and then pass the results to the template for displaying. BeanShell is good in calculating data (and in whatever complex algorithms), FTL is good in displaying data. So you use the adequate languages for the subtasks. This can be implemented with the <@s>localData setting and its <@c>bsh function.

    - - -<@sect title="Showing information about something that will be generated further down"> - -

    For example, you have to show a Table of Contents at the top of the page, but the list of headings is not known until the page generation reaches the bottom of the page. In this case, generate the section that contains the headings first, but capture the output in a variable with an assignment directive (as <@c><#assign <@r>var><@r>...</#assign>). Then print the top of the page, and then the captured output. Check <@example 'capture' /> to see a working example.

    - - - - - diff --git a/fmpp/src/docs/versions.html b/fmpp/src/docs/versions.html deleted file mode 100644 index ae66513..0000000 --- a/fmpp/src/docs/versions.html +++ /dev/null @@ -1,733 +0,0 @@ -<@page title="Version History" keywords="verions, version history"> - -<@sect title="0.9.15"> -

    Date of release: 2014-11-05

    -

    Bug fixes:

    -
      -
    • Fixed an oversight where an <@c>Engine static field was accidentally initialized in a non-static initializer, causing problems in multi-threaded environment.
    • -
    • Removed version ranges from Maven dependencies, replacing them with concrete version numbers.
    • -
    • Log files now don't contain the stack trace twice when the processing session is aborted by a file processing error.
    • -
    • Setting values with integer type haven't understood <@c>+ prefix, like in <@c>+1.
    • -
    - -

    New features, improvements:

    -
      -
    • Added <@a href="dataloader.html#key_json">JSON data loader. -
    • - Exposed relevant FreeMarker settings added since 2.3.15: -
        -
      • <@s>freemarkerIncompatibleImprovements (also exposed to <@s>objectWrapper scripts as a global variable with the same name)
      • -
      • <@s>booleanFormat
      • -
      • <@s>sqlDateAndTimeTimeZone
      • -
      -
    • -
    • The command line tool doesn't "snip" (<@c>--8<--) error messages any more, instead, by default, it prints a cause message chain instead of a stack trace on error. This is especially useful as newer FreeMarker versions tend to give more detailed error messages that shouldn't be cut off. Stack traces can be asked with the new <@s>printStackTrace setting. The <@s>snip setting is now deprecated, and is only an inverted alias to <@s>printStackTrace.
    • -
    • Improved console error output quality in general.
    • -
    • The command line tool now detects the actual number of console (terminal) columns and wraps lines accordingly. Earlier it has used 80 columns. This only works if you invoke FMPP with the provided shell script (<@c>bin/fmpp or <@c>bin/fmpp.bat). Also, it won't work if you have explicitly set the <@s>columns setting (like in <@c>~/.fmpprc) as then that will take precedence.
    • -
    • Better <@c>java location detection in the UN*X shell script (<@c>bin/fmpp) -
    • FMPP license has been changed from BSD to Apache License 2.0. The copyright owner has been changed to be the same as the owners of FreeMarker. The two projects now share the same license and Contributor License Agreement.
    • -
    • - The dependencies of FMPP has been updated/changed: -
        -
      • <@attc/> The minimum required Java version has been increased from 1.2 to 1.4.
      • -
      • <@attc/> The minimum required FreeMarker version has been increased from 2.3.15 to 2.3.21.
      • -
      • Removed Oro dependency (<@c>lib/oro.jar) as regular expression support is included in Java 1.4.
      • -
      • Updated FreeMarker dependency from 2.3.15 to 2.3.21 (<@c>lib/freemarker.jar and FreeMarker Manual).
      • -
      • Updated <@c>ImageInfo to version 1.9. It isn't included in <@c>fmpp.jar any more, instead it's a regular dependency (<@c>lib/imageinfo.jar).
      • -
      • Updated <@c>xml-resolver.jar dependency from 1.1 to version 1.2 (note that thus its license changes from Apache License 1.1 to Apache License 2.0)
      • -
      -
    • -
    • Added new constructor, <@c>Engine(BeansWrapper beansWrapper, Version fmIncompImprovements), deprecated the earlier <@c>Version-less overload.
    • -
    • Removed long deprecated method: <@c>Settings.execute(Engine eng). -
    • The project source code was moved from SourceForge.net to GitHub: <@url href="https://github.com/freemarker/fmpp" />.
    • -
    • Overall source code structure and Ant build improvements.
    • -
    • Updated Web site and documentation design, also cleaned up the content a bit.
    • -
    - - - -<@sect title="0.9.14"> -

    Date of release: 2009-03-15

    - -

    Bug fixes:

    -
      -
    • Fixing bug that caused <@s>skipUnchanged to skip a file when the destination was newer than the source. Now it only skips files when the modification date of the source and destination files are exactly the same.
    • -
    • Fixing some TDD parser crashes occurring when parsing invalid TDD.
    • -
    • Preventing obviously useless traversing inside SVN and CVS directories.
    • -
    • Fixed some typos in the documentation.
    • -
    - -

    New features, improvements:

    -
      -
    • FMPP now can create empty directories using one of the two new features (reminder: FMPP creates output directories on-demand before an actual output file is created in them, hence usually it doesn't create empty directories): -
        -
      • If a directory file contains a file named <@c>createdir.fmpp then that will ensure that the containing directory will exist in the output as well. The <@c>createdir.fmpp file itself will not appear in the output, it's only a marker. -
      • New setting, <@s>alwaysCreateDirectories: If this is set to <@c>true, all processed directories will produce a corresponding output directory, even when that directory will be empty. -
      - -
    • The <@a href="dataloader.html#key_xml">XML data loader now supports XInclude-s by setting its <@c>xincludeAware option to <@c>true. - -
    • To follow the Ant conventions, now <@s>sourceRoot can alternatively be specified with the <@c>srcdir attribute, and <@s>outputRoot with the <@c>destdir attribute of the Ant task. - -
    • API: New JavaBean propery in <@c>fmpp.Engine and <@c>fmpp.setting.Settings: <@c>dontTraverseDirectories. It should be set to <@c>true by front-ends that explicitly specify the list of all source files and source directories, rather than expecting the <@c>Engine to discover them. Till now such front-ends only specified the list of files, so this property wasn't needed. However, to support the new <@c>alwaysCreateDirectories setting, now the list of directories should be passed as well, and hence the need for this new property.
    • - -
    • Updated <@c>freemarker.jar and the included FreeMarker Manual to 2.3.15.
    • -
    - - -<@sect title="0.9.13"> -

    Date of release: 2007-12-16

    - -

    Bug fixes:

    -
      -
    • The <@s>skipUnchanged setting haven't had any effect since 0.9.10. Now it works again.
    • - -
    • When detecting the dimensions of certain image files, new lines were printed to the standard output (i.e., to the console).
    • - -
    • The <@c>slicedText data loader has ignored the <@c>encoding parameter.
    • - -
    • <@nbc/> The <@c>csv, <@c>text and <@c>slicedText data loaders didn't skipped the BOM (byte order mark) character at the beginning of the file. This was a problem as the Windows Notepad inserts a BOM there when it saves with UTF-8 encoding. This fix is not 100% backward compatible, as someone may indeed wanted to have that BOM.
    • - -
    • API: The <@c>fmpp.dataloaders.AbstractTextDataLoader ignored the encoding returned by the <@c>parseExtraArguments method.
    • - -
    • API: The <@c>fmpp.dataloaders.AbstractTextDataLoader didn't removed the BOM character from the beginning of files.
    • -
    - -

    New features, improvements:

    -
      -
    • The <@c>csv data loader has a few new options: <@c>normalizeHeaders, <@c>trimCells, and <@c>emptyValue. <@a href="dataloader.html#key_csv">More details...
    • - -
    • <@nbc /> New setting: <@s>ignoreSvnFiles. This will ignore directories with name <@c>.svn inside the source root directory. This setting is by default on (<@c>true), so it's theoretically not backward compatible.
    • - -
    • API: <@c>DataLoaderUtil.getStringArrayArgument and <@c>getStringArrayOption now have an overload with <@c>allowString argument, so that a single item can be easily treated as an array of length 1.
    • - -
    • Updated <@c>freemarker.jar and the included FreeMarker Manual to 2.3.11.
    • - -
    • The project has switched from CVS to SVN. The CVS repository is not used anymore.
    • -
    - - - -<@sect title="0.9.12"> -

    Date of release: 2007-04-27

    - -

    Bug fixes:

    -
      -
    • <@nbc /> In TDD files value types were incorrectly forced to string if they were inside an explicitly defined hash (i.e. inside <@c>{ and <@c>}). Like <@c>{x: 1, y: false} was interpreted as <@c>{x: "1", y: "false"}, that is, both values were strings. From now it is interpreted correctly, so with the above example <@c>x will be the number <@c>1 and <@c>y will be the boolean <@c>false.
    • -
    - -

    New features, improvements:

    -
      -
    • New data loader: <@c>tddSequence for loading a TDD file as a TDD sequence (i.e. list) rather than as a TDD hash (i.e. map). <@a href="dataloader.html#key_tddSequence">More... -
    • Updated <@c>freemarker.jar to 2.3.10, and <@c>bhs.jar (BeanShell) to 2.0b4 in the distribution pack. -
    - - - -<@sect title="0.9.11"> -

    Date of release: 2006-03-15

    - -

    New features, improvements:

    -
      -
    • New setting: <@s>tagSyntax. This let you access this new setting of FreeMaker 2.3.5. - -
    • For nightly FMPP builds the build date is now logged in additional to the version number. - -
    • Updated <@c>freemarker.jar to 2.3.6, and <@c>bhs.jar (BeanShell) to 2.0b1.1 in the distribution pack. -
    - -

    Bug fixes:

    -
      -
    • The Ant task have processed all files of the source root directory if the number of selected file was 0.
    • - -
    • <@nbc /> When <@s>sources was set to any empty list in a configuration file, the whole source root directory was processed in certain cases. From now it will process no files in that case. If you want to process the whole source root directory, don't specify the <@s>sources setting at all. - -
    • <@nbca /> The <@c>Settings class was badly assumed that the whole source root directory has to be processed if the <@s>sources setting was an empty list. This was incorrect, as in that case simply 0 files should be processed, and processing the whole source directory should occur only if the <@s>sources setting was not set at all (it's <@c>null when you get it). So, if you want the whole source root directory to be processed, don't set the <@s>sources setting at all. If it is already set, you can "unset" it with <@c>settings.remove(Settings.NAME_SOURCES).
    • - -
    • The Ant task didn't logged setting errors into the log file.
    • - -
    • The test suite now works with JDK 1.5, if you add <@c>xpathSupport.lib to the <@c>build.properties. - -
    - - - - -<@sect title="0.9.10"> -

    Date of release: 2005-10-23

    - -

    New features, improvements:

    -
      -
    • The <@a href="pphash.html#key_newWritableSequence"><@c>pp.newWritableSequence and <@a href="pphash.html#key_newWritableHash"><@c>pp.newWritableHash methods now have an optional parameter, which is the sequence or hash whose items are added to the new writable sequence or hash. This makes <@a href="pphash.html#key_newWritableHash"><@c>pp.copyWritable deprecated, which was not able to create writable sequences/hashes based on non-writable ones.
    • - -
    • New setting: <@s>objectWrapper. This let FreeMarker "experts" to create and fully configure the <@c>freemarker.template.ObjectWrapper object that FMPP will use.
    • - -
    • Java API: a new <@c>fmpp.Engine constructor now let you specify the <@c>freemarker.template.ObjectWrapper to use.
    • - -
    • FreeMarker 2.3.4 is included in the distribution. Note the new feature of FreeMarket that let you use <@c>[#<@r>...], <@c>[@<@r>...], etc instead of <@c><#<@r>...>, <@c><@<@r>...>, etc if you start the template with <@c>[#ftl].
    • - -
    • <@example 'multipage_list' /> was updated to use <@c><@r>sequence?chunk(<@r>pageSize), instead of complex BeanShell script that was needed before FreeMarker 2.3.3.
    • - -
    • Manual improvements.
    • -
    - -

    Bug fixes:

    -
      -
    • On Windows, <@c>fmpp.bat has sometimes build the <@c>CLASSPATH badly that ruined the command line call to java.exe and caused it to die with a strange <@c>ClassNotFoundError.
    • - -
    • When a file is copied in "copy" processing mode, FMPP now sets the last modification time of the destination file to the last modification time of the source file.
    • - -
    • <@nbca/> The FMPP engine has used and modified the shared - <@c>freemarker.template.ObjectWrapper.BEANS_WRAPPER object, which is dangerous. From now by default it uses its own <@c>ObjectWrapper instance. If you have utilized that it uses the shared <@c>ObjectWrapper.BEANS_WRAPPER object (not recommended!), then for 100% backward compatibility you have to use the <@s>objectWrapper setting with this value:
      - <@c>"ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); return ow;"
      - (or if you don't use FMPP settings, do this in Java where you create the engine object: <@c>ObjectWrapper ow = ObjectWrapper.BEANS_WRAPPER; ow.setSimpleMapWrapper(true); Engine eng = new Engine(ObjectWrapper.BEANS_WRAPPER);)
    • -
    - - - -<@sect title="0.9.9"> -

    Date of release: 2005-04-12

    - -

    New features, improvements:

    -
      -
    • The <@a href="dataloader.html#key_csv">csv data loader was improved: -
        -
      • With the new <@c>headers option you can specify the header row for a CSV file that doesn't actually have a header row.
      • -
      • With the new <@c>replaceHeaders option you can override the header row of a CSV file.
      • -
      • The values returned for the rows are now not only hashes but also the sequences of the cells. -
      -
    • New data loader: <@c>slicedText for loading a text file as a sequence of strings. <@a href="dataloader.html#key_slicedText">More... -
    • Java API: New class: <@c>fmpp.dataloaders.AbstractTextDataLoader, to ease the creation of custom text file data loaders for Java programmers.
    • -
    • Java API: New <@c>StringUtil methods: <@c>normalizeNewliens, <@c>split with trimming.
    • -
    • <@nbc/>The <@c>+ operator in TDD files and configuration files is not allowed anymore. This operator was used for adding hashes prior 0.9.0. Since 0.9.0 the preferred (and now required) way of adding hashes is different. For example, assuming that your configuration file is in <@a href="properties.html">"properties" format (that is, the extension of the FMPP configuration file is <@c>cfg or <@c>properties), instead of this:
      - <@c>data={a:1, b:2} + properties(data/style.properties) + birds:csv(data/birds.csv)
      - your should write this:
      - <@c>data=a:1, b:2, tdd(data/style.tdd), birds:csv(data/birds.csv)
      - <@a href="tdd.html#hashAddition">More information on hash addition...
    • -
    - -

    Bug fixes:

    -
      -
    • The <@c>csv data loader has incorrectly interpreted <@c>"\n\r" as a single line-break. -
    • Fixed some mistakes in the Manual and in the JavaDocs. -
    - - -<@sect title="0.9.8"> -

    Date of release: 2005-01-28

    - -

    New features, improvements:

    -
      -
    • FreeMarker 2.3.2mod (a stable nightly build after 2.3.2) is included. -
    • FMPP was updated to enable the new output encoding and URL escaping related features of FreeMarker 2.3.1. (The usage of 2.3.2mod is recommended because of a bug fix.) -
    • New setting: <@s>urlEscapingCharset -
    • Java API: added static final fields to <@c>Engine for reserved engine parameter (setting) value strings: <@c>PARAMETER_VALUE_SOURCE, <@c>PARAMETER_VALUE_HOST, <@c>PARAMETER_VALUE_OUTPUT. Also added the similar missing static fields to the <@c>Settings class. -
    - -

    Bug fixes:

    -
      -
    • The reserved <@c>"host" output encoding value was not resolved in some rare cases. -
    • The the <@c>pp.urlEnc/<@c>pp.urlPathEnc functions and the <@c>fmpp.util.StringUtil.urlEnc(...)/<@c>urlPathEnc(...) methods were malfunctioned with a few charsets, for example with UTF-16, UTF-7, and EBCDIC based charsets. -
    • <@nbca/>The documentation of <@c>fmpp.ProgressListener.notifyProgressEvent(<@r>...) forgot to mention regarding the <@c>event parameter that: "As new event types can be introduced with new FMPP versions (even if it happens very seldom), a progress listener implementation should survive events that it does not understand. That is, it must not stop with an error, but it should silently ignore the event." Note that there is no new event type in this version.
    • -
    • Many fixes in the Manual and in the the API JavaDocs.
    • -
    • <@nbca/>The <@c>fmpp.util.NullWriter and <@c>fmpp.util.NullOutputStream classes has no public constructor anymore. Use their static <@c>INSTANCE field to get the singleton.
    • -
    • Fixed test-suite bugs: Windows vs UN*X vs Mac line-breaks, class-path problem in the <@c>build.xml.
    • -
    - - -<@sect title="0.9.7"> -

    Date of release: 2004-03-01

    - -

    New features, improvements:

    -
      -
    • New setting: <@s>freemarkerLinks. This is a dirty hack to satisfy a frequent demand: <@c><#include <@r>...>/<@c><#import <@r>...> files that are outside the source root directory (as FTL macro libraries used by more projects).
    • -
    • Later nightly FreeMarker 2.3 build is included.
    • -
    - -

    Bug fixes:

    -
      -
    • <@nbc/>From now, native separators (as backslash under Windows) are not tolerated in the paths used in <@c><#import <@r>...> and <@c><#include <@r>...> directives. You must use <@c>/ there.
    • -
    • Fixes in the Manual and in the the API JavaDocs.
    • -
    - - -<@sect title="0.9.6"> -

    Date of release: 2004-01-20

    - -

    New features, improvements:

    -
      -
    • New processing mode: <@c>renderXml. When a source file is processed in this mode, it's parsed as XML, and then the parsed XML document is rendered to output file(s) by a FreeMarker template, which is chosen based on the path or the document element of the XML document. -
        -
      • New setting: <@s>xmlRenderings. <@a href="settings.html#xmlRendering">More info...
      • -
      • New <@c>pp variable: <@c>pp.doc. <@a href="pphash.html#key_doc">More info...
      • -
      • Java API: New class: <@c>fmpp.XmlRenderingConfiguration. New <@c>fmpp.Engine.PMODE_<@r>... constant: <@c>PMODE_RENDER_XML. New <@c>Engine methods to add/clean XML rendering configurations.
      • -
      -
    • - -
    • When template execution dies with error, and it didn't generated any output yet, nor it flushed the output explicitly or by changing output file, then no 0 length output file will be generated.
    • - -
    • New target in the <@c>build.xml, <@c>qinstall. It's the same as <@c>install, but assumes <@c>y for all questions.
    • - -
    • Added figures to the <@a href="qtour.html">Quick Tour chapter.
    • - -
    • Java API: Added a new utility method to <@c>Engine: <@c>static String getProgressListenerEventName(int event)
    • -
    - - - -<@sect title="0.9.5"> -

    Date of release: 2004-01-14

    - -

    New features, improvements:

    -
      -
    • Java API: Improvements to the <@c>Settings class: -
        -
      • The API of this class is now as stable as other FMPP API-s, so it is not marked as experimental anymore.
      • -
      • The <@c>execute(Engine) method is now deprecated, and will be soon removed. Use <@c>execute() instead. If you use <@c>Settings, then don't create <@c>Engine objects manually anymore, just use the <@c>Settings object alone. See an example <@a href="writefrontend.html">here...
      • -
      • Methods have been added to deal with progress listeners and engine attributes.
      • -
      -
    • - -
    • Java API: some convenience methods has been added: <@c>Settings.set(String, boolean), <@c>Settings.set(String, int), <@c>Settings.setDefault(String, boolean), <@c>Settings.setDefault(String, int), <@c>Engine.isXmlSupportAvailable(), <@c>TddHashLocalDataLoader(String)
    • - -
    • More API documentation.
    • - -
    • More reliable and helpful <@c>install Ant target.
    • - -
    • Terminology change: To prevent confusion, the settings of the <@c>fmpp.Engine object (known be people who use FMPP at Java API level) are now called "engine parameters", as the "settings" term is already used since version 0.9.0 for the high level settings seen by usual front-end users.
    • - -
    • Many grammatical mistakes have been fixed in the documentation. Other minor improvements in the Manual.
    • -
    - -

    Bug fixes:

    -
      -
    • A later nightly FreeMarker 2.3 build is included, that fixes various bugs with XML related keys <@c>@@markup, <@c>@@nested_markup, <@c>@@start_tag, and <@c>@@attributes_markup. This is mostly important for people who uses data of XHTML format for generating (X)HTML pages.
    • -
    - - - -<@sect title="0.9.4"> -

    Date of release: 2004-01-03

    - -

    New features, improvements:

    -
      -
    • New setting: <@s>localData -
        -
      • Till now, all source files (all templates) have started with the same data model, the one you have specified with the <@s>data setting. With the new <@s>localData setting you can add variables to, and override the variables of the common data model, for groups of source files selected by path patterns.
      • -
      • This feature also let you attach a BeanShell script to a template, that can done some complex calculations before template execution, and put the results into the data model for the individual template.
      • -
      • The <@s>templateData setting is now deprecated.
      • -
      • Java API changes: New interface <@c>fmpp.LocalDataBuilder, deprecates <@c>fmpp.TemplateDataModelBuilder.
      • -
      -
    • - -
    • The <@s>borders setting supports multiple layers. That is, multiple borders can be used at once for the same file. - -
    • In <@c><@pp.renameOutputFile <@r>... /> you can use the <@c>extension parameter instead of <@c>name, to change only the extension of the output file. - -
    • Java API: <@c>TemplateEnvironment has new methods, most importantly <@c>static TemplateEnvironment getCurrentInstance() for accessing the current template environment in FreeMarker transforms/methods.
    • - -
    • Java API: New methods to <@c>Engine: <@c>Object getData(name) (returns unwrapped original values), <@c>Object removeData(name), <@c>cleatData() (deprecates misnamed <@c>clearSharedVariables()).
    • - -
    • Java API: Engine attribute that implements <@c>ProgressListener get notifications about engine events.
    • - -
    • Java API: <@c>fmpp.tdd.FunctionCall has public constructor now.
    • - -
    • <@nbca /><@c>Engine.getData(<@r>...) doesn't throw <@c>TemplateModelException anymore, because data wrapping is now deferred until the session execution.
    • - -
    • <@nbca />Synchronization was removed from <@c>Engine. It did the same as if you synchronize on the <@c>Engine instance and call the methods anyway...
    • - -
    • <@nbca /><@c>ProgressListener.notifyProgressEvent(<@r>...) is now allowed to throw <@c>Exception. - -
    • More API documentation.
    • -
    - -

    Bug fixes:

    -
      -
    • <@c><@pp.renameOutputFile <@r>... /> has malfunctioned when the buffer was already flushed.
    • - -
    • Minor documentation fixes.
    • - -
    • 3rd party libraries BeanShell and ORO were upgraded. The upgrades fix a few bugs.
    • - -
    • <@nbca />Package <@c>fmpp.listeners were renamed to <@c>fmpp.progresslisteners. - -
    • <@nbca /><@c>Engine.removeAttribue was renamed to <@c>Engine.removeAttribute. -
    - - - -<@sect title="0.9.3"> -

    Date of release: 2003-12-22

    - -

    New features, improvements:

    -
      -
    • In FreeMarker 2.3: The quotations in FreeMarker error messages are now terser and thus easier to read.
    • - -
    • Various really missing XML related features added (<@a href="settings.html#xml">Detailed information...): -
        -
      • New settings: <@s>xmlCatalogFiles, <@s>xmlCatalogPrefer. With these settings you can setup the OASIS catalogs that will be used for resolving entities in XML files. (See <@example 'xml_validating' />)
      • - -
      • New option to the xml data loader: <@c>validate. This specifies if the XML file will be checked for validity.
      • - -
      • New setting: <@s>validateXml. This specifies if by default XML files will be checked for validity.
      • - -
      • New setting: <@s>xpathEngine. With this setting you can set if you want to use Jaxen or Xalan for XPath-s.
      • -
      -
    • -
    - -

    Bug fixes:

    -
      -
    • In FreeMarker 2.3: A bug that caused template processing to fail with <@c>NullPointerException on low memory conditions is now fixed. A bug in Jaxen XPath support that caused <@c>NullPointerException-s has been fixed. Etc.
    • - -
    • <@nbca/><@c>Engine.process doesn't throw sly unchecked <@c>fmpp.IllegalConfigurationException-s anymore. Also, <@c>fmpp.IllegalConfigurationException is not public from now; it wasn't mentioned in other public API-s anyway.
    • - -
    • FMPP has died with internal error if somebody tried to use XML related features, and XML support was not available.
    • - -
    • Minor documentation fixes.
    • -
    - - -<@sect title="0.9.2"> -

    Date of release: 2003-11-12

    - -

    Bug fixes:

    -
      -
    • <@nbc/> Only Windows users (and the users of other operation systems where paths use something else instead of slash) are affected by this fix. Relative paths in <@c><#include <@r>...> and <@c><#import <@r>...> were badly interpreted relatively to the <@s>sourceRoot. Now they are correctly interpreted relatively to the directory of the template file. This bug fix is not backward compatible, if you have accidentally utilized the bad behavior. For example, you have included <@c><@r><sourceRoot>/includes/foo.ftl in a template file which is in not directly in the <@s>sourceRoot like this: <@c><#include "includes/foo.ftl">. Now you should replace it with: <@c><#include "/includes/foo.ftl">.
    • - -
    • Minor documentation fixes.
    • -
    - - -<@sect title="0.9.1"> -

    Date of release: 2003-11-09

    - -

    New features, improvements:

    -
      -
    • <@nbc/>Data loader <@c>antProperty and <@c>antProperties now can convert the property values to numerical, boolean, or data/time/date-time variables. For example, to expose property <@c>x as numerical variable, use <@c>antProperty(x?n) instead of <@c>antProperty(x). This causes backward compatibility problem only if you have Ant property names that ends with one of these: <@c>?n, <@c>?b, <@c>?d, <@c>?t, <@c>?dt, <@c>?s, and you have specified their name as parameter to these data loaders. In this case, append <@c>?s at the end of the parameters. <@a href="dataloader.html#key_antProperty">More info...
    • - -
    • Data loader <@c>csv now supports columns of type date, time, and date-time. <@a href="dataloader.html#key_csv">More info...
    • - -
    • Later nightly build of FreeMarker 2.3 is included, that introduces new built-ins: <@c>j_string, <@c>js_string. These can be used to escape text with Java language or JavaScript string literal escaping rules. Also it contains some minor bug fixes.
    • - -
    • The text hard-wrapper (used by the command-line tool) has some fixes and improvements.
    • - -
    • Added a chapter about writing new front-ends. <@a href="writefrontend.html">Here...
    • - -
    • A few minor fixes in the documentation and in the examples.
    • -
    - -

    Bug fixes:

    -
      -
    • The <@s>expert setting worked inverted with the Ant task when it decided if you are allowed to use the project base directory as <@s>outputRoot.
    • - -
    • The <@c>install target of <@c>build.xml didn't stopped nicely if the <@c>ANT_HOME was not set.
    • -
    - - -<@sect title="0.9.0"> -

    Date of release: 2003-10-30 - -

    New features, improvements: -

      -
    • <@nbc/>The default configuration file format is TDD from now, instead of "Java properties" (to decrease the number of syntaxes user has to use). Files with extension <@c>cfg or <@c>properties are automatically interpreted as "Java properties" file, so the old <@c>fmpp.cfg-s will still work. But if your old configuration file doesn't use extension <@c>cfg or <@c>properties, then you have to rename it now. Also, note that the default file name for the new (TDD) configuration files is <@c>config.fmpp, which has priority over <@c>fmpp.cfg when both present in the same directory. <@a href="configfile.html">More info... - -
    • TDD was substantially revisited. -
        -
      • The TDD syntax has several improvements and also conceptual changes. The revisited TDD is backward compatible with the old. However, I will remove hash unions later, so <@c>+ will be available for other purposes. To prepare for this future change, just replace <@c>+ characters with comma (<@c>,) in your hash unions. <@a href="tdd.html">See the chapter about the new TDD... -
          -
        • All FTL string literal features are supported. Escapes, raw strings...
        • -
        • With a new escape sequence, strings can be broken into multiple lines visually, without affecting their value.
        • -
        • Much more character is allowed in unquoted strings.
        • -
        • FTL comments and single line <@c># comments are supported. -
        • TDD files can specify their own encoding (charset) with a special comment in their first line. -
        • Line-break can be used instead of comma to separate items in listings. -
        • The hash union concept was gone. Instead, you can put hashes directly into the enclosing hash. -
        • In hashes the value can be omitted from the key:value pair, in which case it defaults to <@c>true. -
        -
      • - -
      • TDD error messages show the error location (line, column, file) and quote the problematic line.
      • - -
      • TDD now uses term "TDD function" instead of "TDD directive".
      • - -
      • <@nbca/><@c>fmpp.tdd.TddParser was gone, and <@c>fmpp.tdd.Interpreter was introduced instead, which has different API.
      • -
      -
    • - -
    • The FMPP Ant task now can load the settings from configuration files, with the new attribute <@c>configuration. Thus, now you can store the settings in a single place if you use FMPP both as command-line tool and Ant task. Look at <@example "build.xml"/> and <@example "ant3"/> to see applications. - -
    • New setting: <@c>inheritConfiguration. It is used for "customizing" an existing configuration by overriding some settings in it. See <@example "inherit_cfg" />. <@a href="configfile.html#inheritance">More info... - -
    • <@nbc/>Setting <@c>sources now uses TDD sequence syntax. Thus, you can't separate the files with <@c>: or <@c>; anymore, but with comma (<@c>,). According to TDD syntax, quote file names that contain problematic characters, e.g.:
      - <@c>no/problem/with.it, "but quote this.txt",
      - C:\windows\path, r"C:\quote this win\path"
    • - -
    • Error message creation mechanism was changed. The messages are now more "stupid mechanical", but there is far less chance that some helpful detail is accidentally left out. - -
    • The default values of a few settings of the command-line tool can be customized with <@c>.fmpprc file placed into the user home directory or into the FMPP home directory. <@a href="commandline.html#fmpprc">More info... - -
    • The <@c>get data loader function returns the values of other variables in the data model. This can be used to pass previously loaded data to other data loaders as parameters, for example:
      - <@c>data: {doc:xml(data/foo.xml), index:com.example.IndexBuilderDataLoader(get(doc))}. <@a href="dataloader.html#key_get">More information... - -
    • Data loader <@c>eval has an optional 2nd parameter, the hash of variables that will be available when the BeansScript is evaluated. For example:
      - <@c>data: eval('<@r>...', {foo:properties(foo.properties), items:get(items)})
      - <@a href="dataloader.html#key_eval">More info.... - -
    • With the new <@s>appendLogFile setting you can specify that the log file is continued, rather than restarted for each processing session. - -
    • <@nbc/>The <@c>fmpp file extension is now reserved for the purposes of FMPP. Files with this extension are never processed (they are ignored). If you had to process files of this extension, protect them using double extension as <@c>test.fmpp.keepme, and then add the extra extension (<@c>keepme in this case) to the <@s>removeExtensions setting. - -
    • The <@s>quiet setting now accepts values <@c>true, <@c>false, and <@c>reallyQuiet. Integer values are supported for backward compatibility only. - -
    • These settings were renamed: <@s false>removePostfix to <@s>removePostfixes, <@s false>removeExtension to <@s>removeExtensions, <@s false>replaceExtension to <@s>replaceExtensions. This change is backward compatible, because the old names are internally translated. - -
    • New FMPP Ant task attribute: <@c>antTaskFailOnError. This tells if the FMPP Ant task should abort the Ant project with error if there were errors during the FMPP processing session. - -
    • <@c>Engine.process(File src, File out) now modifies <@c>null <@s>sourceRoot and/or <@s>outputRoot settings for the time of the method call to the parent directories of the source and output files respectively. - -
    • FMPP build information (build date) can be queried with the new method, <@c>Engine.getBuildInfo. Also now the command-line tool prints it with <@c>--version. - -
    • Improvements to the command-line help, such as new command-line option <@c>--long-help. - -
    • <@nbca/><@c>Engine.process doesn't throw <@c>IOException anymore, only <@c>ProcessingException. - -
    • <@nbca/>The built-in <@c>DataLoader implementations were moved into new package <@c>tdd.dataloaders. - -
    • <@nbca/><@c>tdd.util.StringUtil.excToStr(Throwable) was removed. - -
    • Revisited documentation and site generator. - -
    • Now mode x is set for <@c>bin/* in the tar file. - -
    • Added test suite. (But more test cases should be added...) -
    - -

    Bug fixes: -

      -
    • <@c>fmpp.bat was stopped with error if it didn't find Ant! AAARGH! - -
    • A later nightly build of the uncompleted FreeMarker 2.3 is included. This fixes a FreeMarker bug that has caused the first empty line of the template files ignored, when the template has started with empty line. - -
    • <@nbc/>The FMPP Ant task didn't aborted the Ant project when <@c>stopOnError="false", and the were skipped failed processing. Now it does. Note that the old behavior can be emulated using <@c>antTaskFailOnError="false". - -
    • <@c>pp.locale didn't followed the locale changes made at template execution time with <@c><#setting locale=<@r>...>.
    • - -
    • Various other little fixes here and there... But don't be sad. Many exciting new bugs has been added during the refactorings... ;) -
    - - -<@sect title="0.8.12"> -

    Date of release: 2003-09-30 -

    New features, improvements: -

      -
    • <@nbc/>A later nightly build of the uncompleted FreeMarker 2.3 is included. Unfortunately it contains some incompatible changes (Sorry... :( I will not risk nightly FreeMarker builds anymore after 2.3 is out...): -
        -
      • White-space stripping is now more aggressive as before: it always removes leading and trailing white-space if the line only contains FTL tags. (Earlier the white-space was not removed if the tag was <@c><#include ...> or user-defined directive tag with empty directive syntax as <@c><@myMacro/> (or its equivalents: <@c><@myMacro></@myMacro> and <@c><@myMacro></@>). Now white-space is removed in these cases as well.) Also, top-level white-space that separates macro definitions and/or assignments is now ignored. <@fma href="dgui_misc_whitespace.html#dgui_misc_whitespace_stripping">More information... -
      • The return value of <@c>freemarker.template.TemplateMethodModel.exec(...) is <@c>Object, not <@c>TemplateModel. -
      -
    • New <@c>pp variable: <@c>freemarkerVersion. Also, new <@c>fmpp.Engine method: <@c>fmpp.Engine.getFreeMarkerVersionNumber(). Also, FreeMarker version number is printed together with FMPP version number everywhere. -
    • <@nbca/>API change: <@c>fmpp.Engine.getVersionNumber() does not throw checked exceptions anymore. -
    • New <@c>pp directive: <@c>pp.restartOutputFile. This directive empties the output file, but does not delete the file or discards the further output as <@c>pp.dropOutputFile does.
    • -
    • <@nbc/>New setting: "ignore temporary files". This filters out certain typical temporary/backup files (that is, it chooses ignore processing mode for them), unless you explicitly set this setting to false. The old <@c>.bak and <@c>~* filter mechanism was removed. Note that this all does not affect the FMPP Ant task. <@a href="settings.html#processingMode">More information... -
    -

    Bug fixes: -

      -
    • With setting "borders", using headers with a template that contains <@c><#ftl <@r>...> resulted on illegal FreeMarker template, as nothing can precede the <@c>ftl directive. Now the header is intelligently moved after the <@c>ftl directive. -
    • The documentation of <@c>pp.set and <@c>pp.add was totally confused. -
    • The engine was unable to return the FMPP version number sometimes due class loader issues. -
    • <@nbc/>Setting "ignore CVS files" had lower priority than the processing mode chooser list. Now it has higher priority. -
    • <@nbc/>Setting "ignore CVS files" didn't ignored <@c>.#?* files. Now it does. -
    - - -<@sect title="0.8.11"> -

    Date of release: 2003-08-11 -

    New features, improvements: -

      -
    • <@nbc/>A later nighly build of the uncompleted FreeMarker 2.3 is included. Most importantly, its XML handling is now much better, but unfortunately has incompatible changes: -
        -
      • Attribute queries such as <@c>foo.@bar now return sequences (similarly to child element queries and XPath queries), not single nodes. Because of the rule with node sequences of size 1, it is still good to write <@c><#noparse>${foo.@bar}, but built-ins such as <@c>?exists, <@c>?if_exists or <@c>?default don't work as before. For example, instead of <@c>foo.@bar?default('black'), you now have to write <@c>foo.@bar[0]?default('black'). So if you have used existence built-ins with attributes, you have to find those occurrences in the templates and add that <@c>[0].
      • - -
      • XML name-space handling has been totally reworked and is absolutely incompatible with the old stuff. Don't worry about this if none of your XML input documents use <@c>xmlns.
      • - -
      • Special-keys <@c>@@ and <@c>@* now return a sequence of attribute nodes instead of the hash of them.
      • -
      -
    • The <@c>xml data loader has a new boolean option: <@c>namespaceAware. If this is set to <@c>false, you can load XML files with the logic as XML has worked before the introduction of name-spaces. -
    • Minor fixes/improvements in the manual. -
    -

    Bug fixes: -

      -
    • The FMPP Ant task stopped with error if you have used nested elements and you have executed multiple "top-level" tasks with the same ant invocation. -
    • The snip function of the command-line tool has snipped the text-flood too late sometimes. -
    - - -<@sect title="0.8.10"> -

    Date of release: 2003-07-03 -

    New features, improvements: -

      -
    • <@nbc/>This release uses a nightly build of the uncompleted FreeMarker 2.3. FreeMarker 2.3 adds several important new features to 2.2.x, but it is not fully backward compatible. Do not forget to read the <@fma href="versions_2_3.html">list of uncompatible changes in the FreeMarker Manual! -
    • <@c>antProperties improved: You can give the names of Ant properties you want to expose, as parameters. So if you want to expose only properties <@c>foo and <@c>bar, then just write <@c>antProperties(foo, bar). <@a href="dataloader.html#key_antProperites">More info... -
    • New data loader <@c>antProperty, to expose the value of a single Ant property. <@a href="dataloader.html#key_antProperty">More info... -
    • New data loader <@c>xml, which uses the new XML wrapper of FreeMarker. It replaces the old <@c>xmlInfoset data loader, which is kept only for backward compatibility. <@a href="dataloader.html#key_xml">More info... -
    • Some code clean-up (as removing a few unused variables). -
    • From now, <@c>freemarker.jar will be checked in to the CVS repository. -
    -

    Bug fixes: -

      -
    • <@nbca/> In <@c>fmpp.util.FreemarkerUtil, <@c>FtlVarToCoreJavaObject is now renamed to <@c>ftlVarToCoreJavaObject -
    - - -<@sect title="0.8.9"> -

    Date of release: 2003-05-02 -

    New features, improvements: -

      -
    • Better error messages: FMPP tools now tend to show the whole cause chain, rather than just the top-level exception. -
    • New data loader: <@c>text. This loads a plain text file into a string variable. -
    • New pp variable to retrieve the FMPP Engine version number: <@c>pp.version -
    • Easier to build: -
        -
      • Task for getting the latest nightly FMPP. -
      • Fixed the class loading issues of the "docs" task, so the default target is now "build". -
      -
    • The distribution now works with JDK 1.2.2 -
    • Minor additions to the Manual. -
    -

    Bug fixes: -

      -
    • The Ant build was not working without <@c>build.properties. -
    • The localized lookup feature of FreeMarker was not disabled, and it could cause confusing effects. -
    • The log file didn't stored the source file path for errors that was logged before the "END OF PROCESSING SESSION" message. -
    - - -<@sect title="0.8.8"> -

    Date of release: 2003-04-29 -

    New features, improvements: -

      -
    • Rewritten <@c>fmpp.bat; it is now more flexible. -
    • More documentation. No more "Under Construction" logo. -
    • New <@c>pp hash methods: <@c>outputFileLastModified, <@c>sourceFileLastModified, <@c>realFileLastModified -
    -

    Bug fixes: -

      -
    • Predefined data loader <@c>now didn't used the "time zone" FMPP engine setting. -
    • The "turns" setting was missing from the Manual. -
    • Fixing some typos in the error messages and in the documentation. -
    - - -<@sect title="0.8.7"> -

    Date of release: 2003-04-12 -

    New features, improvements: -

      -
    • New date/time related settings of FreeMarker 2.2.1 are exposed now: date format, time format, datetime format, time zone -
    • Date/time related <@c>pp variables: <@c>now, <@c>sessionStart. -
    • Final version of FreeMarker 2.2.1 is included. -
    -

    Bug fixes: -

      -
    • The classpath in <@c>fmpp.jar didn't included <@c>bsh.jar. -
    - - -<@sect title="0.8.6"> -

    Date of release: 2003-04-06 -

    New features, improvements: -

      -
    • New pp method: <@c>pp.loadData(<@r>dataLoaderName, <@r>args...). This can be used to load data into a variable in templates, with the same data loaders as with the "data" setting. <@a href="pphash.html#loadData">More information... -
    • New <@c>Engine method: <@c>TemplateModel wrap(Object obj) -
    • Newer nightly build of FreeMarker is included (2.2.1). -
    -

    Bug fixes: -

      -
    • <@nbca/><@c>DataLoader.load(engine, args) now uses <@c>List instead of <@c>ArrayList for the <@c>args. -
    • The <@c>install target of <@c>build.xml forgot to copy <@c>bsh.jar. -
    • Minor fixes in the documentation. -
    - - -<@sect title="0.8.5"> -

    Date of release: 2003-03-23 -

    New features, improvements: -

      -
    • New built-in data loader directive: <@c>eval(<@r>JavaExpression) -
    -

    Bug fixes: -

      -
    • Fixes in the documentation. -
    - - -<@sect title="0.8.4"> -

    Date of release: 2003-03-21 -

    New features, improvements: -

      -
    • More documentation. Especially in the <@a href="commandline.html">documentation of the command-line tool. -
    • New setting: replace extension -
    • <@nbc/>If the option <@c>remove-extension or <@c>remove-postfix is specified both in the configuration file and in the command-line, then the two option parameter values will be merged. -
    • Newer nightly build of FreeMarker 2.2 is included. -
    -

    Bug fixes: -

      -
    • The output file name deduction was applied twice in certain situations. -
    - - -<@sect title="0.8.3"> -

    Date of release: 2003-03-16 -

    New features, improvements: -

      -
    • <@c>bin/fmpp and <@c>bin\fmpp.bat now can load the FMPP realted jars from the <@c>ANT_HOME. -
    • Added <@c>install target to <@c>build.xml that copies the jars to the <@c>ANT_HOME.
    • -
    • More detailed installing instructions.
    • -
    -

    Bug fixes: -

      -
    • <@c>fmpp.FileUtil.compressPath has died with <@c>IndexOutOfBounds in rare cases. -
    • <@c>rar was missing from the list of static file extensions. -
    - - -<@sect title="0.8.2"> -

    Date of release: 2003-03-13 -

    New features, improvements: -

      -
    • Block assignments instead of <@c>@capture. For example, instead of <@c><@capture local="foo"><@r>...</@capture> you can write <@c><#local foo><@r>...</#local>. -
    • New pp methods to calculate relative paths: <@c><@a href="pphash.html#key_pathTo">pathTo and <@c><@a href="pphash.html#key_sourcePathTo">sourcePathTo.
    • -
    • <@c>fmpp.FileUtil.getRelativePath does no require anymore that the starting point is an ascendent directory of the destination. -
    • Newer nightly build of FreeMarker 2.2 is included (supports block assignments + bug fixes). -
    -

    Bug fixes: -

      -
    • <@c>fmpp.FileUtil.getRelativePath has returned bad results in some rare situations. -
    - - -<@sect title="0.8.1"> -

    Date of release: 2003-03-10 -

    New features, improvements: -

      -
    • Added "ignore CVS files" setting. -
    • Added <@c>xml_infoset example. -
    • Simplified build process. -
    • Some minor fixes in the html-s and txt-s. -
    • Newer nightly build of FreeMarker 2.2 is included. -
    • <@nbc/><@c>?chop was renamed to <@c>?chop_linebreak (due the changes in the FreeMarker 2.2 CVS head) -
    • <@nbc/>CVS files (<@c>**/.cvsignore and <@c>**/CVS/) in the source directory will be ignored by default. -
    -

    Bug fixes: -

      -
    • The <@c>Manifest.mf in <@c>fmpp.jar was empty. -
    • Last-generated date was incorrect on the HTML pages. -
    - - -<@sect title="0.8.0"> -

    Date of release: 2003-03-05 -

    The initial Sourceforge release. - - - diff --git a/fmpp/src/docs/writefrontend.html b/fmpp/src/docs/writefrontend.html deleted file mode 100644 index 61a1a4c..0000000 --- a/fmpp/src/docs/writefrontend.html +++ /dev/null @@ -1,71 +0,0 @@ -<@page title="Writing New Front-ends" keywords="front-end, front-ends, custom, write, embed"> - -<@note>I'm talking about writing front-ends here, but of course the same technique can be used to embed FMPP into your application that you couldn't call a front-end. - -

    The low-level method is to create an <@c>fmpp.Engine object, and then set it up with its methods, and then call its <@c>process(<@r>...) method to execute a processing session. The API of this object reflects the internal architecture of FMPP. Higher-level concepts as <@a href="settings.html">settings or <@a href="configfile.html">configuration files doesn't exist on this level. So I don't recommend you to work with <@c>fmpp.Engine objects directly.

    - -

    The high-level method is to create an <@c>fmpp.setting.Settings object, and fill it with the setting values. This object can load configuration files, and its API uses a higher level approach in general. This is the object where <@a href="settings.html">FMPP settings are implemented. After you set the setting values (and also you have added progress listeners and engine attributes you wanted), invoke <@c>Settings.execute() to execute a processing session.

    - -<@figure src="fmpparch.png" alt="FMPP architecture"> - The components involved in typical FMPP usage. Red arrow shows direct method invocation (or constructor invocation, or static field access) between the components. The arrow points from the caller towards the called. Dashed lines indicate unimportant or occasional access. - - -

    Note that some settings are not implemented by <@c>Settings (as <@s>echoFormat, <@s>logFile, ...etc.), and should be implemented by the front-end.

    - -

    For more information, please see <@a href="api/index.html">the API documentation. Also, you can look into the source code of <@c>fmpp.tools.CommandLine and <@c>fmpp.tools.AntTask.

    - -

    Example: Below is the source code of a very simple command-line front-end. It accepts one argument, the name of the configuration file to use. If that's omitted, it tries to load a configuration file from the current directory.

    - -<@prg> -package fmpp.testsuite; - -import java.io.File; - -import fmpp.ProcessingException; -import fmpp.progresslisteners.ConsoleProgressListener; -import fmpp.setting.SettingException; -import fmpp.setting.Settings; -import fmpp.util.MiscUtil; -import freemarker.log.Logger; - -public class AdhocFrontEnd { - public static void main(String[] args) { - // Parse command-line args - File cfgFile = null; - if (args.length == 0) { - cfgFile = new File("."); // load the cfg. of the the current dir. - } else if (args.length == 1) { - cfgFile = new File(args[0]); - } else { - System.err.println( - "Usage: java AdhocFrontEnd [configuration-file]"); - System.exit(-1); - } - - // Shut FreeMarker logger up - try { - Logger.selectLoggerLibrary(Logger.LIBRARY_NONE); - } catch (ClassNotFoundException e) { - throw new RuntimeException( - "Failed to disable FreeMarker logging."); - } - - // Now comes the meat... - try { - Settings ss = new Settings(new File(".")); - ss.load(cfgFile); - ss.addProgressListener(new ConsoleProgressListener()); - ss.execute(); - System.out.println("Done."); - } catch (SettingException e) { - System.err.println(MiscUtil.causeMessages(e)); - System.exit(-2); - } catch (ProcessingException e) { - System.err.println(MiscUtil.causeMessages(e)); - System.exit(-3); - } - } -} - - - diff --git a/fmpp/src/main/java/fmpp/DataModelBuildingException.java b/fmpp/src/main/java/fmpp/DataModelBuildingException.java deleted file mode 100644 index 113f91f..0000000 --- a/fmpp/src/main/java/fmpp/DataModelBuildingException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import fmpp.util.ExceptionCC; - -/** - * Error while trying to build the data-model for a template. - * Usually you meet this exception as the root cause of a - * {@link ProcessingException} - */ -public class DataModelBuildingException extends ExceptionCC { - - public DataModelBuildingException(Throwable cause) { - super(cause); - } - - public DataModelBuildingException(String message) { - super(message); - } - - public DataModelBuildingException(String message, Throwable cause) { - super(message, cause); - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/Engine.java b/fmpp/src/main/java/fmpp/Engine.java deleted file mode 100644 index f8cdaaf..0000000 --- a/fmpp/src/main/java/fmpp/Engine.java +++ /dev/null @@ -1,3161 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.TimeZone; -import java.util.regex.Pattern; -import java.util.regex.PatternSyntaxException; - -import fmpp.util.BorderedReader; -import fmpp.util.BugException; -import fmpp.util.ExceptionCC; -import fmpp.util.FileUtil; -import fmpp.util.InstallationException; -import fmpp.util.MiscUtil; -import fmpp.util.StringUtil; -import freemarker.ext.beans.BeansWrapper; -import freemarker.ext.beans.BeansWrapperBuilder; -import freemarker.template.Configuration; -import freemarker.template.Template; -import freemarker.template.TemplateException; -import freemarker.template.TemplateExceptionHandler; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNodeModel; -import freemarker.template.Version; - -/** - * The bare-bone, low-level preprocessor engine. Since FMPP 0.9.0 you should - * rather use a {@link fmpp.setting.Settings} object instead of directly using - * this class. - * - *

    {@link Engine fmpp.Engine} vs {@link fmpp.setting.Settings}: - * The design of the {@link Engine} object API is driven by the internal - * architecture of FMPP system. It doesn't consider front-ends, doesn't know - * configuration files or similar high-level stuff. {@code Settings} - * wraps the Engine object, and implements end-user (front-end) centric - * concepts, as the settings and configuration files described in the FMPP - * Manual. The API of {@link Engine} is more natural and convenient - * than the API of a {@code Map}-like object as a - * {@code Settings} object. But {@code Settings} are far easier - * to use if you want FMPP behave as described in the FMPP Manual from the - * viewpoint of end-user. In principle, if FMPP is used embedded in a way - * that the end-user will never face FMPP (doesn't use the FMPP Manual, - * etc.), using the {@link Engine} object directly can be a good - * solution. But, since the Java programmers get know FMPP through the - * higher-level concepts (they try it with the command-line tool, etc.), I - * say, just use {@code Settings} always. The resource usage overhead - * is negligible, and all capabilities of the {@link Engine} will be - * available, plus some extra features (as configuration files). So basically, - * the introduction of {@code Settings} has degraded {@link Engine} to - * an internally used object. - * - *

    Engine parameters: - * Engine parameters are very similar to "settings" discussed in the - * FMPP Manual. You will usually find trivial one-to-one correspondence between - * settings and engine parameters, but not always. Settings use the - * front-end/end-user's viewpoint, and are mostly built on the top of engine - * parameters, while engine parameters use FMPP system implementation driven - * approach. - *
    The value of engine parameters can't be set while a processing session is - * executing. An attempt to do so will result in - * {@link java.lang.IllegalStateException}. Thus, for example, you can't change - * an engine parameter from an executing template. Also, you should not change - * the objects stored as "data" (i.e. the variables that are visible for all - * templates) while the processing session is executing, even though it's not - * prevented technically (because it can't be...). - * - *

    Life-cycle: The engine object can be used for multiple processing - * sessions. However, the typical usage is that it is used - * only for a single processing session. The state of the engine object possibly - * changes during sessions because of the engine attributes (see - * {@link #setAttribute(String, Object)}), and because plugged long-lived - * objects as local data builders and progress listeners can maintain state - * through multiple sessions. These objects should behave so that the output - * files of a session is not influenced by earlier sessions. - */ -public class Engine { - - /** Processing mode: N/A */ - public static final int PMODE_NONE = 0; - - /** Processing mode: Execute the file as template */ - public static final int PMODE_EXECUTE = 1; - - /** Processing mode: Copy the file as-is (binary copy). */ - public static final int PMODE_COPY = 2; - - /** Processing mode: Ignore the file. */ - public static final int PMODE_IGNORE = 3; - - /** Processing mode: Render XML with an FTL template. */ - public static final int PMODE_RENDER_XML = 4; - - /** Used with the "skipUnchnaged" engine parameter: never skip files */ - public static final int SKIP_NONE = 0; - - /** - * Used with the "skipUnchanged" engine parameter: skip unchanged static - * files - */ - public static final int SKIP_STATIC = 1; - - /** - * Used with the "skipUnchanged" engine parameter: skip all unchanged - * files - */ - public static final int SKIP_ALL = 2; - - /** - * A commonly used reserved parameter value: {@code "source"}. - */ - public static final String PARAMETER_VALUE_SOURCE = "source"; - - /** - * A commonly used reserved parameter value: {@code "source"}. - */ - public static final String PARAMETER_VALUE_OUTPUT = "output"; - - /** - * A commonly used reserved parameter value: {@code "host"}. - */ - public static final String PARAMETER_VALUE_HOST = "host"; - - /** - * Used as the value of the "xmlEngine" engine parameter: keep the current - * JVM level setting. - */ - public static final String XPATH_ENGINE_DONT_SET = "dontSet"; - - /** - * Used as the value of the "xmlEngine" engine parameter: Let FreeMarker - * choose. - */ - public static final String XPATH_ENGINE_DEFAULT = "default"; - - /** - * Used as the value of the "xmlEngine" engine parameter: Force the usage - * of Xalan. - */ - public static final String XPATH_ENGINE_XALAN = "xalan"; - - /** - * Used as the value of the "xmlEngine" engine parameter: Force the usage - * of Jaxen. - */ - public static final String XPATH_ENGINE_JAXEN = "jaxen"; - - private static final String IGNOREDIR_FILE = "ignoredir.fmpp"; - - private static final String CREATEDIR_FILE = "createdir.fmpp"; - - private static final Set STATIC_FILE_EXTS = new HashSet(); - static { - String[] list = new String[] { - "jpg", "jpeg", "gif", "png", "swf", "bmp", "pcx", "tga", "tiff", - "ico", - "zip", "gz", "tgz", "jar", "ace", "bz", "bz2", "tar", "arj", - "rar", "lha", "cab", "lzh", "taz", "tz", "arc", - "exe", "com", "msi", "class", "dll", - "doc", "xls", "pdf", "ps", "chm", - "avi", "wav", "mp3", "mpeg", "mpg", "wma", "mov", "fli"}; - for (int i = 0; i < list.length; i++) { - STATIC_FILE_EXTS.add(list[i]); - } - } - - private static String cachedVersion; - private static String cachedBuildInfo; - - // Settins - private File srcRoot, outRoot, dataRoot; - private boolean dontTraverseDirs; - private Map freemarkerLinks = new HashMap(); - private boolean stopOnError = true; - private Map data = new HashMap(); - private LayeredChooser localDataBuilders = new LayeredChooser(); - private TemplateDataModelBuilder tdmBuilder; - private String outputEncoding = PARAMETER_VALUE_SOURCE; - private String urlEscapingCharset = PARAMETER_VALUE_OUTPUT; - private LinkedList pModeChoosers = new LinkedList(); - private LayeredChooser headerChoosers = new LayeredChooser(); - private LayeredChooser footerChoosers = new LayeredChooser(); - private LinkedList turnChoosers = new LinkedList(); - private boolean csPathCmp = false; - private boolean expertMode = false; - private ArrayList removeExtensions = new ArrayList(); - private ArrayList removePostfixes = new ArrayList(); - private ArrayList replaceExtensions = new ArrayList(); - private int skipUnchanged; - private boolean alwaysCrateDirs = false; - private boolean ignoreCvsFiles = true; - private boolean ignoreSvnFiles = true; - private boolean ignoreTemporaryFiles = true; - private String xpathEngine = XPATH_ENGINE_DONT_SET; - private Object xmlEntityResolver; - private boolean validateXml = false; - private List xmlRendCfgCntrs = new ArrayList(); - - // Misc - private Configuration fmCfg; - private MultiProgressListener progListeners = new MultiProgressListener(); - private TemplateEnvironment templateEnv; - private int maxTurn, currentTurn; - private Map attributes = new HashMap(); - private Boolean chachedXmlSupportAvailable; - private boolean parametersLocked; - - // Session state - private Map ignoredDirCache = new HashMap(); - private Set processedFiles = new HashSet(); - - /** - * Same as {@link #Engine(BeansWrapper) Engine(null)}. - * - * @deprecated Use {@link #Engine(BeansWrapper, Version)} instead. - */ - public Engine() { - this(null); - } - - /** - * Same as - * {@link #Engine(BeansWrapper, Version) Engine(beansWrapper, null)}. - * - * @deprecated Use {@link #Engine(BeansWrapper, Version)} instead. - */ - public Engine(BeansWrapper beansWrapper) { - this(beansWrapper, null); - } - - /** - * Creates a new FMPP engine instance. - * Use the setter methods (as {@code setProgressListener}) to configure - * the new instance. - * - * @param beansWrapper the FreeMarker beans-wrapper that this instance - * will use. Just use {@code null} if you don't know what's this. - * If you do know what's this, note that FMPP by default (when this - * parameter is {@code null}) uses a {@code BeansWrapper} with - * {@code simpleMapWrapper} set to {@code true}. - * - * @param fmIncompImprovements Sets the "incompatible improvements" version of FreeMarker. You should set this to - * the current FreeMarker version in new projects. See {@link Configuration#Configuration(Version)} for details. - * If it's at least {@code 2.3.21} and {@code beansWrapper} is {@code null}, the default will be created using - * {@link BeansWrapperBuilder} instead of {@code new BeansWrapper()}, which means that that the resulting - * {@link BeansWrapper} will be a shared singleton with read-only settings. - */ - public Engine(BeansWrapper beansWrapper, Version fmIncompImprovements) { - fmCfg = fmIncompImprovements != null ? new Configuration(fmIncompImprovements) : new Configuration(); - - if (beansWrapper == null) { - if (fmIncompImprovements == null - || fmIncompImprovements.intValue() < Configuration.VERSION_2_3_21.intValue()) { - // The old (deprecated) way: - BeansWrapper bw = fmIncompImprovements != null - ? new BeansWrapper(fmIncompImprovements) : new BeansWrapper(); - bw.setSimpleMapWrapper(true); - fmCfg.setObjectWrapper(bw); - } else { - BeansWrapperBuilder bwb = new BeansWrapperBuilder(fmIncompImprovements); - bwb.setSimpleMapWrapper(true); - fmCfg.setObjectWrapper(bwb.build()); - } - } else { - fmCfg.setObjectWrapper(beansWrapper); - } - - fmCfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); - fmCfg.setTemplateUpdateDelay(Integer.MAX_VALUE - 10000); - fmCfg.setDefaultEncoding("ISO-8859-1"); - fmCfg.setLocale(Locale.US); - fmCfg.setNumberFormat("0.############"); - fmCfg.setLocalizedLookup(false); - - templateEnv = new TemplateEnvironment(this); - - clearModeChoosers(); - } - - // ------------------------------------------------------------------------- - // Processing - - /** - * Processes a list of files. - * - *

    The source root and output root directory must be set (non-null) prior - * to calling this method. - * - * @see #process(File, File) - * - * @param sources The list of files to process. All file must be inside - * the source root. The files will be processed in the order as they - * appear in the list, except that if you use multiple turns, they - * are re-sorted based on the associated turns (the original order - * of files is kept inside turns). - * - * @throws ProcessingException if {@code Engine.process} has - * thrown any exception. The message of this exception holds nothing - * interesting (just a static text). Call its {@code getCause()} - * method to get the exception that caused the termination. Note that - * all (so even non-checked exceptions) thrown be the engine are - * catched and wrapped by this exeption. - */ - public void process(File[] sources) - throws ProcessingException { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_BEGIN_PROCESSING_SESSION, - null, PMODE_NONE, - null, null); - try { - try { - setupSession(); - } catch (IllegalConfigurationException e) { - throw new ProcessingException(this, null, e); - } - try { - File src; - File[] srcs = new File[sources.length]; - for (int i = 0; i < sources.length; i++) { - src = sources[i].getCanonicalFile(); - - if (!FileUtil.isInsideOrEquals(src, srcRoot)) { - throw new IOException( - "The source file (" - + src.getPath() - + ") is not inside the source root (" - + srcRoot.getPath() + ")"); - } - - srcs[i] = src; - } - - for (; currentTurn <= maxTurn; currentTurn++) { - for (int i = 0; i < srcs.length; i++) { - if (srcs[i] != null) { - boolean done; - - File out = new File( - outRoot, - FileUtil.getRelativePath(srcRoot, srcs[i])); - - if (srcs[i].isDirectory()) { - done = processDir(srcs[i], out); - } else { - done = processFile(srcs[i], out, true); - } - if (done) { - srcs[i] = null; - } - } - } - } - } finally { - cleanupSession(); - } - } catch (ProcessingException e) { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_END_PROCESSING_SESSION, - null, PMODE_NONE, - e, null); - throw e; - } catch (IOException e) { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_END_PROCESSING_SESSION, - null, PMODE_NONE, - e, null); - throw new ProcessingException(this, null, e); - } - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_END_PROCESSING_SESSION, - null, PMODE_NONE, - null, null); - } - - private boolean isDirMarkedWithIgnoreFile(File dir) - throws IOException { - boolean ign; - Boolean ignore = (Boolean) ignoredDirCache.get(dir); - if (ignore != null) { - return ignore.booleanValue(); - } - if (!dir.equals(srcRoot)) { - File parentDir = dir.getParentFile(); - if (parentDir != null && isDirMarkedWithIgnoreFile(parentDir)) { - ignoredDirCache.put(dir, Boolean.TRUE); - return true; - } - } - ign = new File(dir, IGNOREDIR_FILE).exists(); - ignoredDirCache.put(dir, ign ? Boolean.TRUE : Boolean.FALSE); - return ign; - } - - /** - * Hack to processes a single file. - * - *

    If the source root and/or output root directory is not set, they - * will be set for the time of this method call to the parent diretories of - * the source and output files respectively. - * - * @see #process(File[]) - * - * @param src the source file (not directory). Can't be null. - * @param out the output file (not directory). Can't be null. - * - * @throws ProcessingException if {@code Engine.process} has - * thrown any exception. The message of this exception holds nothing - * interesting (just a static text). Call its {@code getCause()} - * method to get the exception that caused the termination. Note that - * all (so even non-checked exceptions) thrown be the engine are - * catched and wrapped by this exception. - */ - public void process(File src, File out) - throws ProcessingException { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_BEGIN_PROCESSING_SESSION, - null, PMODE_NONE, - null, null); - File oldSrcRoot = srcRoot; - File oldOutRoot = outRoot; - try { - try { - if (src == null) { - throw new IllegalArgumentException( - "The source argument can't be null."); - } - if (out == null) { - throw new IllegalArgumentException( - "The output argument can't be null."); - } - - src = src.getCanonicalFile(); - if (!src.exists()) { - throw new IOException( - "Source file not found: " - + src.getPath()); - } - if (src.isDirectory()) { - throw new IOException( - "Source file can't be a directory: " - + src.getPath()); - } - - out = out.getCanonicalFile(); - if (out.exists() && out.isDirectory()) { - throw new IOException( - "The output file can't be a directory."); - } - - if (srcRoot == null) { - setSourceRoot(src.getParentFile()); - } - - if (outRoot == null) { - setOutputRoot(out.getParentFile()); - } - - try { - setupSession(); - } catch (IllegalConfigurationException e) { - throw new ProcessingException(this, null, e); - } - try { - if (!FileUtil.isInsideOrEquals(src, srcRoot)) { - throw new IOException( - "The source file (" - + src.getPath() - + ") is not inside the source root (" - + srcRoot.getPath() + ")"); - } - - if (!FileUtil.isInsideOrEquals(out, outRoot)) { - throw new IOException( - "The output file (" - + out.getPath() - + ") is not inside the output root (" - + outRoot.getPath() + ")"); - } - - for (; currentTurn <= maxTurn; currentTurn++) { - processFile(src, out, false); - } - } finally { - cleanupSession(); - } - } catch (ProcessingException e) { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_END_PROCESSING_SESSION, - null, PMODE_NONE, - e, null); - throw e; - } catch (IOException e) { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_END_PROCESSING_SESSION, - null, PMODE_NONE, - e, null); - throw new ProcessingException(this, null, e); - } - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_END_PROCESSING_SESSION, - null, PMODE_NONE, - null, null); - } finally { - // clear auto-deduced root dirs. - if (oldSrcRoot == null) { - srcRoot = null; - } - if (oldOutRoot == null) { - outRoot = null; - } - } - } - - private void setupSession() - throws IOException, IllegalConfigurationException { - if (srcRoot == null) { - throw new IllegalConfigurationException( - "The source root directory was not set."); - } - if (outRoot == null) { - throw new IllegalConfigurationException( - "The output root directory was not set."); - } - if (!srcRoot.exists()) { - throw new IOException("Source root directory does not exists."); - } - if (!srcRoot.isDirectory()) { - throw new IOException("Source root is not a directory."); - } - if (outRoot.exists() && !outRoot.isDirectory()) { - throw new IOException("Output root is not a directory."); - } - - boolean done = false; - try { - if (!xpathEngine.equals(XPATH_ENGINE_DONT_SET)) { - EngineXmlUtils.setFreeMarkerXPathEngine(xpathEngine); - } - - maxTurn = 1; - Iterator it = turnChoosers.iterator(); - while (it.hasNext()) { - int t = ((TurnChooser) it.next()).turn; - if (t > maxTurn) { - maxTurn = t; - } - } - currentTurn = 1; - - fmCfg.setTemplateLoader(new FmppTemplateLoader(this)); - fmCfg.clearTemplateCache(); - - fmCfg.clearSharedVariables(); - it = data.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - try { - fmCfg.setSharedVariable( - (String) ent.getKey(), ent.getValue()); - } catch (TemplateModelException e) { - throw new IllegalConfigurationException( - "Failed to convert data " - + StringUtil.jQuote((String) ent.getKey()) - + " to FreeMarker variable.", - e); - } - } - - processedFiles.clear(); - ignoredDirCache.clear(); - - templateEnv.setupForSession(); - - lockParameters(); - - done = true; - } finally { - if (!done) { - cleanupSession(); - } - } - } - - private void cleanupSession() { - unlockParameters(); - - templateEnv.cleanAfterSession(); - - processedFiles.clear(); - ignoredDirCache.clear(); - fmCfg.clearTemplateCache(); - fmCfg.clearSharedVariables(); - } - - private boolean processDir(File srcDir, File dstDir) - throws IOException, ProcessingException { - - if (isDirMarkedWithIgnoreFile(srcDir)) { - return true; - } - - String name = srcDir.getName(); - if (ignoreCvsFiles) { - if (name.equals("CVS") - || (!csPathCmp && name.equalsIgnoreCase("CVS"))) { - return true; - } - } - if (ignoreSvnFiles) { - if (name.equals(".svn") - || (!csPathCmp && name.equalsIgnoreCase(".svn"))) { - return true; - } - } - - if (alwaysCrateDirs || new File(srcDir, CREATEDIR_FILE).isFile()) { - if (!dstDir.exists()) { - if (!dstDir.mkdirs()) { - throw new IOException( - "Failed to create directory: " - + dstDir.getAbsolutePath()); - } - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_CREATED_EMPTY_DIR, - srcDir, - PMODE_NONE, null, null); - } - } - - if (!dontTraverseDirs) { - File[] dir = srcDir.listFiles(); - for (int i = 0; i < dir.length; i++) { - File sf = dir[i]; - String fn = sf.getName(); - File df = new File(dstDir, fn); - if (sf.isDirectory()) { - processDir(sf, df); - } else { - processFile(sf, df, true); - } - } - } - - return false; - } - - private boolean processFile(File sf, File df, boolean allowOutFAdj) - throws IOException, ProcessingException { - if (isDirMarkedWithIgnoreFile( - sf.getParentFile().getCanonicalFile())) { - return true; - } - - if (sf.getName().equalsIgnoreCase(CREATEDIR_FILE)) { - File srcDir = sf.getParentFile(); - // Re-check with the comparison rules of the file-system - if (new File(srcDir, CREATEDIR_FILE).exists()) { - File dstDir = df.getParentFile(); - if (!dstDir.exists()) { - if (!dstDir.mkdirs()) { - throw new IOException( - "Failed to create directory: " - + dstDir.getAbsolutePath()); - } - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_CREATED_EMPTY_DIR, - srcDir, - PMODE_NONE, null, null); - } - return true; - } - } - - if (currentTurn != getTurn(sf)) { - return false; - } - if (!processedFiles.add(sf)) { - return true; - } - - int pmode = getProcessingMode(sf); - - Throwable catchedExc = null; - - try { - if (allowOutFAdj && pmode != Engine.PMODE_IGNORE) { - df = adjustOutputFileName(df); - } - if (!expertMode && pmode != Engine.PMODE_IGNORE) { - if (sf.equals(df)) { - throw new IOException( - "The input and output files are the same (" - + sf.getPath() - + "); if you want to allow this, " - + "you should turn on expert mode."); - } - } - if (pmode != Engine.PMODE_IGNORE - && (skipUnchanged == SKIP_ALL - || (skipUnchanged == SKIP_STATIC - && pmode == Engine.PMODE_COPY))) { - long dfl = df.lastModified(); - long sfl = sf.lastModified(); - if (df.exists() && dfl > 0 && sfl > 0 && dfl == sfl) { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_SOURCE_NOT_MODIFIED, - sf, pmode, - null, null); - return true; //! - } - } - } catch (Throwable e) { - // delay the throwing of exc. as if it was happen while processing - catchedExc = e; - } - - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_BEGIN_FILE_PROCESSING, - sf, pmode, - null, null); - try { - if (catchedExc != null) { - throw catchedExc; - } - - switch (pmode) { - case PMODE_EXECUTE: - executeFile(sf, df); - break; - case PMODE_COPY: - File dstDir; - dstDir = df.getParentFile(); - if (dstDir != null) { - dstDir.mkdirs(); - } - FileUtil.copyFile(sf, df); - break; - case PMODE_RENDER_XML: - renderXmlFile(sf, df); - break; - case PMODE_IGNORE: - break; - default: - throw new BugException( - "Bad processing mode in the procModeChoosers:" + pmode); - } - } catch (Throwable e) { - catchedExc = e; - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_END_FILE_PROCESSING, - sf, pmode, - e, null); - } - if (catchedExc == null) { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_END_FILE_PROCESSING, - sf, pmode, - null, null); - } else { - // OutOfMemoryError-s can cause Java applications to enter an - // inconsistent state, so it's better stop the session. - if (stopOnError || catchedExc instanceof OutOfMemoryError) { - throw new ProcessingException(this, sf, catchedExc); - } - } - return true; - } - - private void executeFile(File sf, File df) - throws ProcessingException, DataModelBuildingException, - TemplateException, IOException { - Template template - = fmCfg.getTemplate(FileUtil.pathToUnixStyle( - FileUtil.getRelativePath(srcRoot, sf))); - - String outEnc = getOutputEncoding(); - if (outputEncoding.equalsIgnoreCase(PARAMETER_VALUE_SOURCE)) { - outEnc = template.getEncoding(); - } - - FmppOutputWriter out = new FmppFileOutputWriter(this, df, outEnc); - boolean done = false; - try { - templateEnv.execute(template, out, sf, null, null, null); - done = true; - } finally { - out.close(!done); - } - } - - private void renderXmlFile(File sf, File df) - throws ProcessingException, DataModelBuildingException, - TemplateException, IOException, InstallationException, - GenericProcessingException { - final XmlRenderingConfiguration xrc; - Object loadedDoc = null; // this is an org.w3c.Document - boolean isLoadedDocumentValidated = false; - { - String sfPathForComparison = null; - int xrccln = xmlRendCfgCntrs.size(); - int xrccIdx; - XmlRenderingConfiguration curXRC = null; - findMatchingXRC: for (xrccIdx = 0; xrccIdx < xrccln; xrccIdx++) { - XmlRenderingCfgContainer curXRCC = (XmlRenderingCfgContainer) xmlRendCfgCntrs.get(xrccIdx); - curXRC = curXRCC.xmlRenderingCfg; - - // Filter: ifSourceIs - { - int ln = curXRCC.compiledPathPatterns.length; - if (ln != 0) { - if (sfPathForComparison == null) { - sfPathForComparison = normalizePathForComparison( - FileUtil.pathToUnixStyle( - FileUtil.getRelativePath(srcRoot, sf))); - } - int i; - for (i = 0; i < ln; i++) { - if (curXRCC.compiledPathPatterns[i].matcher(sfPathForComparison).matches()) { - break; - } - } - if (i == ln) { - // curXRC was excluded - continue findMatchingXRC; - } - } - } // end Filter: ifSourceIs - // At this point: we know that "ifSourceIs" doesn't exclude curXRC - - // Filter: ifDocumentElementIs - { - int ln = curXRC.getDocumentElementLocalNames().size(); - if (ln != 0) { - if (loadedDoc == null) { - Object o = curXRC.getXmlDataLoaderOptions().get("validate"); - if (o == null) { - o = getValidateXml() ? Boolean.TRUE : Boolean.FALSE; - } - isLoadedDocumentValidated = Boolean.TRUE.equals(o); - loadXml: while (true) { - try { - loadedDoc = EngineXmlUtils.loadXmlFile( - this, sf, isLoadedDocumentValidated); - } catch (Exception e) { - if (isLoadedDocumentValidated) { - isLoadedDocumentValidated = false; - // Retry without validation: - continue loadXml; - } - throw new DataModelBuildingException( - "Failed to load XML source file.", e); - } - break loadXml; - } - } - // At this point: loadedDoc is non-null - - List localNames = curXRC.getDocumentElementLocalNames(); - List namespaces = curXRC.getDocumentElementNamespaces(); - int i; - for (i = 0; i < ln; i++) { - if (EngineXmlUtils.documentElementEquals( - loadedDoc, - (String) namespaces.get(i), - (String) localNames.get(i))) { - break; - } - } - if (i == ln) { - // curXRC was excluded - continue findMatchingXRC; - } - } - } // end Filter: ifDocumentElementIs - // At this point: we know that "ifDocumentElementIs" doesn't exclude curXRC - - // Nothing has excluded it, so curXRC is matching: - break findMatchingXRC; - } // findRendering - - xrc = xrccIdx != xrccln ? curXRC : null; - } // end find matching XRC - if (xrc == null) { - throw new GenericProcessingException( - "The source file has to be processed in " - + "\"renderXml\" mode, but there is no matching " - + "XML rendering configuration for it. " - + "(Check the if... options of the XML rendering " - + "configurations)"); - } - - if (xrc.getCopy()) { - File dstDir; - dstDir = df.getParentFile(); - if (dstDir != null) { - dstDir.mkdirs(); - } - FileUtil.copyFile(sf, df); - } else { - Object xmlDLValidateOpt = xrc.getXmlDataLoaderOptions().get("validate"); - if (xmlDLValidateOpt == null) { - xmlDLValidateOpt = Boolean.valueOf(getValidateXml()); - } - boolean doctMustBeValidated = Boolean.TRUE.equals(xmlDLValidateOpt); - if (isLoadedDocumentValidated != doctMustBeValidated) { - loadedDoc = null; - } - if (loadedDoc == null) { - try { - loadedDoc = EngineXmlUtils.loadXmlFile(this, sf, doctMustBeValidated); - } catch (Exception e) { - throw new DataModelBuildingException( - "Failed to load the XML source file.", e); - } - } - - TemplateNodeModel wrappedDoc; - List args = new ArrayList(2); - args.add(""); - args.add(xrc.getXmlDataLoaderOptions()); - try { - wrappedDoc = EngineXmlUtils.loadWithXmlDataLoader(this, args, loadedDoc); - } catch (Exception e) { - throw new DataModelBuildingException( - "Failed to load the XML source file.", e); - } - - Template template; - try { - template = fmCfg.getTemplate(xrc.getTemplatePath()); - } catch (IOException e) { - throw new GenericProcessingException( - "Failed to load the template specified by the XML " - + "rendering configuration: " + xrc.getTemplatePath(), - e); - } - - String outEnc = getOutputEncoding(); - if (outputEncoding.equalsIgnoreCase(PARAMETER_VALUE_SOURCE)) { - outEnc = template.getEncoding(); - } - - FmppOutputWriter out = new FmppFileOutputWriter(this, df, outEnc); - boolean done = false; - try { - templateEnv.execute( - template, out, sf, - loadedDoc, wrappedDoc, xrc.getLocalDataBuilders()); - done = true; - } finally { - out.close(!done); - } - } - } - - // ------------------------------------------------------------------------- - // Engine parameters - - public boolean getStopOnError() { - return stopOnError; - } - - public void setStopOnError(boolean stopOnError) { - checkParameterLock(); - this.stopOnError = stopOnError; - } - - /** - * Returns the output root directory. - * This can be null. However, it is never null while a processing session is - * running, since the output root must be specified for successfully start a - * processing session. - * - *

    The returned {@code File} is always a canonical - * {@code File}.

    - */ - public File getOutputRoot() { - return outRoot; - } - - /** - * Sets the root directory of output files. - * If it is null, the output directory will be used if the output is a - * directory, otherwise the parent directory of the output file. - * Initially this engine parameter is null. - */ - public void setOutputRoot(File outputRoot) - throws IOException { - checkParameterLock(); - this.outRoot = outputRoot.getCanonicalFile(); - } - - /** - * Returns the source root directory. - * This can be null. However, it is never null while a processing session is - * runing, since the source root must be specified for successfully start a - * processing session. - * - *

    The returned {@code File} is always a canonical - * {@code File}.

    - */ - public File getSourceRoot() { - return srcRoot; - } - - /** - * Sets the root directory of source files. - * If it is null, the source directory will be used if the source is a - * directory, otherwise the parent directory of the source file. - */ - public void setSourceRoot(File srcRoot) throws IOException { - checkParameterLock(); - if (srcRoot != null) { - this.srcRoot = srcRoot.getCanonicalFile(); - } else { - this.srcRoot = null; - } - } - - /** - * Returns the directory used as data root directory. - * This will be the source root, if the data directory was not set (null). - * Note that the data-root can be null, when the source root is also null. - * However, it is never null while a processing session is runing, since - * the source root must be specified for successfully start a processing - * session. - * - *

    The returned {@code File} is always a canonical - * {@code File}.

    - */ - public File getDataRoot() { - if (dataRoot == null) { - return srcRoot; - } else { - return dataRoot; - } - } - - /** - * Sets the root directory of data files. - * If it is {@code "source"} or {@code null}, then the source - * directory will be used. - */ - public void setDataRoot(File dataRoot) - throws IOException { - checkParameterLock(); - if (dataRoot == null) { - this.dataRoot = null; - } else { - this.dataRoot = dataRoot.getCanonicalFile(); - } - } - - /** - * Adds a FreeMarker link. FreeMarker links are fake files/directories - * visible in the source root directory. They are visible for the predefined - * FreeMarker directives only (thus, not for {@code pp} variables). - * A FreeMarker link acts as an alias or hard-link to another file or - * directory. This is a hack that allows you to - * {@code <#include ...>} or {@code <#import ...>} files - * that are outside the source root directory. - * - *

    The link is visible as a file or directory in the source root - * directory with name {@code @}{@code name}. For example, if the link name - * is {@code "inc"}, then it can be used as - * {@code <#include '/@inc/blah.ftl'>} (assuming the link points - * to a directory that contains file {@code blah.ftl}). - * - *

    In the generic case, a FreeMarker link is associated with a list of - * files/directories, not just with a single file/directory. For example, - * if {@code inc} is associated with {@code /home/joe/inc1} and - * {@code /home/joe/inc2} (in this order), then - * {@code <#include '/@inc/blah.ftl'>} will try to read - * {@code /home/joe/inc1/blah.ftl}, and if that file is missing, - * then {@code /home/joe/inc2/blah.ftl}. You can associate the name with - * multiple files/directories by calling this method with the same name for - * multiple times. The earlier you have added a file/directory, the higher - * its priority is. - * - * @param name the name of fake entry in the source root directory, minus - * the {@code @} prefix. To prevent confusion, the name can't start - * with @. - * @param fileOrDir the file or directory the link will point to. It can be - * a outside the source root directory. - */ - public void addFreemarkerLink(String name, File fileOrDir) - throws IOException { - checkParameterLock(); - if (name == null) { - throw new IllegalArgumentException("The \"name\" argument to the " - + "\"Engine.addIncludeDirectory\" method can't be null."); - } - if (name.startsWith("@")) { - throw new IllegalArgumentException("The \"name\" argument to the " - + "\"Engine.addIncludeDirectory\" method can't start with " - + "@. The @ prefix is used only when you refer to a " - + "FreeMarker link. It is not part of the link name. " - + "For example, if the link name is \"foo\", then you can " - + "refer to it as <#include '/@foo/something.ftl'>."); - } - if (fileOrDir == null) { - throw new IllegalArgumentException("The \"fileOrDir\" argument to " - + "the \"Engine.addIncludeDirectory\" method can't be " - + "null."); - } - fileOrDir = fileOrDir.getCanonicalFile(); - List dirs = (List) freemarkerLinks.get(name); - if (dirs == null) { - dirs = new ArrayList(); - freemarkerLinks.put(name, dirs); - } - dirs.add(fileOrDir); - } - - /** - * Returns the list of files associated with a FreeMarker link name. - * - * @param name the name of the link (do not use the {@code @} preifx) - * - * @return the list of canonical files associated with this link, or - * {@code null}, if no FreeMarker link with the given name exist. - */ - public List getFreemarkerLink(String name) { - return (List) freemarkerLinks.get(name); - } - - /** - * Removes all FreeMarker links. - * - * @see #addFreemarkerLink(String, File) - */ - public void clearFreemarkerLinks() { - checkParameterLock(); - freemarkerLinks.clear(); - } - - /** - * Adds a progress listener to the list of progress listeners. - * All progress listeners of the list will be invoked on the events of the - * engine. - * - *

    If you want a local data loader or engine attribute to listen engine - * events, do not add it with this method. It will be automatically - * notified about events, they need not be added here. - * - *

    Note that if you try to add the same object for multiple times, the - * object will added only in the first occasion. - */ - public void addProgressListener(ProgressListener listener) { - checkParameterLock(); - this.progListeners.addUserListener(listener); - } - - /** - * Removes all progress listeners from the list of progress listeners that - * were added with {@link #addProgressListener}. It does not affect - * other listening objects, as local data loaders or engine attributes. - */ - public void clearProgressListeners() { - checkParameterLock(); - progListeners.clearUserListeners(); - } - - /** - * Sets the class that will be instantiated to create the template specfic - * variables. - * - * @see TemplateDataModelBuilder - */ - public void setTemplateDataModelBuilder( - TemplateDataModelBuilder tdmBuilder) { - checkParameterLock(); - this.tdmBuilder = tdmBuilder; - } - - /** - * @see #setTemplateDataModelBuilder(TemplateDataModelBuilder) - */ - public void setTemplateDataModelBuilder(String className) - throws DataModelBuildingException { - - checkParameterLock(); - - Class clazz; - try { - clazz = Class.forName(className); - } catch (ClassNotFoundException exc) { - throw new DataModelBuildingException( - "Template data builder class not found: " + className); - } - - if (clazz.isInterface()) { - throw new DataModelBuildingException( - "Template data builder class must be a class, but this " - + "is an interface: " + clazz.getName()); - } - - if (!(TemplateDataModelBuilder.class) - .isAssignableFrom(clazz)) { - throw new DataModelBuildingException( - "Template data builder class must implement " - + "TemplateDataModelBuilder interface, " - + "but this class doesn't implement that: " - + clazz.getName()); - } - try { - this.setTemplateDataModelBuilder( - (TemplateDataModelBuilder) clazz.newInstance()); - } catch (InstantiationException exc) { - throw new DataModelBuildingException( - "Failed to create an instance of " - + clazz.getName() + ": " - + exc, exc); - } catch (IllegalAccessException exc) { - throw new DataModelBuildingException( - "Failed to create an instance of " - + clazz.getName() + ": " - + exc, exc); - } - } - - /** - * @see #setTemplateDataModelBuilder(TemplateDataModelBuilder) - */ - public TemplateDataModelBuilder getTemplateDataModelBuilder() { - return tdmBuilder; - } - - /** - * Sets the encoding (charset) of textual source files. - * Note that according to FreeMarker rules, this can be overridden in a - * template with {@code <#ftl encoding="...">}. - * - *

    Initially the encoding is ISO-8859-1. - * - * @param encoding The encoding, or {@code "host"} if the default - * encoding ({@code file.encoding} system property) of the host - * machine should be used. {@code null} is the same as - * {@code "host"}. - */ - public void setSourceEncoding(String encoding) { - checkParameterLock(); - if (encoding == null || encoding.equals(PARAMETER_VALUE_HOST)) { - fmCfg.setDefaultEncoding(System.getProperty("file.encoding")); - } else { - fmCfg.setDefaultEncoding(encoding); - } - } - - /** - * Returns the source encoding used for the template files. - * This is not {@code null} or {@code "host"}; this is always - * a concrete encoding, such as {@code "UTF-8"}. - */ - public String getSourceEncoding() { - return fmCfg.getDefaultEncoding(); - } - - /** - * Sets the locale (country, language). - * - *

    Initially the locale is {@code en_US}. - * - * @param locale The locale, or null if the default locale of the host - * machine should be used. - */ - public void setLocale(Locale locale) { - checkParameterLock(); - if (locale == null) { - fmCfg.setLocale(Locale.getDefault()); - } else { - fmCfg.setLocale(locale); - } - } - - /** - * Sets the locale (country, language). - * - *

    Initially the locale is {@code en_US}. - * - * @param locale The locale, or "host" if the default locale of the host - * machine should be used. Null is the same as "host". - */ - public void setLocale(String locale) { - checkParameterLock(); - if (locale == null || locale.equals(PARAMETER_VALUE_HOST)) { - fmCfg.setLocale(Locale.getDefault()); - } else { - String codes[] = StringUtil.split(locale + "__", '_'); - fmCfg.setLocale(new Locale(codes[0], codes[1], codes[2])); - } - } - - /** - * Returns the actual (non-null) locale in use. - */ - public Locale getLocale() { - return fmCfg.getLocale(); - } - - /** - * Sets if the {@code #} is required in FTL tags or not. - * In the old template syntax {@code #} was not required. - * The default and recommended value for this engine parameter is - * {@code false}. - */ - public void setOldTemplateSyntax(boolean oldSyntax) { - checkParameterLock(); - fmCfg.setStrictSyntaxMode(!oldSyntax); - } - - /** - * @see #setOldTemplateSyntax - */ - public boolean getOldTemplateSyntax() { - return !fmCfg.getStrictSyntaxMode(); - } - - /** - * Sets the {@code tagSyntax} setting of FreeMarker. - * The recommendend value for new projects is - * {@link Configuration#AUTO_DETECT_TAG_SYNTAX}, the defalt with - * FreeMarker 2.3.x is {@link Configuration#ANGLE_BRACKET_TAG_SYNTAX}, - * the default with FreeMarker 2.4 and later is - * {@link Configuration#AUTO_DETECT_TAG_SYNTAX}. - */ - public void setTagSyntax(int tagSyntax) { - checkParameterLock(); - fmCfg.setTagSyntax(tagSyntax); - } - - /** - * @see #setTagSyntax(int) - */ - public int getTagSyntax() { - return fmCfg.getTagSyntax(); - } - - /** - * Sets the encoding used for textural output (template generated files). - * By default it is {@code "source"}. - * - * @param outputEncoding The name of encoding. If it is - * {@code "source"}, then the encoding of the source (template - * file) will be used for the output. {@code null} is the same as - * {@code "source"}. If it is {@code "host"} then the - * default encoding of the host machine will be used. - */ - public void setOutputEncoding(String outputEncoding) { - checkParameterLock(); - if (outputEncoding == null) { - this.outputEncoding = PARAMETER_VALUE_SOURCE; - } else if (outputEncoding.equals(PARAMETER_VALUE_HOST)) { - this.outputEncoding = System.getProperty("file.encoding"); - } else { - this.outputEncoding = outputEncoding; - } - } - - /** - * Retruns the output encoding used; It can be {@code "source"} - * (since that can't be resolved to a concrete charset), but never - * {@code null} or {@code "host"}. - */ - public String getOutputEncoding() { - return outputEncoding; - } - - /** - * Sets the charset used for URL escaping. By default it is - * {@code "output"}. - * - * @param urlEscapingCharset The name of charset (encoding) that is used - * for URL escaping. If it is {@code "output"}, then the encoding - * of the output will be used. {@code null} is the same as - * {@code "output"}. If it is {@code "host"} then the - * default encoding of the host machine will be used. - */ - public void setUrlEscapingCharset(String urlEscapingCharset) { - checkParameterLock(); - if (urlEscapingCharset == null - || urlEscapingCharset.equals(PARAMETER_VALUE_OUTPUT)) { - this.urlEscapingCharset = PARAMETER_VALUE_OUTPUT; - fmCfg.setURLEscapingCharset(null); - } else if (urlEscapingCharset.equals(PARAMETER_VALUE_HOST)) { - this.urlEscapingCharset = System.getProperty("file.encoding"); - fmCfg.setURLEscapingCharset(this.urlEscapingCharset); - } else { - this.urlEscapingCharset = urlEscapingCharset; - fmCfg.setURLEscapingCharset(this.urlEscapingCharset); - } - } - - /** - * Retruns the output encoding used; It can be {@code "output"} - * (since that can't be resolved to a concrete charset), but never - * {@code null}. - */ - public String getUrlEscapingCharset() { - return urlEscapingCharset; - } - - /** - * Sets the number format used to convert numbers to strings, as defined - * by {@link Configuration#setNumberFormat(String)}. - * At least on FreeMarker 2.3.21, this is a pattern as {@link java.text.DecimalFormat} defines it, - * or the reserved values {@code "number"} or {@code "currency"}. - */ - public void setNumberFormat(String format) { - checkParameterLock(); - fmCfg.setNumberFormat(format); - } - - /** - * Sets the boolean format used to convert boolean to strings, as defined - * by {@link Configuration#setBooleanFormat(String)}. Note that it can't be {@code "true,false"}; for that you have - * to print the boolean value with ${foo?c}. - */ - public void setBooleanFormat(String format) { - checkParameterLock(); - fmCfg.setBooleanFormat(format); - } - - /** - * @see #setNumberFormat - */ - public String getNumberFormat() { - return fmCfg.getNumberFormat(); - } - - /** - * Sets the format used to convert date values (year + month + day) to - * strings. - * See {@link Configuration#setDateFormat(String)} in the FreeMarker API - * for more information. - * - *

    The default is the format suggested by the underlying Java platform - * implementation for the current locale. - */ - public void setDateFormat(String format) { - checkParameterLock(); - fmCfg.setDateFormat(format); - } - - /** - * @see #setDateFormat - */ - public String getDateFormat() { - return fmCfg.getDateFormat(); - } - - /** - * Sets the format used to convert time values (hour + minute + second - * + millisecond) to strings. - * See {@link Configuration#setTimeFormat(String)} in the FreeMarker API - * for more information. - * - *

    The default is the format suggested by the underlying Java platform - * implementation for the current locale. - */ - public void setTimeFormat(String format) { - checkParameterLock(); - fmCfg.setTimeFormat(format); - } - - /** - * @see #setTimeFormat - */ - public String getTimeFormat() { - return fmCfg.getTimeFormat(); - } - - /** - * Sets the format used to convert date-time values (year + month + day + - * hour + minute + second + millisecond) to strings. - * See {@link Configuration#setDateTimeFormat(String)} in the FreeMarker API - * for more information. - * - *

    The default is the format suggested by the underlying Java platform - * implementation for the current locale. - */ - public void setDateTimeFormat(String format) { - checkParameterLock(); - fmCfg.setDateTimeFormat(format); - } - - /** - * @see #setDateTimeFormat - */ - public String getDateTimeFormat() { - return fmCfg.getDateTimeFormat(); - } - - /** - * Sets the time zone used to display date/time/date-time values. - * See FreeMarker's {@link Configuration#setTimeZone(TimeZone)} for more information. - */ - public void setTimeZone(TimeZone zone) { - checkParameterLock(); - fmCfg.setTimeZone(zone); - } - - /** - * Same as {@link #setTimeZone(TimeZone)}, but lets FreeMarker parse the value to time zone. If the value comes - * from a string source anyway, it's recommended to use this instead of the other overload. - */ - public void setTimeZone(String zone) { - checkParameterLock(); - try { - fmCfg.setSetting(Configuration.TIME_ZONE_KEY, zone); - } catch (TemplateException e) { - throw new RuntimeException("Failed to set timeZone in FreeMarker Configuration", e); - } - } - - /** - * Sets the time zone used when dealing with {@link java.sql.Date java.sql.Date} and - * {@link java.sql.Time java.sql.Time} values. - * See FreeMarker's {@link Configuration#setSQLDateAndTimeTimeZone(TimeZone)} for more information. - */ - public void setSQLDateAndTimeTimeZone(TimeZone zone) { - checkParameterLock(); - fmCfg.setSQLDateAndTimeTimeZone(zone); - } - - /** - * Same as {@link #setSQLDateAndTimeTimeZone(TimeZone)}, but lets FreeMarker parse the value to time zone. If - * the value comes from a string source anyway, it's recommended to use this instead of the other overload. - */ - public void setSQLDateAndTimeTimeZone(String zone) { - checkParameterLock(); - try { - fmCfg.setSetting(Configuration.SQL_DATE_AND_TIME_TIME_ZONE_KEY, zone); - } catch (TemplateException e) { - throw new RuntimeException("Failed to set timeZone in FreeMarker Configuration", e); - } - } - - /** - * @see #setTimeZone - */ - public TimeZone getTimeZone() { - return fmCfg.getTimeZone(); - } - - /** - * Adds a new entry to the end of path-pattern -> processing-mode - * mapping list. - * @param pattern a path pattern as "*.txt" or - * "/docs/**/item_??.xml". - * You have to use slash (/) or backslash (\) or the platform specific - * separator to spearate directories. - * @param pmode the mode in which you want to process the files. Use the - * {@code PMODE_...} constants. - */ - public void addModeChooser( - String pattern, int pmode) { - checkParameterLock(); - - PModeChooser chooser = new PModeChooser(pattern); - - if (pmode == PMODE_EXECUTE || pmode == PMODE_RENDER_XML - || pmode == PMODE_COPY || pmode == PMODE_IGNORE) { - chooser.pMode = pmode; - } else { - throw new IllegalArgumentException( - "Illegal processing mode was passed to " - + "Engine.addProcessingModeChooser: " + pmode); - } - - pModeChoosers.add(chooser); - } - - /** - * Adds a new entry to the end of path-pattern -> header mapping list of - * layer 0. - * - * @deprecated Use {@link #addHeaderChooser(int, String, String)} instead. - */ - public void addHeaderChooser(String pattern, String header) { - checkParameterLock(); - headerChoosers.addChooser(0, pattern, header); - } - - /** - * Adds a new entry to the end of path-pattern -> header mapping list of the - * given layer. Layers are indexed from 0. The lower the layer index is, - * the earlier the header occurs in the text. - */ - public void addHeaderChooser(int layer, String pattern, String footer) { - checkParameterLock(); - headerChoosers.addChooser(layer, pattern, footer); - } - - /** - * Adds a new entry to the end of path-pattern -> footer mapping list of - * layer 0. - * - * @deprecated Use {@link #addFooterChooser(int, String, String)} instead. - */ - public void addFooterChooser(String pattern, String footer) { - checkParameterLock(); - footerChoosers.addChooser(0, pattern, footer); - } - - /** - * Adds a new entry to the end of path-pattern -> footer mapping list of the - * given layer. Layers are indexed from 0. The lower the layer index is, - * the later the footer occurs in the text. - */ - public void addFooterChooser(int layer, String pattern, String footer) { - checkParameterLock(); - footerChoosers.addChooser(layer, pattern, footer); - } - - /** - * Adds a new entry to the end of path-pattern -> turn-number mapping list. - */ - public void addTurnChooser(String pattern, int turn) { - checkParameterLock(); - TurnChooser chooser = new TurnChooser(pattern); - chooser.turn = turn; - turnChoosers.add(chooser); - } - - /** - * Removes all processing mode choosers. This is the initial state after - * the instantiation of {@link Engine} (i.e. no processing mode - * choosers). - */ - public void clearModeChoosers() { - checkParameterLock(); - pModeChoosers.clear(); - } - - /** - * Removes all header choosers. - */ - public void clearHeaderChoosers() { - checkParameterLock(); - headerChoosers.clear(); - } - - /** - * Removes all footer choosers. - */ - public void clearFooterChoosers() { - checkParameterLock(); - footerChoosers.clear(); - } - - /** - * Removes all turn choosers. - */ - public void clearTurnChoosers() { - checkParameterLock(); - turnChoosers.clear(); - } - - /** - * Sets if the engine differentiates upper- and lower-case letters when it - * compares paths or matches path patterns with paths. False by default - * (ignores case). - */ - public void setCaseSensitive(boolean cs) { - checkParameterLock(); - if (csPathCmp != cs) { - csPathCmp = cs; - - // Re-prase re-s in choosers. - Iterator it; - it = pModeChoosers.iterator(); - while (it.hasNext()) { - ((Chooser) it.next()).recompile(); - } - it = turnChoosers.iterator(); - while (it.hasNext()) { - ((Chooser) it.next()).recompile(); - } - it = xmlRendCfgCntrs.iterator(); - while (it.hasNext()) { - ((XmlRenderingCfgContainer) it.next()).recompile(); - } - headerChoosers.recompile(); - footerChoosers.recompile(); - localDataBuilders.recompile(); - } - } - - /** - * @see #setCaseSensitive - */ - public boolean getCaseSensitive() { - return csPathCmp; - } - - /** - * Allows some features that are considerd dangerous. - * These are currently: - *

      - *
    • The source and the output file is the same - *
    - */ - public void setExpertMode(boolean expertMode) { - checkParameterLock(); - this.expertMode = expertMode; - } - - /** - * @see #setExpertMode - */ - public boolean getExpertMode() { - return expertMode; - } - - /** - * Adds a postfix to the list of file name postfixes to remove. - * If the source file name before the first dot ends with a string in the - * list, then it will be removed from the output file name. For example, - * if "_t" is in the list, then the output file for "example_t.html" will - * be "example.html". If the file name does not contains dot, then it - * still works: "example_t" will become to "example". - * - * @param postfix the postfix to remove. Can't be null or empty - * string, and can't contain dot. - */ - public void addRemovePostfix(String postfix) { - checkParameterLock(); - if (postfix == null || postfix.length() == 0) { - throw new IllegalArgumentException( - "engine parameter \"remove postfix\" can't be empty " - + "string"); - } - if (postfix.indexOf(".") != -1) { - throw new IllegalArgumentException( - "engine parameter \"remove postfix\" can't contain dot: " - + postfix); - } - removePostfixes.add(postfix); - } - - /** - * Adds an extension to the list of extensions to remove. - * If the source file name ends with an extension in the list, then it will - * be removed from the output file name. For example, - * if "t" is in the list, then the output file for "example.html.t" will - * be "example.html". The extension to remove can contain dots (as tar.gz). - * - * @param extension the extension to remove without the dot. Can't be - * null or empty string, and can't start with dot. - */ - public void addRemoveExtension(String extension) { - checkParameterLock(); - checkExtension("remove extension", extension); - removeExtensions.add(extension); - } - - /** - * Adds an old-exension -> new-extension pair to the list of - * extension replacements. - * If a source file name ends with the old extension, then it will - * be replaced with the new extension in the output file name. - * - * @param oldExtension the old extension without the preceding dot. - * @param newExtension the new extension without the preceding dot. - */ - public void addReplaceExtension( - String oldExtension, String newExtension) { - checkParameterLock(); - checkExtension("replace extension", oldExtension); - checkExtension("replace extension", newExtension); - replaceExtensions.add(new String[] {oldExtension, newExtension}); - } - - private void checkExtension(String paramName, String extension) { - if (extension == null || extension.length() == 0) { - throw new IllegalArgumentException( - "Problem with engine parameter \"" + paramName - + "\": extension can't be empty string"); - } - if (extension.startsWith(".")) { - throw new IllegalArgumentException( - "Problem with parameter \"" + paramName - + "\": extension can't start with dot: " - + extension); - } - } - - public void clearRemovePostfixes() { - checkParameterLock(); - removePostfixes.clear(); - } - - public void clearRemoveExtensions() { - checkParameterLock(); - removeExtensions.clear(); - } - - public void clearReplaceExtensions() { - checkParameterLock(); - replaceExtensions.clear(); - } - - /** - * Sets the {@link Engine} should automatically process the files and - * directories inside a directory whose processing was asked through the - * public {@link Engine} API. Defaults to {@code true}. It is set to - * {@code false} by front-ends that explicitly specify the list of - * source files and source directories, rather than expecting the - * {@link Engine} to discover them. - */ - public void setDontTraverseDirectories(boolean dontTraverseDirs) { - checkParameterLock(); - this.dontTraverseDirs = dontTraverseDirs; - } - - public boolean getDontTraverseDirectories() { - return dontTraverseDirs; - } - - /** - * Sets what source file can be skipped if it was not modified after the - * last modification time of the output file. Also, if the output is not - * existing, the source file will be processed. Note that this feature will - * not work for templates that rename or drop the original output file - * during the template execution. - * - *

    The initial value of this engine parameter is {@code SKIP_NONE}. - * - * @param skipWhat a {@code SKIP_...} contant. - */ - public void setSkipUnchanged(int skipWhat) { - checkParameterLock(); - this.skipUnchanged = skipWhat; - } - - public int getSkipUnchanged() { - return skipUnchanged; - } - - /** - * Sets whether for source directories a corresponding output directory - * will be created even if no file output went into it. Defaults to - * {@code false}. - * - *

    Notes: - *

      - *
    • Even if this is set to {@code true}, if - * a directory contains an {@code ignoredir.fmpp} file, it will not - * create output directory. - *
    • If the directory contains a file called {@code createdir.fmpp}, - * the directory will be created even if this setting is - * {@code false}. - *
    - */ - public void setAlwaysCreateDirectories(boolean enable) { - checkParameterLock(); - alwaysCrateDirs = enable; - } - - public boolean getAlwaysCreateDirectories() { - return alwaysCrateDirs; - } - - /** - * Sets if the CVS files inside the source root directory should be - * ignored or not. This engine parameter is initially true. - * - *

    The CVS files are: {@code **}{@code /.cvsignore}, - * {@code **}{@code /CVS/**} and {@code **}{@code /.#*} - */ - public void setIgnoreCvsFiles(boolean ignoreCvsFiles) { - checkParameterLock(); - this.ignoreCvsFiles = ignoreCvsFiles; - } - - public boolean getIgnoreCvsFiles() { - return ignoreCvsFiles; - } - - /** - * Sets if the SVN files inside the source root directory should be - * ignored or not. This engine parameter is initially true. - * - *

    The SVN files are: {@code **}{@code /SVN/**} - */ - public void setIgnoreSvnFiles(boolean ignoreSvnFiles) { - checkParameterLock(); - this.ignoreSvnFiles = ignoreSvnFiles; - } - - public boolean getIgnoreSvnFiles() { - return ignoreSvnFiles; - } - - /** - * Set if well-known temporary files inside the source root directory should - * be ignored or not. For the list of well-known temporary file patterns, - * read the FMPP Manual. - */ - public void setIgnoreTemporaryFiles( - boolean ignoreTemporaryFiles) { - checkParameterLock(); - this.ignoreTemporaryFiles = ignoreTemporaryFiles; - } - - public boolean getIgnoreTemporaryFiles() { - return ignoreTemporaryFiles; - } - - /** - * Sets if which XPath engine should be used. - * @param xpathEngine one of the {@code XPATH_ENGINE_...} constants, - * or a class name. - */ - public void setXpathEngine(String xpathEngine) { - checkParameterLock(); - this.xpathEngine = xpathEngine; - } - - public String getXpathEngine() { - return xpathEngine; - } - - /** - * Sets the XML entiry resolver used for reading XML documents. - * - * The default value is {@code null}. - * - * @param xmlEntityResolver it must implement - * {@link org.xml.sax.EntityResolver org.xml.sax.EntityResolver} (it was declared as - * {@code Object} to prevent linkage errors when XML related - * features are not used on pre-1.4 Java), or it must be {@code null}. - */ - public void setXmlEntityResolver(Object xmlEntityResolver) - throws InstallationException { - checkParameterLock(); - if (xmlEntityResolver != null) { - if (!EngineXmlUtils.isEntityResolver(xmlEntityResolver)) { - throw new IllegalArgumentException( - "The argument to Engine.setXmlEntiryResolver " - + "must implement org.xml.sax.EntityResolver. " - + "The class of the argument was " - + xmlEntityResolver.getClass().getName() + "."); - } - } - this.xmlEntityResolver = xmlEntityResolver; - } - - /** - * Gets the XML entiry resolver used for reading XML documents. - * @return {@code null} of no resolver is used, or an - * {@link org.xml.sax.EntityResolver org.xml.sax.EntityResolver} (it was declared as - * {@code Object} to prevent linkage errors when XML related - * features are not used on pre-1.4 Java). - */ - public Object getXmlEntiryResolver() { - return xmlEntityResolver; - } - - /** - * Sets if XML documents should be validated when they are loaded. - * Defaults to {@code true}. - */ - public void setValidateXml(boolean validateXml) { - checkParameterLock(); - this.validateXml = validateXml; - } - - public boolean getValidateXml() { - return validateXml; - } - - /** - * Adds as XML rendering configuration. - */ - public void addXmlRenderingConfiguration( - XmlRenderingConfiguration xmlRendering) { - if (xmlRendering.getTemplatePath() == null && !xmlRendering.getCopy()) { - throw new IllegalArgumentException( - "Illegal XmlRenderingConfiguration: " - + "Either \"template\" must be non-null, or \"copy\" must " - + "be true."); - } - xmlRendCfgCntrs.add(new XmlRenderingCfgContainer(xmlRendering)); - - List ldbs = xmlRendering.getLocalDataBuilders(); - int ln = ldbs.size(); - for (int i = 0; i < ln; i++) { - Object o = ldbs.get(i); - if (o instanceof ProgressListener) { - progListeners.addXmlLdbListener((ProgressListener) o); - } - } - } - - /** - * Removes all XML rendering configurations. - */ - public void clearXmlRenderingConfigurations() { - xmlRendCfgCntrs.clear(); - progListeners.clearXmlLdbListeners(); - } - - // ------------------------------------------------------------------------- - // Shared variables - - /** - * Adds a variable that will be visible for all templates when the - * processing session executes. - */ - public void addData(String name, Object value) { - checkParameterLock(); - data.put(name, value); - } - - /** - * Convenience method for adding a {@link Byte} object. - * @see #addData(String, Object) - */ - public void addData(String name, byte value) { - checkParameterLock(); - data.put(name, new Byte(value)); - } - - /** - * Convenience method for adding a {@link Short} object. - * @see #addData(String, Object) - */ - public void addData(String name, short value) { - checkParameterLock(); - data.put(name, new Short(value)); - } - - /** - * Convenience method for adding a {@link Integer} object. - * @see #addData(String, Object) - */ - public void addData(String name, int value) { - checkParameterLock(); - data.put(name, new Integer(value)); - } - - /** - * Convenience method for adding a {@link Long} object. - * @see #addData(String, Object) - */ - public void addData(String name, long value) { - checkParameterLock(); - data.put(name, new Long(value)); - } - - /** - * Convenience method for adding a {@link Float} object. - * @see #addData(String, Object) - */ - public void addData(String name, float value) { - checkParameterLock(); - data.put(name, new Float(value)); - } - - /** - * Convenience method for adding a {@link Double} object. - * @see #addData(String, Object) - */ - public void addData(String name, double value) { - checkParameterLock(); - data.put(name, new Double(value)); - } - - /** - * Convenience method for adding a {@link Character} object. - * @see #addData(String, Object) - */ - public void addData(String name, char value) { - checkParameterLock(); - data.put(name, new Character(value)); - } - - /** - * Convenience method for adding a {@link Boolean} object. - * @see #addData(String, Object) - */ - public void addData(String name, boolean value) { - checkParameterLock(); - data.put(name, value ? Boolean.TRUE : Boolean.FALSE); - } - - /** - * Adds all entries with {@link #addData(String, Object)}. - * The name of the variable will be the key of the map entry, - * and its value will be the value of the map entry. - */ - public void addData(Map map) { - checkParameterLock(); - data.putAll(map); - } - - /** - * Removes all data. - * - * @see #addData(String, Object) - */ - public void clearData() { - checkParameterLock(); - data.clear(); - } - - /** - * Gets the value of a variable. This method accesses the variables that - * are visible for all templates. It corresponds to setting {@code data}. - * - *

    Warning! When the processing session is executing, you must - * not modify the returned object. - * - * @return {@code null} if no such variable exist. - * Values are returned exactly as they were added, that is, without - * FreeMarker's wrapping (but note that some variables initially use - * FreeMarker {@link TemplateModel} types, such as variables created by - * some of the data loaders). - * - * @see #addData(String, Object) - */ - public Object getData(String name) { - return data.get(name); - } - - /** - * Removes a variable that would be visible for all templates when the - * processing session executes. I does nothing if there is no variable - * exists for the given name. - * - * @return the removed value, or {@code null} if there was no value - * stored for the given name. - * - * @see #addData(String, Object) - */ - public Object removeData(String name) { - return data.remove(name); - } - - /** - * @deprecated Use {@link #clearData()} instead. - */ - public void clearSharedVariables() { - clearData(); - } - - /** - * Adds a local data builder. The local data builder will be invoked - * directly before the execution of templates (if the - * {@code pathPattern} matches the source file path). - * - * @param layer the index of the layer, stating from 0. 0 is the layer with - * the highest priority. - * @param pathPattern the path pattern of source files where this local - * data builder will be used. - * @param builder the local data builder object. - */ - public void addLocalDataBuilder( - int layer, String pathPattern, LocalDataBuilder builder) { - if (builder == null) { - throw new IllegalArgumentException( - "Argument \"builder\" to addLocalDataBuilder can't be null."); - } - localDataBuilders.addChooser(layer, pathPattern, builder); - if (builder instanceof ProgressListener) { - progListeners.addLdbListener((ProgressListener) builder); - } - } - - /** - * Removes all local data builders. - * - * @see #addLocalDataBuilder(int, String, LocalDataBuilder) - */ - public void clearLocalDataBuilders() { - localDataBuilders.clear(); - progListeners.clearLdbListeners(); - } - - // ------------------------------------------------------------------------- - // Misc public - - /** - * Converts an {@code ProgressListener.EVENT_...} constant to English - * text. - */ - public static String getProgressListenerEventName(int event) { - if (event == ProgressListener.EVENT_BEGIN_FILE_PROCESSING) { - return "begin file processing"; - } else if (event == ProgressListener.EVENT_BEGIN_PROCESSING_SESSION) { - return "begin processing session"; - } else if (event == ProgressListener.EVENT_END_FILE_PROCESSING) { - return "end file processing"; - } else if (event == ProgressListener.EVENT_END_PROCESSING_SESSION) { - return "end processing session"; - } else if (event == ProgressListener.EVENT_IGNORING_DIR) { - return "ignoring dir"; - } else if (event == ProgressListener.EVENT_SOURCE_NOT_MODIFIED) { - return "source not modified"; - } else if (event == ProgressListener.EVENT_WARNING) { - return "warning"; - } else { - return "event code " + event; - } - } - - /** - * Wraps any object as {@link TemplateModel}. - */ - public TemplateModel wrap(Object obj) throws TemplateModelException { - return fmCfg.getObjectWrapper().wrap(obj); - } - - /** - * Returns the {@link TemplateEnvironment}. - * - * The template environment is available with this method only when a - * template execution is in progress, or when a - * {@link TemplateDataModelBuilder} (deprecated) is running. - * - * @throws IllegalStateException if the template environment is not - * available. - */ - public TemplateEnvironment getTemplateEnvironment() { - if (templateEnv.isExternallyAccessible()) { - return templateEnv; - } else { - throw new IllegalStateException( - "You can't get the TemplateEnvironment, since no " - + "template execution is in progress currently."); - } - } - - /** - * Tells if {@link #getTemplateEnvironment()} will throw exception or not. - */ - public boolean isTemplateEnvironmentAvailable() { - return templateEnv.isExternallyAccessible(); - } - - /** - * Adds/replaces an engine attribute. - * Attributes are arbitrary key-value pairs that are associated with the - * {@link Engine} object. FMPP reserves all keys starting with - * {@code fmpp.} for its own use. Attributes are not understood by the - * {@link Engine}, but by data loaders, local data builders, and tools that - * create them. - * - *

    Attributes can be changed (replaced, removed, ...etc.) while the - * processing session is executing. - * - * @param name the name of the attribute. To prevent name - * clashes, it should follow the naming convention of Java classes, e.g. - * {@code "com.example.someproject.something"}. - * @param value the value of the attribute. If it implements - * {@link ProgressListener}, then it will receive notifications about - * the events of the {@link Engine}. If attribute(s) with that value is - * (are) removed, then the value object doesn't receive more - * notifications. - * @return The previous value of the attribute, or {@code null} if - * there was no attribute with the given name. - */ - public Object setAttribute(String name, Object value) { - Object oldValue = attributes.put(name, value); - if (value instanceof ProgressListener) { - progListeners.addAttrListener((ProgressListener) value); - } - if (oldValue instanceof ProgressListener) { - if (!MiscUtil.mapContainsObject(attributes, oldValue)) { - progListeners.removeAttrListener((ProgressListener) oldValue); - } - } - return oldValue; - } - - /** - * Reads an engine attribute. - * - * @see #setAttribute(String, Object) - * - * @return {@code null} if no attribute exists with the given name. - */ - public Object getAttribute(String name) { - return attributes.get(name); - } - - /** - * Removes an attribute. It does nothing if the attribute does not exist. - * - * @see #setAttribute(String, Object) - * - * @return The value of the removed attribute or {@code null} if there - * was no attribute with the given name. - */ - public Object removeAttribute(String name) { - Object oldValue = attributes.remove(name); - if (oldValue instanceof ProgressListener) { - if (!MiscUtil.mapContainsObject(attributes, oldValue)) { - progListeners.removeAttrListener((ProgressListener) oldValue); - } - } - return oldValue; - } - - /** - * Removes all attributes. - * - * @see #setAttribute(String, Object) - */ - public void clearAttribues() { - progListeners.clearAttrListeners(); - attributes.clear(); - } - - /** - * Returns the FMPP version number string. FMPP version number string - * follows the {@code major.minor.sub} or {@code major.minor.sub.nightly} - * format, where each part (separated by dots) is an non-negative integer - * number. - */ - public static String getVersionNumber() { - if (cachedVersion == null) { - loadVersionInfo(); - } - return cachedVersion; - } - - /** - * Returns FMPP build info. This is usually the date of the build, but it - * can be anything. - */ - public static String getBuildInfo() { - if (cachedBuildInfo == null) { - loadVersionInfo(); - } - return cachedBuildInfo; - } - - public static String getFreeMarkerVersionNumber() { - return Configuration.getVersionNumber(); - } - - /** - * Quickly tells if XML support is available. - */ - public boolean isXmlSupportAvailabile() { - if (chachedXmlSupportAvailable != null) { - return chachedXmlSupportAvailable.booleanValue(); - } else { - try { - MiscUtil.checkXmlSupportAvailability(null); - } catch (InstallationException e) { - chachedXmlSupportAvailable = Boolean.FALSE; - return false; - } - chachedXmlSupportAvailable = Boolean.TRUE; - return true; - } - } - - /** - * Checks if XML support is available. It can be quicker than - * {@link MiscUtil#checkXmlSupportAvailability(String)}, so rather use this. - * - * @param requiredForThis a short sentence that describes for human reader - * if for what do we need the XML support (e.g. - * {@code "Usage of xml data loader."} or - * {@code "Set XML entity resolver."}). This sentence is used - * in error message of the {@link fmpp.util.InstallationException}. - * Can be {@code null}. - * - * @throws InstallationException if the XML support is not available. - */ - public void checkXmlSupportAvailability(String requiredForThis) - throws InstallationException { - if (chachedXmlSupportAvailable != null - && chachedXmlSupportAvailable.booleanValue()) { - return; - } - try { - MiscUtil.checkXmlSupportAvailability(requiredForThis); - } catch (InstallationException e) { - chachedXmlSupportAvailable = Boolean.FALSE; - throw e; - } - chachedXmlSupportAvailable = Boolean.TRUE; - } - - // ------------------------------------------------------------------------- - // Package - - void sendWarning(File srcFile, String message) { - try { - progListeners.notifyProgressEvent( - this, - ProgressListener.EVENT_WARNING, - srcFile, PMODE_NONE, - null, message); - } catch (ProcessingException e) { - ; // ignore - } - } - - Reader wrapReader(Reader r, File f) throws IOException { - List headers = headerChoosers.choose(f); - List footers = footerChoosers.choose(f); - int hc = headers.size(); - int fc = footers.size(); - if (hc == 0 && fc == 0) { - return r; - } else { - int i; - String header; - String footer; - StringBuffer sb = null; - - if (hc != 0) { - if (hc == 1) { - header = (String) headers.get(0); - } else { - sb = new StringBuffer(40 + hc * 80); - for (i = 0; i < hc; i++) { - sb.append((String) headers.get(i)); - } - header = sb.toString(); - } - header = moveHeaderAfterTheFtlDirective(header, r); - } else { - header = null; - } - - if (fc != 0) { - if (fc == 1) { - footer = (String) footers.get(0); - } else { - if (sb == null) { - sb = new StringBuffer(40 + fc * 80); - } else { - sb.setLength(0); - } - for (i = fc - 1; i >= 0; i--) { - sb.append((String) footers.get(i)); - } - footer = sb.toString(); - } - } else { - footer = null; - } - - return new BorderedReader(header, r, footer); - } - } - - List getLocalDataBuildersForFile(File sf) throws IOException { - return localDataBuilders.choose(sf); - } - - Pattern pathPatternToRegexpPattern (String path) { - String originalPattern = path; - - path = FileUtil.pathToUnixStyle(path); - if (!csPathCmp) { - path = path.toLowerCase(); - } - path = FileUtil.pathPatternToPerl5Regex(path); - try { - return Pattern.compile(path); - } catch (PatternSyntaxException exc) { - throw new BugException( - "Failed to parse path pattern: " + originalPattern, - exc); - } - } - - // ------------------------------------------------------------------------- - // Private - - private static final int MAX_WBLN = 64; - - /** - * Moves the header after the {@code <#ftl ...>} if that exists. - * The returned header should by used instead of the parameter header. - * The reader's "position" will be increased, but the readen characters - * are added to the new header, so they don't lose. - */ - private String moveHeaderAfterTheFtlDirective(String header, Reader r) - throws IOException { - StringBuffer sb = new StringBuffer(MAX_WBLN); - - char[] wb = new char[MAX_WBLN]; - int wbln; - - int mode = 0; - int submode = 0; - char quot = ' '; - int cmpIdx = 0; - headerBuilding: while (true) { - wbln = r.read(wb); - fetchChars: for (int i = 0; i < wbln; i++) { - char c = wb[i]; - if (mode == 0) { - if (Character.isWhitespace(c)) { - continue fetchChars; //! - } else { - mode = 1; - } - } - if (mode == 1) { - if (cmpIdx < 5 && c == "<#ftl".charAt(cmpIdx)) { - cmpIdx++; - continue fetchChars; //! - } else { - if (cmpIdx == 5 - && (Character.isWhitespace(c) - || c == '>' || c == '/')) { - mode = 2; - } else { - mode = -1; - break fetchChars; //! - } - } - } - if (mode == 2) { - if (submode == 0) { - if (c == '>') { - sb.append(wb, 0, i + 1); - sb.append(header); - if (i < wbln - 1) { - sb.append(wb, i + 1, wbln - (i + 1)); - } - header = sb.toString(); - break headerBuilding; //!! - } else if (c == '\'' || c == '\"') { - quot = c; - if ((i != 0 && wb[i - 1] == 'r') - || (sb.length() > 0 - && sb.charAt(sb.length() - 1) == 'r')) { - submode = 2; - } else { - submode = 1; - } - } - } else if (submode == 1) { - if (c == '\\') { - submode = 3; - } else if (c == quot) { - submode = 0; - } - } else if (submode == 2) { - if (c == quot) { - submode = 0; - } - } else if (submode == 3) { - submode = 1; - } - } - } - if (wbln > 0) { - sb.append(wb, 0, wbln); - } - if (wbln < MAX_WBLN || mode == -1) { - header = header + sb.toString(); - break headerBuilding; //!! - } - } - - return header; - } - - private File adjustOutputFileName(File f) throws IOException { - String fn = f.getName(); - fn = applyRemoveExtensionSetting(fn); - fn = applyRemovePostfixesSetting(fn); - fn = applyReplaceExtensionsSetting(fn); - - if (fn.length() == 0) { - throw new IOException( - "The deduced output file name is empty " - + "for this source file: " - + FileUtil.getRelativePath(outRoot, f)); - } - - return new File(f.getParent(), fn).getCanonicalFile(); - } - - private String applyRemoveExtensionSetting(String fn) { - final String fnNormdCase = csPathCmp ? fn : fn.toLowerCase(); - int ln = removeExtensions.size(); - for (int i = 0; i < ln; i++) { - final String dotExtToRemove = "." + (String) removeExtensions.get(i); - final String dotExtToRemoveNormdCase = csPathCmp ? dotExtToRemove : dotExtToRemove.toLowerCase(); - if (fnNormdCase.endsWith(dotExtToRemoveNormdCase)) { - // We only remove one extension: - return fn.substring(0, fn.length() - dotExtToRemove.length()); - } - } - return fn; - } - - private String applyRemovePostfixesSetting(String fn) { - final int extDotIdx; - final String fnWithoutExt; - { - int i = fn.indexOf('.'); - if (i != -1) { - fnWithoutExt = fn.substring(0, i); - extDotIdx = i; - } else { - fnWithoutExt = fn; - extDotIdx = fn.length(); - } - } - - final String fnWithoutExtNormdCase = csPathCmp ? fnWithoutExt : fnWithoutExt.toLowerCase(); - final int ln = removePostfixes.size(); - for (int i = 0; i < ln; i++) { - final String posfixToRemove = (String) removePostfixes.get(i); - final String posfixToRemoveNormdCase = csPathCmp ? posfixToRemove : posfixToRemove.toLowerCase(); - if (fnWithoutExtNormdCase.endsWith(posfixToRemoveNormdCase)) { - // We only remove one postfix: - return fn.substring(0, extDotIdx - posfixToRemove.length()) + fn.substring(extDotIdx); - } - } - return fn; - } - - private String applyReplaceExtensionsSetting(String fn) { - final String fnNormedCase = csPathCmp ? fn : fn.toLowerCase(); - final int ln = replaceExtensions.size(); - for (int i = 0; i < ln; i++) { - final String[] fromToPair = (String[]) replaceExtensions.get(i); - final String replacedExtNormedCase = csPathCmp ? fromToPair[0] : fromToPair[0].toLowerCase(); - if (fnNormedCase.endsWith("." + replacedExtNormedCase)) { - // We only d one substitution: - return fn.substring(0, fn.length() - fromToPair[0].length()) + fromToPair[1]; - } - } - return fn; - } - - private Chooser findChooser(LinkedList choosers, File f) - throws IOException { - String fp = FileUtil.getRelativePath(srcRoot, f); - fp = normalizePathForComparison(FileUtil.pathToUnixStyle(fp)); - - Iterator it = choosers.iterator(); - while (it.hasNext()) { - Chooser c = (Chooser) it.next(); - if (c.regexpPattern.matcher(fp).matches()) { - return c; - } - } - return null; - } - - private String normalizePathForComparison(String fp) { - if (fp.endsWith("/")) { - fp = fp.substring(0, fp.length() - 1); - } - if (!fp.startsWith("/")) { - fp = "/" + fp; - } - if (!csPathCmp) { - fp = fp.toLowerCase(); - } - return fp; - } - - private int getProcessingMode(File f) throws IOException { - String fnameCs = f.getName(); - String fpathCs = f.getAbsolutePath(); - String fnameCisLower; - String fpathCisLower; - String fpathCisUpper; - if (!csPathCmp) { - fnameCisLower = fnameCs.toLowerCase(); - fpathCisLower = fpathCs.toLowerCase(); - fpathCisUpper = fpathCs.toUpperCase(); - } else { - fnameCisLower = fnameCs; - fpathCisLower = fpathCs; - fpathCisUpper = fpathCs; - } - - int i = fnameCs.lastIndexOf("."); - String extLower; - if (i == -1) { - extLower = ""; - } else { - extLower = fnameCs.substring(i + 1).toLowerCase(); - } - - if (extLower.equals("fmpp")) { - return PMODE_IGNORE; - } - if (ignoreCvsFiles) { - if (fnameCisLower.equals(".cvsignore") - || fpathCisUpper.indexOf("/CVS/") != -1 - || fpathCisUpper.indexOf( - File.separatorChar + "CVS" + File.separatorChar) - != -1 - || (fnameCs.length() > 2 && fnameCs.startsWith(".#"))) { - return PMODE_IGNORE; - } - } - if (ignoreSvnFiles) { - if (fpathCisLower.indexOf("/.svn/") != -1 - || fpathCisLower.indexOf( - File.separatorChar + ".svn" + File.separatorChar) - != -1) { - return PMODE_IGNORE; - } - } - if (ignoreTemporaryFiles) { - if ( - (fnameCs.length() > 2 && ( - (fnameCs.startsWith("#") && fnameCs.endsWith("#")) - || (fnameCs.startsWith("%") && fnameCs.endsWith("%")) - || fnameCs.startsWith("._") - || extLower.equals("bak"))) - || (fnameCs.length() > 1 && ( - fnameCs.endsWith("~") - || fnameCs.startsWith("~") - || extLower.startsWith("~"))) - ) { - return PMODE_IGNORE; - } - } - - PModeChooser pmc = (PModeChooser) findChooser(pModeChoosers, f); - if (pmc == null) { - if (STATIC_FILE_EXTS.contains(extLower)) { - return PMODE_COPY; - } else if (xmlRendCfgCntrs.size() != 0 && extLower.equals("xml")) { - return PMODE_RENDER_XML; - } else { - return PMODE_EXECUTE; - } - } else { - return pmc.pMode; - } - } - - private int getTurn(File f) throws IOException { - TurnChooser tc = (TurnChooser) findChooser(turnChoosers, f); - if (tc == null) { - return 1; - } else { - return tc.turn; - } - } - - private static void loadVersionInfo() { - Properties vp = new Properties(); - InputStream ins = Engine.class.getClassLoader() - .getResourceAsStream("fmpp/version.properties"); - if (ins == null) { - throw new RuntimeException( - "Version file (/fmpp/version.properties) " - + "is missing."); - } else { - try { - try { - vp.load(ins); - } finally { - ins.close(); - } - } catch (IOException exc) { - throw new RuntimeException( - "Error loading version file " - + "(/fmpp/version.properties): " + exc); - } - String v = vp.getProperty("version"); - if (v == null) { - throw new RuntimeException( - "Version file (/fmpp/version.properties) " - + "is corrupt: version key is missing."); - } - - String d = vp.getProperty("buildInfo"); - if (d == null) { - throw new RuntimeException( - "Version file (/fmpp/version.properties) " - + "is corrupt: buildInfo key is missing."); - } - - cachedVersion = v; - cachedBuildInfo = d; - } - } - - private void lockParameters() { - parametersLocked = true; - } - - private void unlockParameters() { - parametersLocked = false; - } - - private void checkParameterLock() { - if (parametersLocked) { - throw new IllegalStateException( - "You can't change the engine parameters now. Settings can't be" - + "changed while the processing session is runing."); - } - } - - // ------------------------------------------------------------------------- - // Classes - - private class Chooser { - private Chooser(String pathPattern) { - this.pathPattern = pathPattern; - this.regexpPattern = pathPatternToRegexpPattern(pathPattern); - } - - void recompile() { - this.regexpPattern = pathPatternToRegexpPattern(pathPattern); - } - - private String pathPattern; - private Pattern regexpPattern; - } - - private class PModeChooser extends Chooser { - PModeChooser(String pathPattern) { - super(pathPattern); - } - - private int pMode; - } - - private class TurnChooser extends Chooser { - TurnChooser(String pathPattern) { - super(pathPattern); - } - - private int turn; - } - - private class ObjectChooser extends Chooser { - private final Object value; - - ObjectChooser(String pathPattern, Object value) { - super(pathPattern); - this.value = value; - } - } - - private class LayeredChooser { - private List layers = new ArrayList(); - private int usedLayers; - - /** - * @param layer Must be 0 or positive. 0 is the layer with the highest - * priority. Missing layers are automatically added, but there shouldn't - * be to much unused layers embedded (as hundreds of them) as that - * degrades performance. - */ - private void addChooser( - int layer, String pathPattern, Object value) { - if (layer < 0) { - throw new IllegalArgumentException( - "Layer index can't be negative: " + layer); - } - ObjectChooser chooser = new ObjectChooser(pathPattern, value); - int max = layers.size() - 1; - while (max < layer) { - layers.add(null); - max++; - } - LinkedList choosers = (LinkedList) layers.get(layer); - if (choosers == null) { - choosers = new LinkedList(); - layers.set(layer, choosers); - usedLayers++; - } - choosers.add(chooser); - } - - /** - * @return the list of choosen objects, ordered by ascending layer - * index. Possibly an empty list, but never {@code null}. - */ - private List choose(File f) throws IOException { - List result = new ArrayList(usedLayers); - int ln = layers.size(); - for (int i = 0; i < ln; i++) { - LinkedList choosers = (LinkedList) layers.get(i); - if (choosers != null) { - ObjectChooser c = (ObjectChooser) findChooser(choosers, f); - if (c != null) { - result.add(c.value); - } - } - } - return result; - } - - private void recompile() { - int ln = layers.size(); - for (int i = 0; i < ln; i++) { - LinkedList choosers = (LinkedList) layers.get(i); - Iterator it = choosers.iterator(); - while (it.hasNext()) { - ((Chooser) it.next()).recompile(); - } - } - } - - private void clear() { - layers.clear(); - usedLayers = 0; - } - } - - private class MultiProgressListener implements ProgressListener { - - private ArrayList userListeners = new ArrayList(); - private ArrayList attrListeners = new ArrayList(); - private ArrayList ldbListeners = new ArrayList(); - private ArrayList xmlLdbListeners = new ArrayList(); - private boolean mergedNeedsRefresh = true; - private ArrayList mergedListeners = new ArrayList(); - - void addUserListener(ProgressListener listener) { - if (!MiscUtil.listContainsObject(userListeners, listener)) { - userListeners.add(listener); - } - } - - void clearUserListeners() { - mergedNeedsRefresh = true; - userListeners.clear(); - } - - void addAttrListener(ProgressListener listener) { - if (!MiscUtil.listContainsObject(attrListeners, listener)) { - mergedNeedsRefresh = true; - attrListeners.add(listener); - } - } - - void removeAttrListener(ProgressListener listener) { - int i = MiscUtil.findObject(attrListeners, listener); - if (i != -1) { - mergedNeedsRefresh = true; - attrListeners.remove(i); - } - } - - void clearAttrListeners() { - mergedNeedsRefresh = true; - attrListeners.clear(); - } - - void addLdbListener(ProgressListener listener) { - if (!MiscUtil.listContainsObject(ldbListeners, listener)) { - mergedNeedsRefresh = true; - ldbListeners.add(listener); - } - } - - void clearLdbListeners() { - mergedNeedsRefresh = true; - ldbListeners.clear(); - } - - void addXmlLdbListener(ProgressListener listener) { - if (!MiscUtil.listContainsObject(xmlLdbListeners, listener)) { - mergedNeedsRefresh = true; - xmlLdbListeners.add(listener); - } - } - - void clearXmlLdbListeners() { - mergedNeedsRefresh = true; - xmlLdbListeners.clear(); - } - - public void notifyProgressEvent( - Engine engine, - int event, - File src, int pMode, - Throwable error, Object param) - throws ProcessingException { - if (mergedNeedsRefresh) { - refreshMergedListeneres(); - } - int doneCounter = 0; - int closingEvent = getClosingEvent(event); - ProcessingException firstException = null; - Iterator it = mergedListeners.iterator(); - normalLoop: while (it.hasNext()) { - ProgressListener lr = (ProgressListener) it.next(); - try { - lr.notifyProgressEvent( - engine, - event, - src, pMode, - error, param); - } catch (Throwable e) { - //!!logme - if (firstException == null) { - firstException = new ProcessingException( - Engine.this, src, new ExceptionCC( - "A listener Java object has failed to " - + "handle event \"" - + getProgressListenerEventName(event) - + "\". The class of the failing " - + "listener object is " - + lr.getClass().getName() + ".", - e)); - } - if (closingEvent != Integer.MIN_VALUE) { - break normalLoop; - } - } - doneCounter++; - } - if (firstException != null) { - if (closingEvent != Integer.MIN_VALUE) { - it = mergedListeners.iterator(); - while (it.hasNext() && doneCounter != 0) { - ProgressListener lr = (ProgressListener) it.next(); - try { - lr.notifyProgressEvent( - engine, - closingEvent, - src, pMode, - error, param); - } catch (Throwable e) { - ; //!!logme - } - doneCounter--; - } - } - throw firstException; - } - } - - private void refreshMergedListeneres() { - int i; - int ln; - Object o; - - mergedListeners.clear(); - - ln = xmlLdbListeners.size(); - for (i = 0; i < ln; i++) { - o = xmlLdbListeners.get(i); - if (!MiscUtil.listContainsObject(mergedListeners, o)) { - mergedListeners.add(o); - } - } - - ln = ldbListeners.size(); - for (i = 0; i < ln; i++) { - o = ldbListeners.get(i); - if (!MiscUtil.listContainsObject(mergedListeners, o)) { - mergedListeners.add(o); - } - } - - ln = attrListeners.size(); - for (i = 0; i < ln; i++) { - o = attrListeners.get(i); - if (!MiscUtil.listContainsObject(mergedListeners, o)) { - mergedListeners.add(o); - } - } - - ln = userListeners.size(); - for (i = 0; i < ln; i++) { - o = userListeners.get(i); - if (!MiscUtil.listContainsObject(mergedListeners, o)) { - mergedListeners.add(o); - } - } - - mergedNeedsRefresh = false; - } - - private int getClosingEvent(int event) { - if (event == EVENT_BEGIN_FILE_PROCESSING) { - return EVENT_END_FILE_PROCESSING; - } else if (event == EVENT_BEGIN_PROCESSING_SESSION) { - return EVENT_END_PROCESSING_SESSION; - } else { - return Integer.MIN_VALUE; - } - } - } - - private class XmlRenderingCfgContainer { - final XmlRenderingConfiguration xmlRenderingCfg; - Pattern[] compiledPathPatterns; - - XmlRenderingCfgContainer( - XmlRenderingConfiguration xmlRendering) { - this.xmlRenderingCfg = xmlRendering; - recompile(); - } - - void recompile() { - List pathPatterns = xmlRenderingCfg.getPathPatterns(); - int ln = pathPatterns.size(); - compiledPathPatterns = new Pattern[ln]; - for (int i = 0; i < ln; i++) { - compiledPathPatterns[i] - = pathPatternToRegexpPattern((String) pathPatterns.get(i)); - } - } - - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/EngineXmlUtils.java b/fmpp/src/main/java/fmpp/EngineXmlUtils.java deleted file mode 100644 index 786ded4..0000000 --- a/fmpp/src/main/java/fmpp/EngineXmlUtils.java +++ /dev/null @@ -1,91 +0,0 @@ -package fmpp; - -import java.io.File; -import java.util.List; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.xml.sax.EntityResolver; - -import fmpp.dataloaders.XmlDataLoader; -import fmpp.util.MiscUtil; -import fmpp.util.StringUtil; -import freemarker.ext.dom.NodeModel; -import freemarker.template.TemplateNodeModel; - -class EngineXmlUtils { - - private EngineXmlUtils() { } - - static void setFreeMarkerXPathEngine(String xpathEngine) - throws IllegalConfigurationException { - if (xpathEngine.equals(Engine.XPATH_ENGINE_DONT_SET)) { - ; // do nothing - } else if (xpathEngine.equals(Engine.XPATH_ENGINE_DEFAULT)) { - NodeModel.useDefaultXPathSupport(); - } else if (xpathEngine.equals(Engine.XPATH_ENGINE_XALAN)) { - try { - NodeModel.useXalanXPathSupport(); - } catch (Exception e) { - throw new IllegalConfigurationException( - "Failed to use Xalan XPath engine.", e); - } - } else if (xpathEngine.equals(Engine.XPATH_ENGINE_JAXEN)) { - try { - NodeModel.useJaxenXPathSupport(); - } catch (Exception e) { - throw new IllegalConfigurationException( - "Failed to use Jaxen XPath engine.", e); - } - } else { - Class cl; - try { - cl = MiscUtil.classForName(xpathEngine); - } catch (ClassNotFoundException e) { - throw new IllegalConfigurationException( - "Custom XPath engine adapter class " - + StringUtil.jQuote(xpathEngine) + " not found. " - + "Note that the reserved names are: " - + StringUtil.jQuote(Engine.XPATH_ENGINE_DONT_SET) + ", " - + StringUtil.jQuote(Engine.XPATH_ENGINE_DEFAULT) + ", " - + StringUtil.jQuote(Engine.XPATH_ENGINE_XALAN) + ", " - + StringUtil.jQuote(Engine.XPATH_ENGINE_JAXEN) + ".", - e); - } - NodeModel.setXPathSupportClass(cl); - } - } - - static boolean isEntityResolver(Object o) { - return o instanceof EntityResolver; - } - - static Object loadXmlFile( - Engine eng, File xmlFile, boolean validate) throws Exception { - return XmlDataLoader.loadXmlFile(eng, xmlFile, true, validate); - } - - static boolean documentElementEquals( - Object doc, String namespace, String localName) { - Element e = ((Document) doc).getDocumentElement(); - String ns = e.getNamespaceURI(); - String ln = e.getLocalName(); - if (ns == null || ns.length() == 0) { - if (namespace != null) { - return false; - } - } else { - if (namespace == null || !namespace.equals(ns)) { - return false; - } - } - return localName.equals(ln); - } - - static TemplateNodeModel loadWithXmlDataLoader( - Engine eng, List args, Object preLoaderXml) throws Exception { - XmlDataLoader xdl = new XmlDataLoader(); - return xdl.load(eng, args, (Document) preLoaderXml); - } - -} diff --git a/fmpp/src/main/java/fmpp/FmppFileOutputWriter.java b/fmpp/src/main/java/fmpp/FmppFileOutputWriter.java deleted file mode 100644 index 245838a..0000000 --- a/fmpp/src/main/java/fmpp/FmppFileOutputWriter.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.Writer; -import java.util.ArrayList; -import java.util.Iterator; - -import fmpp.util.FileUtil; -import fmpp.util.NullWriter; - -/** - * The writer that FMPP uses to write file output. - */ -class FmppFileOutputWriter extends FmppOutputWriter { - private static final int BUFFER_SIZE = 160; // large buffer slows down - - private Engine engine; - private ArrayList stateStack = new ArrayList(); - private boolean closed = false; - private boolean ignoreFlush = false; - - // State fields. Keep in sync. with save/restoreState! - private File dst; - private String enc; - private int freeBuf = BUFFER_SIZE; - private StringBuffer buf = new StringBuffer(BUFFER_SIZE); - private Writer fileWriter; - private boolean append; - private SavedState sharedSavedState; - - FmppFileOutputWriter(Engine engine, File dst, String enc) { - this.engine = engine; - this.engine = engine; - this.dst = dst; - this.enc = enc; - } - - public void write(String data) throws IOException { - if (fileWriter != null) { - fileWriter.write(data); - } else { - int ln = data.length(); - if (ln <= freeBuf) { - buf.append(data); - freeBuf -= ln; - } else { - createFileWriter(); - fileWriter.write(buf.toString()); - buf = null; - fileWriter.write(data); - } - } - } - - public void write(char[] data, int off, int len) throws IOException { - if (fileWriter != null) { - fileWriter.write(data, off, len); - } else { - int ln = data.length; - if (ln <= freeBuf) { - buf.append(data, off, len); - freeBuf -= ln; - } else { - createFileWriter(); - fileWriter.write(buf.toString()); - buf = null; - fileWriter.write(data, off, len); - } - } - } - - // Affects current writer only! - public void flush() throws IOException { - if (!ignoreFlush) { - if (fileWriter == null) { - createFileWriter(); - fileWriter.write(buf.toString()); - buf = null; - } - fileWriter.flush(); - } - } - - // Close *all* writers here! - public void close(boolean error) throws IOException { - if (closed) { - return; - } - try { - do { - try { - if (!error - || fileWriter != null - || (buf != null && buf.length() != 0)) { - flush(); - } - } finally { - if (fileWriter != null) { - fileWriter.close(); - } - } - fileWriter = null; - if (stateStack.size() == 0) { - break; - } - nestOutputFileEnd(true); - } while (true); - } finally { - // Final attempt to release resources - Iterator it = stateStack.iterator(); - while (it.hasNext()) { - SavedState s = (SavedState) it.next(); - try { - s.fileWriter.close(); - } catch (Throwable exc) { - //!!logme - ; //ignore - } - } - stateStack.clear(); - closed = true; - } - } - - public void close() throws IOException { - close(false); - } - - void dropOutputFile() throws IOException { - if (fileWriter != null) { - fileWriter.close(); - if (dst.isFile()) { - dst.delete(); - } - } - fileWriter = NullWriter.INSTANCE; - buf = null; - } - - void restartOutputFile() throws IOException { - if (fileWriter != null) { - fileWriter.close(); - } - initOutputBufferAndWriter(); - } - - void renameOutputFile(String newName) throws IOException { - File newDst = deduceNewDst(newName); - if (dst.equals(newDst)) { - return; - } - if (fileWriter != null) { - flush(); - fileWriter.close(); - - initOutputBufferAndWriter(); - - if (!dst.isFile()) { - throw new IOException("Can't find the file to rename: " - + dst.getPath()); - } - if (newDst.isFile()) { - newDst.delete(); - } - File parent = newDst.getParentFile(); - if (parent != null && !parent.exists()) { - parent.mkdirs(); - } - if (!dst.renameTo(newDst)) { - throw new IOException("Failed to rename " + dst.getPath() - + " to " + newDst.getPath()); - } - append = true; - } - dst = newDst; - } - - void changeOutputFile(String newName, boolean append) - throws IOException { - File newDst = deduceNewDst(newName); - if (dst.equals(newDst)) { - return; - } - - for (int i = stateStack.size() - 1; i >= 0; i--) { - SavedState s = (SavedState) stateStack.get(i); - if (s.dst.equals(newDst)) { - if (sharedSavedState == null || s != sharedSavedState) { - throw new IOException( - "Something is already using this file as output: " - + newDst.getAbsolutePath()); - } else { - break; - } - } - } - - - flush(); - fileWriter.close(); - - initOutputBufferAndWriter(); - this.append = append; - - dst = newDst; - } - - void nestOutputFileBegin(String newName, boolean append) - throws IOException { - File newDst = deduceNewDst(newName); - - SavedState s = new SavedState(); - s.store(); - stateStack.add(s); - - for (int i = stateStack.size() - 1; i >= 0; i--) { - s = (SavedState) stateStack.get(i); - if (s.dst.equals(newDst)) { - s.load(); - // intentionally ignore "append" parameter - sharedSavedState = s; - return; //! - } - } - initOutputBufferAndWriter(); - sharedSavedState = null; - this.append = append; - dst = newDst; - } - - void nestOutputFileEnd(boolean alreadyClosed) throws IOException { - if (stateStack.size() == 0) { - throw new RuntimeException( - "There is no more saved state in the state-stack!"); - } - - if (sharedSavedState != null) { - SavedState s = sharedSavedState.sharedSavedState; - sharedSavedState.store(); - sharedSavedState.sharedSavedState = s; - } else { - if (!alreadyClosed) { - flush(); - fileWriter.close(); - } - } - SavedState s = (SavedState) stateStack.remove(stateStack.size() - 1); - s.load(); - } - - void setOutputEncoding(String enc) throws IOException { - if (fileWriter != null && !(fileWriter instanceof NullWriter)) { - throw new IOException("Can't change the output encoding becasue " + "some of the output was already written to the file."); - } else { - if (enc.equals(Engine.PARAMETER_VALUE_HOST)) { - this.enc = System.getProperty("file.encoding"); - } else { - this.enc = enc; - } - } - } - - String getOutputEncoding() { - return enc; - } - - void setIgnoreFlush(boolean ignore) { - ignoreFlush = ignore; - } - - private void createFileWriter() throws IOException { - File p = dst.getParentFile(); - if (p != null) { - p.mkdirs(); - } - fileWriter = new BufferedWriter(new OutputStreamWriter( - new FileOutputStream(dst.getPath(), append), enc)); - } - - private File deduceNewDst(String newName) throws IOException { - newName = FileUtil.pathToUnixStyle(newName); - return FileUtil.resolveRelativeUnixPath( - engine.getOutputRoot(), - dst.getParentFile(), - newName); - } - - private void initOutputBufferAndWriter() { - fileWriter = null; - if (buf == null) { - buf = new StringBuffer(BUFFER_SIZE); - } else { - buf.delete(0, buf.length()); - } - freeBuf = BUFFER_SIZE; - } - - private class SavedState { - private File dst; - private String enc; - private int freeBuf; - private StringBuffer buf; - private Writer fileWriter; - private boolean append; - private SavedState sharedSavedState; - - private void store() { - this.dst = FmppFileOutputWriter.this.dst; - enc = FmppFileOutputWriter.this.enc; - freeBuf = FmppFileOutputWriter.this.freeBuf; - buf = FmppFileOutputWriter.this.buf; - fileWriter = FmppFileOutputWriter.this.fileWriter; - append = FmppFileOutputWriter.this.append; - sharedSavedState = FmppFileOutputWriter.this.sharedSavedState; - } - - private void load() { - FmppFileOutputWriter.this.dst = dst; - FmppFileOutputWriter.this.enc = enc; - FmppFileOutputWriter.this.freeBuf = freeBuf; - FmppFileOutputWriter.this.buf = buf; - FmppFileOutputWriter.this.append = append; - FmppFileOutputWriter.this.fileWriter = fileWriter; - FmppFileOutputWriter.this.sharedSavedState = sharedSavedState; - } - } - - public File getOutputFile() { - return dst; - } -} diff --git a/fmpp/src/main/java/fmpp/FmppOutputWriter.java b/fmpp/src/main/java/fmpp/FmppOutputWriter.java deleted file mode 100644 index d3e3ee3..0000000 --- a/fmpp/src/main/java/fmpp/FmppOutputWriter.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.io.File; -import java.io.IOException; -import java.io.Writer; - -/** - * The writer that FMPP uses to write the output files. - */ -abstract class FmppOutputWriter extends Writer { - abstract void dropOutputFile() throws IOException; - - abstract void restartOutputFile() throws IOException; - - abstract void renameOutputFile(String newName) throws IOException; - - abstract void changeOutputFile(String newName, boolean append) - throws IOException; - - abstract void nestOutputFileBegin(String newName, boolean append) - throws IOException; - - abstract void nestOutputFileEnd(boolean alreadyClosed) throws IOException; - - abstract void setOutputEncoding(String enc) throws IOException; - - abstract String getOutputEncoding(); - - abstract File getOutputFile(); - - abstract void setIgnoreFlush(boolean ignore) throws IOException; - - abstract void close(boolean error) throws IOException; -} diff --git a/fmpp/src/main/java/fmpp/FmppTemplateLoader.java b/fmpp/src/main/java/fmpp/FmppTemplateLoader.java deleted file mode 100644 index 559eaeb..0000000 --- a/fmpp/src/main/java/fmpp/FmppTemplateLoader.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; -import java.util.List; - -import freemarker.cache.TemplateLoader; - -/** - * A TemplateLoader that uses files in a specified directory as the - * source of templates. - */ -class FmppTemplateLoader implements TemplateLoader { - private static final boolean SEP_IS_SLASH = File.separatorChar == '/'; - private final Engine engine; - - public FmppTemplateLoader(Engine engine) - throws IOException { - this.engine = engine; - } - - public Object findTemplateSource(String name) - throws IOException { - if (name.indexOf('\\') != -1) { - throw new IOException("Malformed path. FreeMarker paths use slash " - + "(/) to separate path components, not backslash (\\). " - + "Please replace backslashes with slashes in this path: " - + name); - } - - String nativeName - = SEP_IS_SLASH ? name : name.replace('/', File.separatorChar); - - File source = new File(engine.getSourceRoot(), nativeName); - if (source.isFile()) { - return source; - } - - if (name.startsWith("@")) { - int i = name.indexOf("/"); - String linkName; - if (i != -1) { - linkName = name.substring(1, i); - nativeName = nativeName.substring(i + 1); - } else { - linkName = name.substring(1); - nativeName = null; - } - List links = engine.getFreemarkerLink(linkName); - if (links != null) { - int ln = links.size(); - for (i = 0; i < ln; i++) { - if (nativeName != null) { - source = new File((File) links.get(i), nativeName); - } else { - source = (File) links.get(i); - } - if (source.isFile()) { - return source; //!! - } - } - } - } - - return null; - } - - public long getLastModified(Object templateSource) { - return ((File) templateSource).lastModified(); - } - - public Reader getReader(Object templateSource, String encoding) - throws IOException { - return engine.wrapReader( - new InputStreamReader( - new FileInputStream((File) templateSource), - encoding), - (File) templateSource); - } - - public void closeTemplateSource(Object templateSource) { - // Do nothing. - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/GenericProcessingException.java b/fmpp/src/main/java/fmpp/GenericProcessingException.java deleted file mode 100644 index 57c60c7..0000000 --- a/fmpp/src/main/java/fmpp/GenericProcessingException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import fmpp.util.ExceptionCC; - -/** - * Problem has occured during the processing session. - */ -class GenericProcessingException extends ExceptionCC { - - public GenericProcessingException(String message) { - super(message); - } - - public GenericProcessingException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/fmpp/src/main/java/fmpp/IllegalConfigurationException.java b/fmpp/src/main/java/fmpp/IllegalConfigurationException.java deleted file mode 100644 index d7315bf..0000000 --- a/fmpp/src/main/java/fmpp/IllegalConfigurationException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import fmpp.util.ExceptionCC; - -/** - * The engine was not configured correctly. - */ -class IllegalConfigurationException extends ExceptionCC { - - public IllegalConfigurationException(String message) { - super(message); - } - - public IllegalConfigurationException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/fmpp/src/main/java/fmpp/LocalDataBuilder.java b/fmpp/src/main/java/fmpp/LocalDataBuilder.java deleted file mode 100644 index fe036f1..0000000 --- a/fmpp/src/main/java/fmpp/LocalDataBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.util.Map; - -/** - * Contains callback to build the local data for a file processing. - * This interface is used to implement the "localData" setting. - * - *

    Life-cycle: These are long-lived objects. The - * local data builder object is plugged into the {@link Engine}, and then it may - * be in use during several processing sessions. - * Typically the construction of the object is done by - * {@link fmpp.setting.Settings#execute()}, based on the value of setting - * "localData". - * - *

    Local data builders that are added with setting "localData" (or - * directly with {@link Engine#addLocalDataBuilder}) receive notifications about - * the events of the {@link Engine} if they implement interface - * {@link ProgressListener}. - */ -public interface LocalDataBuilder { - /** - * Returns the variables that could be added to the local data. - * - * @return the variables to add to the local data. Can be - * null. The returned map will not be modified - * (although technically, badly behaved 3rd party code can modify - * the values soted in the map...). - */ - Map build(Engine eng, TemplateEnvironment env) throws Exception; -} diff --git a/fmpp/src/main/java/fmpp/ProcessingException.java b/fmpp/src/main/java/fmpp/ProcessingException.java deleted file mode 100644 index bcbbacf..0000000 --- a/fmpp/src/main/java/fmpp/ProcessingException.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.io.File; - -import fmpp.util.ExceptionCC; - -/** - * Error while performing the processing session. - */ -public class ProcessingException extends ExceptionCC { - - private static final long serialVersionUID = 1L; - - private final File sourceFile; - private final File sourceRoot; - - /** - * @param sourceFile can be null. - */ - public ProcessingException(Engine e, File sourceFile, Throwable cause) { - super(cause); - this.sourceRoot = e.getSourceRoot(); - if (sourceRoot != null) { - this.sourceFile = sourceFile; - } else { - this.sourceFile = null; - } - } - - /** - * Returns the source file the faliure relates to. - * This is an absolute file (not relative). - * It's null if no such information is available. - */ - public File getSourceFile() { - return sourceFile; - } - - /** - * Returns the "sourceRoot" used during the processing session that failed. - * It's maybe null, but only if {@link #getSourceFile()} - * returns null too. - */ - public File getSourceRoot() { - return sourceRoot; - } - - /** - * Returns always the same text: "FMPP processing session failed." - */ - public String getMessage() { - return "FMPP processing session failed" + (sourceFile != null ? " at " + sourceFile : ""); - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/ProgressListener.java b/fmpp/src/main/java/fmpp/ProgressListener.java deleted file mode 100644 index 3722105..0000000 --- a/fmpp/src/main/java/fmpp/ProgressListener.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.io.File; - -/** - * Interface to monitor the events of an Engine. - * - *

    The object that implements this interface need to be plugged into the - * {@link Engine} to receive notifications about its events. For example, if you - * add an object as engine attribute or as local data loader to the engine, it - * will be notified about the events. Object that has no role other than - * listening to events can to be plugged with - * {@link Engine#addProgressListener}. - * - *

    Examples of the usage of progress listeners: - *

      - *
    • Displaying visually the progress of the processing session for the - * user. - *
    • Creating statistics about the processing session. - *
    • Implementing a poor man's logging (until no logging support added to - * FMPP) - *
    • Releasing the resources held by local data loaders and engine - * attributes when the session is finished. - *
    - */ -public interface ProgressListener { - /** Engine.process has started the work. */ - int EVENT_BEGIN_PROCESSING_SESSION = 1; - - /** Engine.process has finished the work. */ - int EVENT_END_PROCESSING_SESSION = 4; - - /** The processing of a single file has been started. */ - int EVENT_BEGIN_FILE_PROCESSING = 2; - - /** The processing of a single file has been finished. */ - int EVENT_END_FILE_PROCESSING = 3; - - /** A source directory has been ignored (skipped.) */ - int EVENT_IGNORING_DIR = 5; - - /** An empty directory was created due to the copyEmptyDirs setting. */ - int EVENT_CREATED_EMPTY_DIR = 8; - - /** - * A warning message has been received from a template or from the - * engine. - */ - int EVENT_WARNING = 6; - - /** - * The processing of source was skipped because the output was generated - * after the last modification of the source file. - */ - int EVENT_SOURCE_NOT_MODIFIED = 7; - - /** - * Method called be the engine to notify events. - * - *

    It is guaranteed that this method will not be called concurrently - * as far as the listener is added to a single Engine instance - * only. - * - * @param engine The engine instance where the event has occurred. - * @param event The code of the event: an EVENT_... constant. - * As new event types can be introduced with new FMPP versions (even if - * it happens very seldom), a progress listener implementation should - * survive events that it does not understand. That is, it must not stop - * with an error, but it should silently ignore the event. - * @param src Depending on event the source file or null. - * @param pMode Depending on event the proccessing mode - * (Engine.PMODE_... constant) or - * Engine.PMODE_NONE. Note that new processing modes may - * be added as FMPP evolvers, so values that are not known be the - * progress listener should be handler nicely, and never cause error. - * @param error The error, or null if there was no error. - * @param param Extra information about the event. The class and meaning of - * object depends on the concrete event: - *

      - *
    • For EVENT_WARNING it is a String that - * describles the reason of warning. - *
    - */ - void notifyProgressEvent( - Engine engine, - int event, - File src, int pMode, - Throwable error, Object param) throws Exception; -} diff --git a/fmpp/src/main/java/fmpp/TemplateDataModelBuilder.java b/fmpp/src/main/java/fmpp/TemplateDataModelBuilder.java deleted file mode 100644 index 903b944..0000000 --- a/fmpp/src/main/java/fmpp/TemplateDataModelBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.io.File; -import java.util.Map; - -import freemarker.template.Template; - -/** - * Contains callback to build the data-model for a template execution. - * - * @deprecated Use {@link fmpp.LocalDataBuilder} instead. - */ -public interface TemplateDataModelBuilder { - - /** - * Returns the top-level variables that will be available for the template. - */ - Map build(Engine e, Template template, File src) - throws Exception; -} diff --git a/fmpp/src/main/java/fmpp/TemplateEnvironment.java b/fmpp/src/main/java/fmpp/TemplateEnvironment.java deleted file mode 100644 index b7d6911..0000000 --- a/fmpp/src/main/java/fmpp/TemplateEnvironment.java +++ /dev/null @@ -1,1473 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.io.File; -import java.io.IOException; -import java.io.Writer; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import fmpp.models.AddTransform; -import fmpp.models.ClearTransform; -import fmpp.models.CopyWritableVariableMethod; -import fmpp.models.NewWritableHashMethod; -import fmpp.models.NewWritableSequenceMethod; -import fmpp.models.RemoveTransform; -import fmpp.models.SetTransform; -import fmpp.models.TemplateModelUtils; -import fmpp.models.WritableHash; -import fmpp.tdd.DataLoader; -import fmpp.tdd.EvalException; -import fmpp.util.FileUtil; -import fmpp.util.FreemarkerUtil; -import fmpp.util.StringUtil; -import freemarker.core.Environment; -import freemarker.template.ObjectWrapper; -import freemarker.template.SimpleCollection; -import freemarker.template.SimpleDate; -import freemarker.template.SimpleNumber; -import freemarker.template.SimpleScalar; -import freemarker.template.Template; -import freemarker.template.TemplateBooleanModel; -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateDateModel; -import freemarker.template.TemplateException; -import freemarker.template.TemplateHashModelEx; -import freemarker.template.TemplateMethodModel; -import freemarker.template.TemplateMethodModelEx; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNodeModel; -import freemarker.template.TemplateScalarModel; -import freemarker.template.TemplateTransformModel; - -/** - * The runtime FMPP environment of an executing template. - */ -public class TemplateEnvironment { - private static final ThreadLocal THREAD_LOCAL = new ThreadLocal(); - - private final Engine eng; - - private class PPHash implements TemplateHashModelEx { - private Map map = new HashMap(); - - public int size() throws TemplateModelException { - return map.size(); - } - - public TemplateCollectionModel keys() throws TemplateModelException { - return new SimpleCollection( - map.keySet(), ObjectWrapper.SIMPLE_WRAPPER); - } - - public TemplateCollectionModel values() throws TemplateModelException { - return new SimpleCollection( - map.values(), ObjectWrapper.SIMPLE_WRAPPER); - } - - public TemplateModel get(String key) throws TemplateModelException { - Object o = map.get(key); - if (o instanceof LiveScalar) { - return (TemplateModel) ((LiveScalar) o) - .exec(Collections.EMPTY_LIST); - } else { - return (TemplateModel) o; - } - } - - public boolean isEmpty() throws TemplateModelException { - return map.isEmpty(); - } - - public void put(String name, TemplateModel value) { - map.put(name, value); - } - - public void put(String name, String value) { - map.put(name, new SimpleScalar(value)); - } - - public void remove(String name) { - map.remove(name); - } - } - - // State variables - private final PPHash ppHash = new PPHash(); - private boolean externallyAccessible; - private String ppOpDenialMessage; - private FmppOutputWriter outputWriter; - private File srcFile; - private Template template; - private Environment fmEnv; - private Map localData; - private Object xmlDocument; // org.w3c.Document - private TemplateNodeModel wrappedXmlDocument; - - TemplateEnvironment(Engine engine) { - this.eng = engine; - - // transforms - ppHash.put("changeOutputFile", new ChangeOutputFileTransform()); - ppHash.put("renameOutputFile", new RenameOutputFileTransform()); - ppHash.put("dropOutputFile", new DropOutputFileTransform()); - ppHash.put("restartOutputFile", new RestartOutputFileTransform()); - ppHash.put("nestOutputFile", new NestOutputFileTransform()); - ppHash.put("setOutputEncoding", new SetOutputEncodingTransform()); - ppHash.put("ignoreOutput", new IgnoreOutputTransform()); - ppHash.put("warning", new WarningTransform()); - ppHash.put("set", new SetTransform()); - ppHash.put("add", new AddTransform()); - ppHash.put("remove", new RemoveTransform()); - ppHash.put("clear", new ClearTransform()); - - // methods - ppHash.put("realFileSize", new RealFileSizeMethod()); - ppHash.put("realFileLastModified", new RealFileLastModifiedMethod()); - ppHash.put("realFileExists", new RealFileExistsMethod()); - ppHash.put("sourceFileSize", new SourceFileSizeMethod()); - ppHash.put("sourceFileLastModified", - new SourceFileLastModifiedMethod()); - ppHash.put("sourceFileExists", new SourceFileExistsMethod()); - ppHash.put("outputFileSize", new OutputFileSizeMethod()); - ppHash.put("outputFileLastModified", - new OutputFileLastModifiedMethod()); - ppHash.put("outputFileExists", new OutputFileExistsMethod()); - ppHash.put("urlEnc", new UrlEncodeMethod()); - ppHash.put("urlPathEnc", new UrlPathEncodeMethod()); - ppHash.put("sourceRootRelativePath", - new ToSourceRootRelativePathMethod()); - ppHash.put("outputRootRelativePath", - new ToOutputRootRelativePathMethod()); - ppHash.put("pathTo", - new PathToMethod()); - ppHash.put("sourcePathTo", - new PathToSourceMethod()); - ppHash.put("newWritableSequence", new NewWritableSequenceMethod()); - ppHash.put("newWritableHash", new NewWritableHashMethod()); - ppHash.put("copyWritable", new CopyWritableVariableMethod()); - ppHash.put("loadData", new LoadDataMethod()); - - // constants - ppHash.put("slash", File.separator); - ppHash.put("version", Engine.getVersionNumber()); - ppHash.put("freemarkerVersion", Engine.getFreeMarkerVersionNumber()); - - // live variables - ppHash.put("outputFile", new OutputFileMethod()); - ppHash.put("outputDirectory", new OutputDirectoryMethod()); - ppHash.put("outputFileName", new OutputFileNameMethod()); - ppHash.put("realOutput", new RealOutputMethod()); - ppHash.put("realOutputDirectory", new RealOutputDirectoryMethod()); - ppHash.put("outputEncoding", new OutputEncodingMethod()); - ppHash.put("home", new HomeScalar()); - ppHash.put("locale", new LocaleMethod()); - ppHash.put("now", new NowScalar()); - ppHash.put("doc", new DocScalar()); - } - - // ------------------------------------------------------------------------- - // Public - - /** - * Returns the {@link TemplateEnvironment} object used for the template - * currently being executed by FMPP in the current thread. - * The return value of the method is undefined if no such template execution - * is in progress. - * In practice it means that it can be safely called from a Java - * method that is (indirectly) invoked by the executing template. For - * example, in a {@link freemarker.template.TemplateTransformModel} that is - * used in the template with {@code <@...>}. - */ - public static TemplateEnvironment getCurrentInstance() { - return (TemplateEnvironment) THREAD_LOCAL.get(); - } - - /** - * Returns the FreeMarker environment currently in use. - * The FreeMarker environment can be used to set/get variables, among - * others. - * - * @throws IllegalStateException if the FreeMarker environment is not - * available. - */ - public Environment getFreemarkerEnvironment() { - if (fmEnv == null) { - throw new IllegalStateException("The FreeMarker environment is " - + "not available, because the template is not executing."); - } - return fmEnv; - } - - /** - * Returns the FMPP engine object in use. - */ - public Engine getEngine() { - return eng; - } - - /** - * Returns the processed XML document ({@code pp.doc}) as - * {@link org.w3c.dom.Document}. This will return non-{@code null} - * if, and only if the current processing mode is "renderXml". - * - * @see #getWrappedXmlDocument() - */ - public Object getXmlDocument() { - return xmlDocument; - } - - /** - * The same as {@link #getXmlDocument()}, but returns the document as - * {@link freemarker.ext.dom.NodeModel}. - */ - public TemplateNodeModel getWrappedXmlDocument() { - return wrappedXmlDocument; - } - - /** - * Similar to {@link Engine#getData}, but it also sees file processing - * specifict variables (local data). - * - * @param name the name of the variable. - * @return the value of the variable, or {@code null} if no variable - * with the given name exists. - */ - public Object getData(String name) { - Object o = localData.get(name); - return o == null ? eng.getData(name) : o; - } - - /** - * Returns the source file. - */ - public File getSourceFile() { - return srcFile; - } - - /** - * Retuns the FreeMarker {@link Template} object for the source file. - */ - public Template getTemplate() { - return template; - } - - /** - * Returns the output file. Note that this value can change during the - * execution of template. - */ - public File getOutputFile() throws IOException { - return outputWriter.getOutputFile(); - } - - /** - * Returns URL-style path of the output root relative to the current output - * file. - */ - public String getHomePath() throws IOException { - File d = outputWriter.getOutputFile().getParentFile(); - File r = eng.getOutputRoot(); - String home = ""; - while (!d.equals(r)) { - home = home + "../"; - d = d.getParentFile(); - } - return home; - } - - /** - * Returns the output encoding. Note that this value can change during the - * execution of template. - */ - public String getOutputEncoding() throws IOException { - return outputWriter.getOutputEncoding(); - } - - /** - * It does the same as the directive in the pp hash. - */ - public void changeOutputFile(String name) throws IOException { - checkPpOpsAllowed(); - outputWriter.changeOutputFile(name, false); - } - - /** - * It does the same as the directive in the pp hash. - */ - public void changeOutputFile(String name, boolean append) - throws IOException { - checkPpOpsAllowed(); - outputWriter.changeOutputFile(name, append); - } - - /** - * It does the same as the directive in the pp hash. - */ - public void renameOutputFile(String name) throws IOException { - checkPpOpsAllowed(); - outputWriter.renameOutputFile(name); - } - - /** - * It does the same as the directive in the pp hash. - */ - public void dropOutputFile() throws IOException { - checkPpOpsAllowed(); - outputWriter.dropOutputFile(); - } - - /** - * It does the same as the directive in the pp hash. - */ - public void restartOutputFile() throws IOException { - checkPpOpsAllowed(); - outputWriter.restartOutputFile(); - } - - /** - * It does the same as the begin tag of the corresponding directive of the - * pp hash. - */ - public void beginNestedOutputFile(String name) throws IOException { - checkPpOpsAllowed(); - outputWriter.nestOutputFileBegin(name, false); - } - - /** - * It does the same as the begin tag of the corresponding directive of the - * pp hash. - */ - public void beginNestedOutputFile(String name, boolean append) - throws IOException { - checkPpOpsAllowed(); - outputWriter.nestOutputFileBegin(name, append); - } - - /** - * It does the same as the end tag of the corresponding directive of the - * pp hash. - */ - public void endNestedOutputFile() throws IOException { - checkPpOpsAllowed(); - outputWriter.nestOutputFileEnd(false); - } - - /** - * It does the same as the directive in the pp hash. - */ - public void setOutputEncoding(String encoding) throws IOException { - checkPpOpsAllowed(); - outputWriter.setOutputEncoding(encoding); - fmEnv.setOutputEncoding(outputWriter.getOutputEncoding()); - } - - /** - * It does the same as the directive in the pp hash. - */ - public void warning(String message) { - eng.sendWarning(srcFile, message); - } - - /** - * Resolves a source path to a File object. - * Use this for your custom transforms that wants the path of a source file - * as parameter. When it tries to find the file, paths as - * {@code foo.jpg} will be interpreted relatively to the current source - * file, while paths like {@code /img/foo.jpg} will be interpreted - * relatively to source root directory. - * - *

    Note that an IOException will be thrown if the file is outside the - * source root directory. - * - * @param path the path in UN*X or native format. - * @return {@link File} object that points to the file. - */ - public File resolveSourcePath(String path) throws IOException { - path = FileUtil.pathToUnixStyle(path); - return FileUtil.resolveRelativeUnixPath( - eng.getSourceRoot(), - srcFile.getParentFile(), - path); - } - - /** - * Resolves a output path to a File object. - * This follows the same logic as {@link #resolveSourcePath}, but it uses - * the output file and the output root directory as appropriate. - */ - public File resolveOutputPath(String path) throws IOException { - path = FileUtil.pathToUnixStyle(path); - return FileUtil.resolveRelativeUnixPath( - eng.getOutputRoot(), - getOutputFile().getParentFile(), - path); - } - - /** - * Returns the path relative to the source root. - * - * @param path the path in UN*X or native format. - * The virtual root directory will be the source root, not the real - * root directory of the host system. - * @return the source root relative path in UN*X format. - * It does not start with slash. - */ - public String toSourceRootRelativePath(String path) throws IOException { - File f = resolveSourcePath(path); - return FileUtil.pathToUnixStyle( - FileUtil.getRelativePath(eng.getSourceRoot(), f)); - } - - /** - * Convets a file object to a source root relative UN*X style path. - */ - public String toSourceRootRelativePath(File f) throws IOException { - return FileUtil.pathToUnixStyle( - FileUtil.getRelativePath(eng.getSourceRoot(), f)); - } - - /** - * Same as {@link #toSourceRootRelativePath(String)} but with the output - * file and output root directory. - */ - public String toOutputRelatitvePath(String path) throws IOException { - File f = resolveOutputPath(path); - return FileUtil.pathToUnixStyle( - FileUtil.getRelativePath(eng.getOutputRoot(), f)); - } - - /** - * Convets a file object to an output root relative UN*X style path. - */ - public String toOutputRootRelativePath(File f) throws IOException { - return FileUtil.pathToUnixStyle( - FileUtil.getRelativePath(eng.getOutputRoot(), f)); - } - - /** - * Calculates the path of another output file relatively to current output - * file, in UN*X format. - * - * @param dst the path of the other output file in UN*X or native format. - * The (virtual) root directory will be the output root directory, not - * the real root directory of the host system. - * @return the path of {@code dst} relatively to the current output - * file, in UN*X format. - * It never starts with slash. It ends with slash if and only if - * {@code dst} ends with slash, except if the return value would - * be a single slash then, in which case the result will be an empty - * string instead. - */ - public String getPathTo(String dst) throws IOException { - boolean slashEnd = dst.endsWith("/") || dst.endsWith(File.separator); - File f = resolveOutputPath(dst); - String res = FileUtil.pathToUnixStyle( - FileUtil.getRelativePath(getOutputFile().getParentFile(), f)); - if (res.endsWith("/")) { - res = res.substring(0, res.length() - 1); - } - return slashEnd && res.length() != 0 ? res + "/" : res; - } - - /** - * Same as {@link #getPathTo} but with the source file and - * source root directory. - */ - public String getSourcePathTo(String dst) throws IOException { - boolean slashEnd = dst.endsWith("/") || dst.endsWith(File.separator); - File f = resolveSourcePath(dst); - String res = FileUtil.pathToUnixStyle( - FileUtil.getRelativePath(srcFile.getParentFile(), f)); - if (res.endsWith("/")) { - res = res.substring(0, res.length() - 1); - } - return slashEnd && res.length() != 0 ? res + "/" : res; - } - - // ------------------------------------------------------------------------- - // Protected - - boolean isExternallyAccessible() { - return externallyAccessible; - } - - void setupForSession() { - ppHash.put("s", new WritableHash()); - ppHash.put("sessionStart", - new SimpleDate(new Date(), TemplateDateModel.DATETIME)); - } - - void cleanAfterSession() { - ppHash.remove("s"); - } - - void execute( - Template template, FmppOutputWriter out, File srcFile, - Object xmlDocument, TemplateNodeModel wrappedXmlDocument, - List xmlldbs) - throws DataModelBuildingException, TemplateException, IOException { - try { - this.outputWriter = out; - this.srcFile = srcFile; - this.template = template; - this.xmlDocument = xmlDocument; - this.wrappedXmlDocument = wrappedXmlDocument; - this.localData = new HashMap(); - - // Update the PP hash: - - ppHash.put("sourceRoot", fixedDirPath(eng.getSourceRoot())); - ppHash.put("outputRoot", fixedDirPath(eng.getOutputRoot())); - ppHash.put("realSource", fixedFilePath(srcFile)); - ppHash.put("sourceFile", FileUtil.pathToUnixStyle( - FileUtil.getRelativePath( - eng.getSourceRoot(), srcFile))); - ppHash.put("sourceFileName", srcFile.getName()); - ppHash.put("realSourceDirectory", - fixedDirPath(srcFile.getParentFile())); - ppHash.put("sourceDirectory", FileUtil.pathToUnixStyle( - fixedDirPath(FileUtil.getRelativePath( - eng.getSourceRoot(), - srcFile.getParentFile())))); - ppHash.put("sourceEncoding", template.getEncoding()); - - // Build the local data model: - - ppOpDenialMessage = "You are not allowed to do this operation " + "while building the local data model."; - List ldbs = eng.getLocalDataBuildersForFile(srcFile); - int ln = ldbs.size(); - Map builtData; - for (int i = ln - 1; i >= 0; i--) { - LocalDataBuilder ldb = (LocalDataBuilder) ldbs.get(i); - try { - builtData = ldb.build(eng, this); - } catch (Throwable e) { - throw new DataModelBuildingException( - "Failed to build local data.", e); - } - if (builtData != null) { - localData.putAll(builtData); - } - } - if (xmlldbs != null) { - ln = xmlldbs.size(); - for (int i = 0; i < ln; i++) { - try { - builtData = ((LocalDataBuilder) xmlldbs.get(i)) - .build(eng, this); - } catch (Throwable e) { - throw new DataModelBuildingException( - "Failed to build local data with the " + "local data builder specified by the XML " + "rendering configuration.", e); - } - if (builtData != null) { - localData.putAll(builtData); - } - } - } - - // Execute the template: - - Object lastThreadLocal = THREAD_LOCAL.get(); - THREAD_LOCAL.set(this); - try { - externallyAccessible = true; - try { - // Deprecated TemplateDataModelBuilder - TemplateDataModelBuilder tdmBuilder - = eng.getTemplateDataModelBuilder(); - if (tdmBuilder != null) { - Map td; - try { - td = tdmBuilder.build(eng, template, srcFile); - } catch (Throwable e) { - throw new DataModelBuildingException( - "Failed to build template specific data. " - + "(at builder of class " - + tdmBuilder.getClass().getName() + ")", - e); - } - if (td != null) { - localData.putAll(td); - } - } - - localData.put("pp", ppHash); - - ppOpDenialMessage = null; - - fmEnv = template.createProcessingEnvironment( - localData, outputWriter); - fmEnv.setOutputEncoding(outputWriter.getOutputEncoding()); - fmEnv.process(); - } finally { - externallyAccessible = false; - } - } finally { - THREAD_LOCAL.set(lastThreadLocal); - } - } finally { - execute_clean(); - } - } - - // ------------------------------------------------------------------------- - // Private - - private void execute_clean() { - outputWriter = null; - srcFile = null; - template = null; - fmEnv = null; - localData = null; - xmlDocument = null; - wrappedXmlDocument = null; - } - - private void checkPpOpsAllowed() { - if (ppOpDenialMessage != null) { - throw new IllegalStateException(ppOpDenialMessage); - } - } - - private String getCurrentUrlEncodingCharset() { - String s = fmEnv.getURLEscapingCharset(); - return s != null ? s : fmEnv.getOutputEncoding(); - } - - private static String fixedFilePath(File f) throws IOException { - return f.getCanonicalPath(); - } - - private static String fixedDirPath(File f) throws IOException { - return fixedDirPath(f.getCanonicalPath()); - } - - private static String fixedDirPath(String s) throws IOException { - if (s.length() > 0 && !s.endsWith(File.separator) && !s.endsWith("/")) { - s = s + File.separator; - } - return s; - } - - // ------------------------------------------------------------------------- - // Transforms - - private class ChangeOutputFileTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException { - String name = null; - boolean append = false; - - try { - out.flush(); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to change the outout file", exc); - } - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("name".equals(pname)) { - name = strParam(pvalue, pname); - } else if ("append".equals(pname)) { - append = boolParam(pvalue, pname); - } else { - throw newUnsupportedParamException(pname); - } - } - if (name == null) { - throw newMissingParamException("name"); - } - - try { - outputWriter.changeOutputFile(name, append); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to change the outout file", exc); - } - - return null; - } - } - - private class RenameOutputFileTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException { - String name = null; - String extension = null; - - try { - outputWriter.setIgnoreFlush(true); - try { - out.flush(); - } finally { - outputWriter.setIgnoreFlush(false); - } - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to rename the output file", exc); - } - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("name".equals(pname)) { - name = strParam(pvalue, pname); - } else if ("extension".equals(pname)) { - extension = strParam(pvalue, pname); - } else { - throw newUnsupportedParamException(pname); - } - } - if (name == null) { - if (extension == null) { - throw new TemplateModelException("You must specify on of " + "parameters \"name\" and \"extension\"."); - } - try { - name = getOutputFile().getName(); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to rename the output file", exc); - } - int i = name.lastIndexOf('.'); - if (i != -1) { - name = name.substring(0, i + 1) + extension; - } else { - name = name + "." + extension; - } - } else { - if (extension != null) { - throw new TemplateModelException("You can't specify both " - + "parameters \"name\" and \"extension\"."); - } - } - - try { - outputWriter.renameOutputFile(name); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to rename the output file", exc); - } - - return null; - } - } - - private class DropOutputFileTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException { - if (params != null && params.size() != 0) { - throw newNoParamsAllowedException(); - } - - try { - outputWriter.dropOutputFile(); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to drop the output file", exc); - } - - return null; - } - } - - private class RestartOutputFileTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException { - if (params != null && params.size() != 0) { - throw newNoParamsAllowedException(); - } - - try { - outputWriter.restartOutputFile(); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to reset the output file", exc); - } - - return null; - } - } - - private class NestOutputFileTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(final Writer out, Map params) - throws TemplateModelException { - String name = null; - boolean append = false; - - try { - out.flush(); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to nest output file", exc); - } - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("name".equals(pname)) { - name = strParam(pvalue, pname); - } else if ("append".equals(pname)) { - append = boolParam(pvalue, pname); - } else { - throw newUnsupportedParamException(pname); - } - } - if (name == null) { - throw newMissingParamException("name"); - } - - try { - outputWriter.nestOutputFileBegin(name, append); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to nest output file", exc); - } - - return new Writer() { - - public void write(String data) - throws IOException { - out.write(data); - } - - public void write(char[] cbuf, int off, int len) - throws IOException { - out.write(cbuf, off, len); - } - - public void flush() throws IOException { - out.flush(); - } - - public void close() throws IOException { - outputWriter.nestOutputFileEnd(false); - } - }; - } - } - - class SetOutputEncodingTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException { - String encoding = null; - - try { - outputWriter.setIgnoreFlush(true); - try { - out.flush(); - } finally { - outputWriter.setIgnoreFlush(false); - } - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to set output encoding", exc); - } - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("encoding".equals(pname)) { - encoding = strParam(pvalue, pname); - } else { - throw newUnsupportedParamException(pname); - } - } - if (encoding == null) { - throw newMissingParamException("encoding"); - } - - try { - if (encoding.equals(Engine.PARAMETER_VALUE_SOURCE)) { - encoding = template.getEncoding(); - } - setOutputEncoding(encoding); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to set output encoding", exc); - } - - return null; - } - } - - private class WarningTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException { - String message = null; - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("message".equals(pname)) { - message = strParam(pvalue, pname); - } else { - throw newUnsupportedParamException(pname); - } - } - if (message == null) { - throw newMissingParamException("message"); - } - - eng.sendWarning(srcFile, message); - - return null; - } - } - - private class IgnoreOutputTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(final Writer out, Map params) - throws TemplateModelException { - if (params != null && params.size() != 0) { - throw new TemplateModelException( - "This transform does no support parameters."); - } - - return new Writer() { - public void close() throws IOException { - // nop - } - - public void flush() throws IOException { - out.flush(); - } - - public void write(char[] arg0, int arg1, int arg2) - throws IOException { - // nop - } - - public void write(String str) throws IOException { - // nop - } - }; - } - } - - private class RealFileSizeMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "realFileSize needs 1 argument: file name"); - } - File f = new File((String) arguments.get(0)); - return new SimpleNumber(f.length()); - } - } - - private class RealFileLastModifiedMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "realFileLastModified needs 1 argument: file name"); - } - File f = new File((String) arguments.get(0)); - long l = f.lastModified(); - if (l == 0L) { - throw new TemplateModelException( - "Can't query last modification date, because the " - + "file does not exist: " + f.getAbsolutePath()); - } - return new SimpleDate(new Date(l), TemplateDateModel.DATETIME); - } - } - - private class RealFileExistsMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "realFileExists needs 1 argument: file name"); - } - File f = new File((String) arguments.get(0)); - return f.exists() - ? TemplateBooleanModel.TRUE : TemplateBooleanModel.FALSE; - } - } - - private class SourceFileSizeMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "sourceFileSize needs 1 argument: file name"); - } - try { - File f = resolveSourcePath((String) arguments.get(0)); - return new SimpleNumber(f.length()); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to query file size", exc); - } - } - } - - private class SourceFileLastModifiedMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "sourceFileLastModified needs 1 argument: file name"); - } - try { - File f = resolveSourcePath((String) arguments.get(0)); - long l = f.lastModified(); - if (l == 0L) { - throw new TemplateModelException( - "Can't query last modification date, because the " - + "file does not exist: " + f.getAbsolutePath()); - } - return new SimpleDate(new Date(l), TemplateDateModel.DATETIME); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to query last modification date", - exc); - } - } - } - - private class SourceFileExistsMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "sourceFileExists needs 1 argument: file name"); - } - try { - File f = resolveSourcePath((String) arguments.get(0)); - return f.exists() - ? TemplateBooleanModel.TRUE - : TemplateBooleanModel.FALSE; - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to check if the file exists", exc); - } - } - } - - private class OutputFileSizeMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "outputFileSize needs 1 argument: file name"); - } - try { - File f = resolveOutputPath((String) arguments.get(0)); - return new SimpleNumber(f.length()); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to query file size", exc); - } - } - } - - private class OutputFileLastModifiedMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "outputFileLastModified needs 1 argument: file name"); - } - try { - File f = resolveOutputPath((String) arguments.get(0)); - long l = f.lastModified(); - if (l == 0L) { - throw new TemplateModelException( - "Can't query last modification date, because the " - + "file does not exist: " + f.getAbsolutePath()); - } - return new SimpleDate(new Date(l), TemplateDateModel.DATETIME); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to query last modification date", - exc); - } - } - } - - private class OutputFileExistsMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "outputFileExists needs 1 argument: file name"); - } - try { - File f = resolveOutputPath((String) arguments.get(0)); - return f.exists() - ? TemplateBooleanModel.TRUE - : TemplateBooleanModel.FALSE; - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to check if the file exists", exc); - } - } - } - - private class UrlEncodeMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "urlEncode needs 1 argument"); - } - try { - return new SimpleScalar( - StringUtil.urlEnc( - (String) arguments.get(0), - getCurrentUrlEncodingCharset())); - } catch (IOException exc) { - throw new TemplateModelException( - "URL encoding failed", exc); - } - } - } - - private class UrlPathEncodeMethod implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "urlEncode needs 1 argument"); - } - try { - String s = (String) arguments.get(0); - s = s.replace('\\', '/'); - s = s.replace(File.separatorChar, '/'); - return new SimpleScalar( - StringUtil.urlPathEnc( - s, - getCurrentUrlEncodingCharset())); - } catch (IOException exc) { - throw new TemplateModelException( - "URL path encoding failed", exc); - } - } - } - - private class ToSourceRootRelativePathMethod - implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "sourceRootRelativePath needs 1 argument"); - } - try { - return new SimpleScalar( - toSourceRootRelativePath( - (String) arguments.get(0))); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to transform path " + StringUtil.jQuote((String) arguments.get(0)) - + " to source-root relative.", - exc); - } - } - } - - private class ToOutputRootRelativePathMethod - implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "outputRootRelativePath needs 1 argument"); - } - try { - return new SimpleScalar( - toOutputRelatitvePath( - (String) arguments.get(0))); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to transform path " + StringUtil.jQuote((String) arguments.get(0)) - + " to output-root relative.", - exc); - } - } - } - - private class PathToSourceMethod - implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "pathToSource needs 1 argument"); - } - try { - return new SimpleScalar( - getSourcePathTo( - (String) arguments.get(0))); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to transform path " + StringUtil.jQuote((String) arguments.get(0)) - + " to source file relative.", - exc); - } - } - } - - private class PathToMethod - implements TemplateMethodModel { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() != 1) { - throw new TemplateModelException( - "pathTo needs 1 argument"); - } - try { - return new SimpleScalar( - getPathTo( - (String) arguments.get(0))); - } catch (IOException exc) { - throw new TemplateModelException( - "Failed to transform path " + StringUtil.jQuote((String) arguments.get(0)) - + " to output file relative.", - exc); - } - } - } - - private abstract class LiveScalar implements TemplateMethodModelEx { - abstract String getName(); - - abstract TemplateModel getValue() throws IOException; - - public Object exec(List args) - throws TemplateModelException { - if (args.size() != 0) { - throw new TemplateModelException( - getFullName() + " does not support parameters."); - } - try { - return getValue(); - } catch (IOException exc) { - throw new TemplateModelException( - getFullName() + " failed", exc); - } - } - - private String getFullName() { - return "pp.get" + getName().substring(0, 1).toUpperCase() - + getName().substring(1) + "()"; - } - - } - - private abstract class LiveString extends LiveScalar { - TemplateModel getValue() throws IOException { - return new SimpleScalar(getStringValue()); - } - - abstract String getStringValue() throws IOException; - } - - private class OutputEncodingMethod extends LiveString { - - String getName() { - return "outputEncoding"; - } - - String getStringValue() { - return outputWriter.getOutputEncoding(); - } - } - - private class RealOutputMethod extends LiveString { - - String getName() { - return "realOutput"; - } - - String getStringValue() throws IOException { - return outputWriter.getOutputFile().getCanonicalPath(); - } - } - - private class OutputFileMethod extends LiveString { - - String getName() { - return "outputFile"; - } - - String getStringValue() throws IOException { - return FileUtil.pathToUnixStyle(FileUtil.getRelativePath( - eng.getOutputRoot(), outputWriter.getOutputFile())); - } - } - - private class RealOutputDirectoryMethod extends LiveString { - - String getName() { - return "realOutputDirectory"; - } - - String getStringValue() throws IOException { - return fixedDirPath(outputWriter.getOutputFile().getParentFile()); - } - } - - private class OutputDirectoryMethod extends LiveString { - - String getName() { - return "outputDirectory"; - } - - String getStringValue() throws IOException { - return FileUtil.pathToUnixStyle( - fixedDirPath(FileUtil.getRelativePath( - eng.getOutputRoot(), - outputWriter.getOutputFile().getParentFile()))); - } - } - - private class OutputFileNameMethod extends LiveString { - - String getName() { - return "outputFile"; - } - - String getStringValue() { - return outputWriter.getOutputFile().getName(); - } - } - - private class HomeScalar extends LiveString { - - String getName() { - return "home"; - } - - String getStringValue() throws IOException { - return getHomePath(); - } - } - - private class NowScalar extends LiveScalar { - - String getName() { - return "now"; - } - - TemplateModel getValue() { - return new SimpleDate(new Date(), TemplateDateModel.DATETIME); - } - } - - private class DocScalar extends LiveScalar { - - String getName() { - return "doc"; - } - - TemplateModel getValue() { - return wrappedXmlDocument; - } - } - - private class LocaleMethod extends LiveString { - - String getName() { - return "locale"; - } - - String getStringValue() { - return Environment.getCurrentEnvironment().getLocale().toString(); - } - } - - private class LoadDataMethod - implements TemplateMethodModelEx { - public Object exec(List args) - throws TemplateModelException { - int ln = args.size(); - if (ln < 1) { - throw new TemplateModelException( - "loadData needs at least 1 argument"); - } - Object o = args.get(0); - if (!(o instanceof TemplateScalarModel)) { - throw new TemplateModelException( - "The first argument to loadData must be a string"); - } - List args2 = new ArrayList(ln - 1); - for (int i = 1; i < ln; i++) { - args2.add(FreemarkerUtil.ftlVarToCoreJavaObject( - (TemplateModel) args.get(i))); - } - String dlName = ((TemplateScalarModel) o).getAsString(); - DataLoader dl; - try { - dl = fmpp.tdd.TddUtil.getDataLoaderInstance(eng, dlName); - } catch (EvalException e) { - throw new TemplateModelException( - "Failed to get data loader.", e); - } - try { - return eng.wrap(dl.load(eng, args2)); - } catch (Exception exc) { - throw new TemplateModelException( - "Error runing data loader " + StringUtil.jQuote(dlName) - + ".", - exc); - } - } - } -} diff --git a/fmpp/src/main/java/fmpp/XmlRenderingConfiguration.java b/fmpp/src/main/java/fmpp/XmlRenderingConfiguration.java deleted file mode 100644 index 1985379..0000000 --- a/fmpp/src/main/java/fmpp/XmlRenderingConfiguration.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import fmpp.util.FileUtil; -import fmpp.util.StringUtil; - -/** - * Stores options that describe when and how to process an XML file in - * "renderXml" processing mode. - * - *

    Do not change this object after you have added it to the - * {@link fmpp.Engine}. It's in principle - * an immutable object, but to prevent too many constructor parameters and - * later backward compatibility problems, you have to specify the options with - * setter methods, rather than with constructor arguments. - * - *

    You must set a non-null template or set - * copy to true. All other options are optional. - */ -public class XmlRenderingConfiguration { - private String template; - private boolean copy; - private List pathPatterns = new ArrayList(); - private List documentElementLocalNames = new ArrayList(); - private List documentElementNamespaces = new ArrayList(); - private List localDataBuilders = new ArrayList(); - private Map xmlDataLoaderOptions = new HashMap(); - - // ------------------------------------------------------------------------- - // Constructors - - /** - * Creates new object. - */ - public XmlRenderingConfiguration() { - } - - // ------------------------------------------------------------------------- - // Public interface - - /** - * Sets the renderer template. - * - * @param template the source path of the template used for the - * rendering of the XML file. Can't be null. - */ - public void setTemplate(String template) { - if (template != null) { - template = FileUtil.pathToUnixStyle(template); - if (template.startsWith("/")) { - template = template.substring(1); - } - this.template = template; - } - } - - /** - * Sets if the XML file should be copied as is, or renderd with a template. - * If the value of this option is true, then the value of the - * template option is insignificant. - */ - public void setCopy(boolean copy) { - this.copy = copy; - } - - /** - * Adds an element to the list of document elements. The XML file will not - * be processed according this configuration object if this list - * doesn't contain the document element of the XML file. - * If the list is empty, then this criteria will not be considered - * (accepts XML documents regardels of their document element). - * - * @param xmlns the name-space URL of the element. This should be - * null or 0-length stirng if the element doesn't belong to - * any XML name-space. - * @param localName the local (name-space preixless) name of the element. - */ - public void addDocumentElement(String xmlns, String localName) { - documentElementNamespaces.add(xmlns); - documentElementLocalNames.add(localName); - } - - /** - * Empties the document element list. - * @see #addDocumentElement(String, String) - */ - public void clearDocumentElements() { - documentElementNamespaces.clear(); - documentElementLocalNames.clear(); - } - - /** - * Adds an extra local data builder that is invoked after all other - * local data builders. The task of this builder is to do the - * complex or resource eager parts of the XML processing that you don't - * want to do in FTL, and expose the results as local data. - * - *

    The data loaders added earlier will be executed earlier. The data - * loader executed later can replace earlier added local data variables. - */ - public void addLocalDataBuilder(LocalDataBuilder localDataBuilder) { - localDataBuilders.add(localDataBuilder); - } - - /** - * Removes all local data builders. - * - * @see #addLocalDataBuilder(LocalDataBuilder) - */ - public void clearLocalDataBuilders() { - localDataBuilders.clear(); - } - - /** - * Adds a path to the list of source path patterns. The XML file will not be - * processed according this configuration object if no path - * in this list matches the source root relative path of the XML file. - * If the list is empty, then this criteria will not be considered - * (accepts XML documents regardels of their source file path). - * - * @param pathPattern the path pattern of the source root relative path of - * the XML file. It doesn't mater if it starts with / or not. - */ - public void addSourcePathPattern(String pathPattern) { - this.pathPatterns.add(pathPattern); - } - - /** - * Empties the list of source path patterns. - * @see #addSourcePathPattern(String) - */ - public void clearSourcePathPatterns() { - pathPatterns.clear(); - } - - /** - * Adds or replaces an option in the map of xml data loader - * options. - * The set of valid values are specified by the xml data loader - * (see in the FMPP Manual), and they will not be validated until the data - * loader is actually invoked, so when the processing of the XML file - * starts. The only exception from this rule is the - * "namespaceAware" option, for which false - * value is not allowed. - * - * @param name the name of the option. Option "namespaceAware" - * is not allowed. - * @param value the value of the option - */ - public void addXmlDataLoaderOption(String name, Object value) { - if (name.equals("namespaceAware") && Boolean.FALSE.equals(value)) { - throw new IllegalArgumentException("It's not allowed to set the " - + "\"namespaceAware\" option to false."); - } - xmlDataLoaderOptions.put(name, value); - } - - /** - * Removes all xml data loader options. - */ - public void clearXmlDataLoaderOptions() { - xmlDataLoaderOptions.clear(); - } - - public String toString() { - StringBuffer sb = new StringBuffer(128); - - sb.append("xmlRendering{"); - sb.append("template="); - sb.append(template); - sb.append(", ifSourceIs="); - sb.append(pathPatterns); - sb.append(", ifDocumentElementIs=["); - for (int i = 0; i < documentElementLocalNames.size(); i++) { - if (i != 0) { - sb.append(", "); - } - if (documentElementNamespaces.get(i) != null) { - sb.append(StringUtil.jQuote( - (String) documentElementNamespaces.get(i))); - sb.append(":"); - } - sb.append(documentElementLocalNames.get(i)); - } - sb.append("], localDataBuilder="); - sb.append(localDataBuilders); - sb.append(", xmlDataLoaderOptions="); - sb.append(xmlDataLoaderOptions); - sb.append("}"); - - return sb.toString(); - } - - // ------------------------------------------------------------------------- - // Package interface - - String getTemplatePath() { - return template; - } - - boolean getCopy() { - return copy; - } - - List getPathPatterns() { - return pathPatterns; - } - - List getDocumentElementLocalNames() { - return documentElementLocalNames; - } - - List getDocumentElementNamespaces() { - return documentElementNamespaces; - } - - Map getXmlDataLoaderOptions() { - return xmlDataLoaderOptions; - } - - List getLocalDataBuilders() { - return localDataBuilders; - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/dataloaders/AbstractTextDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/AbstractTextDataLoader.java deleted file mode 100644 index d4a36b2..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/AbstractTextDataLoader.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.util.List; - -/** - * Returns a string based on a plain text file. - */ -public abstract class AbstractTextDataLoader extends FileDataLoader { - - protected final Object load(InputStream data) throws Exception { - String encoding; - - encoding = parseExtraArguments(args); - if (encoding == null) { - encoding = engine.getSourceEncoding(); - } - - StringBuffer sb = new StringBuffer(1024); - Reader r = new InputStreamReader(data, encoding); - char[] buffer = new char[4096]; - int i; - while ((i = r.read(buffer)) != -1) { - sb.append(buffer, 0, i); - } - - String s = sb.toString(); - - // Remove Windows Notepad BOM: - if (s.startsWith("\uFEFF")) { - s = s.substring(1); - } - - return parseText(s); - } - - /** - * Parses the file content to the final object that the data loader - * will return. - * - * @param text the content of the text file - * @return the return value of the data loader - */ - protected abstract Object parseText(String text) throws Exception; - - /** - * Parses the argument list, except the 1st (file name) argument. - * @param args the arguments (all of them, starting from the 1st) - * @return the encoding given with the extra arguments, or - * null if the encoding was not specified. In the latest - * case the encoding will default to the source encoding engine - * parameter (the sourceEncoding setting). - */ - protected abstract String parseExtraArguments(List args) throws Exception; - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/dataloaders/AntDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/AntDataLoader.java deleted file mode 100644 index 2b2e905..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/AntDataLoader.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.util.List; - -import org.apache.tools.ant.Task; - -import fmpp.Engine; -import fmpp.tdd.DataLoader; -import fmpp.util.RuntimeExceptionCC; - -/** - * Abstract base class of Ant related data loaders. - */ -public abstract class AntDataLoader implements DataLoader { - /** - * The name of the {@link Engine} attribute that must store the Ant task - * object. - */ - public static final String ATTRIBUTE_ANT_TASK = "fmpp.ant.task"; - - /** - * Gets the Ant task object, and invoked {@link #load(Engine, List, Task)}. - */ - public Object load(Engine eng, List args) throws Exception { - Task task = (Task) eng.getAttribute(ATTRIBUTE_ANT_TASK); - if (task == null) { - throw new RuntimeExceptionCC( - "Ant environment not available: " + ATTRIBUTE_ANT_TASK - + " Engine attribute is not set."); - } - - return load(eng, args, task); - } - - /** - * Override this method to implement your Ant related data loader. - */ - protected abstract Object load(Engine eng, List args, Task task) - throws Exception; -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/AntProjectDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/AntProjectDataLoader.java deleted file mode 100644 index 666037f..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/AntProjectDataLoader.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.util.List; - -import org.apache.tools.ant.Task; - -import fmpp.Engine; - -/** - * Returns the Ant project object. - */ -public class AntProjectDataLoader extends AntDataLoader { - - public Object load(Engine eng, List args, Task task) { - if (args.size() != 0) { - throw new IllegalArgumentException( - "antProject data loader has no parameters"); - } - - return task.getProject(); - } -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/AntPropertiesDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/AntPropertiesDataLoader.java deleted file mode 100644 index 34221c4..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/AntPropertiesDataLoader.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.tools.ant.Project; -import org.apache.tools.ant.Task; - -import fmpp.Engine; -import fmpp.util.BugException; -import fmpp.util.StringUtil; -import fmpp.util.StringUtil.ParseException; - -/** - * Returns the Map of all Ant properties, or of the selected Ant properties. - */ -public class AntPropertiesDataLoader extends AntDataLoader { - - public Object load(Engine eng, List args, Task task) throws ParseException { - Project proj = task.getProject(); - - if (args.size() == 0) { - return proj.getProperties(); - } else { - Map exposedProps = new HashMap(); - - for (int i = 0; i < args.size(); i++) { - Object o = args.get(i); - if (!(o instanceof String)) { - throw new IllegalArgumentException( - "The parameters of antProperites data loader must " - + "be all strings; the names of the Ant properties " + "to expose."); - } - String name = (String) o; - int type = 0; - if (name.endsWith("?n")) { - type = 1; - } else if (name.endsWith("?b")) { - type = 2; - } else if (name.endsWith("?d")) { - type = 3; - } else if (name.endsWith("?t")) { - type = 4; - } else if (name.endsWith("?dt")) { - type = 5; - } else if (name.endsWith("?s")) { - type = 6; - } - if (type != 0) { - name = name.substring(0, name.lastIndexOf('?')); - } - - String value = proj.getProperty(name); - Object xValue; - if (value != null) { - if (type == 0 || type == 6) { - xValue = value; - } else if (type == 1) { - try { - xValue = StringUtil.stringToBigDecimal(value); - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException( - "The value of property " - + StringUtil.jQuote(name) + " is invalid.", - e); - } - } else if (type == 2) { - try { - xValue = StringUtil.stringToBoolean(value) - ? Boolean.TRUE : Boolean.FALSE; - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException( - "The value of property " - + StringUtil.jQuote(name) + " is invalid.", - e); - } - } else if (type == 3) { - try { - xValue = StringUtil.stringToDate( - value, eng.getTimeZone()); - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException( - "The value of property " - + StringUtil.jQuote(name) + " is invalid.", - e); - } - } else if (type == 4) { - try { - xValue = StringUtil.stringToTime( - value, eng.getTimeZone()); - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException( - "The value of property " - + StringUtil.jQuote(name) + " is invalid.", - e); - } - } else if (type == 5) { - try { - xValue = StringUtil.stringToDateTime( - value, eng.getTimeZone()); - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException( - "The value of property " - + StringUtil.jQuote(name) + " is invalid.", - e); - } - } else { - throw new BugException("Unknown type " + type); - } - exposedProps.put(name, xValue); - } // if value not null - } // for - - return exposedProps; - } - } -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/AntPropertyDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/AntPropertyDataLoader.java deleted file mode 100644 index ddf724d..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/AntPropertyDataLoader.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.util.List; - -import org.apache.tools.ant.Task; - -import fmpp.Engine; -import fmpp.util.BugException; -import fmpp.util.StringUtil; -import fmpp.util.StringUtil.ParseException; - -/** - * Returns the value of an Ant property. - */ -public class AntPropertyDataLoader extends AntDataLoader { - - public Object load(Engine eng, List args, Task task) throws ParseException { - int argCount = args.size(); - if (argCount < 1 || argCount > 2) { - throw new IllegalArgumentException( - "antProperty(propertyName[, defaultValue]) needs 1 or 2 " + "parameters."); - } - Object obj = args.get(0); - if (!(obj instanceof String)) { - throw new IllegalArgumentException( - "The first parameter to antProperty(propertyName[, " + "defaultValue]) must be a string."); - } - - int type = 0; - String name = (String) obj; - if (name.endsWith("?n")) { - type = 1; - } else if (name.endsWith("?b")) { - type = 2; - } else if (name.endsWith("?d")) { - type = 3; - } else if (name.endsWith("?t")) { - type = 4; - } else if (name.endsWith("?dt")) { - type = 5; - } else if (name.endsWith("?s")) { - type = 6; - } - if (type != 0) { - name = name.substring(0, name.lastIndexOf('?')); - } - - String value = task.getProject().getProperty(name); - if (value == null) { - if (argCount > 1) { - return args.get(1); - } - return null; - } else { - if (type == 0 || type == 6) { - return value; - } else if (type == 1) { - try { - return StringUtil.stringToBigDecimal(value); - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException("The value of property " - + StringUtil.jQuote(name) + " is invalid.", e); - } - } else if (type == 2) { - try { - return StringUtil.stringToBoolean(value) - ? Boolean.TRUE : Boolean.FALSE; - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException("The value of property " - + StringUtil.jQuote(name) + " is invalid.", e); - } - } else if (type == 3) { - try { - return StringUtil.stringToDate(value, eng.getTimeZone()); - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException("The value of property " - + StringUtil.jQuote(name) + " is invalid.", e); - } - } else if (type == 4) { - try { - return StringUtil.stringToTime(value, eng.getTimeZone()); - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException("The value of property " - + StringUtil.jQuote(name) + " is invalid.", e); - } - } else if (type == 5) { - try { - return StringUtil.stringToDateTime( - value, eng.getTimeZone()); - } catch (StringUtil.ParseException e) { - throw new StringUtil.ParseException("The value of property " - + StringUtil.jQuote(name) + " is invalid.", e); - } - } else { - throw new BugException("Unknown type " + type); - } - } - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/dataloaders/AntTaskDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/AntTaskDataLoader.java deleted file mode 100644 index aa78b61..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/AntTaskDataLoader.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.util.List; - -import org.apache.tools.ant.Task; - -import fmpp.Engine; - -/** - * Returns the FMPP Ant task object. - */ -public class AntTaskDataLoader extends AntDataLoader { - - public Object load(Engine eng, List args, Task task) { - - if (args.size() != 0) { - throw new IllegalArgumentException( - "antTask data loader has no parameters"); - } - - return task; - } - -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/CsvDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/CsvDataLoader.java deleted file mode 100644 index e76f66f..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/CsvDataLoader.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.util.Iterator; -import java.util.Map; - -import fmpp.models.CsvSequence; -import fmpp.util.DataLoaderUtil; -import fmpp.util.StringUtil; -import fmpp.util.StringUtil.ParseException; -import freemarker.template.TemplateModelException; - - -/** - * Data loaders that loads CSV (Column Separated Values) files or other files of - * similar formats (as tab divided text), and returns a - * {@link CsvSequence fmpp.models.CsvSequence} object. - * - *

    The format of the directive is: - * csv(filename, option), - * where option is a hash of options, such as - * {encoding:'ISO-8859-3', separator:','}. - * For the complete list of options please see the parameters of - * {@link fmpp.models.CsvSequence CsvSequence} constructors. - * - *

    Note: This class should be an - * {@link fmpp.dataloaders.AbstractTextDataLoader} subclass, but it is not that - * for backward compatibility. - */ -public class CsvDataLoader extends FileDataLoader { - - protected Object load(InputStream data) throws IOException, - TemplateModelException, ParseException { - String encoding = engine.getSourceEncoding(); - - if (args.size() < 1 || args.size() > 3) { - throw new IllegalArgumentException( - "csv data loader needs 1 or 2 arguments: " - + "csv(filename) or csv(filename, options)"); - } - Object obj; - CsvSequence csvs = new CsvSequence(); - if (args.size() > 1) { - Map options; - obj = args.get(1); - if (!(obj instanceof Map)) { - throw new IllegalArgumentException( - "The 2nd argument (options) must be a hash."); - } - boolean aHeaderOpWasUsed = false; - options = (Map) obj; - Iterator it = options.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - String opname = (String) ent.getKey(); - if (opname.equals("headers")) { - if (aHeaderOpWasUsed) { - throw new IllegalArgumentException("Only one of the " - + "\"headers\" and \"replaceHeaders\" options " - + "can be used at once."); - } - csvs.setExternalHeaderRow( - DataLoaderUtil.getStringArrayOption( - opname, ent.getValue())); - csvs.setHasHeaderRow(false); - aHeaderOpWasUsed = true; - } else if (opname.equals("replaceHeaders")) { - if (aHeaderOpWasUsed) { - throw new IllegalArgumentException("Only one of the " - + "\"headers\" and \"replaceHeaders\" options " - + "can be used at once."); - } - csvs.setExternalHeaderRow( - DataLoaderUtil.getStringArrayOption( - opname, ent.getValue())); - csvs.setHasHeaderRow(true); - aHeaderOpWasUsed = true; - } else if (opname.equals("normalizeHeaders")) { - csvs.setNormalizeHeaders(DataLoaderUtil.getBooleanOption( - opname, ent.getValue())); - } else if (opname.equals("trimCells")) { - csvs.setTrimCells(DataLoaderUtil.getBooleanOption( - opname, ent.getValue())); - } else if (opname.equals("emptyValue")) { - csvs.setEmptyValues( - DataLoaderUtil.getStringArrayOption( - opname, ent.getValue(), true)); - } else if (opname.equals("separator")) { - csvs.setSeparator(DataLoaderUtil.getCharOption( - opname, ent.getValue())); - } else if (opname.equals("groupingSeparator")) { - csvs.setGroupingSeparator( - DataLoaderUtil.getCharOption( - opname, ent.getValue())); - } else if (opname.equals("decimalSeparator")) { - csvs.setDecimalSeparator( - DataLoaderUtil.getCharOption( - opname, ent.getValue())); - } else if (opname.equals(DataLoaderUtil.OPTION_NAME_ENCODING)) { - encoding = DataLoaderUtil.getStringOption( - opname, ent.getValue()); - } else if (opname.equals("altTrue")) { - csvs.setAltTrue(DataLoaderUtil.getStringOption( - opname, ent.getValue())); - } else if (opname.equals("altFalse")) { - csvs.setAltFalse(DataLoaderUtil.getStringOption( - opname, ent.getValue())); - } else if (opname.equals("dateFormat")) { - try { - csvs.setDateFormatPattern( - DataLoaderUtil.getStringOption( - opname, ent.getValue())); - } catch (IllegalArgumentException e) { - throw new ParseException( - "The value of option " - + StringUtil.jQuote(opname) + " is illegal.", - e); - } - } else if (opname.equals("timeFormat")) { - try { - csvs.setTimeFormatPattern( - DataLoaderUtil.getStringOption( - opname, ent.getValue())); - } catch (IllegalArgumentException e) { - throw new ParseException( - "The value of option " - + StringUtil.jQuote(opname) + " is illegal.", - e); - } - } else if (opname.equals("dateTimeFormat")) { - try { - csvs.setDateTimeFormatPattern( - DataLoaderUtil.getStringOption( - opname, ent.getValue())); - } catch (IllegalArgumentException e) { - throw new ParseException( - "The value of option " - + StringUtil.jQuote(opname) + " is illegal.", - e); - } - } else { - throw new IllegalArgumentException( - "Unknown option: " + StringUtil.jQuote(opname) - + ". The supported options are: " - + "encoding, separator, headers, replaceHeaders, " - + "normalizeHeaders, trimCells, emptyValue, " - + "groupingSeparator, decimalSeparator, altTrue, " - + "altFalse"); - } - } - } - csvs.setTimeZone(engine.getTimeZone()); - - Reader r = new BufferedReader(new InputStreamReader(data, encoding)); - - // Skipping BOM if present - r.mark(2); - char firstChar = (char) r.read(); - if (firstChar != 0xFEFF) { - r.reset(); - } - - csvs.load(r); - return csvs; - } - -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/EvalDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/EvalDataLoader.java deleted file mode 100644 index 2415f9d..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/EvalDataLoader.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import bsh.Interpreter; -import fmpp.Engine; -import fmpp.tdd.DataLoader; - -/** - * Evaluates a BeanShell expression (looks like as Java). - * The scrip has access to the Engine object by the - * engine variable. - */ -public class EvalDataLoader implements DataLoader { - public Object load(Engine e, List args) throws Exception { - int ln = args.size(); - if (ln < 1 || ln > 2) { - throw new IllegalArgumentException( - "eval(script[, vars]) needs 1 or 2 arguments."); - } - String script; - Object o = args.get(0); - if (!(o instanceof String)) { - throw new IllegalArgumentException( - "The 1st parameter to eval(script[, vars])" + "must be a string, but it was a " - + fmpp.tdd.Interpreter.getTypeName(o) + "."); - } - script = (String) o; - - Interpreter intp = new Interpreter(); - intp.set("engine", e); - - if (ln > 1) { - o = args.get(1); - if (!(o instanceof Map)) { - throw new IllegalArgumentException( - "The 2nd parameter to eval(script[, vars])" - + "must be a hash, but it was a " - + fmpp.tdd.Interpreter.getTypeName(o) + "."); - } - Map vars = (Map) o; - Iterator it = vars.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - intp.set((String) ent.getKey(), ent.getValue()); - } - } - - return intp.eval(script); - } -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/FileDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/FileDataLoader.java deleted file mode 100644 index 89f8026..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/FileDataLoader.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.util.List; - -import fmpp.Engine; -import fmpp.tdd.DataLoader; - -/** - * Ancestor of data loaders that create the result based on a file. - * The first argument of the data loader will be the path of the file. - * If the path is a relative path, then it will be relative to the data root - * directory (an engine level setting), or if data root is null, then relative - * to the working directory (OS facility). The path can use slash (/) instead - * of the OS specific separator char. - */ -public abstract class FileDataLoader implements DataLoader { - - protected Engine engine; - protected List args; - protected File dataFile; - - public Object load(Engine engine, List args) throws Exception { - this.engine = engine; - this.args = args; - - if (args.size() < 1) { - throw new IllegalArgumentException( - "At least 1 argument (file name) needed"); - } - Object obj = args.get(0); - if (!(obj instanceof String)) { - throw new IllegalArgumentException( - "The 1st argument (file name) must be a string."); - } - String path = (String) obj; - path = path.replace('/', File.separatorChar); - - dataFile = new File(path); - if (!dataFile.isAbsolute()) { - dataFile = new File(engine.getDataRoot(), path); - } - - InputStream in = new FileInputStream(dataFile); - try { - return load(in); - } finally { - in.close(); - } - } - - /** - * FileDataLoader subclasess override this method to parse - * the file. - */ - protected abstract Object load(InputStream data) throws Exception; - -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/HtmlUtilsDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/HtmlUtilsDataLoader.java deleted file mode 100644 index 3dcb613..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/HtmlUtilsDataLoader.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.io.Writer; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.devlib.schmidt.imageinfo.ImageInfo; - -import fmpp.Engine; -import fmpp.tdd.DataLoader; -import fmpp.util.StringUtil; -import freemarker.template.TemplateBooleanModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNumberModel; -import freemarker.template.TemplateScalarModel; -import freemarker.template.TemplateTransformModel; - -/** - * Returns a hash that contains useful directives for HTML generation. - *

      - *
    • img: Same as HTML img, but automatically calculates the width and/or - * height attributes if they are missing. - *
    - */ -public class HtmlUtilsDataLoader implements DataLoader { - private boolean xHtml = false; - private String eTagClose; - - private Engine engine; - - private static final int MAX_CACHE_SIZE = 100; - private Map imageInfoCache = new HashMap(); - private CachedImageInfo first; - private CachedImageInfo last; - private ImageInfo imageInfo = new ImageInfo(); - - public Object load(Engine e, List args) throws Exception { - if (args.size() != 0) { - throw new IllegalArgumentException( - "data loader does not have arguments"); - } - engine = e; - if (xHtml) { - eTagClose = " />"; - } else { - eTagClose = ">"; - } - - Map map = new HashMap(); - - map.put("img", new ImgTransform()); - - return map; - } - - public void setXHtml(boolean xHtml) { - this.xHtml = xHtml; - } - - private CachedImageInfo getImageInfo(File f) - throws IOException, TemplateModelException { - String cacheKey = f.getCanonicalPath(); - - CachedImageInfo inf = (CachedImageInfo) imageInfoCache.get(cacheKey); - if (inf != null) { - long lmd = new File(cacheKey).lastModified(); - if (inf.lmd == lmd && lmd != 0L && inf.lmd != 0L) { - if (inf != last) { - if (inf.prev != null) { - inf.prev.next = inf.next; - } else { - first = inf.next; - } - if (inf.next != null) { - inf.next.prev = inf.prev; - } else { - last = inf.prev; - } - - inf.prev = last; - inf.next = null; - last = inf; - inf.prev.next = last; - } - return inf; //! - } else { - imageInfoCache.remove(cacheKey); - if (inf.prev != null) { - inf.prev.next = inf.next; - } else { - first = inf.next; - } - if (inf.next != null) { - inf.next.prev = inf.prev; - } else { - last = inf.prev; - } - } - } - - RandomAccessFile raf; - try { - raf = new RandomAccessFile(f, "r"); - } catch (FileNotFoundException e) { - throw new TemplateModelException("Image file not found: " + f.getAbsolutePath(), e); - } - try { - imageInfo.setCollectComments(false); - imageInfo.setInput(raf); - if (!imageInfo.check()) { - throw new TemplateModelException("Failed to analyse image file: " + cacheKey); - } - } finally { - raf.close(); - } - inf = new CachedImageInfo(); - inf.lmd = f.lastModified(); - inf.width = imageInfo.getWidth(); - inf.height = imageInfo.getHeight(); - inf.path = cacheKey; - if (last != null) { - last.next = inf; - } - inf.prev = last; - inf.next = null; - last = inf; - if (inf.prev == null) { - first = inf; - } - imageInfoCache.put(cacheKey, inf); - if (imageInfoCache.size() > MAX_CACHE_SIZE) { - imageInfoCache.remove(first.path); - first.next.prev = null; - first = first.next; - } - - return inf; - } - - private class CachedImageInfo { - private CachedImageInfo prev; - private CachedImageInfo next; - private String path; - private long lmd; - private int width; - private int height; - } - - private class ImgTransform implements TemplateTransformModel { - public Writer getWriter(Writer out, Map args) - throws TemplateModelException, IOException { - boolean detectHeight = true; - boolean detectWidth = true; - String src = null; - - out.write("{ "a": 1, "b": 2 }), an array, or even just a string, number, boolean or - * {@code null}. - */ -public class JSONDataLoader extends FileDataLoader { - - protected Object load(InputStream in) throws Exception { - - if (args.size() < 1 || args.size() > 2) { - throw new IllegalArgumentException( - "json data loader needs 1 or 2 arguments: json(filename) or json(filename, charset)"); - } - - final String charset; - if (args.size() > 1) { - final Object arg = args.get(1); - if (!(arg instanceof String)) { - throw new IllegalArgumentException("The 2nd argument (charset) must be a string."); - } - charset = (String) arg; - } else { - charset = engine.getSourceEncoding(); - } - - String src = FileUtil.loadString(in, charset); - - Object jsonPOJO = JSONParser.parse(src, dataFile.getAbsolutePath()); - - return finalizeResult(jsonPOJO); - } - - /** - * Converts the POJO created from the JSON to its final form. - */ - protected Object finalizeResult(Object jsonPOJO) throws Exception { - return JSONNode.wrap(jsonPOJO); - } - -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/NowDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/NowDataLoader.java deleted file mode 100644 index a049f13..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/NowDataLoader.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.TimeZone; - -import fmpp.Engine; -import fmpp.tdd.DataLoader; -import fmpp.util.StringUtil; - -/** - * Data loader that produces string from the current date. - * It is maybe better to use pp.sessionStart or - * pp.now instead of this data loader. - * - *

    The format of the directive is: - * now(options), where options is a hash as: - * {pattern:"yyyy-MM-dd HH:mm:ss"} or - * {date:short, time:long, zone:"GMT+0"}. - */ -public class NowDataLoader implements DataLoader { - public Object load(Engine engine, List args) throws Exception { - String pattern = null; - boolean dateTypeSet = false; - int dateType = 0; - boolean timeTypeSet = false; - int timeType = 0; - TimeZone zone = engine.getTimeZone(); - Locale locale = engine.getLocale(); - - if (args.size() > 0) { - if (args.size() != 1) { - throw new IllegalArgumentException( - "nowString data loader needs 0 or 1 arguments."); - } - if (!(args.get(0) instanceof Map)) { - throw new IllegalArgumentException( - "The argument of nowString data loader must be a hash."); - } - Map ops = (Map) args.get(0); - Iterator it = ops.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String opname = (String) e.getKey(); - String opvalue; - if (opname.equals("locale")) { - opvalue = strOp(opname, e.getValue()); - String codes[] = StringUtil.split(opvalue + "__", '_'); - locale = new Locale(codes[0], codes[1], codes[2]); - } else if (opname.equals("date")) { - opvalue = strOp("date", e.getValue()); - dateTypeSet = true; - if (opvalue.equalsIgnoreCase("short")) { - dateType = DateFormat.SHORT; - } else if (opvalue.equalsIgnoreCase("medium")) { - dateType = DateFormat.MEDIUM; - } else if (opvalue.equalsIgnoreCase("long")) { - dateType = DateFormat.LONG; - } else if (opvalue.equalsIgnoreCase("default")) { - dateType = DateFormat.DEFAULT; - } else { - throw new IllegalArgumentException( - "Illegal value for the date option: " - + StringUtil.jQuote(opvalue) + ". " - + "Valid values are: " + "short, medium, long, default"); - } - } else if (opname.equals("time")) { - opvalue = strOp(opname, e.getValue()); - timeTypeSet = true; - if (opvalue.equalsIgnoreCase("short")) { - timeType = DateFormat.SHORT; - } else if (opvalue.equalsIgnoreCase("medium")) { - timeType = DateFormat.MEDIUM; - } else if (opvalue.equalsIgnoreCase("long")) { - timeType = DateFormat.LONG; - } else if (opvalue.equalsIgnoreCase("default")) { - timeType = DateFormat.DEFAULT; - } else { - throw new IllegalArgumentException( - "Illegal value for the time option: " - + StringUtil.jQuote(opvalue) + ". " - + "Valid values are: " - + "short, medium, long, default"); - } - } else if (opname.equals("pattern")) { - pattern = strOp(opname, e.getValue()); - } else if (opname.equals("zone")) { - opvalue = strOp(opname, e.getValue()); - zone = TimeZone.getTimeZone(opvalue); - } else { - throw new IllegalArgumentException( - "Unknown option: " + StringUtil.jQuote(opname) - + ". The supported options are: " - + "locale, date, time, pattern, zone"); - } - } - } - - DateFormat sdf; - if (pattern != null) { - if (dateTypeSet || timeTypeSet) { - throw new IllegalArgumentException( - "You can't use the the date/time options together " - + "with the pattern option."); - } - sdf = new SimpleDateFormat(pattern, locale); - } else { - if (dateTypeSet) { - if (timeTypeSet) { - sdf = DateFormat.getDateTimeInstance( - dateType, timeType, locale); - } else { - sdf = DateFormat.getDateInstance(dateType, locale); - } - } else if (timeTypeSet) { - sdf = DateFormat.getTimeInstance(dateType, locale); - } else { - sdf = DateFormat.getDateTimeInstance( - DateFormat.SHORT, DateFormat.SHORT, locale); - } - } - if (zone != null) { - sdf.setTimeZone(zone); - } - - return sdf.format(new Date()); - } - - private static String strOp(String name, Object value) { - if (value instanceof String) { - return (String) value; - } else { - throw new IllegalArgumentException("The value of " + name - + "option must be a string."); - } - } -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/PropertiesDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/PropertiesDataLoader.java deleted file mode 100644 index a1fdfee..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/PropertiesDataLoader.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -/** - * Returns a Map based on a Java properties file. - */ -public class PropertiesDataLoader extends FileDataLoader { - protected Object load(InputStream data) throws IOException { - if (args.size() != 1) { - throw new IllegalArgumentException( - "Properties data loader needs exaclty 1 argument: " - + "properties(filename)"); - } - - Properties ps = new Properties(); - ps.load(data); - return ps; - } - -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/SlicedTextDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/SlicedTextDataLoader.java deleted file mode 100644 index 172e5a5..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/SlicedTextDataLoader.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import fmpp.util.DataLoaderUtil; -import fmpp.util.StringUtil; - -/** - * Returns a sequence of strings based on a plain text file, where the specified - * symbol is used as separator. For more information please read the FMPP - * Manual. - */ -public class SlicedTextDataLoader extends AbstractTextDataLoader { - - private String separator; - private boolean trim = false; - private boolean dropEmptyLastItem = true; - - protected final Object parseText(String text) throws Exception { - ArrayList res = new ArrayList(100); - int ln = text.length(); - String separator = this.separator; - int sl = separator.length(); - int b = 0; - int e = 0; - boolean hasMore = true; - do { - int si; - int ti = e; - if (e < ln) { - // This part examines if the text starts with the separator - // starting from text index e. If not, si will be less than sl, - // otherwise ti will point the next character after the - // separator. - // { - si = 0; - startsWith: while (si < sl) { - char sc = separator.charAt(si); - if (ti < ln) { - if (sc == 0xA) { - char c = text.charAt(ti); - if (c == 0xA) { - si++; - ti++; - } else if (c == 0xD) { - si++; - ti++; - if (ti < ln && text.charAt(ti) == 0xA) { - ti++; - } - } else if (si != 0 && (c == 0x20 || c == 0x9)) { - ti++; - } else { - break startsWith; - } - } else if (sc == text.charAt(ti)) { - si++; - ti++; - } else { - break startsWith; - } - } else { - break startsWith; - } - } - // } - } else { - // when e == ln: The end of text is an implicit separator - si = sl; - ti = ln; - hasMore = false; - } - - if (si == sl) { - String item; - if (!trim) { - item = text.substring(b, e); - } else { - int e2 = e - 1; - while (e2 >= 0 && Character.isWhitespace(text.charAt(e2))) { - e2--; - } - e2++; - while (b < ln && Character.isWhitespace(text.charAt(b))) { - b++; - } - if (b < e) { - item = text.substring(b, e2); - } else { - item = ""; - } - } - res.add(item); - - b = ti; - e = b; - } else { - e++; - } - } while (hasMore); - - if (dropEmptyLastItem) { - if (((String) res.get(res.size() - 1)).length() == 0) { - res.remove(res.size() - 1); - } - } - - return postProcessItems(res); - } - - /** - * Override this if you want to post-process the items. - * - * @param items the list of String-s that the standard - * slicedText data loader would return. - * - * @return the final return value of the custom data loader. - */ - protected List postProcessItems(List items) { - return items; - } - - protected final String parseExtraArguments(List args) throws Exception { - String encoding = null; - Object obj; - if (args.size() > 1) { - Map options; - obj = args.get(1); - if (!(obj instanceof Map)) { - throw new IllegalArgumentException( - "The 2nd argument (options) must be a hash."); - } - options = (Map) obj; - Iterator it = options.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - String opname = (String) ent.getKey(); - Object opvalue = ent.getValue(); - if (opname.equals("separator")) { - separator = StringUtil.normalizeLinebreaks( - DataLoaderUtil.getStringOption( - opname, opvalue)); - if (separator.length() == 0) { - throw new IllegalArgumentException( - "The value of the " + StringUtil.jQuote(opname) - + "option can't be 0 length string."); - } - } else if (opname.equals("encoding")) { - encoding = DataLoaderUtil.getStringOption( - opname, opvalue); - } else if (opname.equals("trim")) { - trim = DataLoaderUtil.getBooleanOption( - opname, opvalue); - } else if (opname.equals("dropEmptyLastItem")) { - dropEmptyLastItem = DataLoaderUtil.getBooleanOption( - opname, opvalue); - } else { - throw new IllegalArgumentException( - "Unknown option: " + StringUtil.jQuote(opname) - + ". The supported options are: " - + "encoding, separator, trim, " - + "dropEmptyLastItem"); - } - } - } - - if (separator == null) { - separator = "\n"; - } - - return encoding; - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/dataloaders/TddDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/TddDataLoader.java deleted file mode 100644 index 66f8476..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/TddDataLoader.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.InputStream; - -import fmpp.tdd.DataLoaderEvaluationEnvironment; -import fmpp.tdd.Interpreter; - -/** - * Creates a Map based on a TDD file. The TDD file must contain a hash - * or a hash addition such as:
    - * foo:123, bar:456, properties(baaz.properties) - */ -public class TddDataLoader extends FileDataLoader { - - protected Object load(InputStream data) throws Exception { - String encoding; - - if (args.size() < 1 || args.size() > 2) { - throw new IllegalArgumentException( - "tdd data loader needs 1 or 2 arguments: " - + "tdd(filename) or tdd(filename, encoding)"); - } - Object obj; - if (args.size() > 1) { - obj = args.get(1); - if (!(obj instanceof String)) { - throw new IllegalArgumentException( - "The 2nd argument (encoding) must be a strings."); - } - encoding = (String) obj; - } else { - encoding = engine.getSourceEncoding(); - } - - return Interpreter.evalAsHash( - Interpreter.loadTdd(data, encoding), - new DataLoaderEvaluationEnvironment(engine), - false, dataFile.getAbsolutePath()); - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/dataloaders/TddSequenceDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/TddSequenceDataLoader.java deleted file mode 100644 index af0eaf8..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/TddSequenceDataLoader.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.InputStream; - -import fmpp.tdd.DataLoaderEvaluationEnvironment; -import fmpp.tdd.Interpreter; - -/** - * Creates a List based on a TDD file. The TDD file must contain a - * TDD sequence such as:
    - * "Big Joe", 1, [11, 22, 33], properties(foo.properties) - */ -public class TddSequenceDataLoader extends FileDataLoader { - - protected Object load(InputStream data) throws Exception { - String encoding; - - if (args.size() < 1 || args.size() > 2) { - throw new IllegalArgumentException( - "tddSequence data loader needs 1 or 2 arguments: " - + "tddSequence(filename) or " - + "tddSequence(filename, encoding)"); - } - Object obj; - if (args.size() > 1) { - obj = args.get(1); - if (!(obj instanceof String)) { - throw new IllegalArgumentException( - "The 2nd argument (encoding) must be a strings."); - } - encoding = (String) obj; - } else { - encoding = engine.getSourceEncoding(); - } - - return Interpreter.evalAsSequence( - Interpreter.loadTdd(data, encoding), - new DataLoaderEvaluationEnvironment(engine), - false, dataFile.getAbsolutePath()); - } - -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/TextDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/TextDataLoader.java deleted file mode 100644 index ccbe700..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/TextDataLoader.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringWriter; - -/** - * Returns a string based on a plain text file. - * - *

    Note: This class should be an - * {@link fmpp.dataloaders.AbstractTextDataLoader} subclass, but it is not that - * for backward compatibility. - */ -public class TextDataLoader extends FileDataLoader { - - protected Object load(InputStream data) throws Exception { - String encoding; - - if (args.size() < 1 || args.size() > 2) { - throw new IllegalArgumentException( - "text data loader needs 1 or 2 arguments: " - + "text(filename) or text(filename, encoding)"); - } - Object obj; - if (args.size() > 1) { - obj = args.get(1); - if (!(obj instanceof String)) { - throw new IllegalArgumentException( - "The 2nd argument (encoding) must be a strings."); - } - encoding = (String) obj; - } else { - encoding = engine.getSourceEncoding(); - } - - StringWriter w = new StringWriter(); - Reader r = new InputStreamReader(data, encoding); - char[] buffer = new char[4096]; - int i; - while ((i = r.read(buffer)) != -1) { - w.write(buffer, 0, i); - } - - String s = w.toString(); - - // Remove Windows Notepad BOM: - if (s.startsWith("\uFEFF")) { - s = s.substring(1); - } - - return s; - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/dataloaders/XmlDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/XmlDataLoader.java deleted file mode 100644 index aa9c409..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/XmlDataLoader.java +++ /dev/null @@ -1,727 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.EntityResolver; -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - -import fmpp.Engine; -import fmpp.tdd.DataLoader; -import fmpp.util.MiscUtil; -import fmpp.util.StringUtil; -import freemarker.ext.dom.NodeModel; -import freemarker.template.TemplateNodeModel; - -/** - * Returns a variable that exposes the content of an XML file. - */ -public class XmlDataLoader implements DataLoader { - public static final String OPTION_REMOVE_COMMENTS = "removeComments"; - public static final String OPTION_REMOVE_PIS = "removePIs"; - public static final String OPTION_NAMESPACE_AWARE = "namespaceAware"; - public static final String OPTION_XINCLUDE_AWARE = "xincludeAware"; - public static final String OPTION_VALIDATE = "validate"; - public static final String OPTION_INDEX = "index"; - public static final String OPTION_XMLNS = "xmlns"; - - private static final Set OPTION_NAMES = new HashSet(); - static { - OPTION_NAMES.add(OPTION_REMOVE_COMMENTS); - OPTION_NAMES.add(OPTION_REMOVE_PIS); - OPTION_NAMES.add(OPTION_NAMESPACE_AWARE); - OPTION_NAMES.add(OPTION_XINCLUDE_AWARE); - OPTION_NAMES.add(OPTION_VALIDATE); - OPTION_NAMES.add(OPTION_INDEX); - OPTION_NAMES.add(OPTION_XMLNS); - } - - public Object load(Engine engine, List args) throws Exception { - return load(engine, args, null); - } - - public TemplateNodeModel - load(Engine engine, List args, Document preLoadedDoc) - throws Exception { - Object obj; - String path; - boolean removePIs = false; - boolean removeComments = true; - boolean namespaceAware = true; - boolean xincludeAware = false; - boolean validate = engine.getValidateXml(); - Map xmlns = new HashMap(); - Object indexOp = null; - - int argCount = args.size(); - if (argCount < 1) { - throw new IllegalArgumentException( - "xml(fileName[, options]) needs at least 1 parameter."); - } - - if (preLoadedDoc == null) { - obj = args.get(0); - if (!(obj instanceof String)) { - throw new IllegalArgumentException( - "The 1st argument (fileName) must be a string."); - } - path = ((String) obj).replace('/', File.separatorChar); - } else { - path = null; - } - - if (argCount > 1) { - obj = args.get(1); - if (!(obj instanceof Map)) { - throw new IllegalArgumentException( - "The 2nd argument (options) must be a hash."); - } - Iterator ops = ((Map) obj).entrySet().iterator(); - while (ops.hasNext()) { - Map.Entry ent = (Map.Entry) ops.next(); - String opName = (String) ent.getKey(); - Object opValue = ent.getValue(); - if (OPTION_REMOVE_COMMENTS.equals(opName)) { - if (!(opValue instanceof Boolean)) { - throw new IllegalArgumentException( - "The value of option \"removeComments\" " - + "must be a boolean."); - } - removeComments = ((Boolean) opValue).booleanValue(); - } else if (OPTION_REMOVE_PIS.equals(opName)) { - if (!(opValue instanceof Boolean)) { - throw new IllegalArgumentException( - "The value of option \"removePIs\" " - + "must be a boolean."); - } - removePIs = ((Boolean) opValue).booleanValue(); - } else if (OPTION_NAMESPACE_AWARE.equals(opName)) { - if (!(opValue instanceof Boolean)) { - throw new IllegalArgumentException( - "The value of option \"namespaceAware\" " - + "must be a boolean."); - } - namespaceAware = ((Boolean) opValue).booleanValue(); - } else if (OPTION_XINCLUDE_AWARE.equals(opName)) { - if (!(opValue instanceof Boolean)) { - throw new IllegalArgumentException( - "The value of option \"namespaceAware\" " - + "must be a boolean."); - } - xincludeAware = ((Boolean) opValue).booleanValue(); - } else if (OPTION_VALIDATE.equals(opName)) { - if (!(opValue instanceof Boolean)) { - throw new IllegalArgumentException( - "The value of option \"validating\" " - + "must be a boolean."); - } - validate = ((Boolean) opValue).booleanValue(); - } else if (OPTION_INDEX.equals(opName)) { - indexOp = opValue; - } else if (OPTION_XMLNS.equals(opName)) { - if (!(opValue instanceof Map)) { - throw new IllegalArgumentException( - "The value of option \"xmlns\" " - + "must be a hash."); - } - xmlns = (Map) opValue; - Iterator it = xmlns.entrySet().iterator(); - while (it.hasNext()) { - ent = (Map.Entry) it.next(); - String prefix = (String) ent.getKey(); - if (prefix.length() == 0) { - throw new IllegalArgumentException( - "The key in xmlns hash can't be " - + "emptry string"); - } - obj = ent.getValue(); - if (!(obj instanceof String)) { - throw new IllegalArgumentException( - "The subvariables of the xmlns hash " - + "must be strings."); - } - String uri = (String) obj; - uri = uri.trim(); - if (uri.length() == 0) { - throw new IllegalArgumentException( - "The value for key " - + StringUtil.jQuote(prefix) - + " in xmlns hash can't be " + "emptry string"); - } - ent.setValue(uri); - } - } else { - throw new IllegalArgumentException( - "Option " + StringUtil.jQuote(opName) - + " is unknown. Supported options are: " - + " index, removeComments, removePIs, xmlns, " + "validate, namespaceAware."); - } - } - } - - Document doc; - if (preLoadedDoc == null) { - // Load and parse XML file: - File xmlFile = new File(path); - if (!xmlFile.isAbsolute()) { - xmlFile = new File(engine.getDataRoot(), path); - } - doc = XmlDataLoader.loadXmlFile( - engine, xmlFile, namespaceAware, xincludeAware, validate); - } else { - doc = preLoadedDoc; - } - - // Simplify XML: - if (removePIs) { - NodeModel.removePIs(doc); - } if (removeComments) { - NodeModel.removeComments(doc); - } - NodeModel.mergeAdjacentText(doc); - - // Indexing: - if (indexOp != null) { - IndexDescriptor[] indices; - if ((indexOp instanceof Map)) { - indices = new IndexDescriptor[1]; - indices[0] = new IndexDescriptor( - (Map) indexOp, xmlns, namespaceAware); - } else if ((indexOp instanceof String)) { - indices = new IndexDescriptor[1]; - indices[0] = new IndexDescriptor( - (String) indexOp, xmlns, namespaceAware); - } else if (indexOp instanceof List) { - List indexCfgs = (List) indexOp; - indices = new IndexDescriptor[indexCfgs.size()]; - for (int i = 0; i < indexCfgs.size(); i++) { - Object icfg = indexCfgs.get(i); - if (icfg instanceof Map) { - indices[i] = new IndexDescriptor( - (Map) icfg, xmlns, namespaceAware); - } else if (icfg instanceof String) { - indices[i] = new IndexDescriptor( - (String) icfg, xmlns, namespaceAware); - } else { - throw new IllegalArgumentException( - "When the \"index\" sub-option of data loader " + "xml(fileName, options) is a " + "sequence, its subvariables must be " - + "hashes and strings."); - } - } - } else { - throw new IllegalArgumentException( - "The \"index\" sub-option of data loader " + "xml(fileName, options) must be either " - + "hash, string, or sequence."); - } - for (int i = 0; i < indices.length; i++) { - indices[i].apply(doc); - } - } - - // wrap - return NodeModel.wrap(doc); - } - - /** - * Checks if the string is a valid xml data loader option name. - * Options names are the keys in the hash pased as the 2nd argument to the - * xml data loader. - */ - public static boolean isOptionName(String optionName) { - return OPTION_NAMES.contains(optionName); - } - - public static Document loadXmlFile( - Engine engine, File xmlFile, - boolean namespaceAware, boolean validate) - throws SAXException, IOException, ParserConfigurationException { - return loadXmlFile( engine, xmlFile, namespaceAware, false, validate); - } - - public static Document loadXmlFile( - Engine engine, File xmlFile, - boolean namespaceAware, boolean xincludeAware, boolean validate) - throws SAXException, IOException, ParserConfigurationException { - DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); - f.setNamespaceAware(namespaceAware); - if (xincludeAware) { - try { - Method m = f.getClass().getMethod( - "setXIncludeAware", new Class[]{Boolean.TYPE}); - m.invoke(f, new Object[]{Boolean.TRUE}); - } catch (Throwable e) { - throw new SAXException("It seems that your Java setup doesn't " - + "support XML XInclude-es. Upgrading Java may helps." - + "\nCause trace:\n" + MiscUtil.causeTrace(e)); - } - } - f.setValidating(validate); - DocumentBuilder db = f.newDocumentBuilder(); - if (validate) { - db.setErrorHandler(new ErrorHandler() { - - public void error(SAXParseException e) - throws SAXException { - throw new FriendlySaxException( - buildSAXParseExceptionMessage( - "XML parsing error: ", e), - e.getException()); - } - - public void fatalError(SAXParseException e) - throws SAXException { - throw new FriendlySaxException( - buildSAXParseExceptionMessage( - "XML parsing error: ", e), - e.getException()); - } - - public void warning(SAXParseException exception) - throws SAXException { - ; // do nothing - } - - }); - } - EntityResolver er = (EntityResolver) engine.getXmlEntiryResolver(); - if (er != null) { - db.setEntityResolver(er); - } - return db.parse(xmlFile); - } - - private static String buildSAXParseExceptionMessage( - String messagePrefix, SAXParseException e) { - int line = e.getLineNumber(); - int col = e.getColumnNumber(); - String pid = e.getPublicId(); - String sid = e.getSystemId(); - String message = e.getMessage(); - StringBuffer res = new StringBuffer(); - - if (messagePrefix != null) { - res.append(messagePrefix); - } - if (message != null) { - res.append(message); - } - if (line != -1 || col != -1 || pid != null || sid != null) { - boolean needSep = false; - if (res.length() != 0) { - res.append(StringUtil.LINE_BREAK); - } - res.append("Error location: "); - if (line != -1) { - res.append("line "); - res.append(line); - needSep = true; - } - if (col != -1) { - if (needSep) { - res.append(", "); - } - res.append("column "); - res.append(col); - needSep = true; - } - if (sid != null) { - if (needSep) { - res.append(" in "); - } - res.append(sid); - needSep = true; - } else if (pid != null) { - if (needSep) { - res.append(" in "); - } - res.append(pid); - needSep = true; - } - } - - return res.toString(); - } - - private static class IndexDescriptor { - private static final String OP_ELEMENT = "element"; - private static final String OP_ATTRIBUTE = "attribute"; - private static final String OP_VALUE = "value"; - private static final String OP_NUMBERING = "numbering"; - private static final String OPVAL_NUMBERING_SEQUENTIAL = "sequential"; - private static final String OPVAL_NUMBERING_HIERARCHICAL - = "hierarchical"; - private static final int NUMBERING_SEQUENTIAL = 1; - private static final int NUMBERING_HIERARCHICAL = 2; - - private Map elements; - private int numbering = NUMBERING_SEQUENTIAL; - private String attName = "id"; - private String attNSUri = ""; - private char[] attValue = "ppi_%n".toCharArray(); - private boolean namespaceAware; - - private StringBuffer wb = new StringBuffer(); - private int count; - - private IndexDescriptor(Map cfg, Map xmlns, boolean namespaceAware) { - this.namespaceAware = namespaceAware; - - Iterator it = cfg.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - String opName = (String) ent.getKey(); - Object opValue = ent.getValue(); - - String defaultNS = (String) xmlns.get("D"); - if (defaultNS == null) { - defaultNS = ""; - } - - if (OP_ELEMENT.equals(opName)) { - String names[]; - int elementCount; - if (opValue instanceof String) { - elementCount = 1; - names = new String[1]; - names[0] = (String) opValue; - } else if (opValue instanceof List) { - List elements = (List) opValue; - elementCount = elements.size(); - names = new String[elementCount]; - for (int i = 0; i < elementCount; i++) { - Object obj = elements.get(i); - if (!(obj instanceof String)) { - throw new IllegalArgumentException( - "The value of sub-option \"" - + OP_ELEMENT - + "\", when it is a sequence, " - + "must be a sequence of strings."); - } - names[i] = (String) obj; - } - } else { - throw new IllegalArgumentException( - "The value of sub-option \"" + OP_ELEMENT - + "\" must be a string or " + "a sequence of strings."); - } - - // xmlns: - elements = new HashMap(); - for (int i = 0; i < elementCount; i++) { - String uri; - String eName = names[i]; - if (namespaceAware) { - int x = eName.indexOf(':'); - if (x == -1) { - uri = defaultNS; - } else { - String s2 = eName.substring(0, x); - if (s2.length() == 0) { - throw new IllegalArgumentException( - "Illegal element name " - + "in sub-option \"element\": " - + StringUtil.jQuote(eName) + ". " - + "The prefix is missing before " - + "the colon."); - } - eName = eName.substring(x + 1); - uri = (String) xmlns.get(s2); - if (uri == null) { - throw new IllegalArgumentException( - "Undefined XML name-space prefix " + "in sub-option \"element\": " - + StringUtil.jQuote(s2) + ". You " - + "have to define this prefix with " + "option \"xmlns\"."); - } - } - } else { - uri = ""; - } - Set nsSet = (Set) elements.get(eName); - if (nsSet == null) { - nsSet = new HashSet(); - elements.put(eName, nsSet); - } - nsSet.add(uri); - } - } else if (OP_ATTRIBUTE.equals(opName)) { - if (!(opValue instanceof String)) { - throw new IllegalArgumentException( - "The value of option \"" + OP_ATTRIBUTE - + "\" must be a string."); - } - attName = (String) opValue; - if (namespaceAware) { - int x = attName.indexOf(':'); - if (x == -1) { - attNSUri = ""; - } else { - /* - throw new IllegalArgumentException( - "Sorry, currently you can't use prefixes " - + "with attributes in sub-option " + "\"attribute\", because a Sun J2SE 1.4 " - + "(Apache Crimson) bug prevents it."); - Would die with NPE because of a - Sun J2SE 1.4 (crimson) bug: - */ - - String s2 = attName.substring(0, x); - if (s2.length() == 0) { - throw new IllegalArgumentException( - "Illegal element name " - + "in sub-option \"attribute\": " - + StringUtil.jQuote(attName) + ". " - + "The prefix is missing before the " - + "colon."); - } - attName = attName.substring(x + 1); - attNSUri = (String) xmlns.get(s2); - if (attNSUri == null) { - throw new IllegalArgumentException( - "Undefined XML name-space prefix " - + "in sub-option \"attribute\": " - + StringUtil.jQuote(s2) + ". You " - + "have to define this prefix with " - + "option \"xmlns\"."); - } - } - } else { - attNSUri = ""; - } - } else if (OP_VALUE.equals(opName)) { - if (!(opValue instanceof String)) { - throw new IllegalArgumentException( - "The value of option \"" + OP_VALUE - + "\" must be a string."); - } - attValue = ((String) opValue).toCharArray(); - } else if (OP_NUMBERING.equals(opName)) { - if (!(opValue instanceof String)) { - throw new IllegalArgumentException( - "The value of option \"" + OP_NUMBERING - + "\" must be a string."); - } - String s = (String) opValue; - if (OPVAL_NUMBERING_SEQUENTIAL.equals(s)) { - numbering = NUMBERING_SEQUENTIAL; - } else if (OPVAL_NUMBERING_HIERARCHICAL.equals(s)) { - numbering = NUMBERING_HIERARCHICAL; - } else { - throw new IllegalArgumentException( - "Illegal value for option \"" + OP_NUMBERING - + "\": " + StringUtil.jQuote(s) + ". " - + "Valid values are: \"" - + OPVAL_NUMBERING_SEQUENTIAL + "\", \"" - + OPVAL_NUMBERING_HIERARCHICAL + "\"."); - } - } else { - throw new IllegalArgumentException( - "Unknown index option " + StringUtil.jQuote(opName) - + ". Valid options are: \"" + OP_ELEMENT + "\", \"" - + OP_ATTRIBUTE + "\", \"" + OP_VALUE + "\", \"" - + OP_NUMBERING + "\"."); - } - } - - if (elements == null) { - throw new IllegalArgumentException( - "Required sub-option \"element\" " + "of option \"index\" is missing."); - } - } - - private IndexDescriptor( - String element, Map xmlns, boolean namespaceAware) { - this(createCfgMap(element), xmlns, namespaceAware); - } - - private static Map createCfgMap(String element) { - Map map = new HashMap(); - map.put(OP_ELEMENT, element); - return map; - } - - private void apply(Node node) { - count = 0; - apply(node, ""); - } - - private void apply(Node node, String numPrefix) { - boolean indexed; - if (node.getNodeType() == Node.ELEMENT_NODE) { - String eName; - if (namespaceAware) { - eName = node.getLocalName(); - } else { - eName = node.getNodeName(); - } - Object uris = elements.get(eName); - String domAttNSUri; - if (attNSUri.length() == 0) { - domAttNSUri = null; - } else { - domAttNSUri = attNSUri; - } - if (uris != null) { - boolean match; - String nUri = node.getNamespaceURI(); - if (nUri == null || nUri.length() == 0) { - match = ((Set) uris).contains(""); - } else { - match = ((Set) uris).contains(nUri); - } - if (match) { - count++; - indexed = true; - - Element e = (Element) node; - // Method hasAttributeNS would die with NPE because - // of a Sun J2SE 1.4 (crimson) bug - NamedNodeMap attrs = e.getAttributes(); - Attr theAttr; - if (namespaceAware) { - theAttr = (Attr) attrs.getNamedItemNS( - domAttNSUri, attName); - } else { - theAttr = (Attr) attrs.getNamedItem(attName); - } - if (theAttr == null) { - wb.setLength(0); - int ln = attValue.length; - for (int i = 0; i < ln; i++) { - char c = attValue[i]; - if (c != '%') { - wb.append(c); - } else { - i++; - if (i == ln) { - throw new IllegalArgumentException( - "Illegal usage of % in " + "sub-option \"value\" of " - + "option \"index\": " - + "% at the end of the string"); - } else { - c = attValue[i]; - if (c == 'n') { - wb.append(numPrefix); - wb.append(count); - } else if (c == 'e') { - wb.append(eName); - } else if (c == '%') { - wb.append('%'); - } else { - throw new IllegalArgumentException( - "Illegal usage of % in " - + "sub-option \"value\" of " - + "option \"index\": %" - + c); - } - } - } - } - if (domAttNSUri == null) { - e.setAttribute(attName, wb.toString()); - } else { - // This would die with NPE because - // of a Sun J2SE 1.4 (crimson) bug: - // e.setAttributeNS( - // domAttNSUri, - // "fmppIdx:" + attName, - // wb.toString()); - theAttr = node.getOwnerDocument() - .createAttributeNS( - domAttNSUri, - "fmpp:" + attName); - theAttr.setNodeValue(wb.toString()); - e.setAttributeNode(theAttr); - } - } - } else { - indexed = false; - } - } else { - indexed = false; - } - } else { - indexed = false; - } - - NodeList children = node.getChildNodes(); - int ln = children.getLength(); - if (ln != 0) { - if (numbering == NUMBERING_HIERARCHICAL) { - String newNumPrefix; - int oldCount = count; - if (!indexed) { - newNumPrefix = numPrefix; - } else { - wb.setLength(0); - wb.append(numPrefix); - wb.append(Integer.toString(count)); - wb.append("_"); - newNumPrefix = wb.toString(); - count = 0; - } - for (int i = 0; i < ln; i++) { - apply(children.item(i), newNumPrefix); - } - if (indexed) { - count = oldCount; - } - } else if (numbering == NUMBERING_SEQUENTIAL) { - for (int i = 0; i < ln; i++) { - apply(children.item(i), numPrefix); - } - } - } - } - } - - /** - * SAX Exception where we know that we don't have to print the exception - * class for the user, as the message holds enough information. - */ - private static class FriendlySaxException extends SAXException { - - public FriendlySaxException(String message) { - this(message, null); - } - - public FriendlySaxException(String message, Exception e) { - super(message, e); - } - - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/dataloaders/XmlInfosetDataLoader.java b/fmpp/src/main/java/fmpp/dataloaders/XmlInfosetDataLoader.java deleted file mode 100644 index bd81bec..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/XmlInfosetDataLoader.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.dataloaders; - -import java.io.IOException; -import java.io.InputStream; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.FactoryConfigurationError; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -/** - * Returns a variable that exposes the content of an XML file based on - * the W3C XML infoset approach. - * - * @deprecated Use {@link XmlDataLoader} instead. - */ -public class XmlInfosetDataLoader extends FileDataLoader { - protected Object load(InputStream data) - throws ParserConfigurationException, FactoryConfigurationError, - SAXException, IOException { - if (args.size() != 1) { - throw new IllegalArgumentException( - "Properties data loader needs exaclty 1 argument: " - + "xmlInfoset(filename)"); - } - - DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); - f.setNamespaceAware(true); - DocumentBuilder db = f.newDocumentBuilder(); - Document doc = db.parse(data); - - return new freemarker.ext.xml.NodeListModel(doc); - } -} diff --git a/fmpp/src/main/java/fmpp/dataloaders/package.html b/fmpp/src/main/java/fmpp/dataloaders/package.html deleted file mode 100644 index 773b05c..0000000 --- a/fmpp/src/main/java/fmpp/dataloaders/package.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    fmpp.DataLoader implementations. - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/localdatabuilders/BshLocalDataBuilder.java b/fmpp/src/main/java/fmpp/localdatabuilders/BshLocalDataBuilder.java deleted file mode 100644 index 4b60983..0000000 --- a/fmpp/src/main/java/fmpp/localdatabuilders/BshLocalDataBuilder.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.localdatabuilders; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import bsh.EvalError; - -import fmpp.DataModelBuildingException; -import fmpp.Engine; -import fmpp.LocalDataBuilder; -import fmpp.TemplateEnvironment; -import fmpp.setting.SettingException; -import fmpp.tdd.Interpreter; -import fmpp.util.StringUtil; - -/** - * Deduces the file name of a BeanShell scrip file from the source file - * name, and executes that script to create local data. - * - *

    The script must return a java.util.Map, which stores the - * variables that will be added to the local data. - * - *

    The following variables are accessible for the scripts: - *

      - *
    • engine: the {@link fmpp.Engine} instance. - *
    • templateEnvironment: the {@link fmpp.TemplateEnvironment} - * instance. - *
    - */ -public class BshLocalDataBuilder implements LocalDataBuilder { - private static final String PARAM_ENDING = "ending"; - private static final String PARAM_REMOVE_EXTENSION = "removeExtension"; - private static final String PARAM_IGNORE_MISSING = "ignoreMissing"; - private static final String PARAM_ENCODING = "encoding"; - - private String ending = ".bsh"; - private boolean removeExtension; - private boolean ignoreMissing; - private String encoding; - - /** - * Creates new instance. - */ - public BshLocalDataBuilder() { - } - - public static BshLocalDataBuilder createInstanceForSetting( - String fName, List params) throws SettingException { - BshLocalDataBuilder builder = new BshLocalDataBuilder(); - if (params.size() != 0) { - if (params.size() != 1) { - throw new SettingException( - "The number of parameters to function \"" - + fName + "\" must be 1 or 0, but now there are " - + params.size() + " parameters specified."); - } - Object o = params.get(0); - if (!(o instanceof Map)) { - throw new SettingException( - "The parameter to function \"" + fName - + "\" must be a hash, but now it was a " - + Interpreter.getTypeName(o) + "."); - } - Iterator it = ((Map) o).entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - String name = (String) ent.getKey(); - Object value = ent.getValue(); - if (name.equals(PARAM_ENDING)) { - if (!(value instanceof String)) { - throw new SettingException( - "In calling of function \"" + fName + "\", " - + "the value of option \"" + PARAM_ENDING - + "\" must be a string, but now it was a " - + Interpreter.getTypeName(value) + "."); - } - builder.setEnding((String) value); - } else if (name.equals(PARAM_REMOVE_EXTENSION)) { - if (!(value instanceof Boolean)) { - throw new SettingException( - "In calling of function \"" + fName + "\", " - + "the value of option \"" - + PARAM_REMOVE_EXTENSION - + "\" must be a boolean, but now it was a " - + Interpreter.getTypeName(value) + "."); - } - builder.setRemoveExtension( - ((Boolean) value).booleanValue()); - } else if (name.equals(PARAM_IGNORE_MISSING)) { - if (!(value instanceof Boolean)) { - throw new SettingException( - "In calling of function \"" + fName + "\", " - + "the value of option \"" - + PARAM_IGNORE_MISSING - + "\" must be a boolean, but now it was a " - + Interpreter.getTypeName(value) + "."); - } - builder.setIgnoreMissing(((Boolean) value).booleanValue()); - } else if (name.equals(PARAM_ENCODING)) { - if (!(value instanceof String)) { - throw new SettingException( - "In calling of function \"" + fName + "\", " - + "the value of option \"" + PARAM_ENCODING - + "\" must be a string, but now it was a " - + Interpreter.getTypeName(value) + "."); - } - builder.setEncoding((String) value); - } else { - throw new SettingException( - "In calling of function \"" + fName + "\", " - + "option " + StringUtil.jQuote(name) - + " is not supported. Supported options are: \"" - + PARAM_ENDING + "\", \"" + PARAM_REMOVE_EXTENSION - + "\", \"" + PARAM_IGNORE_MISSING + "\"."); - } - } - } - return builder; - } - - public Map build(Engine eng, TemplateEnvironment env) - throws FileNotFoundException, DataModelBuildingException { - String fileName = env.getSourceFile().getPath(); - if (removeExtension) { - int di = fileName.lastIndexOf('.'); - if (di != -1) { - int si = fileName.lastIndexOf(File.separatorChar); - if (si < di) { - fileName = fileName.substring(0, di); - } - } - } - fileName += ending; - - File f = new File(fileName); - if (!f.isFile()) { - if (ignoreMissing) { - return null; - } else { - throw new FileNotFoundException( - "Can't find the BeansShell script file for the source " + "file. The BeanShell file should be: " - + f.getAbsolutePath()); - } - } - - bsh.Interpreter bship = new bsh.Interpreter(); - try { - bship.set("engine", eng); - bship.set("templateEnvironment", env); - } catch (EvalError e) { - throw new DataModelBuildingException( - "Failed to prepare BeanShell execution.", e); - } - Object res; - try { - Reader r = new InputStreamReader( - new FileInputStream(f), - encoding == null ? eng.getSourceEncoding() : encoding); - try { - res = bship.eval(r); - } finally { - r.close(); - } - } catch (IOException e) { - throw new DataModelBuildingException( - "Failed to execute BeanShell script file: " - + f.getAbsolutePath(), e); - } catch (EvalError e) { - throw new DataModelBuildingException( - "Failed to execute BeanShell script file: " - + f.getAbsolutePath(), e); - } - - if (!(res instanceof Map)) { - throw new DataModelBuildingException( - "The BeanShell script file (" - + f.getAbsolutePath() + ") must return a java.util.Map, " - + "but it has returned " - + (res != null - ? "an object of class " - + res.getClass().getName() + "." - : "null.") - ); - } - return (Map) res; - } - - public String getEncoding() { - return encoding; - } - - /** - * Sets the encoding of the script files. If it is null then - * the value of the sourceEncoding setting will be used. - */ - public void setEncoding(String encoding) { - this.encoding = encoding; - } - - public String getEnding() { - return ending; - } - - /** - * Sets the string appended at the end of the source file name. - * Can't be 0 length string. It defaults to ".bsh". - */ - public void setEnding(String ending) { - if (ending.length() == 0) { - throw new IllegalArgumentException( - "Postix must not be an empty string."); - } - this.ending = ending; - } - - /** - * Set if it will be ignored no script file found for the source file, - * rather than throwing an exception. Defaults to false. - */ - public boolean getIgnoreMissing() { - return ignoreMissing; - } - - public void setIgnoreMissing(boolean ignoreMissing) { - this.ignoreMissing = ignoreMissing; - } - - public boolean getRemoveExtension() { - return removeExtension; - } - - /** - * Sets if the extension from the source file name should be removed before - * appending the ending. The extension is the part after the - * last dot of the file name. The dot itself is also removed. - * Defaults to false. - */ - public void setRemoveExtension(boolean removeExtension) { - this.removeExtension = removeExtension; - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/localdatabuilders/CachingLocalDataBuilder.java b/fmpp/src/main/java/fmpp/localdatabuilders/CachingLocalDataBuilder.java deleted file mode 100644 index 97d5359..0000000 --- a/fmpp/src/main/java/fmpp/localdatabuilders/CachingLocalDataBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.localdatabuilders; - -import java.io.File; -import java.util.HashMap; -import java.util.Map; - -import fmpp.Engine; -import fmpp.LocalDataBuilder; -import fmpp.ProgressListener; -import fmpp.TemplateEnvironment; - -/** - * Stores the returned Map, and reuses it - * {@link #build(Engine, TemplateEnvironment)} is invoked again during the same - * processing session. This is useful when the building of the local data is an - * expensive operation, and the builder is used for multiple source files. - * - *

    The stored Map will be deleted at the end of the processing - * session. - */ -public abstract class CachingLocalDataBuilder - implements LocalDataBuilder, ProgressListener { - private Map cachedResult; - - /** - * Takes care of caching, and calls {@link #build(Engine)} if no cached - * result is available. - */ - public final Map build(Engine eng, TemplateEnvironment env) - throws Exception { - if (cachedResult == null) { - Map res = build(eng); - if (res == null) { - cachedResult = new HashMap(); - } else { - cachedResult = res; - /* Caused getData() to return wrapped objects... - // Pre-wrapp the result for better performance - Map wrappedData = new HashMap(); - Iterator it = res.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - try { - wrappedData.put( - ent.getKey(), - eng.wrap(ent.getValue())); - } catch (TemplateModelException e) { - throw new DataModelBuildingException( - "Failed to build local data: " - + "failed to wrap variable " - + StringUtil.jQuote( - ent.getKey().toString()) + ".", - e); - } - } - cachedResult = wrappedData; - */ - } - } - return cachedResult; - } - - /** - * Discards the cached result on - * {@link ProgressListener#EVENT_END_PROCESSING_SESSION}. - * - *

    The {@link TemplateEnvironment} is not passed, to ensure that the - * returned Map doesn't depend on the source file the builder - * is used for, so reusing the result for other source files is safe. - */ - public void notifyProgressEvent( - Engine engine, int event, File src, int pMode, Throwable error, - Object param) - throws Exception { - if (event == EVENT_END_PROCESSING_SESSION) { - cachedResult = null; - } - } - - /** - * Override this method in your local data builder class. - */ - protected abstract Map build(Engine eng) throws Exception; - -} diff --git a/fmpp/src/main/java/fmpp/localdatabuilders/MapLocalDataBuilder.java b/fmpp/src/main/java/fmpp/localdatabuilders/MapLocalDataBuilder.java deleted file mode 100644 index 6ef1e39..0000000 --- a/fmpp/src/main/java/fmpp/localdatabuilders/MapLocalDataBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.localdatabuilders; - -import java.util.Map; - -import fmpp.Engine; -import fmpp.LocalDataBuilder; -import fmpp.TemplateEnvironment; - -/** - * Trivial local data builder that returns the Map passed to - * its constructor. - */ -public class MapLocalDataBuilder implements LocalDataBuilder { - private final Map map; - - public MapLocalDataBuilder(Map map) { - this.map = map; - } - - public Map build(Engine eng, TemplateEnvironment env) throws Exception { - return map; - } - -} diff --git a/fmpp/src/main/java/fmpp/localdatabuilders/TddHashLocalDataBuilder.java b/fmpp/src/main/java/fmpp/localdatabuilders/TddHashLocalDataBuilder.java deleted file mode 100644 index 0acfe2c..0000000 --- a/fmpp/src/main/java/fmpp/localdatabuilders/TddHashLocalDataBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.localdatabuilders; - -import java.util.Map; - -import fmpp.DataModelBuildingException; -import fmpp.Engine; -import fmpp.tdd.DataLoaderEvaluationEnvironment; -import fmpp.tdd.EvaluationEnvironment; -import fmpp.tdd.Fragment; -import fmpp.tdd.Interpreter; - -/** - * Builds data from a TDD hash, interpreting function calls as data loader - * invocations. The hash is evaluated when {@link fmpp.LocalDataBuilder#build} - * is invoked first. Then the result is stored until the end of the processing - * session, to be reused for all subsequent {@link fmpp.LocalDataBuilder#build} - * invokations. - * - *

    This local data builder is what localData setting uses, when the - * last parameter to the case function is a hash, e.g.:
    - * localData: [case(sub/, {bgColor:green, doc:xml(data/foo.xml)})]. - */ -public class TddHashLocalDataBuilder extends CachingLocalDataBuilder { - final Fragment fragment; - - public TddHashLocalDataBuilder(String tddHash) { - this.fragment = new Fragment(tddHash, 0, tddHash.length(), null); - } - - public TddHashLocalDataBuilder(Fragment fragment) { - this.fragment = fragment; - } - - public Map build(Engine eng) throws Exception { - EvaluationEnvironment env = new DataLoaderEvaluationEnvironment(eng); - Object o = Interpreter.eval(fragment, env, false); - if (!(o instanceof Map)) { - throw new DataModelBuildingException( - "Fragment doesn't evalute to Map but to " - + Interpreter.getTypeName(o) + "."); - } - return (Map) o; - } - - public String toString() { - return "TddHashLocalDataBuilder " + fragment; - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/localdatabuilders/package.html b/fmpp/src/main/java/fmpp/localdatabuilders/package.html deleted file mode 100644 index 07d189a..0000000 --- a/fmpp/src/main/java/fmpp/localdatabuilders/package.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    fmpp.LocalDataBuilder implementations. - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/models/AddTransform.java b/fmpp/src/main/java/fmpp/models/AddTransform.java deleted file mode 100644 index 8babb6d..0000000 --- a/fmpp/src/main/java/fmpp/models/AddTransform.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.io.IOException; -import java.io.Writer; -import java.util.Iterator; -import java.util.Map; - -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNumberModel; -import freemarker.template.TemplateTransformModel; - -/** - * Adds/inserts an item to a {@link WritableSequence}. - */ -public class AddTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException, IOException { - WritableSequence seq = null; - int index = 0; - boolean hasIndex = false; - TemplateModel value = null; - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("seq".equals(pname)) { - if (!(pvalue instanceof WritableSequence)) { - throw new TemplateModelException( - "The \"seq\" parameter must be a " - + "writable sequence variable."); - } - seq = (WritableSequence) pvalue; - } else if ("index".equals(pname)) { - if (!(pvalue instanceof TemplateNumberModel)) { - throw new TemplateModelException( - "The \"index\" parameter must be a " - + "numberical value."); - } - index = ((TemplateNumberModel) pvalue).getAsNumber() - .intValue(); - hasIndex = true; - } else if ("value".equals(pname)) { - value = (TemplateModel) pvalue; - } else { - throw newUnsupportedParamException(pname); - } - } - if (seq == null) { - throw newMissingParamException("seq"); - } - if (value == null) { - throw newMissingParamException("value"); - } - if (hasIndex) { - if (index < 0 || index > seq.getList().size()) { - throw new TemplateModelException("Index out of bounds."); - } - seq.getList().add(index, value); - } else { - seq.getList().add(value); - } - - return null; - } -} diff --git a/fmpp/src/main/java/fmpp/models/ClearTransform.java b/fmpp/src/main/java/fmpp/models/ClearTransform.java deleted file mode 100644 index 437c9f9..0000000 --- a/fmpp/src/main/java/fmpp/models/ClearTransform.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.io.IOException; -import java.io.Writer; -import java.util.Iterator; -import java.util.Map; - -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateTransformModel; - -/** - * Removes all items from a {@link WritableSequence} or {@link WritableHash}. - */ -public class ClearTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException, IOException { - WritableSequence seq = null; - WritableHash hash = null; - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("seq".equals(pname)) { - if (!(pvalue instanceof WritableSequence)) { - throw new TemplateModelException( - "The \"seq\" parameter must be a " - + "writable sequence variable."); - } - seq = (WritableSequence) pvalue; - } else if ("hash".equals(pname)) { - if (!(pvalue instanceof WritableHash)) { - throw new TemplateModelException( - "The \"hash\" parameter must be a " - + "writable hash variable."); - } - hash = (WritableHash) pvalue; - } else { - throw newUnsupportedParamException(pname); - } - } - if (seq == null && hash == null) { - throw newMissingParamException("seq or hash"); - } - if (seq != null) { - seq.getList().clear(); - } - if (hash != null) { - hash.getMap().clear(); - } - - return null; - } -} diff --git a/fmpp/src/main/java/fmpp/models/CopyWritableVariableMethod.java b/fmpp/src/main/java/fmpp/models/CopyWritableVariableMethod.java deleted file mode 100644 index 30b4064..0000000 --- a/fmpp/src/main/java/fmpp/models/CopyWritableVariableMethod.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.util.List; - -import freemarker.template.TemplateMethodModelEx; -import freemarker.template.TemplateModelException; - -/** - * Creates a new, empty {@link WritableHash}. - */ -public class CopyWritableVariableMethod implements TemplateMethodModelEx { - public Object exec(List args) - throws TemplateModelException { - if (args.size() != 1) { - throw new TemplateModelException( - "method needs exactly 1 argument"); - } - Object obj = args.get(0); - if (!(obj instanceof WritableVariable)) { - throw new TemplateModelException( - "argument to method " + "must be a writable variable."); - } - return ((WritableVariable) obj).clone(); - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/models/CsvSequence.java b/fmpp/src/main/java/fmpp/models/CsvSequence.java deleted file mode 100644 index d5c79a0..0000000 --- a/fmpp/src/main/java/fmpp/models/CsvSequence.java +++ /dev/null @@ -1,754 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.io.IOException; -import java.io.Reader; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.TimeZone; - -import fmpp.util.BugException; -import fmpp.util.StringUtil; -import fmpp.util.StringUtil.ParseException; -import freemarker.template.SimpleDate; -import freemarker.template.SimpleNumber; -import freemarker.template.SimpleScalar; -import freemarker.template.TemplateBooleanModel; -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateDateModel; -import freemarker.template.TemplateHashModel; -import freemarker.template.TemplateHashModelEx; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateSequenceModel; - -/** - * Sequence variable implementation that wraps text of CSV or tab separated - * values format, or any other format that is the same as CSV except that it - * uses different column separator char. - * - *

    The sequence is the list of table rows, and each row is hash where you - * can access the cells with the column name. The column names (headers) are - * the values in the first row of cells in the CSV file. - * - *

    The values in the table will be always exposed as string variables, unless - * you specify an other type in the header cell directly. This can be done - * by using colon + a type identifier at the end of the header cell. The type - * indetifier can be: n or number, b or - * boolean, d or date, - * t or time, dt or - * dateTime, s or string. For example, if - * the value of a header cell in the CSV file is "price:n", then the values of - * the cell will be exposed as numberical variables, not string. - * - *

    CsvSequence is also a hash that contains one key: - * headers. This is a sequence that stores the header names. - */ -public class CsvSequence implements - TemplateSequenceModel, TemplateHashModel { - private static final int T_STRING = 1; - private static final int T_NUMBER = 2; - private static final int T_BOOLEAN = 3; - private static final int T_DATE = 4; - private static final int T_TIME = 5; - private static final int T_DATETIME = 6; - - // data - private boolean loaded; - private ArrayList rows = new ArrayList(); - private Map nameToCol = new HashMap(); - private int colCount; - private List keyList = new ArrayList(); - - // settings - private String[] externalHeaderRow; - private boolean hasHeaderRow = true; - private boolean normalizeHeaders = false; - private boolean trimCells = false; - private String[] emptyValues; - private char separator = ';'; - private String altTrue, altFalse; - private char groupingSeparator = 0; - private char decimalSeparator = '.'; - private DateFormat dateFormat; - private String dateFormatPattern; - private DateFormat timeFormat; - private String timeFormatPattern; - private DateFormat dateTimeFormat; - private String dateTimeFormatPattern; - private TimeZone timeZone; - - /** - * Creates a new instance. - */ - public CsvSequence() { - } - - /** - * Loads data from text of CSV (or whatever similar) format. - * This method can be called once per instance. - * Set all options (as {@link #getSeparator separator}) before calling this. - * - * @param in reader to read the text (file) to parse. - * Will be close()-d. - */ - public void load(Reader in) - throws ParseException, IOException { - if (loaded) { - throw new IllegalStateException( - "Data already loaded into this CSV sequence."); - } - if (externalHeaderRow == null && !hasHeaderRow) { - throw new IllegalArgumentException("If \"fileHasHeaders\" is " - + "false then the \"headers\" parameter can't be null."); - } - new Parser(in).load(); - loaded = true; - } - - public TemplateModel get(int index) throws TemplateModelException { - return (TemplateModel) rows.get(index); - } - - public int size() throws TemplateModelException { - return rows.size(); - } - - private class Parser { - private Reader in; - private StringBuffer wb = new StringBuffer(); - private int cur; - - private Parser(Reader in) { - this.in = in; - } - - private void load() - throws IOException, ParseException { - String s; - boolean hasNextCol; - - try { - ArrayList headerTypes = new ArrayList(); - if (externalHeaderRow == null) { - cur = in.read(); - - colCount = 0; - hasNextCol = false; - headers: while (hasNextCol || cur != -1) { - s = fetchValue(); - - load_processHeaderCell(s, headerTypes); - - if (cur != separator) { - if (cur == 0xD) { - cur = in.read(); - if (cur == 0xA) { - cur = in.read(); - } - } else if (cur == 0xA) { - cur = in.read(); - } else if (cur != -1) { - if (cur != separator) { - throw new ParseException( - "Line-break or EOF expected but " - + "found " + StringUtil.jQuote( - String.valueOf((char) cur)) - + " instead."); - } - } - break headers; - } - cur = in.read(); - hasNextCol = true; - } - } else { - for (int j = 0; j < externalHeaderRow.length; j++) { - Object o = externalHeaderRow[j]; - if (!(o instanceof String)) { - throw new IllegalArgumentException("The header at " - + "index " + j + " (0 based) is not a " - + "string."); - } - load_processHeaderCell((String) o, headerTypes); - } - cur = in.read(); - if (hasHeaderRow) { - while (cur != 0xA && cur != 0xD && cur != -1) { - cur = in.read(); - } - if (cur == 0xD) { - cur = in.read(); - if (cur == 0xA) { - cur = in.read(); - } - } else if (cur == 0xA) { - cur = in.read(); - } - } - } - - // Iterate through rows: - while (cur != -1) { - TemplateModel[] row = new TemplateModel[colCount]; - int colIdx = 0; - cols: do { - s = fetchValue(); - - if (emptyValues != null) { - searchEmptyValue: - for (int i = 0; i < emptyValues.length; i++) { - if (s.equals(emptyValues[i])) { - s = ""; - break searchEmptyValue; - } - } - } - - if (colIdx >= colCount) { - throw new ParseException( - "Row " + (rows.size() + 2) - + " contains more columns than the number " - + "of header cells."); - } - int t = ((Integer) headerTypes.get(colIdx)).intValue(); - if (t == T_STRING) { - row[colIdx] = new SimpleScalar(s); - } else if (t == T_NUMBER) { - s = fixNumber(s); - if (s.length() != 0) { - row[colIdx] = new SimpleNumber( - StringUtil.stringToBigDecimal(s)); - } - } else if (t == T_BOOLEAN) { - s = fixBoolean(s); - if (s.length() != 0) { - row[colIdx] = StringUtil.stringToBoolean(s) - ? TemplateBooleanModel.TRUE - : TemplateBooleanModel.FALSE; - } - } else if (t == T_DATE) { - if (s.length() != 0) { - if (dateFormat != null) { - try { - row[colIdx] = new SimpleDate( - dateFormat.parse(s.trim()), - TemplateDateModel.DATE); - } catch (java.text.ParseException e) { - throw new ParseException("Date value " - + StringUtil.jQuote(s) - + " is not valid according to " + "pattern " - + StringUtil.jQuote( - dateFormatPattern)); - } - } else { - row[colIdx] = StringUtil.stringToDate( - s, timeZone); - } - } - } else if (t == T_TIME) { - if (s.length() != 0) { - if (timeFormat != null) { - try { - row[colIdx] = new SimpleDate( - timeFormat.parse(s.trim()), - TemplateDateModel.TIME); - } catch (java.text.ParseException e) { - throw new ParseException("Time value " - + StringUtil.jQuote(s) - + " is not valid according to " + "pattern " - + StringUtil.jQuote( - timeFormatPattern)); - } - } else { - row[colIdx] = StringUtil.stringToTime( - s, timeZone); - } - } - } else if (t == T_DATETIME) { - if (s.length() != 0) { - if (dateTimeFormat != null) { - try { - row[colIdx] = new SimpleDate( - dateTimeFormat.parse(s.trim()), - TemplateDateModel.DATETIME); - } catch (java.text.ParseException e) { - throw new ParseException( - "Date-time value " - + StringUtil.jQuote(s) - + " is not valid according to " + "pattern " - + StringUtil.jQuote( - dateTimeFormatPattern)); - } - } else { - row[colIdx] = StringUtil.stringToDateTime( - s, timeZone); - } - } - } else { - throw new BugException("Unknown column type " + t); - } - colIdx++; - - if (cur != separator) { - if (cur == 0xD) { - cur = in.read(); - if (cur == 0xA) { - cur = in.read(); - } - } else if (cur == 0xA) { - cur = in.read(); - } else if (cur != -1) { - if (cur != separator) { - throw new ParseException( - "Line-break or EOF expected " - + "but found" + StringUtil.jQuote( - String.valueOf((char) cur)) - + " instead."); - } - } - break cols; - } - cur = in.read(); - } while (true); - rows.add(new RowHash(row)); - } - } finally { - in.close(); - } - } - - private void load_processHeaderCell(String s, List headerTypes) - throws ParseException { - if (normalizeHeaders) { - // First we remove the part in parenthesses. Further - // normalization will be done only after the type part was - // extracted - int open = s.indexOf('('); - int close = s.lastIndexOf(')'); - if (open != -1 && close != -1 && open < close) { - s = s.substring(0, open) + s.substring(close + 1); - } - } - - int type; - int i = s.lastIndexOf(':'); - if (i == -1) { - s = s.trim(); - type = T_STRING; - } else { - String s2 = s.substring(i + 1).trim().toLowerCase(); - s = s.substring(0, i).trim(); - if (s2.equals("n") || s2.equals("number")) { - type = T_NUMBER; - } else if (s2.equals("s") || s2.equals("string")) { - type = T_STRING; - } else if (s2.equals("b") || s2.equals("boolean")) { - type = T_BOOLEAN; - } else if (s2.equals("d") || s2.equals("date")) { - type = T_DATE; - } else if (s2.equals("t") || s2.equals("time")) { - type = T_TIME; - } else if (s2.equals("dt") || s2.equals("dateTime")) { - type = T_DATETIME; - } else { - throw new ParseException("Unknown data type in a " - + "header: " + StringUtil.jQuote(s2)); - } - } - if (normalizeHeaders) { - s = s.toLowerCase(); - s = StringUtil.replace(s, " ", "_"); - s = StringUtil.replace(s, "-", "_"); - s = StringUtil.replace(s, ",", "_"); - s = StringUtil.replace(s, ";", "_"); - s = StringUtil.replace(s, ":", "_"); - while (s.indexOf("__") != -1) { - s = StringUtil.replace(s, "__", "_"); - } - } - nameToCol.put(s, new Integer(colCount)); - keyList.add(new SimpleScalar(s)); - headerTypes.add(new Integer(type)); - colCount++; - } - - private String fetchValue() throws IOException, ParseException { - wb.setLength(0); - if (cur == '"') { - cur = in.read(); - while (cur != -1) { - if (cur != '"') { - wb.append((char) cur); - cur = in.read(); - } else { - cur = in.read(); - if (cur == '"') { - wb.append((char) cur); - cur = in.read(); - } else { - return wb.toString(); //! - } - } - } - throw new ParseException("Reached the end of the file, and " - + "the closing quotation mark of value is missing."); - } else { - while (cur != separator && cur != -1 - && cur != 0xA && cur != 0xD) { - wb.append((char) cur); - cur = in.read(); - } - String r = wb.toString(); //! - if (trimCells) { - r = r.trim(); - } - return r; - } - } - } - - /** - * Override this if you want to correct boolean values come from the file. - * The default implementation removes leading and trailing white-space, - * converts to lowe case, and reaplaces the alternative boolean values (if - * set) with "true" and "false". - * - * @param s the raw column value - * @return String fixed value - */ - protected String fixBoolean(String s) { - s = s.trim().toLowerCase(); - if (altTrue != null && s.equals(altTrue)) { - return "true"; - } - if (altFalse != null && s.equals(altFalse)) { - return "false"; - } - return s; - } - - /** - * Override this if you want to correct numerical values come from the - * file. - * The default implementation removes leading and trailing white-space, - * removes grouping symbols (if set) and replaces decimal separator (if set) - * with dot. - * - * @param s the raw column value - * @return String fixed value - */ - protected String fixNumber(String s) { - s = s.trim(); - if (groupingSeparator != '\0') { - int i; - while ((i = s.indexOf(groupingSeparator)) != -1) { - s = s.substring(0, i) + s.substring(i + 1, s.length()); - } - } - if (decimalSeparator != '.') { - s = s.replace(decimalSeparator, '.'); - } - return s; - } - - private class RowHash - implements TemplateHashModelEx, TemplateSequenceModel { - - private TemplateModel[] cols; - - private RowHash(TemplateModel[] cols) { - this.cols = cols; - } - - public int size() { - return colCount; - } - - public TemplateCollectionModel keys() { - return new TemplateModelListCollection(keyList); - } - - public TemplateCollectionModel values() { - return new TemplateModelArrayCollection(cols); - } - - public TemplateModel get(String key) { - Integer i = (Integer) nameToCol.get(key); - if (i != null) { - return cols[i.intValue()]; - } else { - return null; - } - } - - public boolean isEmpty() { - return size() == 0; - } - - public TemplateModel get(int i) throws TemplateModelException { - return cols[i]; - } - - } - - public TemplateModel get(String key) throws TemplateModelException { - if (key.equals("headers")) { - return new TemplateModelListSequence(keyList); - } else { - return null; - } - } - - public boolean isEmpty() throws TemplateModelException { - return false; - } - - // ------------------------------------------------------------------------- - // Property setters/getters - - /** - * If it is not null, then it is used as the header row - * instead of the first row of the CSV file. Each value in the array - * corresponds to a header row cell. - */ - public void setExternalHeaderRow(String[] externalHeaderRow) { - this.externalHeaderRow = externalHeaderRow; - } - - public String[] getExternalHeaderRow() { - return externalHeaderRow; - } - - /** - * Specifies if the file contains header row or not. - * If it is false, then the externalHeaderRow - * property must not be null when calling - * {@link #load(Reader)}. Defaults to true. - */ - public void setHasHeaderRow(boolean hasHeaderRow) { - this.hasHeaderRow = hasHeaderRow; - } - - public boolean getHasHeaderRow() { - return hasHeaderRow; - } - - /** - * Specifies if the header names coming from the file will be normalized - * or should be left as is. Normalization means: - *

      - *
    1. Remove the part between the first "(" and last - * ")", before the header is parsed for column type - * identifier (like ":n"). - *
    2. After the type identifier was extracted and removed (if there was - * any), the cell value is trimmed. (Trimming happens even if - * header normalization is off.) - *
    3. Then it's converted to lower case. - *
    4. Then the following characters are replaced with "_": - * space, comma, semicolon, colon.
    5. Then all "__" - * and "___" and so on is replaced with a single - * "_". - *
    - * - * For example, "Price, old (category: A, B, F): n" will be - * normailzed to "price_old", and the type identifier will be - * n. - */ - public void setNormalizeHeaders(boolean normalizeHeaders) { - this.normalizeHeaders = normalizeHeaders; - } - - public boolean getNormalizeHeaders() { - return normalizeHeaders; - } - - /** - * Specifies if all cells will be trimmed. - * Trimming means the removal of all leading and trailing white-space. - * Defaults to false. - */ - public void setTrimCells(boolean trimCells) { - this.trimCells = trimCells; - } - - public boolean getTrimCells() { - return trimCells; - } - - /** - * Specifies the list of cell values that will be replaced with an empty - * (0 length) string. Typical such values are "-" or - * "N/A". The comparison is case-sensitice. When - * {@link #getTrimCells()} is true, the comparison occurs - * after the trimming. The replacement occurs before type conversions (for - * typed columns). Header values will not be affected by this property. - * Defaults to null, i.e., no replacement. - */ - public void setEmptyValues(String[] emptyValues) { - this.emptyValues = emptyValues; - } - - public String[] getEmptyValues() { - return emptyValues; - } - - public String getAltFalse() { - return altFalse; - } - - /** - * Alternative word used to indicate boolean false in the CSV file. - * Use null if you don't need alternative value. - * Defaults to null. - */ - public void setAltFalse(String altFalse) { - this.altFalse = altFalse; - } - - public String getAltTrue() { - return altTrue; - } - - /** - * Alternative word used to indicate boolean true in the CSV file. - * Use null if you don't need alternative value. - * Defaults to null. - */ - public void setAltTrue(String altTrue) { - this.altTrue = altTrue; - } - - public String getDateFormatPattern() { - return dateFormatPattern; - } - - /** - * Sets the pattern used to parse date columns. If this is - * null, then {@link StringUtil#stringToDate} will be used - * to parse the values. Defaults to null. - */ - public void setDateFormatPattern(String dateFormatPattern) { - if (dateFormatPattern == null) { - dateFormat = null; - } else { - dateFormat = new SimpleDateFormat(dateFormatPattern); - if (timeZone != null) { - dateFormat.setTimeZone(timeZone); - } - this.dateFormatPattern = dateFormatPattern; - } - } - - public String getDateTimeFormatPattern() { - return dateTimeFormatPattern; - } - - /** - * Sets the pattern used to parse date-time columns. If this is - * null, then {@link StringUtil#stringToDateTime} will be used - * to parse the values. Defaults to null. - */ - public void setDateTimeFormatPattern(String dateTimeFormatPattern) { - if (dateTimeFormatPattern == null) { - dateTimeFormat = null; - } else { - dateTimeFormat = new SimpleDateFormat(dateTimeFormatPattern); - if (timeZone != null) { - dateTimeFormat.setTimeZone(timeZone); - } - this.dateTimeFormatPattern = dateTimeFormatPattern; - } - } - - public char getDecimalSeparator() { - return decimalSeparator; - } - - /** - * Sets the alternative symbol used for the decimal dot in - * the file for numbers. Note that dot will be always assumed as - * decimal separator, except if groupingSeparator is set to dot. - */ - public void setDecimalSeparator(char decimalSeparator) { - this.decimalSeparator = decimalSeparator; - } - - public char getGroupingSeparator() { - return groupingSeparator; - } - - /** - * Set the grouping separator symbol used for grouping in the file - * for numbers. Use 0 ('\0') if you don't use grouping. - * Defaults to 0. - */ - public void setGroupingSeparator(char groupingSeparator) { - this.groupingSeparator = groupingSeparator; - } - - public char getSeparator() { - return separator; - } - - /** - * Separator char between cloumns. Defaults to semi-colon (;). - */ - public void setSeparator(char separator) { - this.separator = separator; - } - - public String getTimeFormatPattern() { - return timeFormatPattern; - } - - /** - * Sets the pattern used to parse time columns. If this is - * null, then {@link StringUtil#stringToTime} will be used - * to parse the values. Defaults to null. - */ - public void setTimeFormatPattern(String timeFormatPattern) { - if (timeFormatPattern == null) { - timeFormat = null; - } else { - timeFormat = new SimpleDateFormat(timeFormatPattern); - if (timeZone != null) { - timeFormat.setTimeZone(timeZone); - } - this.timeFormatPattern = timeFormatPattern; - } - } - - public TimeZone getTimeZone() { - return timeZone; - } - - /** - * Sets the time zone used for parsing date/time/date-time that does not - * specify a time zone explicitly. If null, the default time - * zone of the computer is used. - */ - public void setTimeZone(TimeZone timeZone) { - this.timeZone = timeZone; - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/models/JSONArrayNode.java b/fmpp/src/main/java/fmpp/models/JSONArrayNode.java deleted file mode 100644 index 40e883a..0000000 --- a/fmpp/src/main/java/fmpp/models/JSONArrayNode.java +++ /dev/null @@ -1,114 +0,0 @@ -package fmpp.models; - -import java.util.List; - -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateSequenceModel; - -/** - * JSON "array" value; see http://www.json.org/. - * This class is NOT thread safe. - */ -public class JSONArrayNode extends JSONNode implements TemplateSequenceModel { - - private static final long serialVersionUID = 1L; - - public static final String NODE_TYPE = "array"; - public static final String DEFAULT_NODE_NAME = nodeTypeToDefaultNodeName(NODE_TYPE); - - /** - * Used internally to differentiate lazily initialized values that are already set to JSON {@code null} - * from those that weren't set yet. - */ - private static JSONNode JSON_NULL_MARK = new JSONNode(null, null) { - - private static final long serialVersionUID = 1L; - - public String getNodeType() throws TemplateModelException { - return null; - } - - public TemplateSequenceModel getChildNodes() throws TemplateModelException { - return null; - } - - protected String getDefaultNodeName() { - return null; - } - - }; - - /** Stores the array elements with plain Java types */ - private final List/**/ elements; - - /** Stores the array elements with FTL type; filled lazily. */ - private transient JSONNode[] wrappedElements; - - public JSONArrayNode(JSONNode parentNode, String nodeName, List/**/ elements) { - super(parentNode, nodeName); - this.elements = elements; - } - - /** - * Returns the {@link JSONNode}-s in this JSON array, using a {@link JSONNullNode} for JSON {@code null}-s. - * Note that {@link #get(int)} treats JSON {@code null}-s differently. - */ - public TemplateSequenceModel getChildNodes() throws TemplateModelException { - return new TemplateSequenceModel() { - - public TemplateModel get(int index) throws TemplateModelException { - final TemplateModel element = JSONArrayNode.this.get(index); - return element != null ? element : new JSONNullNode(JSONArrayNode.this, null); - } - - public int size() throws TemplateModelException { - return JSONArrayNode.this.size(); - } - - }; - } - - /** - * Returns {@link #NODE_TYPE}. - */ - public String getNodeType() throws TemplateModelException { - return NODE_TYPE; - } - - /** - * Returns the {@link JSONNode} at the given index from this JSON array, using a Java {@code null} for JSON - * {@code null}-s. Note that {@link #getChildNodes()} treats JSON {@code null}-s differently. - */ - public TemplateModel get(int idx) throws TemplateModelException { - final int size = elements.size(); - if (idx < 0 || idx >= size) { - throw new TemplateModelException("JSON array index out of bounds: " + idx + " is outside 0.." + (size - 1)); - } - - JSONNode[] wrappedChildren = this.wrappedElements; - if (wrappedChildren == null) { - wrappedChildren = new JSONNode[size]; - this.wrappedElements = wrappedChildren; - } - - JSONNode r = wrappedChildren[idx]; - if (r == null) { - r = wrap(elements.get(idx), this, null, false); - if (r == null) { - r = JSON_NULL_MARK; - } - wrappedChildren[idx] = r; - } - return r != JSON_NULL_MARK ? r : null; - } - - public int size() throws TemplateModelException { - return elements.size(); - } - - protected String getDefaultNodeName() { - return DEFAULT_NODE_NAME; - } - -} diff --git a/fmpp/src/main/java/fmpp/models/JSONBooleanNode.java b/fmpp/src/main/java/fmpp/models/JSONBooleanNode.java deleted file mode 100644 index 40f5c45..0000000 --- a/fmpp/src/main/java/fmpp/models/JSONBooleanNode.java +++ /dev/null @@ -1,46 +0,0 @@ -package fmpp.models; - -import freemarker.template.TemplateBooleanModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateSequenceModel; - -/** - * JSON "true" and "false" value; see http://www.json.org/. - */ -public class JSONBooleanNode extends JSONNode implements TemplateBooleanModel { - - private static final long serialVersionUID = 1L; - - public static final String NODE_TYPE = "boolean"; - public static final String DEFAULT_NODE_NAME = nodeTypeToDefaultNodeName(NODE_TYPE); - - private final boolean value; - - public JSONBooleanNode(JSONNode parentNode, String nodeName, boolean value) { - super(parentNode, nodeName); - this.value = value; - } - - /** - * Always returns {@code null}. - */ - public TemplateSequenceModel getChildNodes() throws TemplateModelException { - return null; - } - - /** - * Returns {@link #NODE_TYPE}. - */ - public String getNodeType() throws TemplateModelException { - return NODE_TYPE; - } - - public boolean getAsBoolean() throws TemplateModelException { - return value; - } - - protected String getDefaultNodeName() { - return DEFAULT_NODE_NAME; - } - -} diff --git a/fmpp/src/main/java/fmpp/models/JSONNode.java b/fmpp/src/main/java/fmpp/models/JSONNode.java deleted file mode 100644 index 90416e7..0000000 --- a/fmpp/src/main/java/fmpp/models/JSONNode.java +++ /dev/null @@ -1,109 +0,0 @@ -package fmpp.models; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -import fmpp.util.StringUtil; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNodeModel; - -/** - * Node in a hierarchy of JSON values. See http://www.json.org/ for JSON types; each has its own subclass. - * JSON "object" and "array" values are the non-leafs in the tree. - */ -public abstract class JSONNode implements TemplateNodeModel, Serializable { - - private static final long serialVersionUID = 1L; - - private final JSONNode parentNode; - private final String nodeName; - - /** - * Returns the FTL node name for a node that has otherwise no name. - */ - protected static String nodeTypeToDefaultNodeName(String nodeType) { - return "unnamed" + StringUtil.capitalizeFirst(nodeType); - } - - /** - * @param parentNode the JSON "object" or JSON "array" that contains this value. - * @param nodeName {@code null}, unless this is the value in a key-value pair, in which case it's the key. - * When it's {@code null}, the actual node name will be {@link #getDefaultNodeName()}. - */ - protected JSONNode(JSONNode parentNode, String nodeName) { - this.parentNode = parentNode; - this.nodeName = nodeName != null ? nodeName : getDefaultNodeName(); - } - - /** - * Returns the name of the node if it has no explicit name. This is normally called by the - * {@link #JSONNode(JSONNode, String)} constructor if its second argument is {@code null}. - * - * @see #nodeTypeToDefaultNodeName(String) - */ - protected abstract String getDefaultNodeName(); - - /** - * Returns the JSON "object" or JSON "array" that contains this value. - */ - public final TemplateNodeModel getParentNode() throws TemplateModelException { - return parentNode; - } - - /** - * Returns the same as {@link #getNodeType()}, except when the node is the value in a key-value pair in a - * JSON object, in which case it returns the key value. - */ - public final String getNodeName() throws TemplateModelException { - return nodeName; - } - - public final String getNodeNamespace() throws TemplateModelException { - return null; - } - - /** - * Wraps a {@link List}, a {@link Map} with string keys, a {@link String}, a {@link Number} or a {@link Boolean} - * into a {@link JSONNode}. The values in the {@link List} or {@link Map} must be also be one of the previously - * listed types. The resulting object is NOT thread safe. Also, the wrapped objects shouldn't be changed after the - * wrapping. The wrapping of the contained values is possibly lazy. - * @return The wrapped value; note the this will return {@code null} for JSON null values, not a - * {@link JSONNullNode} instance. - * @throws TemplateModelException If {@code obj} can't be wrapped into JSON node. - */ - public static JSONNode wrap(Object jsonPOJO) throws TemplateModelException { - return wrap(jsonPOJO, null, null, false); - } - - /** - * @param parentNode Same as the similar parameter of {@link #JSONNode(JSONNode, String)}. - * @param nodeName Same as the similar parameter of {@link #JSONNode(JSONNode, String)}. - * @throws TemplateModelException If {@code obj} can't be wrapped into JSON node. - */ - protected static JSONNode wrap(Object obj, JSONNode parentNode, String nodeName, boolean wrapNullAsJSONNullNode) - throws TemplateModelException { - if (obj == null) { - return wrapNullAsJSONNullNode ? new JSONNullNode(parentNode, nodeName) : null; - } - - if (obj instanceof String) { - return new JSONStringNode(parentNode, nodeName, (String) obj); - } - if (obj instanceof Number) { - return new JSONNumberNode(parentNode, nodeName, (Number) obj); - } - if (obj instanceof Boolean) { - return new JSONBooleanNode(parentNode, nodeName, ((Boolean) obj).booleanValue()); - } - if (obj instanceof List) { - return new JSONArrayNode(parentNode, nodeName, (List) obj); - } - if (obj instanceof Map) { - return new JSONObjectNode(parentNode, nodeName, (Map) obj); - } - throw new TemplateModelException("Can't warp an object of this class as JSON node: " - + obj.getClass().getName()); - } - -} diff --git a/fmpp/src/main/java/fmpp/models/JSONNullNode.java b/fmpp/src/main/java/fmpp/models/JSONNullNode.java deleted file mode 100644 index 6faec27..0000000 --- a/fmpp/src/main/java/fmpp/models/JSONNullNode.java +++ /dev/null @@ -1,34 +0,0 @@ -package fmpp.models; - -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNodeModel; -import freemarker.template.TemplateSequenceModel; - -/** - * JSON "null" value; see http://www.json.org/. Instances of this can only be found through traversing the FTL node - * tree ({@link TemplateNodeModel} tree), not as normal FTL sequence or FTL hash items. - */ -public class JSONNullNode extends JSONNode { - - private static final long serialVersionUID = 1L; - - public static final String NODE_TYPE = "null"; - public static final String DEFAULT_NODE_NAME = nodeTypeToDefaultNodeName(NODE_TYPE); - - public JSONNullNode(JSONNode parentNode, String nodeName) { - super(parentNode, nodeName); - } - - public TemplateSequenceModel getChildNodes() throws TemplateModelException { - return null; - } - - public String getNodeType() throws TemplateModelException { - return NODE_TYPE; - } - - protected String getDefaultNodeName() { - return DEFAULT_NODE_NAME; - } - -} diff --git a/fmpp/src/main/java/fmpp/models/JSONNumberNode.java b/fmpp/src/main/java/fmpp/models/JSONNumberNode.java deleted file mode 100644 index 36f1525..0000000 --- a/fmpp/src/main/java/fmpp/models/JSONNumberNode.java +++ /dev/null @@ -1,46 +0,0 @@ -package fmpp.models; - -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNumberModel; -import freemarker.template.TemplateSequenceModel; - -/** - * JSON "number" value; see http://www.json.org/. - */ -public class JSONNumberNode extends JSONNode implements TemplateNumberModel { - - private static final long serialVersionUID = 1L; - - public static final String NODE_TYPE = "number"; - public static final String DEFAULT_NODE_NAME = nodeTypeToDefaultNodeName(NODE_TYPE); - - private final Number value; - - public JSONNumberNode(JSONNode parentNode, String nodeName, Number value) { - super(parentNode, nodeName); - this.value = value; - } - - /** - * Always returns {@code null}. - */ - public TemplateSequenceModel getChildNodes() throws TemplateModelException { - return null; - } - - /** - * Returns {@link #NODE_TYPE}. - */ - public String getNodeType() throws TemplateModelException { - return NODE_TYPE; - } - - public Number getAsNumber() throws TemplateModelException { - return value; - } - - protected String getDefaultNodeName() { - return DEFAULT_NODE_NAME; - } - -} diff --git a/fmpp/src/main/java/fmpp/models/JSONObjectNode.java b/fmpp/src/main/java/fmpp/models/JSONObjectNode.java deleted file mode 100644 index 94843ee..0000000 --- a/fmpp/src/main/java/fmpp/models/JSONObjectNode.java +++ /dev/null @@ -1,190 +0,0 @@ -package fmpp.models; - -import java.util.Collection; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; - -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateHashModelEx; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateModelIterator; -import freemarker.template.TemplateNodeModel; -import freemarker.template.TemplateSequenceModel; - -/** - * JSON "object" value; see http://www.json.org/. - * This class is NOT thread safe. - */ -public class JSONObjectNode extends JSONNode implements TemplateHashModelEx { - - private static final long serialVersionUID = 1L; - - public static final String NODE_TYPE = "object"; - public static final String DEFAULT_NODE_NAME = nodeTypeToDefaultNodeName(NODE_TYPE); - - private final Map/**/ map; - - /** - * @param map The JSON name-value pairs. The keys must be {@link String}-s, and values must be of a type that - * {@link JSONNode#wrap(Object)} can wrap. - */ - public JSONObjectNode(JSONNode parentNode, String nodeName, Map/**/ map) { - super(parentNode, nodeName); - this.map = map; - } - - public String getNodeType() throws TemplateModelException { - return NODE_TYPE; - } - - /** - * Returns the {@link JSONNode} for the given key from this JSON object, using a Java {@code null} for JSON - * {@code null}-s. Note that {@link #getChildNodes()} treats JSON {@code null}-s differently. - */ - public TemplateModel get(String key) throws TemplateModelException { - return wrap(map.get(key), this, key, false); - } - - public boolean isEmpty() throws TemplateModelException { - return map.isEmpty(); - } - - public int size() throws TemplateModelException { - return map.size(); - } - - public TemplateSequenceModel getChildNodes() throws TemplateModelException { - return new JSONChildNodeSequence(map.entrySet()); - } - - public TemplateCollectionModel keys() throws TemplateModelException { - return new JSONKeyCollection(map.keySet()); - } - - /** - * Returns the values from the key-value pairs of this JSON object, returning Java {@code null} for JSON - * {@code null}-s. Note that {@link #getChildNodes()} treats JSON {@code null}-s differently. - */ - public TemplateCollectionModel values() throws TemplateModelException { - return new JSONValueCollection(map.entrySet()); - } - - private class JSONChildNodeSequence implements TemplateSequenceModel, TemplateCollectionModel { - - private final Collection/*>*/ entries; - - private TemplateNodeModel[] wrappedValues; - - private JSONChildNodeSequence(Collection/*>*/ entries) { - this.entries = entries; - } - - public TemplateModelIterator iterator() throws TemplateModelException { - if (this.wrappedValues == null) { - initializeWrappedValues(); - } - return new TemplateModelIterator() { - - private int nextIdx; - - public boolean hasNext() throws TemplateModelException { - return nextIdx < wrappedValues.length; - } - - public TemplateModel next() throws TemplateModelException { - return wrappedValues[nextIdx++]; - } - - }; - } - - public TemplateModel get(int idx) throws TemplateModelException { - TemplateNodeModel[] wrappedValues = this.wrappedValues; - if (wrappedValues == null) { - wrappedValues = initializeWrappedValues(); - } - - if (idx < 0 || idx >= wrappedValues.length) { - throw new TemplateModelException("JSON object child node index out of bounds: " + idx - + " is outside 0.." + (wrappedValues.length - 1)); - } - return wrappedValues[idx]; - } - - protected TemplateNodeModel[] initializeWrappedValues() throws TemplateModelException { - TemplateNodeModel[] wrappedValues; - wrappedValues = new TemplateNodeModel[size()]; - int dstIdx = 0; - for (Iterator it = entries.iterator(); it.hasNext();) { - final Map.Entry/**/ entry = (Entry) it.next(); - wrappedValues[dstIdx++] = wrap(entry.getValue(), JSONObjectNode.this, (String) entry.getKey(), true); - } - return this.wrappedValues = wrappedValues; - } - - public int size() throws TemplateModelException { - return entries.size(); - } - - } - - private class JSONKeyCollection implements TemplateCollectionModel { - - private final Collection/**/ values; - - private JSONKeyCollection(Collection/**/ values) { - this.values = values; - } - - public TemplateModelIterator iterator() throws TemplateModelException { - return new TemplateModelIterator() { - - Iterator it = values.iterator(); - - public boolean hasNext() throws TemplateModelException { - return it.hasNext(); - } - - public TemplateModel next() throws TemplateModelException { - return wrap(it.next(), JSONObjectNode.this, null, false); - } - - }; - } - - } - - private class JSONValueCollection implements TemplateCollectionModel { - - private final Collection/*>*/ values; - - private JSONValueCollection(Collection/*>*/ values) { - this.values = values; - } - - public TemplateModelIterator iterator() throws TemplateModelException { - return new TemplateModelIterator() { - - Iterator it = values.iterator(); - - public boolean hasNext() throws TemplateModelException { - return it.hasNext(); - } - - public TemplateModel next() throws TemplateModelException { - final Map.Entry/**/ entry = (Entry) it.next(); - return wrap(entry.getValue(), JSONObjectNode.this, (String) entry.getKey(), false); - } - - }; - } - - } - - protected String getDefaultNodeName() { - return DEFAULT_NODE_NAME; - } - -} diff --git a/fmpp/src/main/java/fmpp/models/JSONStringNode.java b/fmpp/src/main/java/fmpp/models/JSONStringNode.java deleted file mode 100644 index 387da9f..0000000 --- a/fmpp/src/main/java/fmpp/models/JSONStringNode.java +++ /dev/null @@ -1,46 +0,0 @@ -package fmpp.models; - -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateScalarModel; -import freemarker.template.TemplateSequenceModel; - -/** - * JSON "string" value; see http://www.json.org/. - */ -public class JSONStringNode extends JSONNode implements TemplateScalarModel { - - private static final long serialVersionUID = 1L; - - public static final String NODE_TYPE = "string"; - public static final String DEFAULT_NODE_NAME = nodeTypeToDefaultNodeName(NODE_TYPE); - - private final String value; - - public JSONStringNode(JSONNode parentNode, String nodeName, String value) { - super(parentNode, nodeName); - this.value = value; - } - - /** - * Always returns {@code null}. - */ - public TemplateSequenceModel getChildNodes() throws TemplateModelException { - return null; - } - - /** - * Returns {@link #NODE_TYPE}. - */ - public String getNodeType() throws TemplateModelException { - return NODE_TYPE; - } - - public String getAsString() throws TemplateModelException { - return value; - } - - protected String getDefaultNodeName() { - return DEFAULT_NODE_NAME; - } - -} diff --git a/fmpp/src/main/java/fmpp/models/NewWritableHashMethod.java b/fmpp/src/main/java/fmpp/models/NewWritableHashMethod.java deleted file mode 100644 index 6ba09e3..0000000 --- a/fmpp/src/main/java/fmpp/models/NewWritableHashMethod.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.util.HashMap; -import java.util.List; - -import freemarker.template.TemplateHashModel; -import freemarker.template.TemplateHashModelEx; -import freemarker.template.TemplateMethodModelEx; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateModelIterator; -import freemarker.template.TemplateScalarModel; - -/** - * Creates a new, empty {@link WritableHash}. - */ -public class NewWritableHashMethod implements TemplateMethodModelEx { - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() == 0) { - return new WritableHash(); - } else if (arguments.size() == 1) { - Object arg = arguments.get(0); - if (arg instanceof WritableHash) { - return ((WritableHash) arg).clone(); - } else if (arg instanceof TemplateHashModel) { - if (!(arg instanceof TemplateHashModelEx)) { - throw new TemplateModelException( - "The argument to newWritableHash(hash) must be " - + "an \"TemplateHashModelEx\" hash (like a wrapped " - + "Map). The argument you have given is a hash, " - + "but it is not \"Ex\", so its entires can't be " - + "enumerated, hence it can't be copyed."); - } - TemplateHashModelEx src = (TemplateHashModelEx) arg; - HashMap dst = new HashMap((int) (src.size() / 0.75 + 1)); - TemplateModelIterator it = src.keys().iterator(); - while (it.hasNext()) { - TemplateModel key = it.next(); - if (!(key instanceof TemplateScalarModel)) { - throw new TemplateModelException( - "The hash given as the argument of " - + "newWritableHash(hash) contains a key that is" - + "not a string. A such key is illegal " - + "according to FreeMarker."); - } - String strkey = ((TemplateScalarModel) key).getAsString(); - dst.put(strkey, src.get(strkey)); - } - return new WritableHash(dst); - } else { - throw new TemplateModelException( - "The argument to newWritableHash(hash) must be " - + "a hash (like a wrapped Map)."); - } - } else { - throw new TemplateModelException( - "The newWritableHash method needs 0 or 1 argument, not " - + arguments.size() + "."); - } - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/models/NewWritableSequenceMethod.java b/fmpp/src/main/java/fmpp/models/NewWritableSequenceMethod.java deleted file mode 100644 index fb8d5d3..0000000 --- a/fmpp/src/main/java/fmpp/models/NewWritableSequenceMethod.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.util.ArrayList; -import java.util.List; - -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateMethodModelEx; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateModelIterator; -import freemarker.template.TemplateSequenceModel; - -/** - * Creates a new, empty {@link WritableSequence}. - */ -public class NewWritableSequenceMethod implements TemplateMethodModelEx { - - public Object exec(List arguments) - throws TemplateModelException { - if (arguments.size() == 0) { - return new WritableSequence(); - } else if (arguments.size() == 1) { - Object arg = arguments.get(0); - if (arg instanceof WritableSequence) { - return ((WritableSequence) arg).clone(); - } else if (arg instanceof TemplateSequenceModel) { - TemplateSequenceModel src = (TemplateSequenceModel) arg; - int ln = src.size(); - ArrayList dst = new ArrayList(ln + 1); - for (int i = 0; i < ln; i++) { - dst.add(src.get(i)); - } - return new WritableSequence(dst); - } else if (arg instanceof TemplateCollectionModel) { - TemplateModelIterator src - = ((TemplateCollectionModel) arg).iterator(); - ArrayList dst = new ArrayList(); - while (src.hasNext()) { - dst.add(src.next()); - } - return new WritableSequence(dst); - } else { - throw new TemplateModelException( - "The argument to newWritableSequence(seq) must be " - + "a sequence (like a wrapped List) or a collection " - + "(like a wrapped Iterator)."); - } - } else { - throw new TemplateModelException( - "The newWritableHash method needs 0 or 1 argument, not " - + arguments.size() + "."); - } - } - -} diff --git a/fmpp/src/main/java/fmpp/models/RemoveTransform.java b/fmpp/src/main/java/fmpp/models/RemoveTransform.java deleted file mode 100644 index f1c5fc6..0000000 --- a/fmpp/src/main/java/fmpp/models/RemoveTransform.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.io.IOException; -import java.io.Writer; -import java.util.Iterator; -import java.util.Map; - -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNumberModel; -import freemarker.template.TemplateScalarModel; -import freemarker.template.TemplateTransformModel; - -/** - * Removes an item from a {@link WritableSequence} or {@link WritableHash}. - */ -public class RemoveTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException, IOException { - WritableSequence seq = null; - WritableHash hash = null; - int index = 0; - String key = null; - boolean hasIndex = false; - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("seq".equals(pname)) { - if (!(pvalue instanceof WritableSequence)) { - throw new TemplateModelException( - "The \"seq\" parameter must be a " - + "writable sequence variable."); - } - seq = (WritableSequence) pvalue; - } else if ("hash".equals(pname)) { - if (!(pvalue instanceof WritableHash)) { - throw new TemplateModelException( - "The \"hash\" parameter must be a " - + "writable hash variable."); - } - hash = (WritableHash) pvalue; - } else if ("index".equals(pname)) { - if (!(pvalue instanceof TemplateNumberModel)) { - throw new TemplateModelException( - "The \"index\" parameter must be a " - + "numberical value."); - } - index = ((TemplateNumberModel) pvalue).getAsNumber() - .intValue(); - hasIndex = true; - } else if ("key".equals(pname)) { - if (!(pvalue instanceof TemplateScalarModel)) { - throw new TemplateModelException( - "The \"key\" parameter must be a " - + "string value."); - } - key = ((TemplateScalarModel) pvalue).getAsString(); - } else { - throw newUnsupportedParamException(pname); - } - } - if (seq == null && hash == null) { - throw newMissingParamException("seq or hash"); - } - if (seq != null) { - if (!hasIndex) { - throw newMissingParamException("index"); - } - if (index < 0 || index >= seq.getList().size()) { - throw new TemplateModelException("Index out of bounds."); - } - seq.getList().remove(index); - } - if (hash != null) { - if (key == null) { - throw newMissingParamException("key"); - } - hash.getMap().remove(key); - } - - return null; - } -} diff --git a/fmpp/src/main/java/fmpp/models/SetTransform.java b/fmpp/src/main/java/fmpp/models/SetTransform.java deleted file mode 100644 index f4ea446..0000000 --- a/fmpp/src/main/java/fmpp/models/SetTransform.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.io.IOException; -import java.io.Writer; -import java.util.Iterator; -import java.util.Map; - -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNumberModel; -import freemarker.template.TemplateScalarModel; -import freemarker.template.TemplateTransformModel; - -/** - * Changes items an item in a {@link WritableSequence} or sets/adds and - * item to a {@link WritableHash}. - */ -public class SetTransform - extends TemplateModelUtils implements TemplateTransformModel { - - public Writer getWriter(Writer out, Map params) - throws TemplateModelException, IOException { - WritableSequence seq = null; - WritableHash hash = null; - int index = 0; - String key = null; - boolean hasIndex = false; - TemplateModel value = null; - - Iterator it = params.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry e = (Map.Entry) it.next(); - String pname = (String) e.getKey(); - Object pvalue = e.getValue(); - - if ("seq".equals(pname)) { - if (!(pvalue instanceof WritableSequence)) { - throw new TemplateModelException( - "The \"seq\" parameter must be a " - + "writable sequence variable."); - } - seq = (WritableSequence) pvalue; - } else if ("hash".equals(pname)) { - if (!(pvalue instanceof WritableHash)) { - throw new TemplateModelException( - "The \"hash\" parameter must be a " - + "writable hash variable."); - } - hash = (WritableHash) pvalue; - } else if ("index".equals(pname)) { - if (!(pvalue instanceof TemplateNumberModel)) { - throw new TemplateModelException( - "The \"index\" parameter must be a " - + "numberical value."); - } - index = ((TemplateNumberModel) pvalue).getAsNumber() - .intValue(); - hasIndex = true; - } else if ("key".equals(pname)) { - if (!(pvalue instanceof TemplateScalarModel)) { - throw new TemplateModelException( - "The \"key\" parameter must be a " - + "string value."); - } - key = ((TemplateScalarModel) pvalue).getAsString(); - } else if ("value".equals(pname)) { - value = (TemplateModel) pvalue; - } else { - throw newUnsupportedParamException(pname); - } - } - if (seq != null) { - if (value == null) { - throw newMissingParamException("value"); - } - if (!hasIndex) { - throw newMissingParamException("index"); - } - if (index < 0 || index >= seq.getList().size()) { - throw new TemplateModelException("Index out of bounds."); - } - seq.getList().set(index, value); - } else if (hash != null) { - if (value == null) { - throw newMissingParamException("value"); - } - if (key == null) { - throw newMissingParamException("key"); - } - hash.getMap().put(key, value); - } else { - throw newMissingParamException("seq or hash"); - } - - return null; - } -} diff --git a/fmpp/src/main/java/fmpp/models/StringArraySequence.java b/fmpp/src/main/java/fmpp/models/StringArraySequence.java deleted file mode 100644 index 5900ae2..0000000 --- a/fmpp/src/main/java/fmpp/models/StringArraySequence.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import freemarker.template.SimpleScalar; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateScalarModel; -import freemarker.template.TemplateSequenceModel; - -/** - * Sequence variable implementation that wraps a String[] with relatively low - * resource utilization. Warning: it does not copy the wrapped array, so do - * not modify that after the model was made! - */ -public class StringArraySequence implements TemplateSequenceModel { - private String[] stringArray; - private TemplateScalarModel[] array; - - /** - * Warning: Does not copy the argument array! - */ - public StringArraySequence(String[] stringArray) { - this.stringArray = stringArray; - } - - public TemplateModel get(int index) throws TemplateModelException { - if (array == null) { - array = new TemplateScalarModel[stringArray.length]; - } - TemplateScalarModel result = array[index]; - if (result == null) { - result = new SimpleScalar(stringArray[index]); - array[index] = result; - } - return result; - } - - public int size() throws TemplateModelException { - return stringArray.length; - } -} diff --git a/fmpp/src/main/java/fmpp/models/TemplateModelArrayCollection.java b/fmpp/src/main/java/fmpp/models/TemplateModelArrayCollection.java deleted file mode 100644 index 971c15b..0000000 --- a/fmpp/src/main/java/fmpp/models/TemplateModelArrayCollection.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelIterator; - -/** - * Collection variable implementation that wraps an array of already - * wrapped objects directly. - */ -public class TemplateModelArrayCollection implements TemplateCollectionModel { - private TemplateModel[] array; - - public TemplateModelArrayCollection(TemplateModel[] array) { - this.array = array; - } - - public TemplateModelIterator iterator() { - return new ArrayModelIterator(); - } - - private class ArrayModelIterator implements TemplateModelIterator { - private int index = 0; - - public TemplateModel next() { - return array[index++]; - } - - public boolean hasNext() { - return index < array.length; - } - } -} diff --git a/fmpp/src/main/java/fmpp/models/TemplateModelListCollection.java b/fmpp/src/main/java/fmpp/models/TemplateModelListCollection.java deleted file mode 100644 index 62ce5ce..0000000 --- a/fmpp/src/main/java/fmpp/models/TemplateModelListCollection.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.util.List; - -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelIterator; - -/** - * Collection variable implementation that wraps a java.util.List of already - * wrapped objects directly. - */ -public class TemplateModelListCollection implements TemplateCollectionModel { - private List list; - - public TemplateModelListCollection(List list) { - this.list = list; - } - - public TemplateModelIterator iterator() { - return new ListModelIterator(); - } - - private class ListModelIterator implements TemplateModelIterator { - private int index = 0; - - public TemplateModel next() { - return (TemplateModel) list.get(index++); - } - - public boolean hasNext() { - return index < list.size(); - } - } -} diff --git a/fmpp/src/main/java/fmpp/models/TemplateModelListSequence.java b/fmpp/src/main/java/fmpp/models/TemplateModelListSequence.java deleted file mode 100644 index 414cdc7..0000000 --- a/fmpp/src/main/java/fmpp/models/TemplateModelListSequence.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.util.List; - -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateSequenceModel; - -/** - * Sequence that wraps a java.util.List of already wrapped objects - * directly, with minimal resource usage. Warning! It does not copy the original - * list. - */ -public class TemplateModelListSequence implements TemplateSequenceModel { - private List list; - - public TemplateModelListSequence(List list) { - this.list = list; - } - - public TemplateModel get(int index) throws TemplateModelException { - return (TemplateModel) list.get(index); - } - - public int size() throws TemplateModelException { - return list.size(); - } - - public Object getWrappedObject() { - return list; - } -} diff --git a/fmpp/src/main/java/fmpp/models/TemplateModelUtils.java b/fmpp/src/main/java/fmpp/models/TemplateModelUtils.java deleted file mode 100644 index 9921021..0000000 --- a/fmpp/src/main/java/fmpp/models/TemplateModelUtils.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import fmpp.util.StringUtil; -import freemarker.template.TemplateBooleanModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNumberModel; -import freemarker.template.TemplateScalarModel; - -/** - * Constains utility methods for transform and method variable implementation. - */ -public class TemplateModelUtils { - protected String strParam(Object m, String name) - throws TemplateModelException { - if (!(m instanceof TemplateScalarModel)) { - throw new TemplateModelException( - "Parameter " + StringUtil.jQuote(name) - + " must be string."); - } else { - return ((TemplateScalarModel) m).getAsString(); - } - } - - protected int intParam(Object m, String name) - throws TemplateModelException { - if (!(m instanceof TemplateNumberModel)) { - throw new TemplateModelException( - "Parameter " + StringUtil.jQuote(name) - + " must be an integer number."); - } else { - Number n = ((TemplateNumberModel) m).getAsNumber(); - int i = n.intValue(); - if (n.doubleValue() != i) { - throw new TemplateModelException( - "Parameter " + StringUtil.jQuote(name) - + " must be an integer."); - } else { - return n.intValue(); - } - } - } - - protected boolean boolParam(Object m, String name) - throws TemplateModelException { - if (!(m instanceof TemplateBooleanModel)) { - throw new TemplateModelException( - "Parameter " + StringUtil.jQuote(name) - + " must be boolean."); - } else { - return ((TemplateBooleanModel) m).getAsBoolean(); - } - } - - /** - * @deprecated Use {@code throw} {@link #newMissingParamException(String)}. - */ - protected void dieWithMissingParam(String pname) throws TemplateModelException { - throw newMissingParamException(pname); - } - - protected TemplateModelException newMissingParamException(String pname) { - return new TemplateModelException("Required parameter with this name is missing: " + pname); - } - - /** - * @deprecated Use {@code throw} {@link #newUnsupportedParamException(String)}. - */ - protected void dieWithUnknownParam(String pname) throws TemplateModelException { - throw newUnsupportedParamException(pname); - } - - protected TemplateModelException newUnsupportedParamException(String pname) { - return new TemplateModelException("Unsupported parameter: " + pname); - } - - /** - * @deprecated Use {@code throw} {@link #newNoParamsAllowedException()}. - */ - protected void dieWithParamsNotAllowed() throws TemplateModelException { - throw newNoParamsAllowedException(); - } - - protected TemplateModelException newNoParamsAllowedException() - throws TemplateModelException { - return new TemplateModelException("This directive doesn't allow any parameters"); - } - -} diff --git a/fmpp/src/main/java/fmpp/models/WritableHash.java b/fmpp/src/main/java/fmpp/models/WritableHash.java deleted file mode 100644 index 086626f..0000000 --- a/fmpp/src/main/java/fmpp/models/WritableHash.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.util.HashMap; -import java.util.Map; -import java.util.SortedMap; -import java.util.TreeMap; - -import freemarker.template.SimpleCollection; -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateHashModelEx; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; - -/** - * Hash variable that can be changed during template execution with the proper - * method variables. - */ -public class WritableHash - extends WritableVariable implements TemplateHashModelEx { - private Map map; - - public WritableHash() { - map = new HashMap(); - } - - /** - * @param map must use {@link String} for keys and {@link TemplateModel}-s - * for values. - */ - public WritableHash(Map map) { - this.map = map; - } - - public int size() throws TemplateModelException { - return map.size(); - } - - public TemplateCollectionModel keys() throws TemplateModelException { - return new SimpleCollection(map.keySet()); - } - - public TemplateCollectionModel values() throws TemplateModelException { - return new SimpleCollection(map.values()); - } - - public TemplateModel get(String key) throws TemplateModelException { - return (TemplateModel) map.get(key); - } - - public boolean isEmpty() throws TemplateModelException { - return map.isEmpty(); - } - - public Map getMap() { - return map; - } - - public void setMap(Map map) { - this.map = map; - } - - public Object clone() { - return new WritableHash(copyMap(map)); - } - - private static Map copyMap(Map map) { - if (map instanceof HashMap) { - return (Map) ((HashMap) map).clone(); - } else if (map instanceof SortedMap) { - if (map instanceof TreeMap) { - return (Map) ((TreeMap) map).clone(); - } else { - return new TreeMap((SortedMap) map); - } - } - return new HashMap(map); - } -} diff --git a/fmpp/src/main/java/fmpp/models/WritableSequence.java b/fmpp/src/main/java/fmpp/models/WritableSequence.java deleted file mode 100644 index 847c4d9..0000000 --- a/fmpp/src/main/java/fmpp/models/WritableSequence.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import java.util.ArrayList; -import java.util.List; - -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateSequenceModel; - -/** - * Sequence variable that can be changed during template execution with the - * proper method variables. - */ -public class WritableSequence - extends WritableVariable implements TemplateSequenceModel { - private List list; - - public WritableSequence() { - list = new ArrayList(); - } - - /** - * @param list must contain only {@link TemplateModel}-s. - */ - public WritableSequence(List list) { - this.list = list; - } - - public TemplateModel get(int index) throws TemplateModelException { - return (TemplateModel) list.get(index); - } - - public int size() throws TemplateModelException { - return list.size(); - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public Object clone() { - return new WritableSequence(new ArrayList(list)); - } -} diff --git a/fmpp/src/main/java/fmpp/models/WritableVariable.java b/fmpp/src/main/java/fmpp/models/WritableVariable.java deleted file mode 100644 index 2fba168..0000000 --- a/fmpp/src/main/java/fmpp/models/WritableVariable.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.models; - -import freemarker.template.TemplateModel; - -/** - * Marker interface for writable variables. - */ -abstract class WritableVariable implements Cloneable, TemplateModel { - public abstract Object clone(); -} diff --git a/fmpp/src/main/java/fmpp/models/package.html b/fmpp/src/main/java/fmpp/models/package.html deleted file mode 100644 index 13746e6..0000000 --- a/fmpp/src/main/java/fmpp/models/package.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    freemarker.template.TemplateModel implementations. - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/overview.html b/fmpp/src/main/java/fmpp/overview.html deleted file mode 100644 index 7321698..0000000 --- a/fmpp/src/main/java/fmpp/overview.html +++ /dev/null @@ -1,18 +0,0 @@ - -

    FMPP is a general-purpose text file preprocessor tool that uses FreeMarker - templates. It is especially designed for HTML preprocessor, for the generation - of complete (static) homepages: directory structure that contains HTML-s, - image files, etc. FMPP can pull data from external data sources (database, - XML files, Java property files, etc.) and embed the data into the - generated files. - -

    For detailed instructions, read the FMPP Manual. - -

    Report bugs and send suggestions to "ddekany at freemail dot hu" - or use the mailing list, forums and trackers on the source forge project page: - http://sourceforge.net/projects/fmpp/. - -

    For the latest version, and for more information visit: - http://fmpp.sourceforge.net/. - - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/package.html b/fmpp/src/main/java/fmpp/package.html deleted file mode 100644 index ef7d539..0000000 --- a/fmpp/src/main/java/fmpp/package.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    The very core, the foundation of FMPP. - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/progresslisteners/AntProgressListener.java b/fmpp/src/main/java/fmpp/progresslisteners/AntProgressListener.java deleted file mode 100644 index 18054d7..0000000 --- a/fmpp/src/main/java/fmpp/progresslisteners/AntProgressListener.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.progresslisteners; - -import java.io.File; -import java.io.IOException; - -import org.apache.tools.ant.Project; -import org.apache.tools.ant.Task; - -import fmpp.Engine; -import fmpp.ProgressListener; -import fmpp.util.FileUtil; -import fmpp.util.MiscUtil; - - -/** - * Designed to show the progress for Ant tasks. - */ -public class AntProgressListener implements ProgressListener { - private int maxPathLength = 80 - 35; - private Task antTask; - private boolean quiet = false; - private int errorCount; - private int warningCount; - private int executedCount; - private int renderedCount; - private int copiedCount; - private int processedCount; - private long startTime; - - /** - * Output will be printed to the stdout. - */ - public AntProgressListener(Task antTask) { - this.antTask = antTask; - } - - /** - * @param quiet If true, only error and warning messages will be printed. - */ - public AntProgressListener(Task antTask, boolean quiet) { - this.antTask = antTask; - this.quiet = quiet; - } - - public void notifyProgressEvent( - Engine engine, int event, - File src, int pMode, - Throwable error, Object param) { - StringBuffer message = new StringBuffer(); - switch (event) { - case EVENT_BEGIN_PROCESSING_SESSION: - errorCount = 0; - warningCount = 0; - processedCount = 0; - executedCount = 0; - renderedCount = 0; - copiedCount = 0; - startTime = System.currentTimeMillis(); - break; - case EVENT_SOURCE_NOT_MODIFIED: //! falls through - case EVENT_BEGIN_FILE_PROCESSING: - if (quiet) { - break; - } - - if (event == EVENT_SOURCE_NOT_MODIFIED) { - message.append("- Not modified: "); - } else { - if (pMode == Engine.PMODE_EXECUTE) { - message.append("- Executing: "); - } else if (pMode == Engine.PMODE_COPY) { - message.append("- Copying: "); - } else if (pMode == Engine.PMODE_RENDER_XML) { - message.append("- Rendering XML: "); - } else if (pMode == Engine.PMODE_IGNORE) { - message.append("- Ignoring: "); - } else { - message.append("- ???: "); - } - } - try { - message.append( - FileUtil.compressPath(FileUtil.getRelativePath( - engine.getSourceRoot(), src), maxPathLength)); - } catch (IOException exc) { - message.append("???"); - } - antTask.log(message.toString()); - break; - case EVENT_END_FILE_PROCESSING: - if (error != null) { - errorCount++; - if (quiet) { - message.append("Error with "); - try { - message.append( - FileUtil.getRelativePath( - engine.getSourceRoot(), src)); - } catch (IOException exc) { - message.append("???"); - } - } else { - message.append("Error"); - } - if (!engine.getStopOnError()) { - message.append(": " + MiscUtil.causeMessages(error)); - } - antTask.log(message.toString(), Project.MSG_ERR); - } else { - processedCount++; - if (pMode == Engine.PMODE_COPY) { - copiedCount++; - } else if (pMode == Engine.PMODE_EXECUTE) { - executedCount++; - } else if (pMode == Engine.PMODE_RENDER_XML) { - renderedCount++; - } - } - break; - case EVENT_WARNING: - warningCount++; - message.append("Warning"); - try { - message.append(" from "); - message.append( - FileUtil.getRelativePath( - engine.getSourceRoot(), src)); - } catch (IOException exc) { - message.append(" from ???"); - } - message.append(": "); - message.append((String) param); - antTask.log(message.toString(), Project.MSG_WARN); - break; - case EVENT_IGNORING_DIR: - if (quiet) { - break; - } - - message.append("- Ignoring directory: "); - try { - message.append( - FileUtil.compressPath(FileUtil.getRelativePath( - engine.getSourceRoot(), src), maxPathLength)); - } catch (IOException exc) { - message.append("???"); - } - antTask.log(message.toString()); - break; - case EVENT_CREATED_EMPTY_DIR: - if (quiet) { - break; - } - - /* Rather don't log this... it's just confusing. - message.append("- Created empty directory:"); - try { - message.append( - FileUtil.compressPath(FileUtil.getRelativePath( - engine.getSourceRoot(), src), maxPathLength)); - } catch (IOException exc) { - message.append("???"); - } - antTask.log(message.toString()); - */ - break; - case EVENT_END_PROCESSING_SESSION: - if (error != null) { - antTask.log( - "Task aborted: " + MiscUtil.causeMessages(error), - Project.MSG_ERR); - } else if (errorCount != 0) { - antTask.log( - "Task finished with " + errorCount + " error(s).", - Project.MSG_WARN); - } - if (!quiet) { - antTask.log("Summary: " - + executedCount + " exe. + " - + renderedCount + " xml. + " - + copiedCount + " cop. = " - + processedCount + " succ.; " - + warningCount + " warn.; " - + errorCount + " failed"); - antTask.log("Time elapsed: " - + (System.currentTimeMillis() - startTime) / 1000.0 - + " seconds", Project.MSG_VERBOSE); - } - break; - default: - ; // ignore - } - } - - public int getErrorCount() { - return errorCount; - } -} diff --git a/fmpp/src/main/java/fmpp/progresslisteners/ConsoleProgressListener.java b/fmpp/src/main/java/fmpp/progresslisteners/ConsoleProgressListener.java deleted file mode 100644 index 650e2dc..0000000 --- a/fmpp/src/main/java/fmpp/progresslisteners/ConsoleProgressListener.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.progresslisteners; - -import java.io.File; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintWriter; - -import fmpp.Engine; -import fmpp.ProgressListener; -import fmpp.util.FileUtil; - - -/** - * Designed to show the progress on console screen. - */ -public class ConsoleProgressListener implements ProgressListener { - private final PrintWriter out; - private int maxPathLength = 80 - 24; - private boolean quiet; - - /** - * Output will be printed to the stdout. - */ - public ConsoleProgressListener() { - this(System.out); - } - - public ConsoleProgressListener(OutputStream out) { - this(new PrintWriter(out, true)); - } - - public ConsoleProgressListener(PrintWriter out) { - this.out = out; - } - - /** - * @param quiet Print warnings and skipped errors only - */ - public ConsoleProgressListener(OutputStream out, boolean quiet) { - this(new PrintWriter(out, true)); - this.quiet = quiet; - } - - /** - * @param quiet Print warnings and skipped errors only - */ - public ConsoleProgressListener(PrintWriter out, boolean quiet) { - this.out = out; - this.quiet = quiet; - } - - public void notifyProgressEvent( - Engine engine, int event, - File src, int pMode, - Throwable error, Object param) { - switch (event) { - case EVENT_SOURCE_NOT_MODIFIED: //! falls through - case EVENT_BEGIN_FILE_PROCESSING: - if (!quiet) { - if (event == EVENT_SOURCE_NOT_MODIFIED) { - out.print("- Not modified: "); - } else { - if (pMode == Engine.PMODE_EXECUTE) { - out.print("- Executing: "); - } else if (pMode == Engine.PMODE_COPY) { - out.print("- Copying: "); - } else if (pMode == Engine.PMODE_RENDER_XML) { - out.print("- Rendering XML: "); - } else if (pMode == Engine.PMODE_IGNORE) { - out.print("- Ignoring: "); - } else { - out.print("- ???: "); - } - } - try { - out.println( - FileUtil.compressPath( - FileUtil.getRelativePath( - engine.getSourceRoot(), src), - maxPathLength)); - } catch (IOException exc) { - out.println("???"); - } - } - break; - case EVENT_END_FILE_PROCESSING: - if (error != null) { - if (!quiet) { - out.println(" !!! FAILED"); - } else { - if (!engine.getStopOnError()) { - out.print("! Error with "); - try { - out.print( - FileUtil.getRelativePath( - engine.getSourceRoot(), src)); - } catch (IOException exc) { - out.print("???"); - } - out.println(": " + error); - } - } - } - break; - case EVENT_WARNING: - if (!quiet) { - out.println(" * Warning: " + (String) param); - } else { - out.print("* Warning from "); - try { - out.print( - FileUtil.getRelativePath( - engine.getSourceRoot(), src)); - } catch (IOException exc) { - out.print("???"); - } - out.println(": " + (String) param); - } - break; - case EVENT_IGNORING_DIR: - if (!quiet) { - out.print("- Ignoring directory: "); - try { - out.println( - FileUtil.compressPath( - FileUtil.getRelativePath( - engine.getSourceRoot(), src), - maxPathLength)); - } catch (IOException exc) { - out.println("???"); - } - } - break; - case EVENT_CREATED_EMPTY_DIR: - if (!quiet) { - /* Rather don't log this... it's just confusing. - out.print("- Created empty directory: "); - try { - out.println( - FileUtil.compressPath( - FileUtil.getRelativePath( - engine.getSourceRoot(), src), - maxPathLength)); - } catch (IOException exc) { - out.println("???"); - } - */ - } - break; - default: - ; // ignore - } - - } -} diff --git a/fmpp/src/main/java/fmpp/progresslisteners/LoggerProgressListener.java b/fmpp/src/main/java/fmpp/progresslisteners/LoggerProgressListener.java deleted file mode 100644 index 27ae566..0000000 --- a/fmpp/src/main/java/fmpp/progresslisteners/LoggerProgressListener.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.progresslisteners; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.io.Reader; -import java.util.Date; - -import fmpp.Engine; -import fmpp.ProcessingException; -import fmpp.ProgressListener; -import fmpp.util.FileUtil; -import fmpp.util.MiscUtil; -import fmpp.util.StringUtil; - - -/** - * Writes detailed information about errors and warning messages into a file - * or into any character stream. - */ -public class LoggerProgressListener implements ProgressListener { - private static final String LOG_FILE_HEADER = "FMPP log file"; - private static final String LOG_FILE_HEADER_OLD = "--- BEGIN LOG FILE ---"; - private final PrintWriter out; - - private int executedCount; - private int copiedCount; - private int renderedCount; - private int errorCount; - private int warningCount; - private long startTime; - - /** - * Output will be printed to the stderr. - */ - public LoggerProgressListener() { - this(System.err); - } - - public LoggerProgressListener(OutputStream out) { - this(new PrintWriter(out, true)); - } - - public LoggerProgressListener(PrintWriter out) { - this.out = out; - } - - public LoggerProgressListener(File logFile) throws IOException { - this(logFile, false); - } - - public LoggerProgressListener(File logFile, boolean append) - throws IOException { - // check what do we prepare to overwrite - boolean logFileExists = logFile.exists() && logFile.length() != 0; - if (logFileExists) { - Reader r = new FileReader(logFile); - try { - int c; - boolean h1 = true; - boolean h2 = true; - int ln1 = LOG_FILE_HEADER.length(); - int ln2 = LOG_FILE_HEADER_OLD.length(); - int i = 0; - while (h1 || h2) { - c = r.read(); - if (h1) { - if (LOG_FILE_HEADER.charAt(i) != c) { - h1 = false; - } - if (i == ln1 - 1) { - break; - } - } - if (h2) { - if (LOG_FILE_HEADER_OLD.charAt(i) != c) { - h2 = false; - } - if (i == ln2 - 1) { - break; - } - } - i++; - } - if (!h1 && !h2) { - throw new IOException( - "Do not want to modify the log file, because " - + "it seems not be an FMPP log file. " - + "If this is a corruped log file, please delete " - + "it manually."); - } - } finally { - r.close(); - } - } - - out = new PrintWriter(new FileWriter( - logFile.getAbsolutePath(), append), true); - if (!append || !logFileExists) { - out.println(LOG_FILE_HEADER); - println("Log file created: " + new Date()); - } else { - println(); - } - println(); - } - - public void notifyProgressEvent( - Engine engine, int event, - File src, int pMode, - Throwable error, Object param) { - switch (event) { - case EVENT_BEGIN_PROCESSING_SESSION: - startTime = System.currentTimeMillis(); - errorCount = 0; - warningCount = 0; - executedCount = 0; - copiedCount = 0; - println("==============================================================================="); - println("PROCESSING SESSION STARTED: " + new Date()); - String fmppVersion, freemarkerVersion; - try { - fmppVersion = Engine.getVersionNumber(); - } catch (Throwable e) { - fmppVersion = "??? (" + e + ")"; - } - try { - freemarkerVersion = Engine.getFreeMarkerVersionNumber(); - } catch (Throwable e) { - freemarkerVersion = "??? (" + e + ")"; - } - println("FMPP version: " + fmppVersion + " (using FreeMarker " + freemarkerVersion + ")"); - - int startIndex = 0; - int dotCount = 0; - while (true) { - startIndex = fmppVersion.indexOf('.', startIndex); - if (startIndex == -1) { - break; - } - startIndex++; - dotCount++; - } - if (dotCount == 3) { - String buildInfo; - try { - buildInfo = Engine.getBuildInfo(); - } catch (Throwable e) { - buildInfo = "??? (" + e + ")"; - } - println("Unreleased \"nightly\" FMPP version! Version number doesn't reflect changes,"); - println("so watch the build date too: " + buildInfo); - } - - println(); - break; - case EVENT_WARNING: - warningCount++; - println("-------------------------------------------------------------------------------"); - println("*** WARNING: " + (String) param); - if (src != null) { - try { - println("Source file: " + FileUtil.getRelativePath(engine.getSourceRoot(), src)); - } catch (IOException e) { - println("???"); - } - } - println(); - break; - case EVENT_END_PROCESSING_SESSION: - println("==============================================================================="); - println("END OF PROCESSING SESSION"); - println(); - - println("Summary:\n" - + executedCount + " executed + " - + renderedCount + " xmlRendered + " - + copiedCount + " copied = " - + (executedCount + copiedCount + renderedCount) - + " successfully processed\n" - + errorCount + " failed, " - + warningCount + " warning(s)"); - println("Time elapsed: " - + (System.currentTimeMillis() - startTime) / 1000.0 - + " seconds"); - break; - case EVENT_END_FILE_PROCESSING: - if (error != null) { - errorCount++; - } else { - if (pMode == Engine.PMODE_COPY) { - copiedCount++; - } else if (pMode == Engine.PMODE_EXECUTE) { - executedCount++; - } else if (pMode == Engine.PMODE_RENDER_XML) { - renderedCount++; - } - } - break; - default: - ; // ignore - } - - if (error != null) { - if (event != EVENT_END_PROCESSING_SESSION) { - println("-------------------------------------------------------------------------------"); - println("!!! ERROR"); - } else { - println(); - println("WARNING! Processing session was interrupted:"); - println(); - } - - if (error instanceof ProcessingException) { - src = ((ProcessingException) error).getSourceFile(); - } - if (src != null) { - println("> Source file:"); - try { - println(FileUtil.getRelativePath(engine.getSourceRoot(), src)); - } catch (IOException e) { - println("???"); - } - } - - if (event == EVENT_END_FILE_PROCESSING && engine.getStopOnError()) { - out.println("> Error message (see also full stack trace at session end):"); - out.print(MiscUtil.causeMessages(error)); - } else { - println("> Error message with stack trace:"); - if (error instanceof ProcessingException) { - final Throwable cause = error.getCause(); - if (cause != null) { - error = cause; - } - } - error.printStackTrace(out); - } - out.flush(); - - println(); - } - if (event == EVENT_END_PROCESSING_SESSION) { - println("==============================================================================="); - } - } - - /** - * Returns the PrintWriter used for printing into the log. - */ - public PrintWriter getPrintWriter() { - return out; - } - - /** - * Closes the PrintWriter used for printing into the log. - */ - public void close() { - out.close(); - } - - /** - * Flushes the PrintWriter used for printing into the log. - */ - public void flush() { - out.flush(); - } - - /** - * Prints into the log without word-wrapping. - */ - public void printlnNW(String text) { - out.println(text); - } - - /** - * Prints into the log without word-wrapping. - */ - public void printNW(String text) { - out.print(text); - } - - /** - * Prints line-break into the log. - */ - public void println() { - out.println(); - } - - /** - * Prints into the log with word-wrapping. - */ - public void println(Object obj) { - println(obj.toString()); - } - - /** - * Prints into the log with word-wrapping. - */ - public void println(String text) { - println(text, 0); - } - - /** - * Prints into the log with word-wrapping and indentation. - */ - public void println(String text, int indent) { - out.println(StringUtil.wrap(text, 80, indent)); - } - - public void printStackTrace(Throwable exc) { - printlnNW("--- Java stack trace: ---"); - exc.printStackTrace(out); - println(); - } -} diff --git a/fmpp/src/main/java/fmpp/progresslisteners/StatisticsProgressListener.java b/fmpp/src/main/java/fmpp/progresslisteners/StatisticsProgressListener.java deleted file mode 100644 index cc7afee..0000000 --- a/fmpp/src/main/java/fmpp/progresslisteners/StatisticsProgressListener.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.progresslisteners; - -import java.io.File; - -import fmpp.Engine; -import fmpp.ProgressListener; - -/** - * Spins some counters regarding the work of the Engine. - * All methods of this listener can be called from multiple threads. The current - * state of counters can be read while the engine is working. - */ -public class StatisticsProgressListener implements ProgressListener { - private int failed, executed, copied, rendered, warnings; - private long endTime, beginTime; - - public void notifyProgressEvent( - Engine engine, - int event, - File src, int pMode, - Throwable error, Object param) { - switch (event) { - case EVENT_BEGIN_PROCESSING_SESSION: - beginTime = System.currentTimeMillis(); - break; - case EVENT_END_PROCESSING_SESSION: - endTime = System.currentTimeMillis(); - break; - case EVENT_BEGIN_FILE_PROCESSING: - // nop - break; - case EVENT_END_FILE_PROCESSING: - if (error == null) { - if (pMode == Engine.PMODE_COPY) { - copied++; - } else if (pMode == Engine.PMODE_EXECUTE) { - executed++; - } else if (pMode == Engine.PMODE_RENDER_XML) { - rendered++; - } - } else { - failed++; - } - break; - case EVENT_WARNING: - warnings++; - default: - ; // ignore - } - } - - /** - * Rests all counters. - */ - public synchronized void reset() { - failed = 0; - executed = 0; - rendered = 0; - copied = 0; - warnings = 0; - beginTime = -1; - endTime = -1; - } - - /** - * The duration of the last - * BEGIN_ALL_PROCESSING-END_ALL_PROCESSING - * in milliseconds, or -1 if that is not known. - */ - public synchronized long getProcessingTime() { - if (beginTime == -1 || endTime == -1) { - return -1; - } else { - return endTime - beginTime; - } - } - - /** - * Number of files successfully copied. - */ - public synchronized int getCopied() { - return copied; - } - - /** - * Number of files successfully executed (templates). - */ - public synchronized int getExecuted() { - return executed; - } - - /** - * Number of XML files successfully rendered. - */ - public synchronized int getXmlRendered() { - return rendered; - } - - /** - * Number of files where processing was failed. - */ - public synchronized int getFailed() { - return failed; - } - - /** - * Number of files where processing was successfull. - */ - public synchronized int getSuccesful() { - return executed + copied + rendered; - } - - /** - * Number of files that the engine has tried to process. - */ - public synchronized int getAccessed() { - return executed + copied + rendered + failed; - } - - /** - * Total number of warnings. - */ - public synchronized int getWarnings() { - return warnings; - } -} diff --git a/fmpp/src/main/java/fmpp/progresslisteners/TerseConsoleProgressListener.java b/fmpp/src/main/java/fmpp/progresslisteners/TerseConsoleProgressListener.java deleted file mode 100644 index 5995b96..0000000 --- a/fmpp/src/main/java/fmpp/progresslisteners/TerseConsoleProgressListener.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.progresslisteners; - -import java.io.File; -import java.io.OutputStream; -import java.io.PrintWriter; - -import fmpp.Engine; -import fmpp.ProgressListener; - -/** - * Designed to show the progress on console screen in a - * very terse way (prints a symbol for each processed file). - */ -public class TerseConsoleProgressListener implements ProgressListener { - private final PrintWriter out; - - /** - * Output will be printed to the stdout. - */ - public TerseConsoleProgressListener() { - this(System.out); - } - - public TerseConsoleProgressListener(OutputStream out) { - this(new PrintWriter(out, true)); - } - - public TerseConsoleProgressListener(PrintWriter out) { - this.out = out; - } - - public void notifyProgressEvent( - Engine engine, int event, - File src, int pMode, - Throwable error, Object param) { - if (event == EVENT_END_FILE_PROCESSING) { - if (error != null) { - out.print("E"); - out.flush(); - } else { - if (pMode == Engine.PMODE_EXECUTE) { - out.print("."); - out.flush(); - } else if (pMode == Engine.PMODE_RENDER_XML) { - out.print(";"); - out.flush(); - } else if (pMode == Engine.PMODE_COPY) { - out.print(":"); - out.flush(); - } else if (pMode == Engine.PMODE_IGNORE) { - ; // nop - } else { - out.print(","); - out.flush(); - } - } - } else if (event == EVENT_SOURCE_NOT_MODIFIED) { - out.print("_"); - out.flush(); - } else if (event == EVENT_END_PROCESSING_SESSION) { - out.println(); - } - } -} diff --git a/fmpp/src/main/java/fmpp/progresslisteners/package.html b/fmpp/src/main/java/fmpp/progresslisteners/package.html deleted file mode 100644 index 47a86cd..0000000 --- a/fmpp/src/main/java/fmpp/progresslisteners/package.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    fmpp.ProgressListener implementations. - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/setting/FileWithConfigurationBase.java b/fmpp/src/main/java/fmpp/setting/FileWithConfigurationBase.java deleted file mode 100644 index eb11f3c..0000000 --- a/fmpp/src/main/java/fmpp/setting/FileWithConfigurationBase.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.setting; - -import java.io.File; - -/** - * File that stores the current configuration base directory at - * the time it was instantiated. This extra information is - * needed if the path may need or need not be resolved relatively to the - * configuration base later, depending on factors that are not known when - * the setting value is set. - */ -public class FileWithConfigurationBase - extends FileWithSettingValue { - private final File configurationBase; - - /** - * Creates a new instance. - * The path will not be resolved relatively to the - * configurationBase. If it was a relative path, then - * it remains that. - */ - public FileWithConfigurationBase( - File configurationBase, String path, String settingValue) { - super(path, settingValue); - if (configurationBase == null) { - throw new IllegalArgumentException( - "Parameter \"cfgBase\" can't be null."); - } - this.configurationBase = configurationBase; - } - - public File getConfigurationBase() { - return configurationBase; - } - - public String toString() { - return getPath() + " (base: " + configurationBase.getPath() + "; " - + "setting value: " + getSettingValue() + ")"; - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/setting/FileWithSettingValue.java b/fmpp/src/main/java/fmpp/setting/FileWithSettingValue.java deleted file mode 100644 index 57d94a1..0000000 --- a/fmpp/src/main/java/fmpp/setting/FileWithSettingValue.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.setting; - -import java.io.File; - -/** - * {@link File} that stores the original setting value (string) it was - * constructed from. This extra information is needed, for example, to - * display the content of a loaded configuration file for the user. - */ -public class FileWithSettingValue extends File { - - private static final long serialVersionUID = 1L; - - private final String settingValue; - - public FileWithSettingValue( - File parent, String child, String settingValue) { - super(parent, child); - if (settingValue == null) { - throw new IllegalArgumentException( - "Parameter settingValue can't be null"); - } - this.settingValue = settingValue; - } - - public FileWithSettingValue(String path, String settingValue) { - super(path); - if (settingValue == null) { - throw new IllegalArgumentException( - "Parameter settingValue can't be null"); - } - this.settingValue = settingValue; - } - - public FileWithSettingValue( - String parent, String child, String settingValue) { - super(parent, child); - if (settingValue == null) { - throw new IllegalArgumentException( - "Parameter settingValue can't be null"); - } - this.settingValue = settingValue; - } - - public String getSettingValue() { - return settingValue; - } - - public String toString() { - return getPath() + " (setting value: " + settingValue + ")"; - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/setting/SettingException.java b/fmpp/src/main/java/fmpp/setting/SettingException.java deleted file mode 100644 index 90c2299..0000000 --- a/fmpp/src/main/java/fmpp/setting/SettingException.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.setting; - -import fmpp.util.ExceptionCC; - -/** - * Bad setting or setting combination, or failure when trying to setup the - * engine with the settings. - */ -public class SettingException extends ExceptionCC { - - private static final long serialVersionUID = 1L; - - public SettingException(String s) { - super(s); - } - - public SettingException(String s, Throwable cause) { - super(s, cause); - } - -} diff --git a/fmpp/src/main/java/fmpp/setting/Settings.java b/fmpp/src/main/java/fmpp/setting/Settings.java deleted file mode 100644 index 9153b57..0000000 --- a/fmpp/src/main/java/fmpp/setting/Settings.java +++ /dev/null @@ -1,3518 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.setting; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Dictionary; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Vector; - -import bsh.EvalError; -import fmpp.DataModelBuildingException; -import fmpp.Engine; -import fmpp.LocalDataBuilder; -import fmpp.ProcessingException; -import fmpp.ProgressListener; -import fmpp.XmlRenderingConfiguration; -import fmpp.localdatabuilders.BshLocalDataBuilder; -import fmpp.localdatabuilders.MapLocalDataBuilder; -import fmpp.localdatabuilders.TddHashLocalDataBuilder; -import fmpp.tdd.DataLoaderEvaluationEnvironment; -import fmpp.tdd.EvalException; -import fmpp.tdd.EvaluationEnvironment; -import fmpp.tdd.Fragment; -import fmpp.tdd.FunctionCall; -import fmpp.tdd.Interpreter; -import fmpp.util.BugException; -import fmpp.util.InstallationException; -import fmpp.util.MiscUtil; -import fmpp.util.StringUtil; -import freemarker.ext.beans.BeansWrapper; -import freemarker.template.Configuration; -import freemarker.template.Version; - -/** - * Stores FMPP settings, loads configuration files, provides other setting - * handling related utilities. - * - *

    Settings are typed variables identified with their case-sensitive name. - * When you set the value of a setting, the value object you supply must be - * of the correct type. See the description of the TYPE_... - * to see the available setting types. - * - *

    Methods that change setting values have a variation - * that require String value(s) instead of Object(s). - * These methods should be used when you get the setting values from text-only - * sources, such as command-line option values, XML attributes or - * .properties file. To demonstrate the difference, assume you have - * string value "a, b, c". If you try to use this value for a - * setting of type list, the normal setter method will interpret the value - * as a list of length 1, that stores string "a, b, c". If you - * try to use the same value with the string version of the same method, it - * will interpret the string as a list of length 3, that stores 3 strings, - * "a", "b", and "c". - * - *

    Notes: - *

      - *
    • All settings you want to set/get must be defined. See {@link #define}. - * Standard settings (the settings documented in the FMPP Manual) are - * initially already defined. - *
    • If you have used an object as the value of a setting, the object must - * not be changed anymore. - *
    • If a method throws {@link SettingException}, then it is ensured that - * the method doesn't change the Settings object. For - * example, with {@link #add(Map)}, either all settings in the map will be - * successfully set, or neither will be set. - *
    - * - *

    You can execute the processing session described by the setting with - * {@link #execute()}. - */ -public class Settings { - - // Setting names: - - public static final String NAME_SKIP_UNCHANGED = "skipUnchanged"; - public static final String NAME_TURNS = "turns"; - public static final String NAME_SOURCES = "sources"; - public static final String NAME_SOURCE_ROOT = "sourceRoot"; - public static final String NAME_OUTPUT_ROOT = "outputRoot"; - public static final String NAME_OUTPUT_FILE = "outputFile"; - public static final String NAME_DATA_ROOT = "dataRoot"; - public static final String NAME_OBJECT_WRAPPER = "objectWrapper"; - public static final String NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS = "freemarkerIncompatibleImprovements"; - public static final String NAME_FREEMARKER_LINKS = "freemarkerLinks"; - public static final String NAME_INHERIT_CONFIGURATION - = "inheritConfiguration"; - public static final String NAME_MODES = "modes"; - public static final String NAME_BORDERS = "borders"; - public static final String NAME_DATA = "data"; - public static final String NAME_LOCAL_DATA = "localData"; - public static final String NAME_TEMPLATE_DATA = "templateData"; - public static final String NAME_SOURCE_ENCODING = "sourceEncoding"; - public static final String NAME_OUTPUT_ENCODING = "outputEncoding"; - public static final String NAME_URL_ESCAPING_CHARSET = "urlEscapingCharset"; - public static final String NAME_LOCALE = "locale"; - public static final String NAME_NUMBER_FORMAT = "numberFormat"; - public static final String NAME_BOOLEAN_FORMAT = "booleanFormat"; - public static final String NAME_DATE_FORMAT = "dateFormat"; - public static final String NAME_TIME_FORMAT = "timeFormat"; - public static final String NAME_DATETIME_FORMAT = "datetimeFormat"; - public static final String NAME_TIME_ZONE = "timeZone"; - public static final String NAME_SQL_DATE_AND_TIME_TIME_ZONE = "sqlDateAndTimeTimeZone"; - public static final String NAME_TAG_SYNTAX = "tagSyntax"; - public static final String NAME_CASE_SENSITIVE = "caseSensitive"; - public static final String NAME_STOP_ON_ERROR = "stopOnError"; - public static final String NAME_REMOVE_EXTENSIONS = "removeExtensions"; - public static final String OLD_NAME_REMOVE_EXTENSION = "removeExtension"; - public static final String NAME_REMOVE_POSTFIXES = "removePostfixes"; - public static final String OLD_NAME_REMOVE_POSTFIX = "removePostfix"; - public static final String NAME_REPLACE_EXTENSIONS = "replaceExtensions"; - public static final String OLD_NAME_REPLACE_EXTENSION = "replaceExtension"; - public static final String NAME_ALWAYS_CREATE_DIRECTORIES - = "alwaysCreateDirectories"; - public static final String NAME_IGNORE_CVS_FILES = "ignoreCvsFiles"; - public static final String NAME_IGNORE_SVN_FILES = "ignoreSvnFiles"; - public static final String NAME_IGNORE_TEMPORARY_FILES - = "ignoreTemporaryFiles"; - public static final String NAME_EXPERT = "expert"; - public static final String NAME_LOG_FILE = "logFile"; - public static final String NAME_APPEND_LOG_FILE = "appendLogFile"; - public static final String NAME_CONFIGURATION_BASE = "configurationBase"; - public static final String NAME_ECHO_FORMAT = "echoFormat"; - public static final String NAME_QUIET = "quiet"; - public static final String NAME_COLUMNS = "columns"; - public static final String NAME_SNIP = "snip"; - public static final String NAME_PRINT_STACK_TRACE = "printStackTrace"; - public static final String NAME_XPATH_ENGINE = "xpathEngine"; - public static final String NAME_XML_CATALOG_FILES = "xmlCatalogFiles"; - public static final String NAME_XML_CATALOG_PREFER = "xmlCatalogPrefer"; - // public static final String NAME_XML_CATALOG_ALLOW_PI - // = "xmlCatalogAllowPi"; [I don't know how to use those PI-s...] - public static final String NAME_VALIDATE_XML = "validateXml"; - public static final String NAME_XML_RENDERINGS = "xmlRenderings"; - - // Values of standard settings: - - public static final String VALUE_SOURCE = Engine.PARAMETER_VALUE_SOURCE; - public static final String VALUE_HOST = Engine.PARAMETER_VALUE_HOST; - public static final String VALUE_OUTPUT = Engine.PARAMETER_VALUE_OUTPUT; - public static final String VALUE_OBJECTWRAPPER_SHARED_BEANS_WRAPPER - = "shared"; - public static final String VALUE_TAG_SYNTAX_ANGLE_BRACKET = "angleBracket"; - public static final String VALUE_TAG_SYNTAX_SQUARE_BRACKET - = "squareBracket"; - public static final String VALUE_TAG_SYNTAX_AUTO_DETECT = "autoDetect"; - public static final String VALUE_NONE = "none"; - public static final String VALUE_REALLY_QUIET = "reallyQuiet"; - public static final String VALUE_XML_CATALOG_PREFER_PUBLIC = "public"; - public static final String VALUE_XML_CATALOG_PREFER_SYSTEM = "system"; - public static final String VALUE_GLOBAL_DEFAULT = "globalDefault"; - - // File names: - - /** - * Primary default file name. - */ - public static final String DEFAULT_CFG_FILE_NAME = "config.fmpp"; - - /** - * Secondary (legacy) default file name. - */ - public static final String DEFAULT_CFG_FILE_NAME_OLD = "fmpp.cfg"; - - // ------------------------------------------------------------------------- - // Setting types - - /** - * Any object. - *

    Input type: Object. - *

    Output type: Object. - *

    String input: any value, stored as is. - *

    Merging: not supported. - */ - public static final SettingType TYPE_ANY = new SettingType() { - - public Object convert(Settings settings, Object value) - throws SettingException { - return value; - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - return value; - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - throw new SettingException( - "Settings of type \"any\" can't be merged."); - } - }; - - /** - * String setting type. - *

    Input type: String, Number, - * Boolean. The last two is converted to string with - * toString() - *

    Output type: String. - *

    String input: any value, stored as is. - *

    Merging: not supported - */ - public static final SettingType TYPE_STRING = new SettingType() { - - public Object convert(Settings settings, Object value) - throws SettingException { - if (value instanceof String) { - return value; - } else if (value instanceof Number || value instanceof Boolean) { - return String.valueOf(value); - } - throw new SettingException( - "The setting value should be a string, but now it was a " - + typeName(value) + "."); - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - return value; - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - throw new SettingException( - "Settings of type \"string\" can't be merged."); - } - }; - - /** - * Integer setting type. - *

    Input type: Number that can be converted to - * Integer without lost. - *

    Output type: Integer. - *

    String input: any value, that can be parsed to Integer - * by Integer.parseInt after trimming. In additional, - * redundant + sign is supported. - *

    Merging: not supported - */ - public static final SettingType TYPE_INTEGER = new SettingType() { - - public Object convert(Settings settings, Object value) - throws SettingException { - if (value instanceof Integer) { - return value; - } else if (value instanceof Number) { - Number n = (Number) value; - double d = n.doubleValue(); - int i = n.intValue(); - if (i != d) { - if (d < Integer.MAX_VALUE && d > Integer.MIN_VALUE) { - throw new SettingException( - "The setting value should be an integer number, " - + "but now it was a fraction number."); - } else { - throw new SettingException( - "The setting value should be an integer number, " - + "but it was a too big number to store " - + "on 32 bits."); - } - } - return new Integer(i); - } - throw new SettingException( - "The setting value should be an integer number, but now " - + "it was a " + typeName(value) + "."); - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - try { - value = value.trim(); - if (value.startsWith("+")) { - value = value.substring(1).trim(); - } - return new Integer(Integer.parseInt(value)); - } catch (NumberFormatException e) { - throw new SettingException( - "Not a valid integer number: " + value, e); - } - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - throw new SettingException( - "Settings of type \"integer\" can't be merged."); - } - }; - - /** - * Boolean setting type. - *

    Input type: Boolean. - *

    Output type: Boolean. - *

    String input: After trimming and converting to lower-case, - * "true", "false" or empty - * string are allowed. Empty string is interpreted as true - * (consider a properties file that contains a key without value). - *

    Merging: not supported - */ - public static final SettingType TYPE_BOOLEAN = new SettingType() { - - public Object convert(Settings settings, Object value) - throws SettingException { - if (value instanceof Boolean) { - return value; - } - throw new SettingException( - "The setting value should be a boolean, but now " - + "it was a " + typeName(value) + "."); - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - value = value.trim().toLowerCase(); - if (value.equals("true") || value.length() == 0) { - return Boolean.TRUE; - } - if (value.equals("false")) { - return Boolean.FALSE; - } - throw new SettingException("Not a valid boolean: " + value); - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - throw new SettingException( - "Settings of type \"boolean\" can't be merged."); - } - }; - - /** - * Sequence setting type. - *

    Input type: List, any array, Vector. No - * restriction regarding the type of the list items. - *

    Output type: List. No restriction regarding the type of - * the list items. - *

    String input: TDD expression starting in list mode. If the result is - * a list that contains a single list, then the contained list will - * be used. This heuristic is used to fix this user mistake:
    - * --some-list="[a, b, c]"
    - * instead of:
    - * --some-list="a, b, c" - *

    Merging: the two lists are concatenated, with the default (inherited) - * value coming last. - */ - public static final SettingType TYPE_SEQUENCE = new SequenceSettingType(); - - /** - * Local data model setting type. - * This is the same as {@link #TYPE_SEQUENCE}, just if the value is given as - * text (string input), it defers the evaluation of the hash parameter of - * the case function call, and stores that as - * {@link fmpp.tdd.Fragment}. This is required because that hash parameter - * may uses data loaders, which shouldn't be executed until almost all - * settings of the {@link fmpp.Engine} are set. This also means that if - * you set the setting value with Java, the last parameter to the - * case {@link fmpp.tdd.FunctionCall} must be a - * {@link fmpp.tdd.Fragment} instead of Map, if you want to use - * data loaders in it. - */ - public static final SettingType TYPE_LOCAL_DATA_MODEL - = new SequenceSettingType() { - protected EvaluationEnvironment getEvaluationEnvironment() { - return new EvaluationEnvironment() { - private int functionCallLevel; - private int hashLevel; - private int sequenceLevel; - private boolean inCaseFunction; - - public Object evalFunctionCall( - FunctionCall fc, Interpreter ip) { - return fc; - } - - public Object notify( - int event, Interpreter ip, String name, Object extra) { - if (event == EVENT_ENTER_FUNCTION_PARAMS) { - functionCallLevel++; - if (functionCallLevel == 1 - && name.equals(FUNCTION_CASE)) { - inCaseFunction = true; - } - } else if (event == EVENT_LEAVE_FUNCTION_PARAMS) { - functionCallLevel--; - if (functionCallLevel == 0) { - inCaseFunction = false; - } - } else if (event == EVENT_ENTER_HASH) { - hashLevel++; - if (inCaseFunction && functionCallLevel == 1 - && hashLevel == 1 && sequenceLevel == 0) { - return RETURN_FRAGMENT; - } - } else if (event == EVENT_LEAVE_HASH) { - hashLevel--; - } else if (event == EVENT_ENTER_SEQUENCE) { - if (inCaseFunction) { - sequenceLevel++; - } - } else if (event == EVENT_LEAVE_SEQUENCE) { - if (inCaseFunction) { - sequenceLevel--; - } - } - return null; - } - - }; - } - }; - - /** - * Hash setting type. - *

    Input type: Map, Dictionary. - *

    Output type: Map. - *

    String input: TDD expression, starting in hash mode. - *

    Merging: the two maps are added (union) - */ - public static final SettingType TYPE_HASH = new SettingType() { - - public Object convert(Settings settings, Object value) - throws SettingException { - if (value instanceof Map) { - return value; - } else if (value instanceof Dictionary) { - return MiscUtil.dictionaryToMap((Dictionary) value); - } - throw new SettingException( - "The setting value should be a hash (a Map), but now it " - + "was a " + typeName(value) + "."); - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - try { - // Because of the hash union feature both will be fine: - // --some-hash-option="a:1, b:2, c:3" - // --some-hash-option="{a:1, b:2, c:3}" - return Interpreter.evalAsHash(value, null, forceStr, null); - } catch (EvalException e) { - throw new SettingException( - "Failed to parse the text as TDD hash.", e); - } - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - Map m1 = (Map) defValue; - Map m2 = (Map) value; - Map m = new HashMap(m1.size() + m2.size()); - m.putAll(m1); - m.putAll(m2); - return m; - } - }; - - /** - * "Configuration relative path" setting type. - *

    Input type: String, {@link FileWithSettingValue}. - * Plain File is not allowed. - *

    Output type: {@link FileWithSettingValue}. - *

    String input: Any value, trimmed before converting. - *

    Merging: not supported - */ - public static final SettingType TYPE_CFG_RELATIVE_PATH - = new SettingType() { - - public Object convert(Settings settings, Object value) - throws SettingException { - if (value instanceof String) { - File f = new File((String) value); - if (f.isAbsolute()) { - return new FileWithSettingValue( - (String) value, (String) value); - } else { - return new FileWithSettingValue( - settings.baseDir, (String) value, (String) value); - } - - } else if (value instanceof FileWithSettingValue) { - return value; - } else { - throw new SettingException( - "The setting value should be a string (a path), but " - + "now it was a " + typeName(value) + "."); - } - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - return convert(settings, value.trim()); - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - throw new SettingException( - "Settings of type \"path\" can't be merged."); - } - }; - - /** - * "Configuration relative paths" setting type. - *

    Input type: Same as for {@link #TYPE_SEQUENCE}, but all list items - * must be string or {@link FileWithSettingValue}. - *

    Output type: Same as for {@link #TYPE_SEQUENCE}, but all list items - * are {@link FileWithSettingValue}-s. - *

    String input: Same as for {@link #TYPE_SEQUENCE}, but all sequence - * items must be strings. "force strings" option is on during the TDD - * interpretation. - *

    Merging: the two list are concatenated. - */ - public static final SettingType TYPE_CFG_RELATIVE_PATHS - = new SequenceSettingType() { - public Object convert(Settings settings, Object value) - throws SettingException { - return convertList(settings, (List) super.convert(settings, value)); - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - return convertList( - settings, - (List) super.convertString(settings, value, forceStr)); - } - - private List convertList(Settings settings, List ls) - throws SettingException { - int ln = ls.size(); - List res = new ArrayList(ln); - for (int i = 0; i < ln; i++) { - Object o = ls.get(i); - - if (o instanceof String) { - File f = new File((String) o); - if (f.isAbsolute()) { - res.add(new FileWithSettingValue( - (String) o, (String) o)); - } else { - res.add(new FileWithSettingValue( - settings.baseDir, (String) o, - (String) o)); - } - } else if (o instanceof FileWithSettingValue) { - res.add(o); - } else { - throw new SettingException( - "All list items must be strings (paths), " - + "but the item at index " + i + " is a " - + typeName(o) + "."); - } - } - return res; - } - }; - - /** - * "Unresolved configuration relative paths" setting type. - *

    Input type: Same as for {@link #TYPE_SEQUENCE}, but all list items - * must be string or {@link FileWithConfigurationBase}. - *

    Output type: Same as for {@link #TYPE_SEQUENCE}, but all list items - * are {@link FileWithConfigurationBase}-s. - *

    String input: Same as for {@link #TYPE_SEQUENCE}, but all sequence - * items must be strings. "force strings" option is on during the TDD - * interpretation. - *

    Merging: the two list are concatenated. - */ - public static final SettingType TYPE_UNRESOLVED_CFG_RELATIVE_PATHS - = new SequenceSettingType() { - public Object convert(Settings settings, Object value) - throws SettingException { - return convertList(settings, (List) super.convert(settings, value)); - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - return convertList( - settings, - (List) super.convertString(settings, value, forceStr)); - } - - private List convertList(Settings settings, List ls) - throws SettingException { - int ln = ls.size(); - List res = new ArrayList(ln); - for (int i = 0; i < ln; i++) { - Object o = ls.get(i); - if (!(o instanceof FileWithConfigurationBase)) { - if (!(o instanceof String)) { - throw new SettingException( - "All list items must be strings (paths), " - + "but the item at index " + i + " is a " - + typeName(o) + "."); - } - res.add(new FileWithConfigurationBase( - settings.baseDir, (String) o, (String) o)); - } else { - res.add(o); - } - } - return res; - } - }; - - /** - * Data model setting type. - *

    Input type: Map, Dictionary, - * {@link fmpp.tdd.Fragment}, - * private class DataList. - *

    Output type: private class DataList extends - * ArrayList. The list may contains: - * Map, String, {@link fmpp.tdd.Fragment}. - *

    String input: TDD expression, starting in hash mode. - *

    Merging: The tow lists are concatenated. - * - *

    This type is used for the "data" setting. The hash value of that - * setting can't be generated until the final value of all other setting is - * set (because data loaders may use the other settings). This way, the - * value of the "data" setting is a List that records the - * changes made on the setting, and not a Map. The - * Map will be built internally based on the list when you call - * {@link #execute()}. - */ - public static final SettingType TYPE_DATA_MODEL = new SettingType() { - - public Object convert(Settings settings, Object value) - throws SettingException { - if (value instanceof Dictionary) { - value = MiscUtil.dictionaryToMap((Dictionary) value); - } - if (value instanceof Map - || value instanceof Fragment - || value instanceof String) { - List ls = new DataList(1); - ls.add(value); - return ls; - } - if (value instanceof DataList) { - return value; - } - throw new SettingException( - "The setting value should be a hash, but now it was a " - + typeName(value) + "."); - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - List ls = new DataList(1); - ls.add(value); - return ls; - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - DataList l1 = (DataList) defValue; - DataList l2 = (DataList) value; - DataList ls = new DataList(l1.size() + l2.size()); - ls.addAll(l1); - ls.addAll(l2); - return ls; - } - }; - - /** - * Hash-of-configuration-relative-paths setting type. - *

    Input type: Map or Dictionary, that stores - * a List or Vector or array, that stores - * strings and/or {@link FileWithSettingValue}-s. Also, the map may - * contains strings and/or {@link FileWithSettingValue} directly as - * value (instead of a list of length 1 that stores the same value). - *

    Output type: Map of List of - * {@link FileWithSettingValue}-s. - *

    String input: TDD expression, starting in hash mode. - *

    Merging: the two maps are added (union) - */ - public static final SettingType TYPE_HASH_OF_SEQUENCE_OF_CFG_RELATIVE_PATHS - = new SettingType() { - - public Object convert(Settings settings, Object value) - throws SettingException { - Map mapVal = (Map) TYPE_HASH.convert(settings, value); - Iterator it = mapVal.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - Object convertedValue; - try { - convertedValue = TYPE_CFG_RELATIVE_PATHS.convert( - settings, ent.getValue()); - } catch (SettingException e) { - throw new SettingException( - "Problem with a value in the hash: " - + e.getMessage(), - e.getCause()); - } - ent.setValue(convertedValue); - } - return mapVal; - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - try { - // Because of the hash union feature both will be fine: - // --some-hash-option="a:1, b:2, c:3" - // --some-hash-option="{a:1, b:2, c:3}" - return convert(settings, Interpreter.evalAsHash( - value, null, forceStr, null)); - } catch (EvalException e) { - throw new SettingException( - "Failed to parse the text as TDD hash.", e); - } - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - Map mDef = (Map) defValue; - Map mPri = (Map) value; - Map mMerged = new HashMap(mDef.size() + mPri.size()); - mMerged.putAll(mPri); - Iterator it = mDef.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - String key = (String) ent.getKey(); - List vDef = (List) ent.getValue(); - List vPri = (List) mMerged.get(key); - if (vPri != null) { - List mergedList = new ArrayList(vPri.size() + vDef.size()); - mergedList.addAll(vPri); - mergedList.addAll(vDef); - mMerged.put(key, mergedList); - } else { - mMerged.put(key, vDef); - } - } - return mMerged; - } - }; - - // ------------------------------------------------------------------------- - // Standard defs - - private static final Map STD_DEFS = new HashMap(); - private static final Map STD_STDCMDL = new HashMap(); - static { - stdDef(NAME_SKIP_UNCHANGED, TYPE_STRING, false, true); - stdDef(NAME_TURNS, TYPE_SEQUENCE, true, false); - stdDef(NAME_SOURCES, TYPE_UNRESOLVED_CFG_RELATIVE_PATHS, true, true); - stdDef(NAME_SOURCE_ROOT, TYPE_CFG_RELATIVE_PATH, false, true); - stdDef(NAME_OUTPUT_ROOT, TYPE_CFG_RELATIVE_PATH, false, true); - stdDef(NAME_OUTPUT_FILE, TYPE_CFG_RELATIVE_PATH, false, true); - stdDef(NAME_DATA_ROOT, TYPE_CFG_RELATIVE_PATH, false, true); - stdDef(NAME_OBJECT_WRAPPER, TYPE_STRING, false, true); - stdDef(NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS, TYPE_STRING, false, true); - stdDef(NAME_FREEMARKER_LINKS, - TYPE_HASH_OF_SEQUENCE_OF_CFG_RELATIVE_PATHS, true, true); - stdDef(NAME_INHERIT_CONFIGURATION, TYPE_CFG_RELATIVE_PATH, false, true); - stdDef(NAME_MODES, TYPE_SEQUENCE, true, true); - stdDef(NAME_BORDERS, TYPE_SEQUENCE, true, true); - stdDef(NAME_DATA, TYPE_DATA_MODEL, true, false); - stdDef(NAME_LOCAL_DATA, TYPE_LOCAL_DATA_MODEL, true, false); - stdDef(NAME_TEMPLATE_DATA, TYPE_STRING, false, true); - stdDef(NAME_SOURCE_ENCODING, TYPE_STRING, false, true); - stdDef(NAME_OUTPUT_ENCODING, TYPE_STRING, false, true); - stdDef(NAME_URL_ESCAPING_CHARSET, TYPE_STRING, false, true); - stdDef(NAME_LOCALE, TYPE_STRING, false, true); - stdDef(NAME_NUMBER_FORMAT, TYPE_STRING, false, true); - stdDef(NAME_BOOLEAN_FORMAT, TYPE_STRING, false, true); - stdDef(NAME_DATE_FORMAT, TYPE_STRING, false, true); - stdDef(NAME_TIME_FORMAT, TYPE_STRING, false, true); - stdDef(NAME_DATETIME_FORMAT, TYPE_STRING, false, true); - stdDef(NAME_TIME_ZONE, TYPE_STRING, false, true); - stdDef(NAME_SQL_DATE_AND_TIME_TIME_ZONE, TYPE_STRING, false, true); - stdDef(NAME_TAG_SYNTAX, TYPE_STRING, false, true); - stdDef(NAME_CASE_SENSITIVE, TYPE_BOOLEAN, false, false); - stdDef(NAME_STOP_ON_ERROR, TYPE_BOOLEAN, false, false); - stdDef(NAME_REMOVE_EXTENSIONS, TYPE_SEQUENCE, true, true); - stdDef(NAME_REMOVE_POSTFIXES, TYPE_SEQUENCE, true, true); - stdDef(NAME_REPLACE_EXTENSIONS, TYPE_SEQUENCE, true, true); - stdDef(NAME_ALWAYS_CREATE_DIRECTORIES, TYPE_BOOLEAN, false, false); - stdDef(NAME_IGNORE_CVS_FILES, TYPE_BOOLEAN, false, false); - stdDef(NAME_IGNORE_SVN_FILES, TYPE_BOOLEAN, false, false); - stdDef(NAME_IGNORE_TEMPORARY_FILES, TYPE_BOOLEAN, false, false); - stdDef(NAME_EXPERT, TYPE_BOOLEAN, false, false); - stdDef(NAME_LOG_FILE, TYPE_CFG_RELATIVE_PATH, false, true); - stdDef(NAME_APPEND_LOG_FILE, TYPE_BOOLEAN, false, false); - stdDef(NAME_CONFIGURATION_BASE, TYPE_CFG_RELATIVE_PATH, false, true); - stdDef(NAME_ECHO_FORMAT, TYPE_STRING, false, true); - stdDef(NAME_QUIET, TYPE_STRING, false, true); - stdDef(NAME_COLUMNS, TYPE_INTEGER, false, false); - stdDef(NAME_PRINT_STACK_TRACE, TYPE_BOOLEAN, false, false); - stdDef(NAME_SNIP, TYPE_BOOLEAN, false, false); - stdDef(NAME_XPATH_ENGINE, TYPE_STRING, false, true); - stdDef(NAME_XML_CATALOG_FILES, TYPE_CFG_RELATIVE_PATHS, true, false); - stdDef(NAME_XML_CATALOG_PREFER, TYPE_STRING, false, false); - // stdDef(new SettingDefinition( - // NAME_XML_CATALOG_ALLOW_PI, TYPE_STRING, false, false)); - stdDef(NAME_VALIDATE_XML, TYPE_BOOLEAN, false, false); - stdDef(NAME_XML_RENDERINGS, TYPE_SEQUENCE, true, false); - } - - // ------------------------------------------------------------------------- - // Other constants - - private static final String FUNCTION_LAYER = "layer"; - private static final String FUNCTION_CASE = "case"; - private static final String LOCAL_DATA_BUILDER_BSH = "bsh"; - - // ------------------------------------------------------------------------- - // State - - private File baseDir; - private Map defs; - private Map values = new HashMap(); - private Map cmdLineNames; - private XmlDependentOps xmlDependentOps; - private List progressListeners = new ArrayList(); - private Map engineAttributes = new HashMap(); - private boolean dontTraverseDirs; - - // ------------------------------------------------------------------------- - // Public menthods - - /** - * Creates a new instance. The standard settings will be already defined - * in the new instance. - * - * @param baseDir the base directory used to resolve relative paths in - * setting names. When you load settings from a configuration file, the - * parent directory of the file will be used instenad, for the settings - * coming from the file. - */ - public Settings(File baseDir) throws SettingException { - if (baseDir == null) { - throw new IllegalArgumentException( - "Parameter \"baseDir\" can't be null."); - } - try { - this.baseDir = baseDir.getCanonicalFile(); - } catch (IOException e) { - throw new SettingException( - "Can't bring base path to canonical form: " - + baseDir.getPath(), e); - } - defs = STD_DEFS; - cmdLineNames = STD_STDCMDL; - } - - /** - * Defines a new setting. No setting with the same name already exists. - * @param name the name of the setting - * @param type the type of the setting - * @param merge specifies if when you add a new setting value, and the - * setting has already set, then the new and old value will be merged, - * or the new value will replace old value. Note that only a few - * setting type supports merging, such as list and map. - * @param forceStr specifies if when parsing string values with TDD - * interpreter, it should be done with the "force strings" option or - * not. - */ - public void define( - String name, SettingType type, boolean merge, boolean forceStr) - throws SettingException { - name = name.trim(); - if (defs.containsKey(name)) { - throw new SettingException( - "Setting " + StringUtil.jQuote(name) - + " is already defined."); - } - SettingDefinition def - = new SettingDefinition(name, type, merge, forceStr); - if (defs == STD_DEFS) { - defs = new HashMap(STD_DEFS); - cmdLineNames = new HashMap(STD_STDCMDL); - } - defs.put(def.name, def); - cmdLineNames.put(getDashedName(name), name); - } - - /** - * Returns if a setting with the given name is defined (do not mix it up - * with being set). - * - * @see #define - */ - public boolean isDefined(String name) { - return defs.containsKey(name); - } - - /** - * Returns if the given name is the name of a standard setting. - */ - public static Iterator getStandardSettingNames() { - return Collections.unmodifiableSet(STD_DEFS.keySet()).iterator(); - } - - /** - * Adds a setting value. If a setting value already exists, it will be - * either replaced or merged with the new value, depending on the - * definition of the setting. When merging, the new value has higher - * priority than the old value. - */ - public void add(String name, Object value) throws SettingException { - addOrSet(values, name, value, false); - } - - /** - * Adds a setting value with low priority. If a setting value already - * exists, it will be either kept (and thus the method call has no effect) - * or merged with the new value, depending on the definition of the setting. - * When merging, the new value has lower priorty than the old value. - */ - public void addDefault(String name, Object value) throws SettingException { - addOrSetDefault(values, name, value, false); - } - - /** - * Same as {@link #add(String, Object)}, but uses string value. - */ - public void addWithString(String name, String value) - throws SettingException { - addOrSet(values, name, translateProperty(name, value), false); - } - - /** - * Same as {@link #addDefault(String, Object)}, but uses string value. - */ - public void addDefaultWithString(String name, String value) - throws SettingException { - addOrSetDefault(values, name, translateProperty(name, value), false); - } - - /** - * Adds all name-value pairs stored in the map with - * {@link #add(String, Object)}. - */ - public void add(Map settingMap) throws SettingException { - addOrSet(settingMap, false); - } - - /** - * Adds all entries stored in the map with - * {@link #addDefault(String, Object)}. - */ - public void addDefaults(Map settingMap) throws SettingException { - addOrSetDefaults(settingMap, false); - } - - /** - * Same as {@link #add(Map)}, but uses a Properties object, - * so the values are strings. - */ - public void addWithStrings(Properties props) throws SettingException { - addOrSetWithStrings(props, false); - } - - /** - * Same as {@link #addDefaults(Map)}, but uses a Properties - * object, so the values are strings. - */ - public void addDefaultsWithStrings(Properties props) - throws SettingException { - addOrSetDefaultsWithStrings(props, false); - } - - /** - * Sets the value of a setting. If the setting value already exists, it will - * be replaced (never merged). - */ - public void set(String name, Object value) throws SettingException { - addOrSet(values, name, value, true); - } - - /** - * Convenience method for setting a Boolean value. - */ - public void set(String name, boolean value) throws SettingException { - set(name, value ? Boolean.TRUE : Boolean.FALSE); - } - - /** - * Convenience method for setting an Integer value. - */ - public void set(String name, int value) throws SettingException { - set(name, new Integer(value)); - } - - /** - * Sets the value of a setting if the value doesn't exists yet. - */ - public void setDefault(String name, Object value) throws SettingException { - addOrSetDefault(values, name, value, true); - } - - /** - * Convenience method for setting a Boolean value. - */ - public void setDefault(String name, boolean value) throws SettingException { - setDefault(name, value ? Boolean.TRUE : Boolean.FALSE); - } - - /** - * Convenience method for setting an Integer value. - */ - public void setDefault(String name, int value) throws SettingException { - setDefault(name, new Integer(value)); - } - - /** - * Same as {@link #set(String, Object)}, but uses string value. - */ - public void setWithString(String name, String value) - throws SettingException { - addOrSet(values, name, translateProperty(name, value), true); - } - - /** - * Same as {@link #setDefault(String, Object)}, but uses string value. - */ - public void setDefaultWithString(String name, String value) - throws SettingException { - addOrSetDefault(values, name, translateProperty(name, value), true); - } - - /** - * Sets all name-value pairs stored in the map with - * {@link #set(String, Object)}. - */ - public void set(Map settingMap) throws SettingException { - addOrSet(settingMap, true); - } - - /** - * Sets all name-value pairs stored in the map with - * {@link #setDefault(String, Object)}. - */ - public void setDefaults(Map settingMap) throws SettingException { - addOrSetDefaults(settingMap, true); - } - - /** - * Same as {@link #set(Map)}, but uses a Properties object, - * so the values are strings. - */ - public void setWithStrings(Properties props) throws SettingException { - addOrSetWithStrings(props, true); - } - - /** - * Same as {@link #setDefaults(Map)}, but uses a Properties - * object, so the values are strings. - */ - public void setDefaultsWithStrings(Properties props) - throws SettingException { - addOrSetDefaultsWithStrings(props, true); - } - - /** - * Loads settings from a configuration file. The file will be interpreted - * as legacy properties file if its extension is cfg or - * properties, otherwise it will be interpreted as TDD file. - * The settings stored in the configuration file will be added - * to the this object with {@link #add(Map)}. - * - *

    Note that meta-settings ("configurationBase" and - * "inheritConfiguration") will not be added to the settings object. - * - *

    If the setting "configurationBase" or "inheritConfiguration" is - * set in this setting object, then they will override the - * meta-settings in the file directly loaded with this method. Files - * inherited by the directly loaded file, however, are not affected. - * - * @param cfgFile the configuration file, or the directory of the - * configuration file if its file name is one of the - * default configuration file names. - * - * @see #loadDefaults(File) - */ - public void load(File cfgFile) throws SettingException { - load_common(cfgFile, false); - } - - /** - * Same as {@link #load(File) load}, except that it adds the settings with - * {@link #addDefaults(Map)}. - * - * @see #load(File) - */ - public void loadDefaults(File cfgFile) throws SettingException { - load_common(cfgFile, true); - } - - /** - * Gets the current value of a setting. - * @param name the name of the setting. - * @return The value of the setting, or null if the setting - * is not set. Do not modify the returned object! - */ - public Object get(String name) { - return values.get(name); - } - - /** - * Removes a setting value. - * @return the removed value, or null if there was no - * value stored for the setting. - */ - public Object remove(String name) { - return values.remove(name); - } - - /** - * Lists the names of settings that were set. - */ - public Iterator getNames() { - return values.keySet().iterator(); - } - - /** - * Executes a processing session based on the setting values. - * For each call of this method, a new {@link fmpp.Engine} object will be - * internaly created, and initialized based on the setting values, and then - * its process method will be called. The method automatically - * chooses between bulk and single-file processing, based on the presence of - * the "outputFile" setting. - * - *

    Settings will go throught semantical checks that are not done when - * you call other methods. For example, it will be checked if setting - * "modes" contains valid mode setter function calls, if "sourceRoot" and - * "outputRoot" are defined for bulk mode, if exactly 1 "sources" is defined - * for single-file mode, etc. - * - *

    This method ignores the following settings: - * "logFile", "appendLogFile", "echoFormat", "quiet", "snip". - * It's the task of the embedding software (the front-end) to interpret - * these settings, at least the ones it is interested in. - * It usually involves adding progress listeners with - * {@link #addProgressListener(ProgressListener)}. - * - *

    This method can be called for multiple times, but be aware of - * that for each call of this method, a new {@link fmpp.Engine} - * object will be created and initialized, even if you didn't changed the - * settings since the last call. If this overhead is not acceptable - * in you case, you can call Engine.process(...) for multiple - * times within the same {@link #execute()} call, by overriding the - * {@link #doProcessing(Engine, File[], File, File)} method. - * Also, you can do extra engine initalization there. - * - * @throws SettingException if the settings are not correct, or can't be - * applied because of some errors occured. This exception, when thrown, - * is always thrown before the execution of the processing session is - * stated. - * @throws ProcessingException if Engine.process has - * thrown any exception, that is, there was an error during the - * execution of the processing session. The message of this exception - * holds nothing interesting (just a static text). Call its - * getCause() method to get the exception that caused the - * termination. Note that all (so even non-checked exceptions) thrown be - * the engine are catched and wrapped by this exeption. - */ - public void execute() throws SettingException, ProcessingException { - final Version fmIcI; - { - String s = (String) get(NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS); - if (s != null) { - try { - fmIcI = new Version(s); - } catch (Exception e) { - throw new SettingException("Failed to apply the value of the " - + StringUtil.jQuote(NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS) - + " setting.", e); - } - } else { - fmIcI = null; - } - } - - final BeansWrapper ow; - { - String s = (String) get(NAME_OBJECT_WRAPPER); - if (s != null) { - Object bres; - bsh.Interpreter intp = new bsh.Interpreter(); - try { - intp.eval("import freemarker.template.ObjectWrapper;"); - intp.eval("import freemarker.ext.beans.BeansWrapper;"); - intp.eval("import freemarker.ext.beans.BeansWrapperBuilder;"); - intp.set(NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS, - fmIcI != null ? fmIcI : Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS); - bres = intp.eval(s); - } catch (EvalError e) { - throw new SettingException("Failed to apply the value of the " - + StringUtil.jQuote(NAME_OBJECT_WRAPPER) - + " setting.", e); - } - if (bres == null) { - throw new SettingException("Failed to apply the value of the " - + StringUtil.jQuote(NAME_OBJECT_WRAPPER) - + " setting: the result of the setting value " - + "evaluation was null. (The typical reason is that " - + "you forget the \"return\" statement. A rare but " - + "rather evil reason is that you use a \"//\" " - + "comment, and Ant eats the line-breaks, so you " - + "comment out everything after the \"//\".)"); - } - if (!(bres instanceof BeansWrapper)) { - throw new SettingException("Failed to apply the value of the " - + StringUtil.jQuote(NAME_OBJECT_WRAPPER) - + " setting: the class of the resulting object must " - + "extend " + BeansWrapper.class.getName() - + ", but the " + bres.getClass().getName() - + " class doesn't extend it."); - } - ow = (BeansWrapper) bres; - } else { - ow = null; - } - } - - final Engine eng = new Engine(ow, fmIcI); - - String s; - Boolean b; - List ls; - Map m; - File f; - int i; - - eng.setDontTraverseDirectories(dontTraverseDirs); - - b = (Boolean) get(NAME_EXPERT); - if (b != null) { - eng.setExpertMode(b.booleanValue()); - } - - b = (Boolean) get(NAME_CASE_SENSITIVE); - if (b != null) { - eng.setCaseSensitive(b.booleanValue()); - } - - s = (String) get(NAME_LOCALE); - if (s != null) { - eng.setLocale(s); - } - - s = (String) get(NAME_NUMBER_FORMAT); - if (s != null) { - eng.setNumberFormat(s); - } - - s = (String) get(NAME_BOOLEAN_FORMAT); - if (s != null) { - eng.setBooleanFormat(s); - } - - s = (String) get(NAME_DATE_FORMAT); - if (s != null) { - eng.setDateFormat(s); - } - - s = (String) get(NAME_TIME_FORMAT); - if (s != null) { - eng.setTimeFormat(s); - } - - s = (String) get(NAME_DATETIME_FORMAT); - if (s != null) { - eng.setDateTimeFormat(s); - } - - s = (String) get(NAME_TIME_ZONE); - if (s != null) { - eng.setTimeZone(s); - } - - s = (String) get(NAME_SQL_DATE_AND_TIME_TIME_ZONE); - if (s != null) { - eng.setSQLDateAndTimeTimeZone(s); - } - - s = (String) get(NAME_TAG_SYNTAX); - if (s != null) { - if (s.equals(VALUE_TAG_SYNTAX_ANGLE_BRACKET)) { - eng.setTagSyntax(Configuration.ANGLE_BRACKET_TAG_SYNTAX); - } else if (s.equals(VALUE_TAG_SYNTAX_SQUARE_BRACKET)) { - eng.setTagSyntax(Configuration.SQUARE_BRACKET_TAG_SYNTAX); - } else if (s.equals(VALUE_TAG_SYNTAX_AUTO_DETECT)) { - eng.setTagSyntax(Configuration.AUTO_DETECT_TAG_SYNTAX); - } else { - throw new SettingException("The value of the " - + StringUtil.jQuote(NAME_TAG_SYNTAX) - + " setting should be one of " - + "\"" + VALUE_TAG_SYNTAX_ANGLE_BRACKET - + "\", \"" + VALUE_TAG_SYNTAX_SQUARE_BRACKET - + "\", \"" + VALUE_TAG_SYNTAX_AUTO_DETECT - + "\". Value " + StringUtil.jQuote(s) + " is invalid."); - } - } - - s = (String) get(NAME_SOURCE_ENCODING); - if (s != null) { - eng.setSourceEncoding(s); - } - - s = (String) get(NAME_OUTPUT_ENCODING); - if (s != null) { - eng.setOutputEncoding(s); - } - - s = (String) get(NAME_URL_ESCAPING_CHARSET); - if (s != null) { - eng.setUrlEscapingCharset(s); - } - - s = (String) get(NAME_XPATH_ENGINE); - if (s != null) { - eng.setXpathEngine(s); - } - - b = (Boolean) get(NAME_STOP_ON_ERROR); - if (b != null) { - eng.setStopOnError(b.booleanValue()); - } - - b = (Boolean) get(NAME_ALWAYS_CREATE_DIRECTORIES); - if (b != null) { - eng.setAlwaysCreateDirectories(b.booleanValue()); - } - - b = (Boolean) get(NAME_IGNORE_CVS_FILES); - if (b != null) { - eng.setIgnoreCvsFiles(b.booleanValue()); - } - - b = (Boolean) get(NAME_IGNORE_SVN_FILES); - if (b != null) { - eng.setIgnoreSvnFiles(b.booleanValue()); - } - - b = (Boolean) get(NAME_IGNORE_TEMPORARY_FILES); - if (b != null) { - eng.setIgnoreTemporaryFiles(b.booleanValue()); - } - - Boolean xmlCatalogPreferPublic; - s = (String) get(NAME_XML_CATALOG_PREFER); - if (s != null) { - if (s.equals(VALUE_XML_CATALOG_PREFER_PUBLIC)) { - xmlCatalogPreferPublic = Boolean.TRUE; - } else if (s.equals(VALUE_XML_CATALOG_PREFER_SYSTEM)) { - xmlCatalogPreferPublic = Boolean.FALSE; - } else if (s.equals(VALUE_GLOBAL_DEFAULT)) { - xmlCatalogPreferPublic = null; - } else { - throw new SettingException("The value of the " - + StringUtil.jQuote(NAME_XML_CATALOG_PREFER) - + " setting should be one of " - + "\"" + VALUE_XML_CATALOG_PREFER_PUBLIC - + "\", \"" + VALUE_XML_CATALOG_PREFER_SYSTEM - + "\", \"" + VALUE_GLOBAL_DEFAULT - + "\". Value " + StringUtil.jQuote(s) + " is invalid."); - } - } else { - xmlCatalogPreferPublic = Boolean.TRUE; - } - - /* - Boolean xmlCatalogAllowPi; - s = (String) get(NAME_XML_CATALOG_ALLOW_PI); - if (s != null) { - try { - xmlCatalogAllowPi = StringUtil.stringToBoolean(s) - ? Boolean.TRUE : Boolean.FALSE; - } catch (StringUtil.ParseException e) { - if (s.equals(VALUE_GLOBAL_DEFAULT)) { - xmlCatalogAllowPi = null; - } else { - throw new SettingException("The value of setting " - + StringUtil.jQuote(NAME_XML_CATALOG_ALLOW_PI) - + " should be a valid boolean value or " - + "\"" + VALUE_GLOBAL_DEFAULT + "\". " - + "Value " + StringUtil.jQuote(s) + " is invalid."); - } - } - } else { - xmlCatalogAllowPi = null; - } - */ - - ls = (List) get(NAME_XML_CATALOG_FILES); - if (ls != null) { - try { - loadXmlCatalogs( - eng, - ls, xmlCatalogPreferPublic, null /*xmlCatalogAllowPi*/); - } catch (InstallationException e) { - throw new SettingException("Failed to setup XML catalogs.", e); - } - } - - b = (Boolean) get(NAME_VALIDATE_XML); - if (b != null) { - eng.setValidateXml(b.booleanValue()); - } - - ls = (List) get(NAME_MODES); - if (ls != null) { - try { - loadProcessingModeChoosers(eng, ls); - } catch (SettingException e) { - throw new SettingException( - "Failed to apply the value of the \"" + NAME_MODES - + "\" setting.", - e); - } - } - - ls = (List) get(NAME_BORDERS); - if (ls != null) { - try { - loadBorderChoosers(eng, ls); - } catch (SettingException e) { - throw new SettingException( - "Failed to apply the value of the \"" + NAME_BORDERS - + "\" setting.", - e); - } - } - - ls = (List) get(NAME_TURNS); - if (ls != null) { - try { - loadTurnChoosers(eng, ls); - } catch (SettingException e) { - throw new SettingException( - "Failed to apply the value of the \"" + NAME_TURNS - + "\" setting.", - e); - } - } - - ls = (List) get(NAME_REPLACE_EXTENSIONS); - if (ls != null) { - try { - loadReplaceExtensions(eng, ls); - } catch (SettingException e) { - throw new SettingException( - "Failed to apply the value of the \"" - + NAME_REPLACE_EXTENSIONS + "\" setting.", - e); - } - } - - ls = (List) get(NAME_REMOVE_EXTENSIONS); - if (ls != null) { - try { - loadRemoveExtensions(eng, ls); - } catch (SettingException e) { - throw new SettingException( - "Failed to apply the value of the \"" - + NAME_REMOVE_EXTENSIONS + "\" setting.", - e); - } - } - - ls = (List) get(NAME_REMOVE_POSTFIXES); - if (ls != null) { - try { - loadRemovePostfixes(eng, ls); - } catch (SettingException e) { - throw new SettingException( - "Failed to apply the value of the \"" - + NAME_REMOVE_POSTFIXES + "\" setting.", - e); - } - } - - s = (String) get(NAME_SKIP_UNCHANGED); - if (s != null) { - if (s.equalsIgnoreCase("none")) { - eng.setSkipUnchanged(Engine.SKIP_NONE); - } else if (s.equalsIgnoreCase("all")) { - eng.setSkipUnchanged(Engine.SKIP_ALL); - } else if (s.equalsIgnoreCase("static")) { - eng.setSkipUnchanged(Engine.SKIP_STATIC); - } else { - throw new SettingException( - "The value of the \"" + NAME_SKIP_UNCHANGED - + "\" setting can't be " + StringUtil.jQuote(s) + ". " - + "It should be one of: none, all, static"); - } - } - - // Root directories and source/output files: - - // - single-file mode: - File outputFile = (File) get(NAME_OUTPUT_FILE); - List sources = (List) get(NAME_SOURCES); - if (sources != null) { - sources = new ArrayList(sources); - } - File sourceFile; - if (outputFile != null) { - try { - outputFile = outputFile.getCanonicalFile(); - } catch (IOException e) { - throw new SettingException( - "Failed to bring the output file path to " - + "canonical form: " + outputFile.getPath(), - e); - } - if (outputFile.exists() && outputFile.isDirectory()) { - throw new SettingException( - "The output file can't be a directory: " - + outputFile.getPath()); - } - if (sources == null || sources.size() != 1) { - throw new SettingException( - "Since you have set the \"" - + NAME_OUTPUT_FILE + "\" setting, you must " - + "give exactly 1 source file. " - + (sources == null || sources.size() == 0 - ? "But there was no source file specified." - : "But there were specified " + sources.size() - + " source files.")); - } - sourceFile = ((FileWithConfigurationBase) sources.get(0)); - if (!sourceFile.isAbsolute()) { - sourceFile = new File( - ((FileWithConfigurationBase) sourceFile) - .getConfigurationBase(), - sourceFile.getPath()); - } - try { - sourceFile = sourceFile.getCanonicalFile(); - } catch (IOException e) { - throw new SettingException( - "Failed to bring the source file path to " - + "canonical form: " + sourceFile.getPath(), - e); - } - if (!sourceFile.exists()) { - throw new SettingException( - "Source file not found: " - + sourceFile.getPath()); - } - if (sourceFile.isDirectory()) { - throw new SettingException( - "This source file is not a file, but a directory: " - + sourceFile.getPath()); - } - if (!sourceFile.isFile()) { - throw new SettingException( - "This source file is not a file: " - + sourceFile.getPath()); - } - } else { - sourceFile = null; - } - - // - source root: - f = (File) get(NAME_SOURCE_ROOT); - if (f == null) { - if (sourceFile != null) { - try { - eng.setSourceRoot(sourceFile.getParentFile()); - } catch (IOException e) { - throw new SettingException( - "Failed to apply the \"" + NAME_SOURCE_ROOT - + "\" setting.", - e); - } - } else { - throw new SettingException( - "The \"" + NAME_SOURCE_ROOT + "\" setting was not set. " - + "FMPP can't start working without that."); - } - } else { - if (!f.exists()) { - throw new SettingException( - "Source root directory not found: " - + f.getPath()); - } - if (!f.isDirectory()) { - throw new SettingException( - "This source root directory is not a directoy: " - + f.getPath()); - } - try { - eng.setSourceRoot(f); - } catch (IOException e) { - throw new SettingException( - "Failed to apply the \"" + NAME_SOURCE_ROOT - + "\" setting.", - e); - } - } - - // - convert sources for bulk mode - if (outputFile == null) { - if (sources != null) { - f = eng.getSourceRoot(); - for (i = 0; i < sources.size(); i++) { - File sf = (File) sources.get(i); - if (!sf.isAbsolute()) { - sf = new File(f, sf.getPath()); - sources.set(i, sf); - } - if (i < 4 && !(sf.exists())) { - throw new SettingException( - "Source file or directory not found: " - + ((File) sources.get(i)).getAbsolutePath()); - } - } - } - } - - // - output root: - f = (File) get(NAME_OUTPUT_ROOT); - if (f == null) { - if (outputFile != null) { - try { - eng.setOutputRoot(outputFile.getParentFile()); - } catch (IOException e) { - throw new SettingException( - "Failed to apply the \"" + NAME_OUTPUT_ROOT - + "\" setting.", - e); - } - } else { - throw new SettingException( - "The \"" + NAME_OUTPUT_ROOT + "\" setting was not set. " - + "FMPP can't start working without that."); - } - } else { - if (f.exists() && !f.isDirectory()) { - throw new SettingException( - "This output root directory is not a directoy: " - + f.getPath()); - } - try { - eng.setOutputRoot(f); - } catch (IOException e) { - throw new SettingException( - "Failed to apply the \"" + NAME_OUTPUT_ROOT - + "\" setting.", - e); - } - } - - // - default source: - if (sources == null) { - sources = new ArrayList(1); - sources.add(eng.getSourceRoot()); - } - - // - data root: - f = (File) get(NAME_DATA_ROOT); - if (f != null && !(f instanceof FileWithSettingValue - && ((FileWithSettingValue) f).getSettingValue() - .equals(VALUE_SOURCE) - )) { - try { - eng.setDataRoot(f); - } catch (IOException e) { - throw new SettingException( - "Failed to apply the \"" + NAME_OUTPUT_ROOT - + "\" setting.", - e); - } - } - - // Safety checks - if (!eng.getExpertMode()) { - try { - if (outputFile == null) { - if (eng.getSourceRoot().getCanonicalFile() - .equals(eng.getOutputRoot().getCanonicalFile())) { - throw new SettingException( - "Safety error! The source root and output " - + "root directories are identical. If this is " - + "intentional, use expert mode to allow " - + "this. (Set the \"" + NAME_EXPERT - + "\" setting to true.)"); - } - } else { - if (sourceFile == null) { - throw new BugException("sourceFile == null"); - } - if (outputFile.getCanonicalFile() - .equals(sourceFile.getCanonicalFile())) { - throw new SettingException( - "Safety error! The source and output " - + "files are identical. If this is " - + "intentional, use expert mode to allow " - + "this. (Set the \"" + NAME_EXPERT - + "\" setting to true.)"); - } - } - } catch (IOException e) { - // This can't happen in principle... - throw new SettingException( - "Unexpected path canonicalization error.", e); - } - } - - // Adding FreeMarker links - - m = (Map) get(NAME_FREEMARKER_LINKS); - if (m != null) { - try { - loadFreemarkerLinks(eng, m); - } catch (Exception e) { - throw new SettingException( - "Failed to apply the \"" + NAME_FREEMARKER_LINKS - + "\" setting.", - e); - } - } - - // Adding XML renderings - - ls = (List) get(NAME_XML_RENDERINGS); - if (ls != null && ls.size() != 0) { - try { - loadXmlRenderings(eng, ls); - } catch (InstallationException e) { - throw new SettingException( - "Failed to apply the \"" + NAME_XML_RENDERINGS - + "\" setting.", - e); - } - } - - // Adding attributes - - // B.C.: Don't clean attributes! - Iterator it = engineAttributes.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - eng.setAttribute((String) ent.getKey(), ent.getValue()); - } - - // Adding progress listeners - - // B.C.: Don't clean progress listeners! - it = progressListeners.iterator(); - while (it.hasNext()) { - eng.addProgressListener((ProgressListener) it.next()); - } - - // Data settings. These must set last! - - // - Session level data - - ls = (List) get(NAME_DATA); - if (ls != null) { - eng.clearData(); - Map dataModel = new HashMap(); - for (i = 0; i < ls.size(); i++) { - Object o = ls.get(i); - if (o instanceof String) { - try { - dataModel.putAll(Interpreter.evalAsHash( - (String) o, - new DataLoaderEvaluationEnvironment(eng), - false, - null)); - } catch (EvalException e) { - throw new SettingException( - "Failed to apply the value of the \"" - + NAME_DATA + "\" setting.", e); - } - } else if (o instanceof Fragment) { - Fragment fr = (Fragment) o; - try { - o = Interpreter.eval( - fr, - new DataLoaderEvaluationEnvironment(eng), - false); - if (o instanceof Map) { - dataModel.putAll((Map) o); - } else { - if (o != null) { - throw new SettingException( - "The value of the \"" - + NAME_DATA + "\" setting should be a " - + "hash, but it is a " + typeName(o) - + " in " + fr.getFileName() + "."); - } - } - } catch (EvalException e) { - throw new SettingException( - "Failed to apply the value of the \"" - + NAME_DATA + "\" setting.", e); - } - } else if (o instanceof Map) { - dataModel.putAll((Map) o); - } else { - throw new BugException("Delayed step call can't be " - + o.getClass().getName()); - } - } - eng.addData(dataModel); - } - - // - Templat data (deprecated) - - s = (String) get(NAME_TEMPLATE_DATA); - if (s != null) { - try { - eng.setTemplateDataModelBuilder(s); - } catch (DataModelBuildingException e) { - throw new SettingException( - "Failed to apply the value of the \"" - + NAME_TEMPLATE_DATA + "\" setting.", - e); - } - } - - // - Local data (this must be the very very last) - - ls = (List) get(NAME_LOCAL_DATA); - if (ls != null) { - eng.clearLocalDataBuilders(); - int layer = 0; - boolean layerUsed = false; - for (i = 0; i < ls.size(); i++) { - Object o = ls.get(i); - if (!(o instanceof FunctionCall)) { - throw new SettingException( - "The value of the \"" + NAME_LOCAL_DATA - + "\" setting must be a sequence of TDD function " - + "calls, but there is an item of type " - + Interpreter.getTypeName(o) + "."); - } - FunctionCall fc = (FunctionCall) o; - if (fc.getName().equals(FUNCTION_LAYER)) { - if (fc.getParams().size() != 0) { - throw new SettingException( - "Problem with the value of the \"" - + NAME_LOCAL_DATA + "\" setting: Function " - + "\"" + FUNCTION_LAYER + "\" " - + "doesn't allow arguments, but now it has " - + fc.getParams().size() + " argument(s)."); - } - if (layerUsed) { - layer++; - layerUsed = false; - } - } else if (fc.getName().equals(FUNCTION_CASE)) { - layerUsed = true; - List params = fc.getParams(); - int paramCnt = params.size(); - if (paramCnt < 2) { - throw new SettingException( - "Problem with the value of the \"" - + NAME_LOCAL_DATA + "\" setting: Function call " - + "to \"" + FUNCTION_CASE + "\" needs at " - + "least 2 parameters: pathPattern, data"); - } - o = params.get(params.size() - 1); - LocalDataBuilder builder; - if (o instanceof String) { - Object bo; - bsh.Interpreter bship = new bsh.Interpreter(); - try { - bship.set("engine", eng); - bo = bship.eval((String) o); - } catch (EvalError e) { - throw new SettingException( - "Problem with the value of the \"" - + NAME_LOCAL_DATA + "\" setting: Failed to " - + "evaluate BeanShell expression.", e); - } - if (!(bo instanceof LocalDataBuilder)) { - throw new SettingException( - "Problem with the value of the \"" - + NAME_LOCAL_DATA + "\" setting: BeanShell " - + "expression " - + StringUtil.jQuote((String) o) - + " evaluates to an object which " - + "doesn't implement " - + LocalDataBuilder.class.getName() - + ". (The class of the object is: " - + o.getClass().getName() + ")"); - } - builder = (LocalDataBuilder) bo; - } else if (o instanceof Fragment) { - builder = new TddHashLocalDataBuilder( - (Fragment) o); - } else if (o instanceof Map) { - builder = new MapLocalDataBuilder((Map) o); - } else if (o instanceof FunctionCall) { - FunctionCall fc2 = (FunctionCall) o; - String name = fc2.getName(); - if (name.equals(LOCAL_DATA_BUILDER_BSH)) { - try { - builder = BshLocalDataBuilder - .createInstanceForSetting( - name, fc2.getParams()); - } catch (SettingException e) { - throw new SettingException( - "Problem with the value of the \"" - + NAME_LOCAL_DATA + "\" setting.", e); - } - } else { - throw new SettingException( - "Problem with the value of the \"" - + NAME_LOCAL_DATA + "\" setting: function " - + "call as the last parameter to \"" - + FUNCTION_CASE - + "\" must refer to a predefined local " - + "data builder, but there is no " - + "predefined local data builder with " - + "name \"" + fc2.getName() + "\"."); - } - } else { - throw new SettingException( - "Problem with the value of the \"" - + NAME_LOCAL_DATA + "\" setting: The last " - + "parameter to function \"" + FUNCTION_CASE - + "\" must be a function call or a hash, but " - + "now it was a " + Interpreter.getTypeName(o) - + "."); - } - for (int x = 0; x < paramCnt - 1; x++) { - o = params.get(x); - if (!(o instanceof String)) { - throw new SettingException( - "Problem with the value of the \"" - + NAME_LOCAL_DATA - + "\" setting: Parameters before the last " - + "parameter to function \"" + FUNCTION_CASE - + "\" must be strings (path patterns), " - + "but parameter at position " + (x + 1) - + " is a " - + (o instanceof Fragment - ? "hash" - : Interpreter.getTypeName(o)) - + "."); - } - eng.addLocalDataBuilder(layer, (String) o, builder); - } - } else { - throw new SettingException( - "Sequence items in the \"" + NAME_LOCAL_DATA - + "\" setting must be a sequence of TDD function " - + "calls to \"" + FUNCTION_LAYER + "\" or \"" - + FUNCTION_CASE + "\", but there is a call to " - + StringUtil.jQuote(fc.getName()) + "."); - } - } - } - - // Processing - - if (outputFile == null) { - int ln = sources.size(); - File[] ss = new File[ln]; - for (i = 0; i < ln; i++) { - ss[i] = (File) sources.get(i); - } - doProcessing(eng, ss, null, null); - } else { - doProcessing(eng, null, sourceFile, outputFile); - } - } - - /** - * Adds a progress listener. The progress listener will be added to the - * internally used {@link fmpp.Engine} object when you call - * {@link #execute()}. - * - * @see #clearProgressListeners() - */ - public void addProgressListener(ProgressListener pl) { - progressListeners.add(pl); - } - - /** - * Removes all progress listeneres. - * - * @see #addProgressListener(ProgressListener) - */ - public void clearProgressListeners() { - progressListeners.clear(); - } - - /** - * Sets an engine attribute. The attribute will be set in the internally - * used {@link fmpp.Engine} object when you call {@link #execute()}. - * - * @return The previous value of the attribute, or null if - * there was no attribute with the given name. - */ - public Object setEngineAttribute(String name, Object value) { - return engineAttributes.put(name, value); - } - - /** - * Reads an engine attribute. - * - * @see #setEngineAttribute(String, Object) - * - * @return null if no attribute exists with the given name. - */ - public Object getEngineAttribute(String name) { - return engineAttributes.get(name); - } - - /** - * Removes an engine attribute. It does nothing if the attribute does not - * exist. - * - * @see #setEngineAttribute(String, Object) - * - * @return The value of the removed attribute or null if there - * was no attribute with the given name. - */ - public Object removeAttribute(String name) { - return engineAttributes.remove(name); - } - - /** - * Removes all engine attributes. - * - * @see #setEngineAttribute(String, Object) - */ - public void clearAttribues() { - engineAttributes.clear(); - } - - /** See {@link Engine#setDontTraverseDirectories(boolean)}. */ - public void setDontTraverseDirectories(boolean dontTraverseDirs) { - this.dontTraverseDirs = dontTraverseDirs; - } - - public boolean getDontTraverseDirectories() { - return dontTraverseDirs; - } - - /** - * Dumps the current content of this object for debugging purposes. - */ - public String dump() { - return Interpreter.dump(values); - } - - /** - * Returns 0 for verbose mode, 1 for quiet mode, 2 for really-quiet mode. - */ - public static int quietSettingValueToInt(String value, String name) - throws SettingException { - if (value == null) { - return 0; - } - if (value.length() == 0) { - return 1; - } else if (value.equals("true")) { - return 1; - } else if (value.equals("false")) { - return 0; - } else if (value.equals(VALUE_REALLY_QUIET)) { - return 2; - } else { - // Backward compatibility - int level; - try { - level = Integer.parseInt(value) + 1; - } catch (NumberFormatException exc) { - level = -123; - } - if (level < 0 || level > 2) { - throw new SettingException("The value of the \"" + name - + "\" setting has to be one of (case insensitive): " - + "\"true\" (or empty string), \"false\", \"" - + VALUE_REALLY_QUIET + "\", but now it was " - + StringUtil.jQuote(value)); - } - return level; - } - } - - /** - * Returns the default configuration file in the directory. - * @return the absolute file, or null if no default - * configuration file exists in the directory. - */ - public static File getDefaultConfigurationFile(File dir) { - File f = new File(dir, Settings.DEFAULT_CFG_FILE_NAME); - if (f.isFile()) { - return f.getAbsoluteFile(); - } else { - f = new File(dir, Settings.DEFAULT_CFG_FILE_NAME_OLD); - if (f.isFile()) { - return f.getAbsoluteFile(); - } else { - return null; - } - } - } - - /** - * Converts legacy dashed setting names to the standard format, as - * source-root to sourceRoot. - * - * @param props the Properties object to convert. - * - * @throws SettingException if no setting with the given name exists. - */ - public void undashNames(Properties props) - throws SettingException { - Enumeration en = props.propertyNames(); - while (en.hasMoreElements()) { - String name = (String) en.nextElement(); - String convertedName = (String) cmdLineNames.get(name); - if (convertedName == null || convertedName.equals(name)) { - if (!defs.containsKey(name)) { - throw newUnknownSettingException(name); - } - } else { - if (props.containsKey(convertedName)) { - throw new SettingException("Setting " - + StringUtil.jQuote(convertedName) - + " was specified twice in the Properties object, " - + "with different but semantically equivalent " - + "names."); - } - props.setProperty(convertedName, props.getProperty(name)); - props.remove(name); - } - } - } - - /** - * Trims all property values. - */ - public void trimValues(Properties props) { - Enumeration en = props.propertyNames(); - while (en.hasMoreElements()) { - String name = (String) en.nextElement(); - String value = props.getProperty(name); - String trimmedValue = value.trim(); - if (!trimmedValue.equals(value)) { - props.setProperty(name, trimmedValue); - } - } - } - - // ------------------------------------------------------------------------- - // Protected - - /** - * Executes the processing session(s) on the {@link fmpp.Engine} level, - * using the already initialized Engine object. - * - *

    By overriding this method, you can - *

      - *
    • call Engine.process(...) for multiple times, so you - * can do multiple processing sessions with the same already - * initialized Engine object. - *
    • do extra Engine initialization. - *
    - * - *

    The inital implementation of this method (that is, the implementation - * in the {@link Settings} class) is something like this: - * - *

    -     * if (outputFile == null) {
    -     *     eng.process(sources);
    -     * } else {
    -     *     eng.process(sourceFile, outputFile);
    -     * }
    - * - *

    Modifying the {@link Settings} object in this method has no effect on - * the Engine object (which is passed in as argument), - * since all settings are already applied on it. If you need to modify the - * Engine object, call its methods directly. - * - *

    An implementation of this method may leak out the initialized - * Engine object for the caller of {@link #execute()}. Also, it - * may does not call Engine.proccess(...), but left it for the - * caller (who has the out-leaked Engine object). These are - * extreme, but otherwise legitimate usages. - * - * @param eng the already initialized Engine object. You may - * do extra addjustments on it. - * @param sources the list of source files, the parameter to - * {@link fmpp.Engine#process(File[])}. It's null if - * the processing session uses outputFile setting. - * @param sourceFile if the session uses outputFile setting, - * then it' the 1st parameter to - * {@link fmpp.Engine#process(File, File)}, otherwise it is null. - * @param outputFile if the session uses outputFile setting, - * then it' the 2nd parameter to - * {@link fmpp.Engine#process(File, File)}, otherwise it is null. - */ - protected void doProcessing( - Engine eng, File[] sources, File sourceFile, File outputFile) - throws SettingException, ProcessingException { - if (outputFile == null) { - eng.process(sources); - } else { - eng.process(sourceFile, outputFile); - } - } - - // ------------------------------------------------------------------------- - // Private - - private void addOrSet(Map m, String name, Object value, boolean set) - throws SettingException { - SettingDefinition def = (SettingDefinition) defs.get(name); - if (def == null) { - throw newUnknownSettingException(name); - } - try { - value = def.type.convert(this, value); - } catch (SettingException e) { - // addjust message - throw new SettingException( - "Problem with the value of setting " - + StringUtil.jQuote(name) + ": " + e.getMessage(), - e.getCause()); - } - if (!set && def.merge) { - Object oldValue = m.get(name); - if (oldValue != null) { - try { - value = def.type.merge(this, oldValue, value); - } catch (SettingException e) { - // addjust message - throw new SettingException( - "Problem with the value of setting " - + StringUtil.jQuote(name) + ": " + e.getMessage(), - e.getCause()); - } - } - } - m.put(name, value); - } - - private void addOrSetDefault(Map m, String name, Object value, boolean set) - throws SettingException { - SettingDefinition def = (SettingDefinition) defs.get(name); - if (def == null) { - throw newUnknownSettingException(name); - } - try { - value = def.type.convert(this, value); - } catch (SettingException e) { - // addjust message - throw new SettingException( - "Problem with the value of setting " - + StringUtil.jQuote(name) + ": " + e.getMessage(), - e.getCause()); - } - Object oldValue = m.get(name); - if (oldValue != null) { - if (!set && def.merge) { - try { - value = def.type.merge(this, value, oldValue); - } catch (SettingException e) { - // addjust message - throw new SettingException( - "Problem with the value of setting " - + StringUtil.jQuote(name) + ": " + e.getMessage(), - e.getCause()); - } - } else { - return; //! - } - } - m.put(name, value); - } - - private void addOrSetWithString( - Map m, String name, String value, boolean set) - throws SettingException { - addOrSet(m, name, translateProperty(name, value), set); - } - - private void addOrSetDefaultWithString( - Map m, String name, String value, boolean set) - throws SettingException { - addOrSetDefault(m, name, translateProperty(name, value), set); - } - - private void addOrSet(Map settingMap, boolean set) throws SettingException { - Map changed = new HashMap(); - Iterator it = settingMap.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - String name = (String) ent.getKey(); - Object value = ent.getValue(); - Object oldValue = values.get(name); - if (oldValue != null) { - changed.put(name, oldValue); - } - addOrSet(changed, name, value, set); - } - values.putAll(changed); - } - - private void addOrSetDefaults(Map settingMap, boolean set) - throws SettingException { - Map changed = new HashMap(); - Iterator it = settingMap.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - String name = (String) ent.getKey(); - Object value = ent.getValue(); - Object oldValue = values.get(name); - if (oldValue != null) { - changed.put(name, oldValue); - } - addOrSetDefault(changed, name, value, set); - } - values.putAll(changed); - } - - private void addOrSetWithStrings(Properties props, boolean set) - throws SettingException { - Map changed = new HashMap(); - Enumeration en = props.propertyNames(); - while (en.hasMoreElements()) { - String name = (String) en.nextElement(); - String value = props.getProperty(name); - Object oldValue = values.get(name); - if (oldValue != null) { - changed.put(name, oldValue); - } - addOrSetWithString(changed, name, value, set); - } - values.putAll(changed); - } - - private void addOrSetDefaultsWithStrings(Properties props, boolean set) - throws SettingException { - Map changed = new HashMap(); - Enumeration en = props.propertyNames(); - while (en.hasMoreElements()) { - String name = (String) en.nextElement(); - String value = props.getProperty(name); - Object oldValue = values.get(name); - if (oldValue != null) { - changed.put(name, oldValue); - } - addOrSetDefaultWithString(changed, name, value, set); - } - values.putAll(changed); - } - - private Object translateProperty(String name, String value) - throws SettingException { - SettingDefinition def = (SettingDefinition) defs.get(name); - if (def == null) { - throw newUnknownSettingException(name); - } - try { - return def.type.convertString(this, value, def.forceStr); - } catch (SettingException e) { - // addjust message - throw new SettingException( - "Problem with the value of setting " - + StringUtil.jQuote(name) + ": " + e.getMessage(), - e.getCause()); - } - } - - private SettingException newUnknownSettingException(String name) { - String s = findSimilar(name); - if (s == null) { - return new SettingException("Unknown setting " - + StringUtil.jQuote(name) + "."); - } else { - return new SettingException("Unknown setting " - + StringUtil.jQuote(name) + ". Maybe you meant to write " - + StringUtil.jQuote(s) + "."); - } - } - - /** - * Converts mixed-case setting name to dashed form, - * as sourceRoot to source-root. - */ - public static String getDashedName(String name) { - int ln = name.length(); - StringBuffer sb = new StringBuffer(ln + 4); - for (int i = 0; i < ln; i++) { - char c = name.charAt(i); - if (Character.isUpperCase(c)) { - sb.append("-"); - c = Character.toLowerCase(c); - } - sb.append(c); - } - return sb.toString(); - } - - private String findSimilar(String name) { - String s; - - s = (String) cmdLineNames.get(name); - if (s != null) { - return s; - } - - String lNameV1 = name.toLowerCase(); - String lNameV2 = lNameV1 + "s"; - String lNameV3 = lNameV1 + "es"; - String lNameV4; - if (lNameV1.endsWith("s")) { - lNameV4 = lNameV1.substring(0, lNameV1.length() - 1); - } else { - lNameV4 = null; - } - String lNameV5; - if (lNameV1.endsWith("es")) { - lNameV5 = lNameV1.substring(0, lNameV1.length() - 2); - } else { - lNameV5 = null; - } - Iterator it = defs.keySet().iterator(); - while (it.hasNext()) { - String dName = (String) it.next(); - String lName = dName.toLowerCase(); - if (lName.equals(lNameV1) - || lName.equals(lNameV2) - || lName.equals(lNameV3) - || (lNameV4 != null && lName.equals(lNameV4)) - || (lNameV5 != null && lName.equals(lNameV5))) { - return dName; - } - } - it = cmdLineNames.keySet().iterator(); - while (it.hasNext()) { - String dName = (String) it.next(); - String lName = dName.toLowerCase(); - if (lName.equals(lNameV1) - || lName.equals(lNameV2) - || lName.equals(lNameV3) - || (lNameV4 != null && lName.equals(lNameV4)) - || (lNameV5 != null && lName.equals(lNameV5))) { - return dName; - } - } - - return null; - } - - private static void stdDef( - String name, SettingType type, boolean merge, boolean forceStr) { - SettingDefinition def = new SettingDefinition( - name, type, merge, forceStr); - if (STD_DEFS.containsKey(def.name)) { - throw new BugException( - "Setting " + StringUtil.jQuote(def.name) - + " is already defined."); - } - STD_DEFS.put(def.name, def); - STD_STDCMDL.put(getDashedName(def.name), def.name); - } - - private static String typeName(Object value) { - if (value instanceof String) { - return "string"; - } else if (value instanceof Number) { - return "number"; - } else if (value instanceof Boolean) { - return "boolean"; - } else if (value instanceof List || value.getClass().isArray() - || value instanceof Vector) { - return "sequence"; - } else if (value instanceof Map || value instanceof Dictionary) { - return "hash"; - } else if (value instanceof FunctionCall) { - return "function call"; - } else { - return value.getClass().getName(); - } - } - - /** - * Backward compatibility hack: renames properties that use - * pre-FMPP 0.9.0 names of settings. - */ - public static void fixVersion08SettingNames(Properties props) - throws SettingException { - fixOldSettingName(props, - OLD_NAME_REMOVE_EXTENSION, - NAME_REMOVE_EXTENSIONS); - fixOldSettingName(props, - OLD_NAME_REMOVE_POSTFIX, - NAME_REMOVE_POSTFIXES); - fixOldSettingName(props, - OLD_NAME_REPLACE_EXTENSION, - NAME_REPLACE_EXTENSIONS); - } - - private static void fixOldSettingName( - Properties props, String oldName, String newName) - throws SettingException { - fixOldSettingName_inner(props, oldName, newName); - fixOldSettingName_inner( - props, - getDashedName(oldName), - getDashedName(newName)); - } - - private static void fixOldSettingName_inner( - Properties props, String oldName, String newName) - throws SettingException { - String s; - s = props.getProperty(oldName); - if (s != null) { - props.remove(oldName); - s = (String) props.setProperty(newName, s); - if (s != null) { - throw new SettingException( - "Old and new setting names are used together: Old \"" - + oldName + "\" and new (use this!) \"" - + newName + "\"."); - } - } - } - - private void load_common(File cfgFile, boolean defaults) - throws SettingException { - File baseOverride = (File) get(NAME_CONFIGURATION_BASE); - File inheritOverride = (File) get(NAME_INHERIT_CONFIGURATION); - Map savedSettings = values; - boolean done = false; - try { - values = new HashMap(); - load_inner(cfgFile, false, baseOverride, inheritOverride); - done = true; - } finally { - if (done) { - Map newSettings = values; - values = savedSettings; - savedSettings = new HashMap(values); - done = false; - try { - if (defaults) { - addDefaults(newSettings); - } else { - add(newSettings); - } - done = true; - } finally { - if (!done) { - values = savedSettings; - } - } - } else { - values = savedSettings; - } - } - } - - /** - * When you call this, the settings map must contain stuff only - * from this loading session. - */ - private void load_inner( - File cfgFile, boolean inherited, - File baseOverride, File inheritOverride) - throws SettingException { - String s; - File f; - boolean tddMode; - - if (cfgFile instanceof FileWithSettingValue - && ((FileWithSettingValue) cfgFile) - .getSettingValue().equals(VALUE_NONE)) { - return; //! - } - - try { - if (cfgFile.isDirectory()) { - f = new File(cfgFile, DEFAULT_CFG_FILE_NAME); - if (!f.exists()) { - f = new File(cfgFile, DEFAULT_CFG_FILE_NAME_OLD); - if (!f.exists()) { - throw new IOException("No file with name \"" - + DEFAULT_CFG_FILE_NAME + "\" or \"" - + DEFAULT_CFG_FILE_NAME_OLD + "\" exists in " - + "this directory: " - + cfgFile.getAbsolutePath()); - } - cfgFile = f; - } else { - cfgFile = f; - } - } - cfgFile = cfgFile.getCanonicalFile(); - s = cfgFile.getName().toLowerCase(); - tddMode = !(s.endsWith(".cfg") || s.endsWith(".properties")); - File inherit; - Map loaded; - if (tddMode) { - String text; - InputStream in = new FileInputStream(cfgFile); - try { - text = Interpreter.loadTdd(in, "ISO-8859-1"); - } finally { - in.close(); - } - FirstPhaseEvaluationEnvironment ee - = new FirstPhaseEvaluationEnvironment(this); - loaded = Interpreter.evalAsHash( - text, ee, false, cfgFile.getAbsolutePath()); - } else { - Properties props = new Properties(); - InputStream in = new FileInputStream(cfgFile); - try { - props.load(in); - } finally { - in.close(); - } - - fixVersion08SettingNames(props); - - undashNames(props); - trimValues(props); - loaded = props; - } - File oldBaseDir = baseDir; - try { - if (baseOverride != null) { - baseDir = baseOverride; - } else { - baseDir = cfgFile.getParentFile().getCanonicalFile(); - f = load_getMetaSetting( - loaded, NAME_CONFIGURATION_BASE, tddMode); - if (f != null) { - baseDir = f; - } - } - loaded.remove(NAME_CONFIGURATION_BASE); - if (!tddMode) { - loaded.remove(getDashedName(NAME_CONFIGURATION_BASE)); - } - - if (inheritOverride != null) { - inherit = inheritOverride; - } else { - inherit = load_getMetaSetting( - loaded, NAME_INHERIT_CONFIGURATION, tddMode); - } - loaded.remove(NAME_INHERIT_CONFIGURATION); - if (!tddMode) { - loaded.remove(getDashedName(NAME_INHERIT_CONFIGURATION)); - } - - if (inherited) { - if (tddMode) { - addDefaults(loaded); - } else { - addDefaultsWithStrings((Properties) loaded); - } - } else { - if (tddMode) { - add(loaded); - } else { - addWithStrings((Properties) loaded); - } - } - - if (inherit != null) { - load_inner(inherit, true, null, null); - } - } finally { - baseDir = oldBaseDir; - } - } catch (Throwable e) { - throw new SettingException( - (inherited - ? "Error loading inherited configuration file: " - : "Error loading configuration file: ") - + cfgFile.getAbsolutePath(), - e); - } - } - - private File load_getMetaSetting(Map m, String name, boolean tddMode) - throws SettingException, IOException { - Object o = m.get(name); - if (!tddMode) { - Object o2 = m.get(getDashedName(name)); - if (o == null) { - o = o2; - } else { - if (o2 != null) { - throw new SettingException("Setting " - + StringUtil.jQuote(name) - + " was specified twice, with different names: " - + StringUtil.jQuote(name) + " and " - + StringUtil.jQuote(getDashedName(name)) + "."); - } - } - } - if (o != null) { - if (!(o instanceof String)) { - throw new SettingException("Setting " - + StringUtil.jQuote(name) - + " must be a string (a path), but now it was a(n) " - + typeName(o) + "."); - } - File f = new File((String) o); - if (f.isAbsolute()) { - return new FileWithSettingValue( - f.getCanonicalPath(), (String) o); - } else { - return new FileWithSettingValue( - new File(baseDir, f.getPath()).getCanonicalPath(), - (String) o); - } - } else { - return null; - } - } - - private static void loadBorderChoosers(Engine eng, List ls) - throws SettingException { - eng.clearFooterChoosers(); - eng.clearHeaderChoosers(); - int layer = 0; - boolean layerUsed = false; - Iterator it = ls.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (!(obj instanceof FunctionCall)) { - throw new SettingException( - "All top-level sequence items must be function calls, " - + "but one of them is a(n) " + typeName(obj) + "."); - } - FunctionCall f = (FunctionCall) obj; - List params = f.getParams(); - Iterator it2 = params.iterator(); - while (it2.hasNext()) { - obj = it2.next(); - if (!(obj instanceof String)) { - throw new SettingException( - "All function call arguments must be strings, " - + "but one of them is a(n) " + typeName(obj) + "."); - } - } - String header = null; - String footer = null; - int i = 0; - if (f.getName().equals("header")) { - if (params.size() < 1) { - throw new SettingException( - "\"header\" function call needs at least " - + "1 argument."); - } - header = (String) params.get(i++); - } else if (f.getName().equals("footer")) { - if (params.size() < 1) { - throw new SettingException( - "\"footer\" function call needs at least " - + "1 argument."); - } - footer = (String) params.get(i++); - } else if (f.getName().equals("border")) { - if (params.size() < 2) { - throw new SettingException( - "\"border\" function call needs at least " - + "2 arguments, but it has " + params.size() - + " argument(s)."); - } - header = (String) params.get(i++); - footer = (String) params.get(i++); - } else if (f.getName().equals(FUNCTION_LAYER)) { - if (params.size() != 0) { - throw new SettingException( - "\"" + FUNCTION_LAYER + "\" function call doesn't " - + "allow arguments, but now it has " + params.size() - + " argument(s)."); - } - if (layerUsed) { - layer++; - layerUsed = false; - } - } else { - throw new SettingException( - "Invalid function: \"" + f.getName() + "\". " - + "Function should be one of: " - + "\"header\", \"footer\", \"border\", \"" + FUNCTION_LAYER + "\"."); - } - if (header != null || footer != null) { - layerUsed = true; - try { - if (i == params.size()) { - if (header != null) { - eng.addHeaderChooser( - layer, "**", header); - } - if (footer != null) { - eng.addFooterChooser( - layer, "**", footer); - } - } else { - for (; i < params.size(); i++) { - if (header != null) { - eng.addHeaderChooser( - layer, (String) params.get(i), header); - } - if (footer != null) { - eng.addFooterChooser( - layer, (String) params.get(i), footer); - } - } - } - } catch (IllegalArgumentException e) { - throw new SettingException( - "FMPP engine rejects the value.", e); - } - } - } - } - - private static void loadTurnChoosers(Engine eng, List ls) - throws SettingException { - eng.clearTurnChoosers(); - Iterator it = ls.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (!(obj instanceof FunctionCall)) { - throw new SettingException( - "All top-level sequence items must be function calls, " - + "but one of them is a(n) " + typeName(obj) + "."); - } - FunctionCall f = (FunctionCall) obj; - if (!f.getName().equals("turn")) { - throw new SettingException( - "Only \"turn\" function allowed here, not " - + StringUtil.jQuote(f.getName())); - } - - List params = f.getParams(); - - if (params.size() < 2) { - throw new SettingException( - "\"turn\" function call needs at least " - + "two parameters, but it has " + params.size() - + " parameter(s)."); - } - obj = params.get(0); - if (!(obj instanceof Integer)) { - throw new SettingException( - "The first argument to \"turn\" function call must " - + "be an integer, but it is a(n) " - + typeName(obj) + "."); - } - int turn = ((Integer) obj).intValue(); - for (int i = 1; i < params.size(); i++) { - obj = params.get(i); - if (!(obj instanceof String)) { - throw new SettingException( - "The arguments to \"turn\" function call after " - + "the first argument must be strings, but " - + "one of them is a(n) " + typeName(obj) + "."); - } - try { - eng.addTurnChooser((String) obj, turn); - } catch (IllegalArgumentException e) { - throw new SettingException( - "FMPP engine rejects the value.", e); - } - } - } - } - - private static void loadRemoveExtensions(Engine eng, List ls) - throws SettingException { - eng.clearRemoveExtensions(); - Iterator it = ls.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (!(obj instanceof String)) { - throw new SettingException( - "All sequence items must be strings, but " - + "one of the items is a(n) " + typeName(obj) + "."); - } - try { - eng.addRemoveExtension((String) obj); - } catch (IllegalArgumentException e) { - throw new SettingException( - "FMPP engine rejects the value.", e); - } - } - } - - private static void loadReplaceExtensions(Engine eng, List ls) - throws SettingException { - if (ls.size() % 2 != 0) { - throw new SettingException( - "The number of elements in the sequence " - + "must be even, but it is " + ls.size() + "."); - } - eng.clearReplaceExtensions(); - Iterator it = ls.iterator(); - while (it.hasNext()) { - Object obj1 = it.next(); - if (!(obj1 instanceof String)) { - throw new SettingException( - "All sequence items must be strings, but " - + "one of them is a(n) " + typeName(obj1) + "."); - } - Object obj2 = it.next(); - if (!(obj2 instanceof String)) { - throw new SettingException( - "All sequence items must be strings, but " - + "one of them is a(n) " + typeName(obj2) + "."); - } - try { - eng.addReplaceExtension((String) obj1, (String) obj2); - } catch (IllegalArgumentException e) { - throw new SettingException( - "FMPP engine rejects the value.", e); - } - } - } - - private static void loadRemovePostfixes(Engine eng, List ls) - throws SettingException { - eng.clearRemovePostfixes(); - Iterator it = ls.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (!(obj instanceof String)) { - throw new SettingException( - "All sequence items must be strings, but " - + "one of them is a(n) " + typeName(obj) + "."); - } - try { - eng.addRemovePostfix((String) obj); - } catch (IllegalArgumentException e) { - throw new SettingException( - "FMPP engine rejects the value.", e); - } - } - } - - private static void loadProcessingModeChoosers(Engine eng, List ls) - throws SettingException { - eng.clearModeChoosers(); - Iterator it = ls.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (!(obj instanceof FunctionCall)) { - throw new SettingException( - "All sequence items must be function calls, but " - + "one of them is a(n) " + typeName(obj) + "."); - } - FunctionCall f = (FunctionCall) obj; - int pmode; - if (f.getName().equals("execute")) { - pmode = Engine.PMODE_EXECUTE; - } else if (f.getName().equals("copy")) { - pmode = Engine.PMODE_COPY; - } else if (f.getName().equals("ignore")) { - pmode = Engine.PMODE_IGNORE; - } else if (f.getName().equals("renderXml")) { - pmode = Engine.PMODE_RENDER_XML; - } else { - throw new SettingException( - "Invalid function: \"" + f.getName() + "\". " - + "Function should be one of: " - + "\"execute\", \"copy\", \"ignore\"."); - } - List paths = f.getParams(); - Iterator it2 = paths.iterator(); - while (it2.hasNext()) { - obj = it2.next(); - if (!(obj instanceof String)) { - throw new SettingException( - "Arguments to \"" + f.getName() - + "\" function must be strings, but " - + "one of them is a(n) " + typeName(obj) + "."); - } - try { - eng.addModeChooser((String) obj, pmode); - } catch (IllegalArgumentException e) { - throw new SettingException( - "FMPP engine rejects the value.", e); - } - } - } - } - - private static void loadFreemarkerLinks(Engine eng, Map m) - throws IOException, SettingException { - Iterator it = m.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - String name = (String) ent.getKey(); - if (name.startsWith("@")) { - throw new SettingException("The FreeMarker link name itself " - + "can't start with @. The @ prefix is used only when " - + "you refer to a FreeMarker link. For example, if the " - + "link name is \"foo\", then you can refer to it as " - + "<#include '/@foo/something.ftl'>."); - } - List files = (List) ent.getValue(); - int ln = files.size(); - for (int i = 0; i < ln; i++) { - eng.addFreemarkerLink(name, (File) files.get(i)); - } - } - } - - private void loadXmlCatalogs( - Engine eng, List ls, Boolean preferPublic, Boolean allowCatalogPI) - throws InstallationException { - StringBuffer catalogs = new StringBuffer(); - Iterator it = ls.iterator(); - while (it.hasNext()) { - catalogs.append(((File) it.next()).getAbsolutePath()); - if (it.hasNext()) { - catalogs.append(';'); - } - } - - XmlDependentOps xmlOps = getXmlDependentOps("Setup XML catalogs."); - eng.setXmlEntityResolver( - xmlOps.createCatalogResolver( - catalogs.toString(), preferPublic, allowCatalogPI)); - } - - private static final String MSG_XML_RENDERING_OPT_ERROR - = "Problem with the options of an XML rendering in " - + "the \"" + NAME_XML_RENDERINGS + "\" setting: "; - - private void loadXmlRenderings(Engine eng, List ls) - throws SettingException, InstallationException { - String s; - Iterator it = ls.iterator(); - XmlDependentOps xmlOps = getXmlDependentOps("Setup XML renderings."); - while (it.hasNext()) { - Object o = it.next(); - if (!(o instanceof Map)) { - throw new SettingException( - "Problem with the value of a sequence item of " - + "the \"" + NAME_XML_RENDERINGS + "\" setting: " - + "The items of the sequence must be hashes, but " - + "one of the items is a " - + Interpreter.getTypeName(o) + "."); - } - - Map m = (Map) o; - XmlRenderingConfiguration xrc = new XmlRenderingConfiguration(); - - boolean copy; - o = m.get("copy"); - if (o == null) { - copy = false; - } else { - if (!(o instanceof Boolean)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The value of the \"copy\" option must be a " - + "boolean, but now it was a " - + Interpreter.getTypeName(o) + "."); - } - copy = ((Boolean) o).booleanValue(); - } - xrc.setCopy(copy); - - o = m.get("template"); - if (o == null) { - if (!copy) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The \"template\" option must be specified, " + "since the \"copy\" option is unspecified or " + "false."); - } - } else { - if (copy) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "You can't use the \"template\" option together " - + "with the \"copy\" option."); - } - if (!(o instanceof String)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The value of the \"template\" option must be a " - + "string, but now it was a " - + Interpreter.getTypeName(o) + "."); - } - xrc.setTemplate((String) o); - } - - o = m.get("xmlns"); - String defaultXmlns; - Map xmlns; - if (o != null) { - if (!(o instanceof Map)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The value of the \"xmlns\" option " - + "must be a hash, but now it was a " - + Interpreter.getTypeName(o) + "."); - } - xmlns = (Map) o; - - o = xmlns.get("D"); - if (o != null && !(o instanceof String)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The values stored in the \"xmlns\" " - + "map must be strings, but \"D\" is a " - + Interpreter.getTypeName(o) + "."); - } - defaultXmlns = (String) o; - } else { - xmlns = null; - defaultXmlns = null; - } - - Iterator it2 = m.entrySet().iterator(); - while (it2.hasNext()) { - Map.Entry ent = (Map.Entry) it2.next(); - String name = (String) ent.getKey(); - Object value = ent.getValue(); - if (name.equals("template") || name.equals("copy")) { - ; // do nothing - } else if (name.equals("ifSourceIs")) { - if (!(value instanceof List)) { - o = new ArrayList(1); - ((List) o).add(value); - value = o; - } - Iterator sourcesIt = ((List) value).iterator(); - while (sourcesIt.hasNext()) { - o = sourcesIt.next(); - if (!(o instanceof String)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The value of the \"ifSourceIs\" option " - + "must be a sequence of strings, but one " - + "of its items is a " - + Interpreter.getTypeName(o) + "."); - } - xrc.addSourcePathPattern((String) o); - } - } else if (name.equals("ifDocumentElementIs")) { - if (!(value instanceof List)) { - o = new ArrayList(1); - ((List) o).add(value); - value = o; - } - Iterator elementsIt = ((List) value).iterator(); - while (elementsIt.hasNext()) { - o = elementsIt.next(); - if (!(o instanceof String)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The value of the " + "\"ifDocumentElementIs\" " + "option must be a sequence strings, but " + "one of its items is a " - + Interpreter.getTypeName(o) + "."); - } - s = (String) o; - int cidx = s.indexOf(':'); - if (cidx == -1) { - xrc.addDocumentElement(defaultXmlns, s); - } else { - String prefix = s.substring(0, cidx); - o = xmlns == null ? null : xmlns.get(prefix); - if (o == null) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The value of the " - + "\"ifDocumentElementIs\" option uses " + "the " + StringUtil.jQuote(prefix) - + " XML name-space prefix, but that " - + "prefix is not defined with the " + "\"xmlns\" option."); - } - if (!(o instanceof String)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "Prefixes defined with the \"xmlns\" " - + "option must be associated with " - + "strings, but the " - + StringUtil.jQuote(prefix) - + " prefix is associated with a " - + Interpreter.getTypeName(o) + "."); - } - xrc.addDocumentElement( - (String) o, s.substring(cidx + 1)); - } - } // while (elementsIt.hasNext()) - } else if (name.equals("localDataBuilder")) { - if (!(value instanceof List)) { - o = new ArrayList(1); - ((List) o).add(value); - value = o; - } - Iterator ldbIt = ((List) value).iterator(); - while (ldbIt.hasNext()) { - o = ldbIt.next(); - if (!(o instanceof String)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "The value of \"localDataBulder\" " - + "must be a string (a BeanShell " - + "expression) but now it was a " - + Interpreter.getTypeName(value) + "."); - } - bsh.Interpreter bship = new bsh.Interpreter(); - try { - bship.set("engine", eng); - o = bship.eval((String) o); - } catch (EvalError e) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "Failed to evaluate the value of " + "\"localDataBulder\" as BeanShell " + "script.", - e); - } - if (!(o instanceof LocalDataBuilder)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "Problem with the value of the " - + "\"localDataBulder\" option: BeanShell " - + "expression " - + StringUtil.jQuote((String) value) - + " evaluates to an object which " - + (o != null - ? "doesn't implement " - + LocalDataBuilder.class - .getName() - + ". (The class of the " + "object is: " - + o.getClass().getName() + ")" - : "is null.")); - } - xrc.addLocalDataBuilder((LocalDataBuilder) o); - } - } else { - if (!xmlOps.isXmlDataLoaderOption(name)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "Unknown option: " + name); - } else { - if (name.equals("namespaceAware")) { - if (Boolean.FALSE.equals(value)) { - throw new SettingException( - MSG_XML_RENDERING_OPT_ERROR - + "It's not allowed to set the " - + "\"namespaceAware\" option to false " - + "for XML renderings."); - } - } - xrc.addXmlDataLoaderOption(name, value); - } - } - } // while hasNext in option entrySet - eng.addXmlRenderingConfiguration(xrc); - } // while hasNext in ls - } - - private XmlDependentOps getXmlDependentOps(String requiredForThis) - throws InstallationException { - if (xmlDependentOps == null) { - MiscUtil.checkXmlSupportAvailability(requiredForThis); - Class cl; - try { - cl = MiscUtil.classForName("fmpp.setting.XmlDependentOpsImpl"); - } catch (ClassNotFoundException e) { - throw new BugException( - "Failed to get fmpp.setting.XmlDependentOpsImpl.", e); - } catch (SecurityException e) { - throw new BugException( - "Failed to get fmpp.setting.XmlDependentOpsImpl.", e); - } - try { - xmlDependentOps = (XmlDependentOps) cl.newInstance(); - } catch (IllegalArgumentException e) { - throw new BugException( - "Failed to instantiate " + "fmpp.setting.XmlDependentOpsImpl", e); - } catch (IllegalAccessException e) { - throw new BugException( - "Failed to instantiate " - + "fmpp.setting.XmlDependentOpsImpl", e); - } catch (InstantiationException e) { - throw new BugException( - "Failed to instantiate " - + "fmpp.setting.XmlDependentOpsImpl", e); - } - } - return xmlDependentOps; - } - - // ------------------------------------------------------------------------- - // Public classes - - private static class SettingDefinition { - private final String name; - private final SettingType type; - private final boolean merge; - private final boolean forceStr; - - private SettingDefinition( - String name, SettingType type, boolean merge, - boolean forceStr) { - this.name = name; - this.type = type; - this.merge = merge; - this.forceStr = forceStr; - } - } - - private static class DataList extends ArrayList { - - private static final long serialVersionUID = 1L; - - public DataList(int initialCapacity) { - super(initialCapacity); - } - - } - - private interface SettingType { - /** - * Converts an object to the type of the setting. - * Warning! Do not modify the value object! - * The method must accept values that were earlier returned by this - * method. - */ - Object convert(Settings settings, Object value) - throws SettingException; - - /** - * Converts a string value to the type of the setting. Ther value is - * already trimmed. - */ - Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException; - - /** - * Merges two setting values. - *

    Warning! Do not modify the value objects! Create new object for - * the merged value. - *

    Both value parameter hold already conver-ed values. - */ - Object merge(Settings settings, Object defValue, Object value) - throws SettingException; - } - - private static class FirstPhaseEvaluationEnvironment - implements EvaluationEnvironment { - private int hashKeyLevel; - private int hashLevel; - private int sequenceLevel; - private int functionCallLevel; - private Settings settings; - private boolean inLocalData; - private boolean inFunctionCase; - - private FirstPhaseEvaluationEnvironment(Settings settings) { - this.settings = settings; - } - - public Object evalFunctionCall(FunctionCall fc, Interpreter ip) - throws Exception { - return fc; - } - - public Object notify( - int event, Interpreter ip, String name, Object extra) - throws SettingException { - if (event == EVENT_ENTER_HASH_KEY) { - hashKeyLevel++; - if (hashKeyLevel == 1) { - if (!settings.defs.containsKey(name)) { - String similar = settings.findSimilar(name); - throw new SettingException( - "No setting with name " - + StringUtil.jQuote(name) + " exists." - + (similar == null - ? "" - : " Maybe you meant to write " - + StringUtil.jQuote(similar) - + ".")); - } - if (name.equals(NAME_DATA)) { - return RETURN_FRAGMENT; - } - if (name.equals(NAME_LOCAL_DATA)) { - inLocalData = true; - } - } - } else if (event == EVENT_LEAVE_HASH_KEY) { - hashKeyLevel--; - if (hashKeyLevel == 0) { - inLocalData = false; - } - } else if (event == EVENT_ENTER_SEQUENCE) { - sequenceLevel++; - } else if (event == EVENT_LEAVE_SEQUENCE) { - sequenceLevel--; - } else if (event == EVENT_ENTER_HASH) { - hashLevel++; - if (inFunctionCase && sequenceLevel == 1 && hashLevel == 2 - && functionCallLevel == 1) { - return RETURN_FRAGMENT; - } - } else if (event == EVENT_LEAVE_HASH) { - hashLevel--; - } else if (event == EVENT_ENTER_FUNCTION_PARAMS) { - functionCallLevel++; - if (inLocalData && sequenceLevel == 1 && hashLevel == 1 - && functionCallLevel == 1 - && name.equals(FUNCTION_CASE)) { - inFunctionCase = true; - } - } else if (event == EVENT_LEAVE_FUNCTION_PARAMS) { - functionCallLevel--; - if (functionCallLevel == 0) { - inFunctionCase = false; - } - } - return null; - } - } - - private static class SequenceSettingType implements SettingType { - - public Object convert(Settings settings, Object value) - throws SettingException { - if (value instanceof List) { - return value; - } - if (value instanceof Vector) { - return new ArrayList((Vector) value); - } - if (value.getClass().isArray()) { - int ln = Array.getLength(value); - List ls = new ArrayList(ln); - for (int i = 0; i < ln; i++) { - ls.add(Array.get(value, i)); - } - return ls; - } - List ls = new ArrayList(1); - ls.add(value); - return ls; - } - - public Object convertString( - Settings settings, String value, boolean forceStr) - throws SettingException { - List ls; - try { - ls = Interpreter.evalAsSequence( - value, getEvaluationEnvironment(), forceStr, null); - } catch (EvalException e) { - throw new SettingException( - "Failed to parse the text as TDD sequence.", e); - } - // To let things work even if the user does this mistake: - // --some-sequ-option="[foo, bar, baz]" - // instead of - // --some-sequ-option="foo, bar, baz" - if (ls.size() == 1 && ls.get(0) instanceof List) { - return ls.get(0); - } - return ls; - } - - public Object merge(Settings settings, Object defValue, Object value) - throws SettingException { - List l1 = (List) defValue; - List l2 = (List) value; - List ls = new ArrayList(l1.size() + l2.size()); - ls.addAll(l2); - ls.addAll(l1); - return ls; - } - - protected EvaluationEnvironment getEvaluationEnvironment() { - return null; - } - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/setting/XmlDependentOps.java b/fmpp/src/main/java/fmpp/setting/XmlDependentOps.java deleted file mode 100644 index 7e4cb6b..0000000 --- a/fmpp/src/main/java/fmpp/setting/XmlDependentOps.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.setting; - -/** - * Encapsulates operations that dependend on J2SE 1.4 XML related classes. - * These are separated to prevent linkage errors when XML related - * classes are not available. - */ -interface XmlDependentOps { - Object createCatalogResolver( - String catalogs, Boolean preferPublic, Boolean allowCatalogPI); - - boolean isXmlDataLoaderOption(String optionName); -} diff --git a/fmpp/src/main/java/fmpp/setting/XmlDependentOpsImpl.java b/fmpp/src/main/java/fmpp/setting/XmlDependentOpsImpl.java deleted file mode 100644 index ae681d4..0000000 --- a/fmpp/src/main/java/fmpp/setting/XmlDependentOpsImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.setting; - -import java.util.Vector; - -import org.apache.xml.resolver.CatalogManager; -import org.apache.xml.resolver.tools.CatalogResolver; - -import fmpp.dataloaders.XmlDataLoader; - -/** - * Encapsulates operations that dependend on J2SE 1.4 XML related classes. - * These are separated to prevent linkage errors when XML related - * classes are not available. - */ -class XmlDependentOpsImpl implements XmlDependentOps { - - public Object createCatalogResolver( - String catalogs, Boolean preferPublic, Boolean allowCatalogPI) { - CatalogManager cm = new CatalogManager(); - cm.setIgnoreMissingProperties(true); - //cm.setVerbosity(9); - cm.setUseStaticCatalog(false); - if (preferPublic != null) { - cm.setPreferPublic(preferPublic.booleanValue()); - } - if (allowCatalogPI != null) { - cm.setAllowOasisXMLCatalogPI(allowCatalogPI.booleanValue()); - } - if (catalogs != null && catalogs.length() != 0) { - StringBuffer sb; - Vector v = cm.getCatalogFiles(); - if (v != null) { - sb = new StringBuffer(); - for (int i = 0; i < v.size(); i++) { - if (i != 0) { - sb.append(';'); - } - sb.append((String) v.get(i)); - } - } else { - sb = null; - } - if (sb != null && sb.length() != 0) { - cm.setCatalogFiles(catalogs + ";" + sb); - } else { - cm.setCatalogFiles(catalogs); - } - } - return new CatalogResolver(cm); - } - - public boolean isXmlDataLoaderOption(String optionName) { - return XmlDataLoader.isOptionName(optionName); - } -} diff --git a/fmpp/src/main/java/fmpp/setting/package.html b/fmpp/src/main/java/fmpp/setting/package.html deleted file mode 100644 index c57ef58..0000000 --- a/fmpp/src/main/java/fmpp/setting/package.html +++ /dev/null @@ -1,5 +0,0 @@ - -

    FMPP settings. FMPP settings is an abstraction over the FMPP core that - helps to write tools (front-ends) that can share configuration information, and - has similar setup rules from the view point of tool user. - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/tdd/DataLoader.java b/fmpp/src/main/java/fmpp/tdd/DataLoader.java deleted file mode 100644 index 349c3e6..0000000 --- a/fmpp/src/main/java/fmpp/tdd/DataLoader.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tdd; - -import java.util.List; - -import fmpp.Engine; - -/** - * Creates an object that will be accessed in FreeMarker templates. The typical - * usage is with the "data" setting, to load data from external sources as - * XML files, databases, etc. Different implementations of this interface know - * different kind of sources. - * - *

    Life-cycle: Data loaders are short-lived objects. They are created - * when the data has to load, and then they are discarded immediately, not - * reused. That is, the {@link #load} method is typically (but not by all means) - * invoked only once. If a data loader needs to maintain state during a - * processing session (such as cache data, pool connections, etc.) it should use - * engine attributes for that purpose (see {@link Engine#setAttribute}). - */ -public interface DataLoader { - /** - * @param args Arguments that the caller specifies for this directive call. - * Not null. - * The implementation should check if it understands all arguments, - * and it should throw java.lang.IllegalArgumentException - * if it doesn't. - * @return The object that will be accessed in FreeMarker templates. - * The object can be of any type. FreeMarker will wrap the object so - * that it is visible as an FTL variable. However, if the object - * implements freemarker.template.TemplateModel, then it - * will not be wrapped, as it is already an FTL variable. - */ - Object load(Engine e, List args) throws Exception; -} diff --git a/fmpp/src/main/java/fmpp/tdd/DataLoaderEvaluationEnvironment.java b/fmpp/src/main/java/fmpp/tdd/DataLoaderEvaluationEnvironment.java deleted file mode 100644 index f265758..0000000 --- a/fmpp/src/main/java/fmpp/tdd/DataLoaderEvaluationEnvironment.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tdd; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import fmpp.DataModelBuildingException; -import fmpp.Engine; -import fmpp.util.StringUtil; - -/** - * Evaluates function calls as data loader invocations. - */ -public class DataLoaderEvaluationEnvironment implements EvaluationEnvironment { - - private final Engine eng; - private final List mapStack = new ArrayList(); - private int disableMapStacking; - - public DataLoaderEvaluationEnvironment(Engine eng) { - this.eng = eng; - } - - public Object evalFunctionCall(FunctionCall fc, Interpreter ip) - throws Exception { - if (fc.getName().equals("get")) { - Map m = null; - List args = fc.getParams(); - int ln = args.size(); - for (int i = 0; i < ln; i++) { - Object o = args.get(i); - if (!(o instanceof String)) { - throw new DataModelBuildingException( - "Parameters to function \"get\" must be strings, " - + "but parameter at position " + (i + 1) + " is a " + Interpreter.getTypeName(o) + "."); - } - String name = (String) o; - if (m == null) { - o = findTopLevelVariable(name); - } else { - o = m.get(name); - } - if (o == null) { - if (i == 0) { - throw new DataModelBuildingException( - "No variable with name " - + StringUtil.jQuote(name) + " exists."); - } else { - throw new DataModelBuildingException( - "No sub-variable with name " - + StringUtil.jQuote(name) + " exists " - + "(referred by parameter at position " - + (i + 1) + ")."); - } - } - if (i == ln - 1) { - return o; //! - } - if (!(o instanceof Map)) { - throw new DataModelBuildingException( - "Parameter at position " + (i + 1) - + " must be the name of a hash variable, but " + "it is the name of a " - + Interpreter.getTypeName(o) + " variable."); - } - m = (Map) o; - } - throw new DataModelBuildingException( - "Function \"get\" needs at least 1 arguments. " - + "get(name, subName, subSubName, ...)"); - } else { - return TddUtil.getDataLoaderInstance( - eng, - fc.getName()).load(eng, fc.getParams()); - } - } - - /** - * Override this to help TDD get function to find top level - * variables. The default implementation finds top-level variables already - * created in the executing TDD expression, and then it tries to get the - * variable with {@link Engine#getData(String)}. - * - * @return the value of variable, or null if no variable - * with the given name exists. - */ - protected Object findTopLevelVariable(String name) { - for (int x = mapStack.size() - 1; x >= 0; x--) { - Object o = ((Map) mapStack.get(x)).get(name); - if (o != null) { - return o; - } - } - return eng.getData(name); - } - - public Object notify( - int event, Interpreter ip, String name, Object extra) { - if (event == EVENT_ENTER_SEQUENCE - || event == EVENT_ENTER_FUNCTION_PARAMS) { - disableMapStacking++; - } else if (event == EVENT_LEAVE_SEQUENCE - || event == EVENT_LEAVE_FUNCTION_PARAMS) { - disableMapStacking--; - } else if (disableMapStacking == 0) { - if (event == EVENT_ENTER_HASH) { - mapStack.add(extra); - } else if (event == EVENT_LEAVE_HASH) { - mapStack.remove(mapStack.size() - 1); - } - } - return null; - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/tdd/EvalException.java b/fmpp/src/main/java/fmpp/tdd/EvalException.java deleted file mode 100644 index 884ad99..0000000 --- a/fmpp/src/main/java/fmpp/tdd/EvalException.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tdd; - -import fmpp.util.ExceptionCC; -import fmpp.util.StringUtil; - -public class EvalException extends ExceptionCC { - public EvalException(String message) { - super(message); - } - - public EvalException(String message, Throwable cause) { - super(message, cause); - } - - public EvalException(String message, int position) { - super(message + StringUtil.LINE_BREAK - + "Error location: character " + (position + 1)); - } - - public EvalException(String message, int position, Throwable cause) { - super(message + StringUtil.LINE_BREAK - + "Error location: character " + (position + 1), - cause); - } - - public EvalException( - String message, String text, int position, String fileName) { - super(StringUtil.createSourceCodeErrorMessage( - message, text, position, fileName, 56)); - } - - public EvalException( - String message, String text, int position, String fileName, - Throwable cause) { - super(StringUtil.createSourceCodeErrorMessage( - message, text, position, fileName, 56), - cause); - } -} diff --git a/fmpp/src/main/java/fmpp/tdd/EvaluationEnvironment.java b/fmpp/src/main/java/fmpp/tdd/EvaluationEnvironment.java deleted file mode 100644 index 49c810e..0000000 --- a/fmpp/src/main/java/fmpp/tdd/EvaluationEnvironment.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tdd; - -/** - * Callbacks that let you control the behaviour of TDD expression evaluation. - */ -public interface EvaluationEnvironment { - /** - * The code of event that indicates that we have started to evaluate the - * value in a key:value pair. - */ - int EVENT_ENTER_HASH_KEY = 1; - - /** - * The code of event that indicates that we have finished to evaluate the - * value in a key:value pair. - */ - int EVENT_LEAVE_HASH_KEY = -1; - - /** - * The code of event that indicates that we have started to evaluate the - * parameter list in a function call. - */ - int EVENT_ENTER_FUNCTION_PARAMS = 3; - - /** - * The code of event that indicates that we have finished to evaluate the - * parameter list in a function call. - */ - int EVENT_LEAVE_FUNCTION_PARAMS = -3; - - /** - * The code of event that indicates that we have started to evaluate the - * items in a sequence. This does not include function call parameter lists. - */ - int EVENT_ENTER_SEQUENCE = 4; - - /** - * The code of event that indicates that we have finished to evaluate the - * items in a sequence. - */ - int EVENT_LEAVE_SEQUENCE = -4; - - - /** - * The code of event that indicates that we have started to evaluate the - * items in a hash. - */ - int EVENT_ENTER_HASH = 5; - - /** - * The code of event that indicates that we have finished to evaluate the - * items in a sequence. - */ - int EVENT_LEAVE_HASH = -5; - - Object RETURN_SKIP = new Object(); - - Object RETURN_FRAGMENT = new Object(); - - /** - * Evaluates the function call. This method may simply returns its - * parameter, which means that the function was not resolved, and thus the - * function call will be availble for further interpretation in the result - * of the TDD expression evaluation. - * - * @param fc the function call to evaluate. - * - * @return the return value of the function call. During the evaluation of - * a TDD expression, function calls will be replaced with their return - * values. - * If the return value is a {@link FunctionCall} object, it will not be - * evaluated again. This way, the final result of a TDD expression - * evaluation can contain {@link FunctionCall} objects. - */ - Object evalFunctionCall(FunctionCall fc, Interpreter ip) throws Exception; - - /** - * Notifies about an event during expression evaluation. - * - * @param event An EVENT_... constant. Further events may will - * be added later, so the implementation must silently ignore events - * that it does not know. It is guaranteed that for each - * EVENT_ENTER_... event there will be an - * EVENT_LEAVE_... event later, except if - * notifyContextChange has thrown exception during handling - * EVENT_ENTER_..., in which case it is guaranteed that - * there will be no corresponding EVENT_LEAVE_... event. - * @param ip the {@link Interpreter} instance that evaluates the text. - * The value returned by {@link Interpreter#getPosition()} will be - * the position in the text where the this even has been created: - *

      - *
    • {@link #EVENT_ENTER_HASH_KEY}: points the first character - * of the value of the key:value pair. - *
    • {@link #EVENT_ENTER_SEQUENCE}, {@link #EVENT_ENTER_HASH}, and - * {@link #EVENT_ENTER_FUNCTION_PARAMS}: points the first - * character after the [ and ( respectively. - *
    • {@link #EVENT_LEAVE_SEQUENCE}, {@link #EVENT_LEAVE_HASH}, and - * {@link #EVENT_LEAVE_FUNCTION_PARAMS}: points the - * terminating character, that is, the ] or ) - * or the character after the end of the string. - *
    - * @param name For {@link #EVENT_ENTER_HASH_KEY} and - * {@link #EVENT_ENTER_FUNCTION_PARAMS}, the name of the hash key or - * function. It is null otherwise. - * @param extra Even specific extra information. - *
      - *
    • For {@link #EVENT_ENTER_HASH}, {@link #EVENT_LEAVE_HASH}, - * {@link #EVENT_ENTER_SEQUENCE}, {@link #EVENT_LEAVE_SEQUENCE} it - * is the Map or List that is being - * built by the hash or sequence. It's OK to modify this - * Map or List. - *
    • For other events it's - * value is currently null. - *
    - * @return return The allowed return values and their meaning depends on - * the event. But return value null always means - * "do nothing special". The currently defiend non-null - * return values for the events: - *
      - *
    • {@link #EVENT_ENTER_HASH_KEY}: - *
        - *
      • {@link #RETURN_SKIP}: Skip the key:value - * pair. That is, the key:value pair will not be added to - * the map. The value expression will not be evaluated. - *
      • {@link #RETURN_FRAGMENT}: The value of the key:value pair - * will be the {@link Fragment} that stores the value - * expression. The value expression will not be evaluated. - * However, if the value is implicit boolean - * true, (i.e. you omit the value) then - * {@link #RETURN_FRAGMENT} has no effect. - *
      - *
    • - *
    • {@link #EVENT_ENTER_HASH} if the hash uses { and - * }): - *
        - *
      • {@link #RETURN_FRAGMENT}: The value of the hash will be - * the {@link Fragment} that stores the hash expression. - * The hash expression will not be evaluated. - *
      - *
    • - *
    - */ - Object notify(int event, Interpreter ip, String name, Object extra) - throws Exception; -} diff --git a/fmpp/src/main/java/fmpp/tdd/Fragment.java b/fmpp/src/main/java/fmpp/tdd/Fragment.java deleted file mode 100644 index cfbd3ae..0000000 --- a/fmpp/src/main/java/fmpp/tdd/Fragment.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tdd; - -/** - * Fragment extracted from a TDD expression. - */ -public class Fragment { - private final String text; - private final int fragmentStart; - private final int fragmentEnd; - private final String fileName; - - /** - * Creates new TDD fragment. - * - * @param text the full TDD text that contains the fragment. (In extreme - * case the fragment and the full text is the same.) - * @param fragmentStart the start index of the fragment in the text. - * @param fragmentEnd the start index of the fragment in the text - * @param fileName the name of the file the text comes from (for - * informational purposes only). It can be null if the source - * file is unknown or there is no source file. - */ - public Fragment( - String text, int fragmentStart, int fragmentEnd, String fileName) { - this.text = text; - this.fragmentStart = fragmentStart; - this.fragmentEnd = fragmentEnd; - this.fileName = fileName; - } - - /** - * Returns the name of the file the text comes from (for informational - * purposes only). It can be null if the source file is unknown - * or there is no source file. - */ - public String getFileName() { - return fileName; - } - - /** - * Returns the full TDD text that contains the fragmet. - */ - public String getText() { - return text; - } - - /** - * Returns the start index of the fragment in the text. - */ - public int getFragmentStart() { - return fragmentStart; - } - - /** - * Returns the end index (exclusive) of the fragment in the text. - */ - public int getFragmentEnd() { - return fragmentEnd; - } - - /** - * Returns the fragment text. - */ - public String toString() { - return text.substring(fragmentStart, fragmentEnd); - } -} diff --git a/fmpp/src/main/java/fmpp/tdd/FunctionCall.java b/fmpp/src/main/java/fmpp/tdd/FunctionCall.java deleted file mode 100644 index 40ebccf..0000000 --- a/fmpp/src/main/java/fmpp/tdd/FunctionCall.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tdd; - -import java.util.List; - -/** - * Symbolizes a TDD function call. - * Function calls that are not evaluated during the evaluation of a TDD - * expressions will be present in the result as the instances of this class. - */ -public class FunctionCall { - private final String name; - private final List params; - - public FunctionCall(String name, List params) { - this.name = name; - this.params = params; - } - - public String getName() { - return name; - } - - public List getParams() { - return params; - } - - public String toString() { - return Interpreter.dump(this); - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/tdd/Interpreter.java b/fmpp/src/main/java/fmpp/tdd/Interpreter.java deleted file mode 100644 index cb96529..0000000 --- a/fmpp/src/main/java/fmpp/tdd/Interpreter.java +++ /dev/null @@ -1,1728 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tdd; - -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import fmpp.util.BugException; -import fmpp.util.FileUtil; -import fmpp.util.MiscUtil; -import fmpp.util.StringUtil; - -/** - * Evaluates TDD expressions. - */ -public class Interpreter { - - /** - * Evaluates function calls to itself. - */ - public static final EvaluationEnvironment SIMPLE_EVALUATION_ENVIRONMENT - = new EvaluationEnvironment() { - public Object evalFunctionCall(FunctionCall f, Interpreter ip) { - return f; - } - - public Object notify( - int event, Interpreter ip, String name, Object extra) { - return null; - } - }; - - private static final boolean[] UQSTR_CHARS = { - true, // NUL (0) - true, // SOH (1) - true, // STX (2) - true, // ETX (3) - true, // EOT (4) - true, // ENQ (5) - true, // ACK (6) - true, // BEL (7) - true, // BS (8) - false, // HT (9) - false, // LF (10) - false, // VT (11) - false, // FF (12) - false, // CR (13) - true, // SO (14) - true, // SI (15) - true, // DLE (16) - true, // DC1 (17) - true, // DC2 (18) - true, // DC2 (19) - true, // DC4 (20) - true, // NAK (21) - true, // SYN (22) - true, // ETB (23) - true, // CAN (24) - true, // EM (25) - true, // SUB (26) - true, // ESC (27) - true, // FS (28) - true, // GS (29) - true, // RS (30) - true, // US (31) - false, // SP (32) - true, // ! (33) - false, // " (34) - true, // # (35) - true, // $ (36) - true, // % (37) - true, // & (38) - false, // ' (39) - false, // ( (40) - false, // ) (41) - true, // * (42) - false, // + (43) - false, // , (44) - true, // - (45) - true, // . (46) - true, // / (47) - true, // 0 (48) - true, // 1 (49) - true, // 2 (50) - true, // 3 (51) - true, // 4 (52) - true, // 5 (53) - true, // 6 (54) - true, // 7 (55) - true, // 8 (56) - true, // 9 (57) - false, // : (58) - false, // ; (59) - false, // < (60) - false, // = (61) - false, // > (62) - true, // ? (63) - true, // @ (64) - true, // A (65) - true, // B (66) - true, // C (67) - true, // D (68) - true, // E (69) - true, // F (70) - true, // G (71) - true, // H (72) - true, // I (73) - true, // J (74) - true, // K (75) - true, // L (76) - true, // M (77) - true, // N (78) - true, // O (79) - true, // P (80) - true, // Q (81) - true, // R (82) - true, // S (83) - true, // T (84) - true, // U (85) - true, // V (86) - true, // W (87) - true, // X (88) - true, // Y (89) - true, // Z (90) - false, // [ (91) - true, // \ (92) - false, // ] (93) - true, // ^ (94) - true, // _ (95) - true, // ` (96) - true, // a (97) - true, // b (98) - true, // c (99) - true, // d (100) - true, // e (101) - true, // f (102) - true, // g (103) - true, // h (104) - true, // i (105) - true, // j (106) - true, // k (107) - true, // l (108) - true, // m (109) - true, // n (110) - true, // o (111) - true, // p (112) - true, // q (113) - true, // r (114) - true, // s (115) - true, // t (116) - true, // u (117) - true, // v (118) - true, // w (119) - true, // x (120) - true, // y (121) - true, // z (122) - false, // { (123) - true, // | (124) - false, // } (125) - true, // ~ (126) - true, // (127) - true, // (128) - true, // (129) - true, // (130) - true, // (131) - true, // (132) - false, // NEL (133) - true, // (134) - true, // (135) - true, // (136) - true, // (137) - true, // (138) - true, // (139) - true, // (140) - true, // (141) - true, // (142) - true, // (143) - true, // (144) - true, // (145) - true, // (146) - true, // (147) - true, // (148) - true, // (149) - true, // (150) - true, // (151) - true, // (152) - true, // (153) - true, // (154) - true, // (155) - true, // (156) - true, // (157) - true, // (158) - true, // (159) - false // NBSP (160) - }; - - private int p; - private int ln; - EvaluationEnvironment ee; - private String tx; - private String fileName; - private boolean skipWSFoundNL; - - private Interpreter() { - } - - // ------------------------------------------------------------------------- - // Public static methods - - /** - * Evaluates text as single TDD expression. - * - * @param text the text to interpret. - * @param ee the {@link EvaluationEnvironment} used to resolve function - * calls. If it is null then - * {@link #SIMPLE_EVALUATION_ENVIRONMENT} will be used. - * @param forceStringValues specifies if expressions as true and - * 123 should be interpreted as strings, or as boolean and - * number respectively. - * @param fileName the path of the source file, or other description of the - * source. It is used for informative purposes only, as in error - * messages. - * - * @return the result of the evaluation. Possibly an empty - * Map, but never null. - */ - public static Object eval( - String text, EvaluationEnvironment ee, boolean forceStringValues, - String fileName) throws EvalException { - Interpreter ip = new Interpreter(); - ip.init(text, fileName, ee); - ip.skipWS(); - if (ip.p == ip.ln) { - throw ip.newSyntaxError("The text is empty."); - } - Object res = ip.fetchExpression(forceStringValues, false); - ip.skipWS(); - if (ip.p < ip.ln) { - throw ip.newSyntaxError("Extra character(s) after the expression."); - } - return res; - } - - /** - * Evaluates a {@link Fragment} as single TDD expression. The expression - * can be surrounded with superfluous white-space. - * - * @see #eval(String, EvaluationEnvironment, boolean, String) - */ - public static Object eval( - Fragment fragment, - EvaluationEnvironment ee, boolean forceStringValues) - throws EvalException { - Interpreter ip = new Interpreter(); - ip.init(fragment, ee); - ip.skipWS(); - if (ip.p == ip.ln) { - throw ip.newSyntaxError("The text is empty."); - } - Object res = ip.fetchExpression(forceStringValues, false); - ip.skipWS(); - if (ip.p < ip.ln) { - throw ip.newSyntaxError("Extra character(s) after the expression."); - } - return res; - } - - /** - * Same as eval(text, null, false, fileName). - * @see #eval(String, EvaluationEnvironment, boolean, String) - */ - public static Object eval(String text, String fileName) - throws EvalException { - return eval(text, null, false, fileName); - } - - /** - * Same as eval(text, null, false, null). - * @see #eval(String, EvaluationEnvironment, boolean, String) - */ - public static Object eval(String text) - throws EvalException { - return eval(text, null, false, null); - } - - /** - * Evaluates text as a list of key:value pairs. - * - * @param text the text to interpret. - * @param ee the {@link EvaluationEnvironment} used to resolve function - * calls. If it is null then - * {@link #SIMPLE_EVALUATION_ENVIRONMENT} will be used. - * @param forceStringValues specifies if expressions as true and - * 123 should be interpreted as strings, or as boolean and - * number respectively. - * @param fileName the path of the source file, or other description of the - * source. It is used for informative purposes only, as in error - * messages. - * - * @return the result of the evaluation. Possibly an empty - * Map, but never null. - */ - public static Map evalAsHash( - String text, EvaluationEnvironment ee, boolean forceStringValues, - String fileName) throws EvalException { - Interpreter ip = new Interpreter(); - ip.init(text, fileName, ee); - Map res = new HashMap(); - boolean done = false; - try { - try { - ip.ee.notify( - EvaluationEnvironment.EVENT_ENTER_HASH, - ip, null, res); - done = true; - } catch (Throwable e) { - throw ip.newWrappedError(e); - } - return ip.fetchHashInner(res, (char) 0x20, forceStringValues); - } finally { - if (done) { - try { - ip.ee.notify( - EvaluationEnvironment.EVENT_LEAVE_HASH, - ip, null, res); - } catch (Throwable e) { - throw ip.newWrappedError(e); - } - } - } - } - - /** - * Same as evalAsHash(text, null, false, null). - * @see #evalAsHash(String, EvaluationEnvironment, boolean, String) - */ - public static Map evalAsHash(String text) throws EvalException { - return evalAsHash(text, null, false, null); - } - - /** - * Same as evalAsHash(text, null, false, fileName). - * @see #evalAsHash(String, EvaluationEnvironment, boolean, String) - */ - public static Map evalAsHash(String text, String fileName) - throws EvalException { - return evalAsHash(text, null, false, fileName); - } - - /** - * Evaluates text as a list values. - * - * @param text the text to interpret. - * @param ee the {@link EvaluationEnvironment} used to resolve function - * calls. If it is null then - * {@link #SIMPLE_EVALUATION_ENVIRONMENT} will be used. - * @param forceStringValues specifies if expressions as true and - * 123 should be interpreted as strings, or as boolean and - * number respectively. - * @param fileName the path of the source file, or other description of the - * source. It is used for informative purposes only, as in error - * messages. - * - * @return the result of the evaluation. Possibly an empty - * List, but never null. - */ - public static List evalAsSequence( - String text, EvaluationEnvironment ee, boolean forceStringValues, - String fileName) throws EvalException { - Interpreter ip = new Interpreter(); - ip.init(text, fileName, ee); - List res = new ArrayList(); - boolean done = false; - try { - try { - ip.ee.notify( - EvaluationEnvironment.EVENT_ENTER_SEQUENCE, - ip, null, res); - done = true; - } catch (Throwable e) { - throw ip.newWrappedError(e); - } - return ip.fetchSequenceInner(res, (char) 0x20, forceStringValues); - } finally { - if (done) { - try { - ip.ee.notify( - EvaluationEnvironment.EVENT_LEAVE_SEQUENCE, - ip, null, res); - } catch (Throwable e) { - throw ip.newWrappedError(e); - } - } - } - } - - /** - * Same as evalAsList(text, null, false, null). - * @see #evalAsSequence(String, EvaluationEnvironment, boolean, String) - */ - public static List evalAsSequence(String text) - throws EvalException { - return evalAsSequence(text, null, false, null); - } - - /** - * Same as evalAsList(text, null, false, fileName). - * @see #evalAsSequence(String, EvaluationEnvironment, boolean, String) - */ - public static List evalAsSequence(String text, String fileName) - throws EvalException { - return evalAsSequence(text, null, false, fileName); - } - - /** - * Loads a TDD file with utilizing #encoding:enc header. - * If the header is missing, the encoding given as parameter is used. - * - * @param in the stream that reads the content of the file. - */ - public static String loadTdd(InputStream in, String defaultEncoding) - throws IOException { - byte[] b = FileUtil.loadByteArray(in); - return loadTdd(b, defaultEncoding); - } - - /** - * Loads a TDD file with utilizing #encoding:enc header. - * If the header is missing, the encoding given as parameter is used. - * - * @param b the content of the file. - */ - public static String loadTdd(byte[] b, String defaultEncoding) - throws IOException { - String de = detectEncoding(b); - if (de != null) { - defaultEncoding = de; - } - return new String(b, defaultEncoding); - } - - /** - * Converts an object to a TDD-like representation (not necessary valid - * TDD). - * @param value the object to convert - * @return the TDD "source code". - */ - public static String dump(Object value) { - StringBuffer buf = new StringBuffer(); - dumpValue(buf, value, ""); - return buf.toString(); - } - - public static String getTypeName(Object value) { - if (value instanceof String) { - return "string"; - } else if (value instanceof Number) { - return "number"; - } else if (value instanceof Boolean) { - return "boolean"; - } else if (value instanceof List) { - return "sequence"; - } else if (value instanceof Map) { - return "hash"; - } else if (value instanceof FunctionCall) { - return "function call"; - } else { - if (value != null) { - return value.getClass().getName(); - } else { - return "null"; - } - } - } - - // ------------------------------------------------------------------------- - // Public non-static methods - - public int getPosition() { - return p; - } - - public String getText() { - return tx; - } - - public String getFileName() { - return fileName; - } - - public EvaluationEnvironment getEvaluationEnvironment() { - return ee; - } - - // ------------------------------------------------------------------------- - // Private - - /** - * Fetches comma separated expressions. The expressions may surrounded with - * superflous WS. - * @param list destination list - * @param terminator The character that signals the end of the list. - * Use 0x20 for EOS. p will point to the terminator - * character when the method returns. - */ - private List fetchSequenceInner( - List list, char terminator, boolean forceStringValues) - throws EvalException { - int listP = p - 1; - skipWS(); - if (terminator == 0x20) { - listP = p; - } - - while (true) { - char c; - if (p < ln) { - c = tx.charAt(p); - if (c == terminator) { - return list; - } - if (c == ',') { - throw newSyntaxError( - "List item is missing before the comma."); - } - } else { - if (terminator == 0x20) { - return list; - } else { - throw newSyntaxError("Reached the end of the text, " - + "but the list was not closed with " - + StringUtil.jQuoteOrName(terminator) + ".", - listP); - } - } - list.add(fetchExpression(forceStringValues, false)); - c = skipSeparator( - terminator, null, "This is a list, and not a hash."); - if (c == terminator) { - return list; - } - } - } - - /** - * Fetches comma separated key:value pairs. The expressions can be - * surrounded with superflous WS. - * @param map destination map - * @param terminator The character that signals the end of the key:value - * pair list. - * Use 0x20 for EOS. p will point to the terminator - * character when the method returns. - */ - private Map fetchHashInner( - Map map, char terminator, boolean forceStringValues) - throws EvalException { - int p2; - - int mapP = p - 1; - skipWS(); - if (terminator == 0x20) { - mapP = p; - } - - // Key lookup - while (true) { - char c; - - if (p < ln) { - c = tx.charAt(p); - if (c == terminator) { - return map; - } - if (c == ',') { - throw newSyntaxError( - "Key-value pair is missing before the comma."); - } - } else { - if (terminator == 0x20) { - return map; - } else { - throw newSyntaxError("Reached the end of the text, " - + "but the map was not closed with " - + StringUtil.jQuoteOrName(terminator) + ".", - mapP); - } - } - - int keyP = p; - Object o1 = fetchExpression(false, true); - FunctionCall keyFunc; - if (o1 instanceof FunctionCall) { - keyFunc = (FunctionCall) o1; - try { - o1 = ee.evalFunctionCall(keyFunc, this); - } catch (Throwable e) { - throw newError("Failed to evaluate function " - + StringUtil.jQuote(keyFunc.getName()) + ".", - keyP, e); - } - } else { - keyFunc = null; - } - - c = skipSeparator(terminator, null, null); - if (c == ':') { - if (!(o1 instanceof String)) { - if (keyFunc != o1) { - throw newError( - "The key must be a String, but it is a(n) " - + getTypeName(o1) + ".", keyP); - } else { - throw newError( - "You can't use the function here, " - + "because it can't be evaluated " - + "in this context.", - keyP); - } - } - - if (p == ln) { - throw newSyntaxError( - "The key must be followed by a value because " - + "colon was used.", keyP); - } - - Object o2; - boolean done = false; - try { - Object nr; - try { - nr = ee.notify( - EvaluationEnvironment.EVENT_ENTER_HASH_KEY, - this, (String) o1, null); - done = true; - } catch (Throwable e) { - throw newWrappedError(e, keyP); - } - if (nr == null) { - o2 = fetchExpression(forceStringValues, false); - map.put(o1, o2); - } else { - p2 = p; - skipExpression(false); - if (nr == EvaluationEnvironment.RETURN_FRAGMENT) { - map.put(o1, new Fragment(tx, p2, p, fileName)); - } - } - } finally { - if (done) { - try { - ee.notify( - EvaluationEnvironment.EVENT_LEAVE_HASH_KEY, - this, (String) o1, null); - } catch (Throwable e) { - throw newWrappedError(e); - } - } - } - - c = skipSeparator(terminator, null, - "Colon is for separating the key from the value, " - + "and the value was alredy given previously."); - } else if (c == ',' || c == terminator || c == 0x20) { - if (keyFunc == null) { - if (o1 instanceof String) { - boolean done = false; - try { - Object nr; - try { - nr = ee.notify( - EvaluationEnvironment - .EVENT_ENTER_HASH_KEY, - this, (String) o1, null); - done = true; - } catch (Throwable e) { - throw newWrappedError(e, keyP); - } - if (nr == null - || nr == EvaluationEnvironment - .RETURN_FRAGMENT) { - map.put(o1, Boolean.TRUE); - } - } finally { - if (done) { - try { - ee.notify( - EvaluationEnvironment - .EVENT_LEAVE_HASH_KEY, - this, (String) o1, null); - } catch (Throwable e) { - throw newWrappedError(e); - } - } - } - } else if (o1 instanceof Map) { - map.putAll((Map) o1); - } else { - throw newError( - "This expression should be either a string " + "or a hash, but it is a(n) " - + getTypeName(o1) + ".", keyP); - } - } else { - if (o1 instanceof Map) { - map.putAll((Map) o1); - } else { - if (keyFunc == o1) { - throw newError( - "You can't use the function here, " - + "because it can't be evaluated " - + "in this context.", - keyP); - } else { - throw newError( - "Function doesn't evalute to a Map, but " - + "to " + getTypeName(o1) - + ", so it can't be merged into the hash.", - keyP); - } - } - } - } - if (c == terminator) { - return map; - } - } - } - - /** - * Fetches arbitrary expression. No surrounding superflous WS is allowed! - */ - private Object fetchExpression(boolean forceStr, boolean hashKey) - throws EvalException { - char c; - - if (p >= ln) { //!!a - throw new BugException("Calling fetchExpression when p >= ln."); - } - - c = tx.charAt(p); - - // Hash: - if (c == '{') { - Object nr; - p++; - Object res; - Map map = new HashMap(); - boolean done = false; - try { - try { - nr = ee.notify( - EvaluationEnvironment.EVENT_ENTER_HASH, - this, null, map); - done = true; - } catch (Throwable e) { - throw newWrappedError(e); - } - if (nr == null) { - fetchHashInner(map, '}', forceStr); - res = map; - } else { - p--; - int p2 = p; - skipExpression(false); - res = new Fragment(tx, p2, p, fileName); - p--; - } - } finally { - if (done) { - try { - ee.notify( - EvaluationEnvironment.EVENT_LEAVE_HASH, - this, null, map); - } catch (Throwable e) { - throw newWrappedError(e); - } - } - } - p++; - return res; //! - } - - // Sequence: - if (c == '[') { - p++; - List res = new ArrayList(); - boolean done = false; - try { - try { - ee.notify( - EvaluationEnvironment.EVENT_ENTER_SEQUENCE, - this, null, res); - done = true; - } catch (Throwable e) { - throw newWrappedError(e); - } - fetchSequenceInner(res, ']', forceStr); - } finally { - if (done) { - try { - ee.notify( - EvaluationEnvironment.EVENT_LEAVE_SEQUENCE, - this, null, res); - } catch (Throwable e) { - throw newWrappedError(e); - } - } - } - p++; - return res; //! - } - - int b = p; - - // Quoted string: - if (c == '"' || c == '\'') { - char q = c; - - p++; - while (p < ln) { - c = tx.charAt(p); - if (c == '\\') { - break; - } - p++; - if (c == q) { - return tx.substring(b + 1, p - 1); //! - } - } - if (p == ln) { - throw newSyntaxError( - "The closing " + StringUtil.jQuoteOrName(q) - + " of the string is missing.", - b); - } - - int bidx = b + 1; - StringBuffer buf = new StringBuffer(); - while (true) { - buf.append(tx.substring(bidx, p)); - if (p == ln - 1) { - throw newSyntaxError( - "The closing " + StringUtil.jQuoteOrName(q) - + " of the string is missing.", - b); - } - c = tx.charAt(p + 1); - switch (c) { - case '"': - buf.append('"'); - bidx = p + 2; - break; - case '\'': - buf.append('\''); - bidx = p + 2; - break; - case '\\': - buf.append('\\'); - bidx = p + 2; - break; - case 'n': - buf.append('\n'); - bidx = p + 2; - break; - case 'r': - buf.append('\r'); - bidx = p + 2; - break; - case 't': - buf.append('\t'); - bidx = p + 2; - break; - case 'f': - buf.append('\f'); - bidx = p + 2; - break; - case 'b': - buf.append('\b'); - bidx = p + 2; - break; - case 'g': - buf.append('>'); - bidx = p + 2; - break; - case 'l': - buf.append('<'); - bidx = p + 2; - break; - case 'a': - buf.append('&'); - bidx = p + 2; - break; - case '{': - buf.append('{'); - bidx = p + 2; - break; - case 'x': - case 'u': - { - p += 2; - int x = p; - int y = 0; - int z = (ln - p) > 4 ? p + 4 : ln; - while (p < z) { - char c2 = tx.charAt(p); - if (c2 >= '0' && c2 <= '9') { - y <<= 4; - y += c2 - '0'; - } else if (c2 >= 'a' && c2 <= 'f') { - y <<= 4; - y += c2 - 'a' + 10; - } else if (c2 >= 'A' && c2 <= 'F') { - y <<= 4; - y += c2 - 'A' + 10; - } else { - break; - } - p++; - } - if (x < p) { - buf.append((char) y); - } else { - throw newSyntaxError( - "Invalid hexadecimal UNICODE escape in " - + "the string literal.", - x - 2); - } - bidx = p; - break; - } - default: - if (isWS(c)) { - boolean hasWS = false; - bidx = p + 1; - do { - if (c == 0xA || c == 0xD) { - if (hasWS) { - break; - } - hasWS = true; - if (c == 0xD && bidx < ln - 1) { - if (tx.charAt(bidx + 1) == 0xA) { - bidx++; - } - } - } - bidx++; - if (bidx == ln) { - break; - } - c = tx.charAt(bidx); - } while (isWS(c)); - if (!hasWS) { throw newSyntaxError( - "Invalid usage of escape sequence " + "\\white-space. This escape sequence " - + "can be used only before " + "line-break."); - } - } else { - throw newSyntaxError( - "Invalid escape sequence \\" + c - + " in the string literal."); - } - } - p = bidx; - while (true) { - if (p == ln) { - throw newSyntaxError( - "The closing " + StringUtil.jQuoteOrName(q) - + " of the string is missing.", - b); - } - c = tx.charAt(p); - if (c == '\\') { - break; - } - if (c == q) { - buf.append(tx.substring(bidx, p)); - p++; - return buf.toString(); //! - } - p++; - } - } // while true - } // if quoted string - - // Raw string: - char c2; - if (p < ln - 1) { - c2 = tx.charAt(p + 1); - } else { - c2 = 0x20; - } - if (c == 'r' && (c2 == '"' || c2 == '\'')) { - char q = c2; - p += 2; - while (p < ln) { - c = tx.charAt(p); - p++; - if (c == q) { - return tx.substring(b + 2, p - 1); //! - } - } - throw newSyntaxError( - "The closing " + StringUtil.jQuoteOrName(q) - + " of the string is missing.", - b); - } - - // Unquoted string, boolean or number, or function call - uqsLoop: while (true) { - c = tx.charAt(p); - if (c <= 160) { - if (!UQSTR_CHARS[c] - && !(p == b && c == '+') - && !(!hashKey && c == ':')) { - break uqsLoop; - } - } else if (isWS(c)) { - break uqsLoop; - } - p++; - if (p == ln) { - break uqsLoop; - } - } - if (b == p) { - throw newSyntaxError("Unexpected character.", b); - } else { - String s = tx.substring(b, p); - int funcP = b; - int oldP = p; - c = skipWS(); - if (c == '(') { - p++; - List params; - boolean done = false; - try { - try { - ee.notify( - EvaluationEnvironment - .EVENT_ENTER_FUNCTION_PARAMS, - this, s, null); - } catch (Throwable e) { - throw newWrappedError(e, funcP); - } - done = true; - params = fetchSequenceInner(new ArrayList(), ')', forceStr); - } finally { - if (done) { - try { - ee.notify( - EvaluationEnvironment - .EVENT_LEAVE_FUNCTION_PARAMS, - this, s, null); - } catch (Throwable e) { - throw newWrappedError(e); - } - } - } - p++; - FunctionCall func = new FunctionCall(s, params); - if (!hashKey) { - try { - return ee.evalFunctionCall(func, this); //! - } catch (Throwable e) { - throw newError("Failed to evaluate function " - + StringUtil.jQuote(func.getName()) + ".", - b, e); - } - } else { - return func; - } - } else { - p = oldP; - if (!forceStr && !hashKey) { - if (s.equals("true")) { - return Boolean.TRUE; //! - } else if (s.equals("false")) { - return Boolean.FALSE; //! - } - c = s.charAt(0); - if ((c >= '0' && c <= '9') || c == '+' || c == '-') { - String s2; - if (c == '+') { - s2 = s.substring(1); // Integer(s) doesn't know +. - } else { - s2 = s; - } - try { - return new Integer(s2); //! - } catch (NumberFormatException exc) { - ; // ignore - } - try { - return new BigDecimal(s2); //! - } catch (NumberFormatException exc) { - ; // ignore - } - } - } - return s; //! - } // if not '(' - } // if b == p - } - - /** - * Skips a single expression. It's ignores syntax errors in the skipped - * expression as far as it is clean where the end of the expression is. - */ - private void skipExpression(boolean hashKey) throws EvalException { - char c; - - if (p >= ln) { //!!a - throw new BugException("Calling fetchExpression when p >= ln."); - } - - c = tx.charAt(p); - - // Hash: - if (c == '{') { - p++; - skipListing('}'); - p++; - return; - } - - // Sequence: - if (c == '[') { - p++; - skipListing(']'); - p++; - return; - } - - // Unresolved object in a dump: - if (c == '<') { - p++; - skipListing('>'); - p++; - return; - } - - // Just for durability: - if (c == '(') { - p++; - skipListing(')'); - p++; - return; - } - - int b = p; - - // Quoted string: - if (c == '"' || c == '\'') { - char q = c; - - p++; - while (p < ln) { - c = tx.charAt(p); - if (c == '\\') { - if (p != ln - 1) { - p++; - } - } - p++; - if (c == q) { - return; //! - } - } - throw newSyntaxError( - "The closing " + StringUtil.jQuoteOrName(q) - + " of the string is missing.", - b); - } // if quoted string - - // Raw string: - char c2; - if (p < ln - 1) { - c2 = tx.charAt(p + 1); - } else { - c2 = 0x20; - } - if (c == 'r' && (c2 == '"' || c2 == '\'')) { - char q = c2; - p += 2; - while (p < ln) { - c = tx.charAt(p); - p++; - if (c == q) { - return; //! - } - } - throw newSyntaxError( - "The closing " + StringUtil.jQuoteOrName(q) - + " of the string is missing.", - b); - } - - // Unquoted string, boolean or number, or function call - uqsLoop: while (true) { - c = tx.charAt(p); - if (c <= 160) { - if (!UQSTR_CHARS[c] - && !(p == b && c == '+') - && !(!hashKey && c == ':')) { - break uqsLoop; - } - } else if (isWS(c)) { - break uqsLoop; - } - p++; - if (p == ln) { - break uqsLoop; - } - } - if (b == p) { - throw newSyntaxError("Unexpected character.", b); - } else { - int oldP = p; - c = skipWS(); - if (c == '(') { - p++; - skipListing(')'); - p++; - } else { - p = oldP; - } // if not '(' - } // if b == p - } - - private void skipListing(char terminator) throws EvalException { - int listP = p - 1; - skipWS(); - if (terminator == 0x20) { - listP = p; - } - - while (true) { - char c; - if (p < ln) { - c = tx.charAt(p); - if (c == terminator) { - return; - } - } else { - if (terminator == 0x20) { - return; - } else { - throw newSyntaxError("Reached the end of the text, " - + "but the closing " - + StringUtil.jQuoteOrName(terminator) - + " is missing.", - listP); - } - } - if (c == ',' || c == ':' || c == ';' || c == '=') { - p++; - } else { - skipExpression(false); - } - c = skipWS(); - if (c == terminator) { - return; - } - } - } - - /** - * Fetches separator between whatever items. - * - * @return the separator, which is either or ',', - * or ':', or 0x20 for EOS, or - * terminator for the terminator character. - * ',' means comma separation, or separation with implied comma - * (i.e. sparation with NL). - * - *

    p will point the first character of the item (or the - * terminator character) after the skipped separator, unless an exception - * aborts the execution of the method. - * - * @param terminator the character that termiantes the sequence of - * separated. items. Use 0x20 for EOS. - * @param commaBadReason if not null, comma will not be - * accepted as separator, and it is the reason why. - * @param colonBadReason if not null, colon will not be - * accepted as separator, and it is the reason why. - */ - private char skipSeparator( - char terminator, String commaBadReason, String colonBadReason) - throws EvalException { - int intialP = p; - char c = skipWS(); - boolean plusConverted = false; - if (c == '+') { - // deprecated the old hash-union syntax - throw newSyntaxError( - "The + operator (\"hash union\") is deprecated since " - + "FMPP 0.9.0, and starting from FMPP 0.9.9 it is not " - + "allowed at all. Please use \"hash addition\" instead. " - + "For example, assuming that your configuration file is " - + "in .properties format (same as .cfg), instead of this:\n" - + "data={a:1, b:2} + properties(data/style.properties) + " - + "birds:csv(data/birds.csv)" - + "\nyour should write this:\n" - + "data=a:1, b:2, tdd(data/style.tdd), " - + "birds:csv(data/birds.csv)" - + "\nFor more information on hash addition please see:\n" - + "http://fmpp.sourceforge.net/tdd.html#hashAddition"); - } - if (c == ',' || c == ':') { - if (commaBadReason != null && c == ',') { - if (!plusConverted) { - throw newSyntaxError( - "Comma (,) shouldn't be used here. " - + commaBadReason); - } else { - throw newSyntaxError( - "Plus sign (+), which is treated as comma (,) " - + "in this case, shouldn't be used here. " - + commaBadReason); - } - } - if (colonBadReason != null && c == ':') { - throw newSyntaxError( - "Colon (:) shouldn't be used here. " + colonBadReason); - } - p++; - skipWS(); - return c; - } else if (c == terminator) { - return terminator; - } else if (c == ';') { - throw newSyntaxError( - "Semicolon (;) was unexpected here. If you want to " - + "separate items in a listing then use comma " - + "(,) instead."); - } else if (c == '=') { - throw newSyntaxError( - "Equals sign (=) was unexpected here. If you want to " - + "associate a key with a value then use " - + "colon (:) instead."); - } else { - if (c == 0x20) { - // EOS - return c; - } - if (skipWSFoundNL) { - // implicit comma - if (commaBadReason != null) { - throw newSyntaxError( - "Line-break shouldn't be used before this iteam as " - + "separator (which is the same as using comma). " - + commaBadReason); - } - return ','; - } else { - if (p == intialP) { - throw newSyntaxError("Character " - + StringUtil.jQuoteOrName(tx.charAt(p)) - + " shouldn't occur here."); - } else { - // WS* separator - throw newSyntaxError("No separator was used before " - + "the item. Items in listings should be " - + "separated with comma (,) or line-break. Keys " - + "and values in hashes should be separated with " - + "colon (:)."); - } - } - } - } - - /** - * Increments p until it finds non-WS character or EOS, also - * it transparently skips TDD comments. - * @return the non-WS char that terminates the WS, or 0x20 if EOS reached. - */ - private char skipWS() throws EvalException { - char c; - skipWSFoundNL = false; - while (p < ln) { - c = tx.charAt(p); - if (!isWS(c)) { - if (c == '#' && isLineEmptyBefore(p)) { - while (true) { - p++; - if (p == ln) { - return 0x20; //! - } - c = tx.charAt(p); - if (c == 0xA || c == 0xD) { - break; //! - } - } - } else if (c == '<' && p < ln - 3 - && tx.charAt(p + 1) == '#' - && tx.charAt(p + 2) == '-' - && tx.charAt(p + 3) == '-') { - int commentP = p; - while (true) { - p++; - if (p >= ln - 2) { - throw newSyntaxError( - "Comment was not closed with \"-->\".", - commentP); - } - if (tx.charAt(p) == '-' - && tx.charAt(p + 1) == '-' - && tx.charAt(p + 2) == '>') { - p += 2; - break; //! - } - } - } else { - return c; //! - } - } else if (c == 0xD || c == 0xA) { - skipWSFoundNL = true; - } - p++; - } - return 0x20; - } - - /** - * Checks if there is only WS* before the specified position in the line the - * pointed character belongs to. - */ - private boolean isLineEmptyBefore(int pos) { - pos--; - while (pos >= 0) { - char c = tx.charAt(pos); - if (c == 0xA || c == 0xD) { - return true; - } - if (!isWS(c)) { - return false; - } - pos--; - } - return true; - } - - /** - * (Re)inits the evaluator object. - */ - private void init(String text, String fileName, EvaluationEnvironment ee) { - p = 0; - skipWSFoundNL = false; - tx = text; - ln = text.length(); - this.fileName = fileName; - this.ee = ee == null ? SIMPLE_EVALUATION_ENVIRONMENT : ee; - } - - /** - * (Re)inits the evaluator object. - */ - private void init(Fragment fr, EvaluationEnvironment ee) { - p = fr.getFragmentStart(); - skipWSFoundNL = false; - tx = fr.getText(); - ln = fr.getFragmentEnd(); - this.fileName = fr.getFileName(); - this.ee = ee == null ? SIMPLE_EVALUATION_ENVIRONMENT : ee; - } - - private static final String ENCODING_COMMENT_1 = "encoding"; - private static final String ENCODING_COMMENT_2 = "charset"; - - /** - * Same as Character.isWhitespace, but counts BOM as WS too. - */ - private static boolean isWS(char c) { - return Character.isWhitespace(c) || c == 0xFEFF; - } - - private static String detectEncoding(byte[] b) { - char c; - String s; - int p = 0; - int ln = b.length; - - while (p < ln && Character.isWhitespace(toChar(b[p]))) { - p++; - } - if (p == ln) { - return null; - } - c = toChar(b[p]); - if (c != '#') { - // Windows Notepad's monster: UTF-8 with BOM - if (!(p <= ln - 3 - && c == 0xEF - && toChar(b[p + 1]) == 0xBB - && toChar(b[p + 2]) == 0xBF - && toChar(b[p + 3]) == '#')) { - return null; - } - p += 3; - } - p++; - p = detectEncoding_skipNonNLWS(b, p); - int bp = p; - while (p < ln) { - c = toChar(b[p]); - if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) { - break; - } - p++; - } - if (p - bp != ENCODING_COMMENT_1.length() - && p - bp != ENCODING_COMMENT_2.length()) { - return null; - } - try { - s = new String(b, bp, p - bp, "ISO-8859-1").toLowerCase(); - } catch (UnsupportedEncodingException e) { - throw new BugException("ISO-8859-1 decoding failed.", e); - } - if (!s.equals(ENCODING_COMMENT_1) && !s.equals(ENCODING_COMMENT_2)) { - return null; - } - p = detectEncoding_skipNonNLWS(b, p); - if (p == ln) { - return null; - } - c = toChar(b[p]); - if (c != ':') { - return null; - } - p++; - p = detectEncoding_skipNonNLWS(b, p); - if (p == ln) { - return null; - } - bp = p; - while (p < ln && !Character.isWhitespace(toChar(b[p]))) { - p++; - } - if (bp == p) { - return null; - } - try { - s = new String(b, bp, p - bp, "ISO-8859-1"); - } catch (UnsupportedEncodingException e) { - throw new BugException("ISO-8859-1 decoding failed.", e); - } - return s; - } - - private static int detectEncoding_skipNonNLWS(byte[] b, int p) { - int ln = b.length; - while (p < ln) { - char c = toChar(b[p]); - if (!Character.isWhitespace(c) || c == 0xD || c == 0xA) { - break; - } - p++; - } - return p; - } - - private static char toChar(byte b) { - return (char) (0xFF & b); - } - - private static void dumpMap(StringBuffer out, Map m, String indent) { - Iterator it = m.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - out.append( - indent - + StringUtil.jQuote((String) ent.getKey()) + ": "); - dumpValue(out, ent.getValue(), indent); - out.append(StringUtil.LINE_BREAK); - } - } - - private static void dumpMapSL(StringBuffer out, Map m) { - Iterator it = m.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry ent = (Map.Entry) it.next(); - out.append(StringUtil.jQuote((String) ent.getKey()) + ":"); - dumpValueSL(out, ent.getValue()); - if (it.hasNext()) { - out.append(", "); - } - } - } - - private static void dumpList(StringBuffer out, List ls, String indent) { - Iterator it = ls.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - out.append(indent); - dumpValue(out, obj, indent); - out.append(StringUtil.LINE_BREAK); - } - } - - private static void dumpListSL(StringBuffer out, List ls) { - Iterator it = ls.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - dumpValueSL(out, obj); - if (it.hasNext()) { - out.append(", "); - } - } - } - - private static void dumpValue(StringBuffer out, Object o, String indent) { - if (o instanceof Number || o instanceof Boolean) { - out.append(o); - } else if (o instanceof String) { - out.append(StringUtil.jQuote((String) o)); - } else if (o instanceof Map) { - out.append("{"); - out.append(StringUtil.LINE_BREAK); - dumpMap(out, (Map) o, indent + " "); - out.append(indent + "}"); - } else if (o instanceof List) { - out.append("["); - out.append(StringUtil.LINE_BREAK); - dumpList(out, (List) o, indent + " "); - out.append(indent + "]"); - } else if (o instanceof FunctionCall) { - FunctionCall dir = (FunctionCall) o; - out.append(dir.getName()); - out.append("("); - dumpListSL(out, dir.getParams()); - out.append(")"); - } else { - if (o == null) { - out.append(""); - } else { - out.append("<"); - out.append(o.getClass().getName()); - out.append(" "); - out.append(StringUtil.jQuote(o.toString())); - out.append(">"); - } - } - } - - private static void dumpValueSL(StringBuffer out, Object o) { - if (o instanceof Number || o instanceof Boolean) { - out.append(o); - } else if (o instanceof String) { - out.append(StringUtil.jQuote((String) o)); - } else if (o instanceof Map) { - out.append("{"); - dumpMapSL(out, (Map) o); - out.append("}"); - } else if (o instanceof List) { - out.append("["); - dumpListSL(out, (List) o); - out.append("]"); - } else if (o instanceof FunctionCall) { - FunctionCall dir = (FunctionCall) o; - out.append(dir.getName()); - out.append("("); - dumpListSL(out, dir.getParams()); - out.append(")"); - } else { - out.append("<"); - out.append(o.getClass().getName()); - out.append(" "); - out.append(StringUtil.jQuote(o.toString())); - out.append(">"); - } - } - - private EvalException newSyntaxError(String message) { - return newSyntaxError(message, p); - } - - private EvalException newSyntaxError(String message, int position) { - return new EvalException( - "TDD syntax error: " + message, tx, position, fileName); - } - - private EvalException newError(String message, int position) { - return new EvalException( - "TDD error: " + message, tx, position, fileName); - } - - private EvalException newError( - String message, int position, Throwable cause) { - return new EvalException( - "TDD error: " + message, tx, position, fileName, cause); - } - - private EvalException newWrappedError(Throwable e) { - return newWrappedError(e, p); - } - - private EvalException newWrappedError(Throwable e, int p) { - if (e instanceof EvalException) { - return (EvalException) e; - } - return new EvalException( - "Error while evaluating TDD: " + e.getMessage(), - tx, p, fileName, MiscUtil.getCauseException(e)); - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/tdd/TddUtil.java b/fmpp/src/main/java/fmpp/tdd/TddUtil.java deleted file mode 100644 index ab50ff5..0000000 --- a/fmpp/src/main/java/fmpp/tdd/TddUtil.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tdd; - -import fmpp.Engine; -import fmpp.dataloaders.CsvDataLoader; -import fmpp.dataloaders.EvalDataLoader; -import fmpp.dataloaders.HtmlUtilsDataLoader; -import fmpp.dataloaders.JSONDataLoader; -import fmpp.dataloaders.NowDataLoader; -import fmpp.dataloaders.PropertiesDataLoader; -import fmpp.dataloaders.SlicedTextDataLoader; -import fmpp.dataloaders.TddDataLoader; -import fmpp.dataloaders.TddSequenceDataLoader; -import fmpp.dataloaders.TextDataLoader; -import fmpp.util.InstallationException; -import fmpp.util.MiscUtil; - -/** - * Utility methods for TDD related tasks. - */ -public class TddUtil { - /** - * Resolves a data loader name to a data loader instance. - */ - public static DataLoader getDataLoaderInstance(Engine eng, String dlName) - throws EvalException { - if (eng == null) { - throw new IllegalArgumentException("Parameter eng can't be null."); - } - - DataLoader dl; - // Hard-linked data loaders - if (dlName.equals("properties")) { - return new PropertiesDataLoader(); - } else if (dlName.equals("json")) { - return new JSONDataLoader(); - } else if (dlName.equals("tdd")) { - return new TddDataLoader(); - } else if (dlName.equals("tddSequence")) { - return new TddSequenceDataLoader(); - } else if (dlName.equals("text")) { - return new TextDataLoader(); - } else if (dlName.equals("slicedText")) { - return new SlicedTextDataLoader(); - } else if (dlName.equals("csv")) { - return new CsvDataLoader(); - } else if (dlName.equals("eval")) { - return new EvalDataLoader(); - } else if (dlName.equals("htmlUtils")) { - return new HtmlUtilsDataLoader(); - } else if (dlName.equals("xhtmlUtils")) { - HtmlUtilsDataLoader f - = new HtmlUtilsDataLoader(); - f.setXHtml(true); - return f; - } else if (dlName.equals("now")) { - return new NowDataLoader(); - // On-demand linked data loaders: - } else if (dlName.equals("antProperty")) { - dlName = "fmpp.dataloaders.AntPropertyDataLoader"; - } else if (dlName.equals("antProperties")) { - dlName = "fmpp.dataloaders.AntPropertiesDataLoader"; - } else if (dlName.equals("antTask")) { - dlName = "fmpp.dataloaders.AntTaskDataLoader"; - } else if (dlName.equals("antProject")) { - dlName = "fmpp.dataloaders.AntProjectDataLoader"; - } else if (dlName.equals("xmlInfoset")) { - try { - eng.checkXmlSupportAvailability( - "Usage of xmlInfoset data loader."); - } catch (InstallationException e) { - throw new EvalException( - "Can't get xmlInfoset data loader", e); - } - dlName = "fmpp.dataloaders.XmlInfosetDataLoader"; - } else if (dlName.equals("xml")) { - try { - eng.checkXmlSupportAvailability( - "Usage of xml data loader."); - } catch (InstallationException e) { - throw new EvalException("Can't get xml data loader", e); - } - dlName = "fmpp.dataloaders.XmlDataLoader"; - } - - if (Character.isLowerCase(dlName.charAt(0)) - && dlName.indexOf('.') == -1) { - throw new EvalException( - "Unknown data loader: " + dlName); - } - - Class clazz; - try { - clazz = MiscUtil.classForName(dlName); - } catch (ClassNotFoundException exc) { - throw new EvalException( - "Data loader class not found: " + dlName); - } - - if (clazz.isInterface()) { - throw new EvalException( - "Data loader class must be a class, but this " - + "is an interface: " + clazz.getName()); - } - - if (!(DataLoader.class) - .isAssignableFrom(clazz)) { - throw new EvalException( - "Data loader class must implement " - + "fmpp.tdd.DataLoader interface, " - + "but this class doesn't implement that: " - + clazz.getName()); - } - try { - dl = (DataLoader) clazz.newInstance(); - } catch (InstantiationException exc) { - throw new EvalException( - "Failed to create an instance of " - + clazz.getName() + ": " - + exc); - } catch (IllegalAccessException exc) { - throw new EvalException( - "Failed to create an instance of " - + clazz.getName() + ": " - + exc); - } - return dl; - } - -} diff --git a/fmpp/src/main/java/fmpp/tdd/package.html b/fmpp/src/main/java/fmpp/tdd/package.html deleted file mode 100644 index 3283bdc..0000000 --- a/fmpp/src/main/java/fmpp/tdd/package.html +++ /dev/null @@ -1,9 +0,0 @@ - -

    Textual Data Definition related classes. - TDD is a very simple expression language created for defining hierarchical data - (vectors, dictionaries) as plain text (maybe a command-line argument). - Its syntax is similar to FreeMarker expression syntax. - -

    TDD is not for defining large amount of data. - Rather, it is for give a uniform syntax for simple setting (configuration) values.

    - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/tools/AntTask.java b/fmpp/src/main/java/fmpp/tools/AntTask.java deleted file mode 100644 index 07dbc4c..0000000 --- a/fmpp/src/main/java/fmpp/tools/AntTask.java +++ /dev/null @@ -1,640 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tools; - -import java.io.File; -import java.io.IOException; -import java.util.Properties; - -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.ProjectComponent; -import org.apache.tools.ant.Target; - -import fmpp.ProcessingException; -import fmpp.dataloaders.AntTaskDataLoader; -import fmpp.progresslisteners.AntProgressListener; -import fmpp.progresslisteners.LoggerProgressListener; -import fmpp.setting.FileWithSettingValue; -import fmpp.setting.SettingException; -import fmpp.setting.Settings; -import fmpp.util.MiscUtil; -import fmpp.util.RuntimeExceptionCC; -import fmpp.util.StringUtil; -import freemarker.log.Logger; - -/** - * Ant task to process files selected by pattern sets. - */ -public class AntTask extends org.apache.tools.ant.taskdefs.MatchingTask { - - private Properties initialOps = new Properties(); - private File dir; - private String configuration; - private boolean hasSourceFileAttr; - private boolean antTaskFailOnError = true; - private Boolean alwaysCreateDirsAltName; - private Boolean sourceRootAltName; - private Boolean outputRootAltName; - - public void setConfiguration(File outputFile) { - configuration = outputFile.getAbsolutePath(); - } - - public void setAntTaskFailOnError(boolean antTaskFailOnError) { - this.antTaskFailOnError = antTaskFailOnError; - } - - public void setConfigurationBase(File f) { - initialOps.setProperty( - Settings.NAME_CONFIGURATION_BASE, f.getAbsolutePath()); - } - - public void setInheritConfiguration(File f) { - initialOps.setProperty( - Settings.NAME_INHERIT_CONFIGURATION, f.getAbsolutePath()); - } - - public void setOutputFile(File outputFile) { - initialOps.setProperty( - Settings.NAME_OUTPUT_FILE, outputFile.getAbsolutePath()); - } - - public void setOutputRoot(File outputRoot) { - setOutputRoot_common(outputRoot, false); - } - - public void setDestDir(File outputRoot) { - setOutputRoot_common(outputRoot, true); - } - - public void setOutputRoot_common(File outputRoot, boolean alt) { - Boolean oAlt = alt ? Boolean.TRUE : Boolean.FALSE; - if (outputRootAltName != null && outputRootAltName != oAlt) { - throw new IllegalArgumentException( - "Can't use synonymous attributes together: " - + "outputroot and destdir"); - } - outputRootAltName = oAlt; - initialOps.setProperty( - Settings.NAME_OUTPUT_ROOT, outputRoot.getAbsolutePath()); - } - - public void setSourceFile(File sourceFile) { - hasSourceFileAttr = true; - initialOps.setProperty( - Settings.NAME_SOURCES, - StringUtil.jQuote(sourceFile.getAbsolutePath())); - } - - public void setSourceRoot(File sourceRoot) { - setSourceRoot_common(sourceRoot, false); - } - - public void setSrcDir(File sourceRoot) { - setSourceRoot_common(sourceRoot, true); - } - - public void setSourceRoot_common(File sourceRoot, boolean alt) { - Boolean oAlt = alt ? Boolean.TRUE : Boolean.FALSE; - if (sourceRootAltName != null && sourceRootAltName != oAlt) { - throw new IllegalArgumentException( - "Can't use synonymous attributes together: " - + "sourceroot and srcdir"); - } - sourceRootAltName = oAlt; - initialOps.setProperty( - Settings.NAME_SOURCE_ROOT, sourceRoot.getAbsolutePath()); - } - - public void setFreemarkerIncompatibleImprovements(String fmIcI) { - initialOps.setProperty( - Settings.NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS, fmIcI); - } - - public void setObjectWrapper(String objectWrapper) { - initialOps.setProperty( - Settings.NAME_OBJECT_WRAPPER, objectWrapper); - } - - public void setFreemarkerLinks(String freemarkerLinks) { - initialOps.setProperty( - Settings.NAME_FREEMARKER_LINKS, freemarkerLinks); - } - - public void setBorders(String border) { - if (initialOps.getProperty(Settings.NAME_BORDERS) != null) { - throw newMultipleDefinitionsException(Settings.NAME_BORDERS); - } - initialOps.setProperty(Settings.NAME_BORDERS, border); - } - - public void setCaseSensitive(boolean caseSensitive) { - initialOps.setProperty( - Settings.NAME_CASE_SENSITIVE, String.valueOf(caseSensitive)); - } - - public void setDataRoot(File dataRoot) { - initialOps.setProperty( - Settings.NAME_DATA_ROOT, dataRoot.getAbsolutePath()); - } - - public void setData(String data) { - if (initialOps.getProperty(Settings.NAME_DATA) != null) { - throw newMultipleDefinitionsException(Settings.NAME_DATA); - } - initialOps.setProperty(Settings.NAME_DATA, data); - } - - public void setLocalData(String localData) { - if (initialOps.getProperty(Settings.NAME_LOCAL_DATA) != null) { - throw newMultipleDefinitionsException(Settings.NAME_LOCAL_DATA); - } - initialOps.setProperty(Settings.NAME_LOCAL_DATA, localData); - } - - public void setTurns(String turn) { - if (initialOps.getProperty(Settings.NAME_TURNS) != null) { - throw newMultipleDefinitionsException(Settings.NAME_TURNS); - } - initialOps.setProperty(Settings.NAME_TURNS, turn); - } - - public void setExpert(boolean expert) { - initialOps.setProperty(Settings.NAME_EXPERT, String.valueOf(expert)); - } - - /** - * Same as {@link #setAlwaysCreateDirectories(boolean)}; added as this name - * is closer to the Ant naming conventions. - */ - public void setAlwaysCreateDirs(boolean copy) { - setAlwaysCreateDirs_common(copy, true); - } - - public void setAlwaysCreateDirectories(boolean copy) { - setAlwaysCreateDirs_common(copy, false); - } - - private void setAlwaysCreateDirs_common(boolean copy, boolean alt) { - Boolean oAlt = alt ? Boolean.TRUE : Boolean.FALSE; - if (alwaysCreateDirsAltName != null - && alwaysCreateDirsAltName != oAlt) { - throw new IllegalArgumentException( - "Can't use synonymous attributes together: " - + "alwaysCreateDirs and alwaysCreateDirectories"); - } - alwaysCreateDirsAltName = oAlt; - initialOps.setProperty( - Settings.NAME_ALWAYS_CREATE_DIRECTORIES, String.valueOf(copy)); - } - - public void setLocale(String locale) { - initialOps.setProperty(Settings.NAME_LOCALE, locale); - } - - public void setLogFile(File logFile) { - if (!logFile.equals(getProject().getBaseDir())) { // if not logFile="" - initialOps.setProperty( - Settings.NAME_LOG_FILE, logFile.getAbsolutePath()); - } - } - - public void setAppendLogFile(boolean append) { - initialOps.setProperty( - Settings.NAME_APPEND_LOG_FILE, String.valueOf(append)); - } - - public void setModes(String mode) { - if (initialOps.getProperty(Settings.NAME_MODES) != null) { - throw newMultipleDefinitionsException(Settings.NAME_MODES); - } - initialOps.setProperty(Settings.NAME_MODES, mode); - } - - public void setNumberFormat(String numberFormat) { - initialOps.setProperty(Settings.NAME_NUMBER_FORMAT, numberFormat); - } - - public void setBooleanFormat(String booleanFormat) { - initialOps.setProperty(Settings.NAME_BOOLEAN_FORMAT, booleanFormat); - } - - public void setDateFormat(String dateFormat) { - initialOps.setProperty(Settings.NAME_DATE_FORMAT, dateFormat); - } - - public void setTimeFormat(String timeFormat) { - initialOps.setProperty(Settings.NAME_TIME_FORMAT, timeFormat); - } - - public void setDateTimeFormat(String dateTimeFormat) { - initialOps.setProperty(Settings.NAME_DATETIME_FORMAT, dateTimeFormat); - } - - public void setTimeZone(String timeZone) { - initialOps.setProperty(Settings.NAME_TIME_ZONE, timeZone); - } - - public void setSQLDateAndTimeTimeZone(String timeZone) { - initialOps.setProperty(Settings.NAME_SQL_DATE_AND_TIME_TIME_ZONE, timeZone); - } - - public void setTagSyntax(String tagSyntax) { - initialOps.setProperty(Settings.NAME_TAG_SYNTAX, tagSyntax); - } - - public void setOutputEncoding(String outputEncoding) { - initialOps.setProperty(Settings.NAME_OUTPUT_ENCODING, outputEncoding); - } - - public void setUrlEscapingCharset(String urlEscapingCharset) { - initialOps.setProperty( - Settings.NAME_URL_ESCAPING_CHARSET, urlEscapingCharset); - } - - public void setXpathEngine(String engine) { - initialOps.setProperty(Settings.NAME_XPATH_ENGINE, engine); - } - - public void setXmlCatalogFiles(String files) { - initialOps.setProperty(Settings.NAME_XML_CATALOG_FILES, files); - } - - public void setXmlCatalogPrefer(String prefer) { - initialOps.setProperty(Settings.NAME_XML_CATALOG_PREFER, prefer); - } - - /* - public void setXmlCatalogAllowPi(String allow) { - initialOps.setProperty( - Settings.NAME_XML_CATALOG_ALLOW_PI, antBooleanToTdd(allow)); - } - */ - - public void setValidateXml(String validate) { - initialOps.setProperty( - Settings.NAME_VALIDATE_XML, antBooleanToTdd(validate)); - } - - public void setXmlRenderings(String prefer) { - if (initialOps.getProperty(Settings.NAME_XML_RENDERINGS) != null) { - throw newMultipleDefinitionsException(Settings.NAME_XML_RENDERINGS); - } - initialOps.setProperty(Settings.NAME_XML_RENDERINGS, prefer); - } - - public void setQuiet(String quiet) { - initialOps.setProperty(Settings.NAME_QUIET, antBooleanToTdd(quiet)); - } - - public void setReplaceExtensions(String replaceExtension) { - initialOps.setProperty( - Settings.NAME_REPLACE_EXTENSIONS, replaceExtension); - } - - public void setRemoveExtensions(String removeExtension) { - initialOps.setProperty( - Settings.NAME_REMOVE_EXTENSIONS, removeExtension); - } - - public void setRemovePostfixes(String removePostfix) { - initialOps.setProperty(Settings.NAME_REMOVE_POSTFIXES, removePostfix); - } - - public void setReplaceExtension(String replaceExtension) { - initialOps.setProperty( - Settings.OLD_NAME_REPLACE_EXTENSION, replaceExtension); - } - - public void setRemoveExtension(String removeExtension) { - initialOps.setProperty( - Settings.OLD_NAME_REMOVE_EXTENSION, removeExtension); - } - - public void setRemovePostfix(String removePostfix) { - initialOps.setProperty( - Settings.OLD_NAME_REMOVE_POSTFIX, removePostfix); - } - - public void setSourceEncoding(String sourceEncoding) { - initialOps.setProperty(Settings.NAME_SOURCE_ENCODING, sourceEncoding); - } - - public void setStopOnError(boolean stopOnError) { - initialOps.setProperty( - Settings.NAME_STOP_ON_ERROR, String.valueOf(stopOnError)); - } - - public void setSkipUnchanged(String skipUnchanged) { - initialOps.setProperty(Settings.NAME_SKIP_UNCHANGED, skipUnchanged); - } - - public void setTemplateData(String templateData) { - initialOps.setProperty(Settings.NAME_TEMPLATE_DATA, templateData); - } - - public void setDir(File dir) { - this.dir = dir; - } - - public void addConfiguredModes(AntAttributeSubstitution ats) { - doAttributeSubstitution(Settings.NAME_MODES, ats); - } - - public void addConfiguredData(AntAttributeSubstitution ats) { - doAttributeSubstitution(Settings.NAME_DATA, ats); - } - - public void addConfiguredLocalData(AntAttributeSubstitution ats) { - doAttributeSubstitution(Settings.NAME_LOCAL_DATA, ats); - } - - public void addConfiguredBorders(AntAttributeSubstitution ats) { - doAttributeSubstitution(Settings.NAME_BORDERS, ats); - } - - public void addConfiguredTurns(AntAttributeSubstitution ats) { - doAttributeSubstitution(Settings.NAME_TURNS, ats); - } - - public void addConfiguredXmlRenderings(AntAttributeSubstitution ats) { - doAttributeSubstitution(Settings.NAME_XML_RENDERINGS, ats); - } - - public void addConfiguredFreemarkerLinks(AntAttributeSubstitution ats) { - doAttributeSubstitution(Settings.NAME_FREEMARKER_LINKS, ats); - } - - public Target getTarget() { - return getOwningTarget(); - } - - public void execute() throws CausePrinterBuildException { - AntProgressListener antProgressListener; - LoggerProgressListener fileLogger = null; - - try { - Logger.selectLoggerLibrary(Logger.LIBRARY_NONE); - } catch (ClassNotFoundException e) { - throw new RuntimeExceptionCC( - "Failed to disable FreeMarker logging", e); - } - - Settings ss; - - try { - boolean singleFileMode; - boolean quiet; - boolean expert; - try { - ss = new Settings(getProject().getBaseDir()); - ss.setEngineAttribute( - AntTaskDataLoader.ATTRIBUTE_ANT_TASK, this); - - Settings.fixVersion08SettingNames(initialOps); - ss.addWithStrings(initialOps); - - if (configuration != null) { - ss.loadDefaults(new File(configuration)); - } - - FileWithSettingValue fws - = (FileWithSettingValue) - ss.get(Settings.NAME_LOG_FILE); - if (fws != null - && !fws.getSettingValue().equals(Settings.VALUE_NONE)) { - try { - Boolean append = (Boolean) - ss.get(Settings.NAME_APPEND_LOG_FILE); - fileLogger = new LoggerProgressListener( - fws, append != null && append.booleanValue()); - ss.addProgressListener(fileLogger); - } catch (IOException e) { - throw new SettingException( - "Failed to create log file.", e); - } - } - - // single file mode - if (ss.get(Settings.NAME_OUTPUT_FILE) != null) { - singleFileMode = true; - } else { - if (hasSourceFileAttr) { - throw new SettingException( - "Attribute \"sourceFile\" can be used in " - + "single file mode only."); - } - singleFileMode = false; - } - - // Disable CVS/SVN file and temporary file ignoring, - // as it interferes with defaultexcludes="no" - ss.add(Settings.NAME_IGNORE_CVS_FILES, Boolean.FALSE); - ss.add(Settings.NAME_IGNORE_SVN_FILES, Boolean.FALSE); - ss.add(Settings.NAME_IGNORE_TEMPORARY_FILES, Boolean.FALSE); - - try { - // Check for misconfigured output root - Object o = ss.get(Settings.NAME_EXPERT); - expert = o == null ? false : ((Boolean) o).booleanValue(); - o = ss.get(Settings.NAME_OUTPUT_ROOT); - if (o != null - && ((File) o).getCanonicalFile().equals( - getProject().getBaseDir() - .getCanonicalFile()) - && !expert) { - throw new SettingException( - "The output root directory is the same as the " - + "project base directory. Maybe something was " - + "misconfigured here? Use expert=\"yes\" to " + "allow this."); - } - } catch (IOException e) { - throw new SettingException( - "Output root directory or project base directory " + "caninalization failed.", - e); - } - - // Add listeners - try { - int q = Settings.quietSettingValueToInt( - (String) ss.get(Settings.NAME_QUIET), - Settings.NAME_QUIET); - quiet = q > 0; - } catch (SettingException e) { - throw new CausePrinterBuildException( - "Failed to interpret the value of setting \"" + Settings.NAME_QUIET + "\".", - e); - } - antProgressListener = new AntProgressListener( - this, quiet || singleFileMode); - ss.addProgressListener(antProgressListener); - - // Add more sources - if (!singleFileMode) { - File sourceRoot = (File) ss.get(Settings.NAME_SOURCE_ROOT); - if (sourceRoot == null) { - throw new CausePrinterBuildException( - "Setting \"" + Settings.NAME_SOURCE_ROOT - + "\" is not set."); - } - File scannerBase = dir != null ? dir : sourceRoot; - - String[] scanResults = MiscUtil.add( - getDirectoryScanner(scannerBase) - .getIncludedFiles(), - getDirectoryScanner(scannerBase) - .getIncludedDirectories()); - String[] sourceFiles = new String[scanResults.length]; - for (int i = 0; i < scanResults.length; i++) { - File f = new File(scannerBase, scanResults[i]); - sourceFiles[i] = f.getAbsolutePath(); - } - ss.add(Settings.NAME_SOURCES, sourceFiles); - - scanResults = getDirectoryScanner(scannerBase) - .getIncludedDirectories(); - String[] sourceDirectories = new String[scanResults.length]; - for (int i = 0; i < scanResults.length; i++) { - File f = new File(scannerBase, scanResults[i]); - sourceDirectories[i] = f.getAbsolutePath(); - } - } - } catch (SettingException e) { - if (fileLogger != null) { - fileLogger.println( - "Failed to initialize FMPP engine:" - + StringUtil.LINE_BREAK - + MiscUtil.causeMessages(e)); - fileLogger.printStackTrace(e); - } - throw new CausePrinterBuildException( - "Failed to initialize FMPP engine.", e); - } - - ss.setDontTraverseDirectories(true); - try { - ss.execute(); - if (antProgressListener.getErrorCount() != 0) { - if (antTaskFailOnError) { - throw new CausePrinterBuildException( - "FMPP Ant task failed: There were errors " + "during the processing session."); - } - } else if (singleFileMode && !quiet) { - log("File processed."); - } - } catch (ProcessingException e) { - // It's already logged by the progress listener, - // so no extra logging is needed here. - if (antTaskFailOnError) { - throw new CausePrinterBuildException( - "FMPP processing session failed.", e.getCause()); - } - } catch (SettingException e) { - // It was not logged by the progress listerner, as the - // processing session didn't started. Has to be logged - // into the log file here. - if (fileLogger != null) { - fileLogger.println(">>> TERMINATED WITH SETTING ERROR <<<"); - fileLogger.println(MiscUtil.causeMessages(e)); - fileLogger.printStackTrace(e); - } - - // And now this is for Ant: - throw new CausePrinterBuildException( - "Failed to initialize FMPP engine.", e); - } - } finally { - if (fileLogger != null) { - fileLogger.close(); - } - } - } - - /** - * Used internally (must be public class for technical reasons). - */ - public static class AntAttributeSubstitution extends ProjectComponent { - private String text; - private boolean expandProperties = false; - - public void setExpandProperties(boolean expandProperties) { - this.expandProperties = expandProperties; - } - - public void addText(String text) { - this.text = text; - } - - public String getText() { - if (text == null) { - text = ""; - } - if (expandProperties) { - return getProject().replaceProperties(text); - } - return text; - } - } - - private String antBooleanToTdd(String s) { - if (s != null) { - if (s.equals("no")) { - return "false"; - } else if (s.equals("yes")) { - return "true"; - } - } - return s; - } - - private void doAttributeSubstitution( - String settingName, AntAttributeSubstitution ats) { - if (initialOps.getProperty(settingName) != null) { - throw newMultipleDefinitionsException(settingName); - } - initialOps.setProperty(settingName, ats.getText()); - } - - private CausePrinterBuildException newMultipleDefinitionsException( - String setting) { - return new CausePrinterBuildException( - "You can't use both attribute \"" + setting - + "\" and element \"" + setting + "\", nor use the element " - + "for multiple times."); - } - - /** - * The message of this exception is the message given in the constructor - * plus the cause trace. This is required because Ant only prints the - * result of getMessage. - */ - class CausePrinterBuildException extends BuildException { - - private static final long serialVersionUID = 1L; - - public CausePrinterBuildException(String message) { - super(message); - } - - public CausePrinterBuildException(String message, Throwable exc) { - super( - message + StringUtil.LINE_BREAK + "Caused by: " - + MiscUtil.causeMessages(exc), - exc); - } - } -} diff --git a/fmpp/src/main/java/fmpp/tools/CommandLine.java b/fmpp/src/main/java/fmpp/tools/CommandLine.java deleted file mode 100644 index 1f5556e..0000000 --- a/fmpp/src/main/java/fmpp/tools/CommandLine.java +++ /dev/null @@ -1,1083 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.tools; - -import java.io.File; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.Arrays; -import java.util.Comparator; -import java.util.Iterator; -import java.util.Locale; -import java.util.Properties; - -import fmpp.Engine; -import fmpp.ProcessingException; -import fmpp.progresslisteners.ConsoleProgressListener; -import fmpp.progresslisteners.LoggerProgressListener; -import fmpp.progresslisteners.StatisticsProgressListener; -import fmpp.progresslisteners.TerseConsoleProgressListener; -import fmpp.setting.FileWithSettingValue; -import fmpp.setting.SettingException; -import fmpp.setting.Settings; -import fmpp.util.ArgsParser; -import fmpp.util.ArgsParser.OptionDefinition; -import fmpp.util.FileUtil; -import fmpp.util.MiscUtil; -import fmpp.util.NullOutputStream; -import fmpp.util.RuntimeExceptionCC; -import fmpp.util.StringUtil; -import freemarker.log.Logger; -import freemarker.template.Configuration; -import freemarker.template.Version; - -/** - * Command-line tool for preprocessing single files or entire directories. - */ -public class CommandLine { - - /** - * The number of console (terminal) columns can be passed in with this environment variable, supposedly by the - * OS-specific starter executable (shell script). Note that if the {@link Settings#NAME_COLUMNS} is set, that will - * override this (but by default it isn't set). The value of the environment variable should be just an integer - * (with possible white space around it), however, if it's not a number, {@link CommandLine} will attempt to parse - * it as the output of the Windows {@code mode con /status} command (also then {@code [BR]} can be used instead of - * real line-breaks, to ease bat programming). On UN*X-es usually this should be the output of {@code tput cols}. - */ - public static final String FMPP_CONSOLE_COLS = "FMPP_CONSOLE_COLS"; - - /** Use only as last resort! */ - private static final int DEFAULT_CONSOLE_COLS = 80; - - // Option keys: - private static final String OPTION_CONFIGURATION = "configuration"; - private static final String OPTION_PRINT_LOCALES = "print-locales"; - private static final String OPTION_VERSION = "version"; - private static final String OPTION_HELP = "help"; - private static final String OPTION_LONG_HELP = "long-help"; - - // Misc. static: - private static final String RC_FILE_NAME = ".fmpprc"; - private static final int EF_NORMAL = 0; - private static final int EF_TERSE = 1; - private static final int EF_QUIET = 2; - - // Option variables: - private boolean quiet; - private boolean printStackTrace; - - // Misc.: - private PrintWriter stdout; - private PrintWriter stderr; - private PrintWriter tOut; - private PrintWriter eOut; - private Integer screenCols; - private boolean loggingStarted = false; - private LoggerProgressListener logListener; - - /** - * Runs the command line interface. - * - * @see #FMPP_CONSOLE_COLS - */ - public static void main(String[] args) { - int exitCode = execute(args, null, null); - if (exitCode != 0) { - System.exit(exitCode); - } - } - - /** - * Emulates the command-line invocation of the tool. - * - * @param args the command line arguments - * @param stdout the PrintWriter used as stdout. - * If it is null then it defaults to the real stdout. - * @param stderr the PrintWriter used as stderr. - * If it is null then it defaults to the real stderr. - * - * @return exit code. 0 if everything was OK, non-0 if there was an error. - */ - public static int execute( - String[] args, PrintWriter stdout, PrintWriter stderr) { - CommandLine tool = new CommandLine(); - tool.stdout = - stdout == null ? new PrintWriter(System.out, true) : stdout; - tool.stderr = - stderr == null ? new PrintWriter(System.err, true) : stderr; - tool.tOut = tool.stdout; - tool.eOut = tool.tOut; - - tool.screenCols = getScreenColsFromEnvVar(); - - return tool.run(args); - } - - /** - * Returns the number of console columns passed in environment variable, or {@code null}. - * - * @see #FMPP_CONSOLE_COLS - */ - private static Integer getScreenColsFromEnvVar() { - String colsStr = System.getenv(FMPP_CONSOLE_COLS); - if (colsStr == null) return null; - colsStr = StringUtil.normalizeLinebreaks(colsStr); - colsStr = StringUtil.replace(colsStr, "[BR]", "\n"); - colsStr = colsStr.trim(); - if (colsStr.startsWith("CON:")) { // This is probably Windows `mode con /status` output. - String[] rows = StringUtil.split(colsStr, '\n'); - int cols = 0; - boolean colsFoundByName = false; - int rowsWithNumValue = 0; - findColumnsRow: for (int i = 0; i < rows.length; i++) { - String row = rows[i]; - int colonIdx = row.indexOf(':'); - if (colonIdx > 0) { - String rowValueStr = row.substring(colonIdx + 1).trim(); - Integer rowValue; - try { - rowValue = Integer.valueOf(rowValueStr); - } catch (NumberFormatException e) { - rowValue = null; - } - if (rowValue != null) { - rowsWithNumValue++; - - String rowLabel = row.substring(0, colonIdx).trim().toLowerCase(); - if ("columns".equals(rowLabel) || "cols".equals(rowLabel) || "spalten".equals(rowLabel) - || "colonnes".equals(rowLabel) || "columnas".equals(rowLabel) - || "\uF99C".equals(rowLabel)) { - cols = rowValue.intValue(); - colsFoundByName = true; - break findColumnsRow; - } - - // The 2nd column with numerical value used to be the number of columns: - if (rowsWithNumValue == 2) { - cols = rowValue.intValue(); - } - } - } - } - // If not found by name, some heuristics to decide if the output of "mode con" has changed too much for - // safe parsing. - if (colsFoundByName || (rowsWithNumValue >= 4 && cols >= 20 && cols < 800)) { - return new Integer(cols); - } else { - return null; - } - } else { - try { - return Integer.valueOf(colsStr); - } catch (NumberFormatException e) { - return null; - } - } - } - - private int run(String[] args) { - String s; - int i; - int exitCode = 0; - - try { - Logger.selectLoggerLibrary(Logger.LIBRARY_NONE); - } catch (ClassNotFoundException e) { - throw new RuntimeExceptionCC( - "Failed to disable FreeMarker logging", e); - } - - File rcFile = null; - s = System.getProperty("user.home"); - if (s != null) { - rcFile = new File(s, RC_FILE_NAME); - if (!rcFile.isFile()) { - rcFile = null; - } - } - if (rcFile == null) { - s = System.getProperty("fmpp.userHome"); - if (s != null) { - rcFile = new File(s, RC_FILE_NAME); - if (!rcFile.isFile()) { - rcFile = null; - } - } - } - if (rcFile == null) { - // Windows hack... - s = System.getProperty("fmpp.home"); - if (s != null && !s.startsWith("%")) { - rcFile = new File(s, RC_FILE_NAME); - if (!rcFile.isFile()) { - rcFile = null; - } - } - } - int impliedEchoFormat = EF_NORMAL; - boolean impliedPrintStackTrace = false; - boolean impliedAppendLogFile = false; - int impliedQuiet = 0; - if (rcFile != null) { - try { - Settings fmpprc = new Settings(new File("."));; - fmpprc.load(rcFile); - Iterator it = fmpprc.getNames(); - while (it.hasNext()) { - String key = (String) it.next(); - String value; - if (key.equals(Settings.NAME_ECHO_FORMAT)) { - value = (String) fmpprc.get(key); - impliedEchoFormat = echoFormatOpToInt( - value, false, key); - } else if (key.equals(Settings.NAME_PRINT_STACK_TRACE)) { - impliedPrintStackTrace - = ((Boolean) fmpprc.get(key)).booleanValue(); - } else if (key.equals(Settings.NAME_SNIP)) { - impliedPrintStackTrace - = !((Boolean) fmpprc.get(key)).booleanValue(); - } else if (key.equals(Settings.NAME_APPEND_LOG_FILE)) { - impliedAppendLogFile - = ((Boolean) fmpprc.get(key)).booleanValue(); - } else if (key.equals(Settings.NAME_COLUMNS)) { - screenCols = (Integer) fmpprc.get(key); - } else if (key.equals(Settings.NAME_QUIET)) { - value = (String) fmpprc.get(key); - impliedQuiet - = Settings.quietSettingValueToInt(value, key); - } else { - throw new SettingException( - "Setting \"" + key + "\" is not allowed in " + ".fmpprc. In general, not setting that " - + "could influence the output files can be " + "set here."); - } - } - } catch (SettingException e) { - p("Error loading .fmpprc."); - p(MiscUtil.causeMessages(e)); - return -1; - } - } - - final File defaultCfg = Settings.getDefaultConfigurationFile(new File(".")); - if (args.length == 0 && defaultCfg == null) { - printHelp(null); - return -1; - } - - try { - - // ----------------------------------------------------------------- - // Parse cmd line - - ArgsParser ap = new ArgsParser(); - - OptionDefinition od; - ap.addOption("S DIR", cln(Settings.NAME_SOURCE_ROOT)) - .desc("Sets the root directory of source files. " - + "In bulk-mode it defaults to the current " + "working directory."); - ap.addOption("O DIR", cln(Settings.NAME_OUTPUT_ROOT)) - .desc("Sets the root directory of output files."); - ap.addOption("o FILE", cln(Settings.NAME_OUTPUT_FILE)) - .desc("The output file. This switches FMPP to single-file " - + "mode."); - ap.addOption(null, cln(Settings.NAME_FREEMARKER_LINKS) + "=MAP") - .desc("The map of FreeMarker links (external includes)."); - ap.addOption("U WHAT", cln(Settings.NAME_SKIP_UNCHANGED)) - .desc("Skip files if the source was not modified " - + "after the output file was last modified. " - + " can be \"all\", \"none\" or \"static\""); - ap.addOption(null, cln(Settings.NAME_DATA_ROOT) + "=DIR") - .desc("Sets the root directory of data files. " - + "The reserved value \"source\" means that the " - + "data root is the same as the source root. " - + "The default value is \"source\"."); - ap.addOption("C FILE", OPTION_CONFIGURATION) - .desc("Load settings from a configuration " - + "file. Settings given with command-line options " + "have higher priority (note that some settings " - + "are merged, rather than overridden). " - + "Be default fmpp will use " + "./config.fmpp or ./fmpp.cfg if that exists. " + "Use value \"none\" (-C none) to prevent this."); - ap.addOption(null, - cln(Settings.NAME_INHERIT_CONFIGURATION) + " FILE") - .desc("Inherits options from a configuration file. " - + "The options in the primary configuration " + "file (-C) has higher precednece."); - ap.addOption("M SEQ", cln(Settings.NAME_MODES)) - .desc("The list of TDD function calls that choose the file " - + "processing mode, e.g.:\n" - + "-M \"ignore(**/tmp/), execute(**/*.htm, " + "**/*.html), copy(**/*)\""); - ap.addOption(null, cln(Settings.NAME_TURNS) + "=SEQ") - .desc("The list of turn(...)-s that choose the " - + "turns of processings, e.g.:\n" - + "--turns \"turn(2, **/*_t2.*, ), " - + "turn(3, **/*_t3.*, **/*.toc)\"\n" - + "By default all files will be procesed in the " - + "first turn."); - ap.addOption(null, cln(Settings.NAME_BORDERS) + "=SEQ") - .desc("The list of TDD function calls that choose header " - + "and footer for templates, e.g.:\n" - + "-M 'border(\"<#escape x as x?html>\", " - + "\"\", *.htm, *.html), " - + "header(\"<#include \\\"/css.ftl\\\">\", *.css)'" - ); - ap.addOption("D TDD", cln(Settings.NAME_DATA)) - .desc("Creates shared data that all template will see. " - + " is the Textual Data Definition, e.g.:\n" - + "-D \"properties(style.properties), " + "onLine:true\"\n" - + "Note that paths like \"style.properties\" are " - + "relatve to the data root directory."); - Version maxFMVer = Configuration.getVersion(); - Version defFMVer = Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS; - ap.addOption(null, cln(Settings.NAME_FREEMARKER_INCOMPATIBLE_IMPROVEMENTS) + "=VER") - .desc("Enables the FreeMarker fixes/improvements that are not 100% backward compatible, and " - + "were implemented in FreeMarker version . " - + "In older projects using the highest available 2.3.x is usually a good " - + "compromise. New projects should use the maximum, which is currently \"" - + maxFMVer.getMajor() + "." + maxFMVer.getMinor() + "." + maxFMVer.getMicro() + "\". " - + "The default is \"" - + defFMVer.getMajor() + "." + defFMVer.getMinor() + "." + defFMVer.getMicro() + "\"."); - ap.addOption(null, cln(Settings.NAME_OBJECT_WRAPPER) + "=BSH") - .desc("Specifies the ObjectWrapper to use with a BeanShell " - + "expression that must evaluate to an object " - + "that extends BeansWrapper. The default value is " - + "a BeansWrapper instance with simpleMapWrapper " - + "set to true."); - ap.addOption(null, cln(Settings.NAME_LOCAL_DATA) + "=SEQ") - .desc("Creates data that is visible only for certain " - + "templates. This is a list of case(...) and " + "layer() function calls."); - ap.addOption(null, cln(Settings.NAME_TEMPLATE_DATA) + "=CLASS") - .desc("Creates Java object that builds data for " - + "individual templates.") - .hide(); - ap.addOption("s", cln(Settings.NAME_STOP_ON_ERROR)) - .propertyValue("true") - .implied() - .desc("Terminate fmpp on failed file processing. " - + "This is the default behaviour. " - + "Use -c to override this."); - ap.addOption("c", "continue-on-error") - .property(cln(Settings.NAME_STOP_ON_ERROR), "false") - .implied() - .desc("Skip to the next file on failed file processing " - + "(and log the error: see -L)"); - ap.addOption("E ENC", cln(Settings.NAME_SOURCE_ENCODING)) - .desc("The encoding of textual sources (templates). " - + "Use the special value \"host\" (-E host) if the " - + "default encoding of the host machine should " - + "be used. The default is " - + "\"ISO-8859-1\"."); - ap.addOption(null, cln(Settings.NAME_OUTPUT_ENCODING) + "=ENC") - .desc("The encoding of template output. Use the special " - + "value \"source\" if the encoding of the " - + "template file should be used. " - + "Use the special value \"host\" if the " - + "default encoding of the host machine should " - + "be used. " - + "The default is \"source\"."); - ap.addOption(null, cln(Settings.NAME_URL_ESCAPING_CHARSET) + "=ENC") - .desc("The charset used for URL escaping. Use the special " - + "value \"output\" if the encoding of the " - + "output file should be used. " - + "The default is \"output\"."); - ap.addOption("A LOC", cln(Settings.NAME_LOCALE)) - .desc("The locale (as ar_SA). Use the special value " - + "\"host\" (-A host) if the default locale of " - + "the host machine should be used. " - + "The default value of the option is en_US."); - ap.addOption(null, cln(Settings.NAME_NUMBER_FORMAT) + "=FORMAT") - .desc("The number format used to show numerical values. " - + "The default is 0.############"); - ap.addOption(null, cln(Settings.NAME_BOOLEAN_FORMAT) + "=FORMAT") - .desc("The boolean format used to show boolean values, like \"Yes,No\". Not \"true,false\"; " - + "use ${myBool?c} for that. The default is error on ${myBool}."); - ap.addOption(null, cln(Settings.NAME_DATE_FORMAT) + "=FORMAT") - .desc("The format used to show date (year+month+day) " - + "values. The default is locale dependent."); - ap.addOption(null, cln(Settings.NAME_TIME_FORMAT) + "=FORMAT") - .desc("The format used to show time values. " - + "The default is locale dependent."); - ap.addOption(null, cln(Settings.NAME_DATETIME_FORMAT) + "=FORMAT") - .desc("The format used to show date-time values. " - + "The default is locale dependent."); - ap.addOption(null, cln(Settings.NAME_TIME_ZONE) + "=ZONE") - .desc("Sets the time zone in which date/time/date-time values are shown. " - + "The default is the time zone of the host " - + "machine. Example: GMT+02"); - ap.addOption(null, cln(Settings.NAME_SQL_DATE_AND_TIME_TIME_ZONE) + "=ZONE") - .desc("Sets a different time zone for java.sql.Date and java.sql.Time only."); - ap.addOption(null, cln(Settings.NAME_TAG_SYNTAX) + "=WHAT") - .desc("Sets the tag syntax for templates that doesn't start " - + "with the ftl directive. Possible values are: " - + Settings.VALUE_TAG_SYNTAX_ANGLE_BRACKET + ", " - + Settings.VALUE_TAG_SYNTAX_SQUARE_BRACKET + ", " - + Settings.VALUE_TAG_SYNTAX_AUTO_DETECT + ". The default " - + "depends on the FreeMarker version. The recommended " - + "value is " + Settings.VALUE_TAG_SYNTAX_AUTO_DETECT - + "."); - ap.addOption(null, cln(Settings.NAME_CASE_SENSITIVE)) - .propertyValue("true") - .desc("Upper- and lower-case letters are considered as " - + "different characters when comparing or matching " - + "paths."); - ap.addOption(null, "ignore-case") - .property(cln(Settings.NAME_CASE_SENSITIVE), "false") - .implied() - .desc("Upper- and lower-case letters are considered as " - + "the same characters when comparing or matching " - + "paths. This is the default."); - ap.addOption(null, cln(Settings.NAME_ALWAYS_CREATE_DIRECTORIES)) - .propertyValue("true") - .desc("Create output subdirectory even if it will remain " - + "empty. Defaults to false."); - ap.addOption(null, cln(Settings.NAME_IGNORE_CVS_FILES)) - .implied() - .desc("Ignore CVS files in the source root directory. " - + "This is the default."); - ap.addOption(null, "dont-" + cln(Settings.NAME_IGNORE_CVS_FILES)) - .property(cln(Settings.NAME_IGNORE_CVS_FILES), "false") - .desc("Don't ignore CVS files in the source root " - + "directory."); - ap.addOption(null, cln(Settings.NAME_IGNORE_SVN_FILES)) - .implied() - .desc("Ignore SVN files in the source root directory. " - + "This is the default."); - ap.addOption(null, "dont-" + cln(Settings.NAME_IGNORE_SVN_FILES)) - .property(cln(Settings.NAME_IGNORE_SVN_FILES), "false") - .desc("Don't ignore SVN files in the source root " - + "directory."); - ap.addOption(null, cln(Settings.NAME_IGNORE_TEMPORARY_FILES)) - .implied() - .desc("Ignore well-known temporary files (e.g. **/?*~) in " + "the source root directory. " + "This is the default."); - ap.addOption(null, - "dont-" + cln(Settings.NAME_IGNORE_TEMPORARY_FILES)) - .property(cln(Settings.NAME_IGNORE_TEMPORARY_FILES), "false") - .desc("Don't ignore well-known temporary files in the " - + "source root directory."); - ap.addOption("R SEQ", cln(Settings.NAME_REMOVE_EXTENSIONS)) - .desc("These extensions will be removed from the output " - + "file name. contains the extensions " + "without the dot."); - ap.addOption(null, cln(Settings.OLD_NAME_REMOVE_EXTENSION) + "=L") - .hide(); - ap.addOption(null, cln(Settings.NAME_REPLACE_EXTENSIONS) + "=SEQ") - .desc("Replaces the extensions with another exensions. " - + "The list contains the old and new extensions " - + "alternately; old1, new1, old2, new2, etc. " - + "The extensions in the do not contain " - + "the dot."); - ap.addOption(null, cln(Settings.OLD_NAME_REPLACE_EXTENSION) + "=L") - .hide(); - ap.addOption(null, cln(Settings.NAME_REMOVE_POSTFIXES) + "=SEQ") - .desc("If the source file name without the extension ends " - + "with a string in the , then that string " - + "will be removed from the output file name."); - ap.addOption(null, cln(Settings.OLD_NAME_REMOVE_POSTFIX) + "=L") - .hide(); - ap.addOption("L FILE", cln(Settings.NAME_LOG_FILE)) - .implied("none") - .desc("Sets the log file. " - + "Use \"none\" (-L none) to disable logging. " - + "The default is \"none\"."); - od = ap.addOption(null, cln(Settings.NAME_APPEND_LOG_FILE)) - .desc("If the log file already exists, it will be " + "continuted, instead of restarting it."); - if (impliedAppendLogFile) { - setAsDefault(od); - } - od = ap.addOption(null, "dont-" + cln(Settings.NAME_APPEND_LOG_FILE)) - .property(cln(Settings.NAME_APPEND_LOG_FILE), "false") - .desc("If the log file already exists, it will be " + "restarted."); - if (!impliedAppendLogFile) { - setAsDefault(od); - } - ap.addOption(null, cln(Settings.NAME_CONFIGURATION_BASE) + "=DIR") - .desc("The directory used as base to " - + "resolve relative paths in the configuration " - + "file. It defaults to the directory of the " - + "configuration file."); - ap.addOption("x", cln(Settings.NAME_EXPERT)) - .propertyValue("true") - .desc("Expert mode."); - ap.addOption(null, "not-expert") - .property(cln(Settings.NAME_EXPERT), "false") - .desc("Disables expert mode. This is the default."); - ap.addOption(null, cln(Settings.NAME_XML_RENDERINGS) + "=SEQ") - .desc("Sets the sequence of XML renderings. Each item is " - + "hash, that stores the options of an XML " - + "rendering configuration."); - ap.addOption(null, cln(Settings.NAME_XPATH_ENGINE) + "=NAME") - .desc("Sets the XPath engine to be used. Legal values are: " - + Engine.XPATH_ENGINE_DONT_SET + ", " - + Engine.XPATH_ENGINE_DEFAULT + ", " - + Engine.XPATH_ENGINE_JAXEN + ", " - + Engine.XPATH_ENGINE_XALAN + ", " - + "and any adapter class name."); - ap.addOption(null, cln(Settings.NAME_XML_CATALOG_FILES) + "=SEQ") - .desc("Sets the catalog files used for XML entity " + "resolution. Catalog based resolution is enabled if " - + "and only if this settings is specified."); - ap.addOption(null, cln(Settings.NAME_XML_CATALOG_PREFER) + "=WHAT") - .desc("Sets if catalog file based XML entity resolution " - + "prefers public or system identifiers. Valid " + "values are: " - + Settings.VALUE_XML_CATALOG_PREFER_PUBLIC + ", " - + Settings.VALUE_XML_CATALOG_PREFER_SYSTEM + ", " - + Settings.VALUE_GLOBAL_DEFAULT + ". Defaults to " - + Settings.VALUE_XML_CATALOG_PREFER_PUBLIC + "."); - /* - ap.addOption(null, - dn(Settings.NAME_XML_CATALOG_ALLOW_PI) + " ALLOW") - .desc("Sets if catalog PI-s are allowed. Valid values " + "are booleans and \"" - + Settings.VALUE_GLOBAL_DEFAULT + "\"."); - */ - ap.addOption(null, cln(Settings.NAME_VALIDATE_XML)) - .desc("Sets that XML files will be validated by default."); - ap.addOption(null, "dont-" + cln(Settings.NAME_VALIDATE_XML)) - .property(cln(Settings.NAME_VALIDATE_XML), "false") - .desc("Sets that XML files will not be validated by " + "default. This is the default."); - od = ap.addOption("v", "verbose") - .property(cln(Settings.NAME_QUIET), "false") - .desc("The opposite of -Q: prints everything to " + "the stdout."); - if (impliedQuiet == 0) { - setAsDefault(od); - } - od = ap.addOption("q", cln(Settings.NAME_QUIET)) - .property(cln(Settings.NAME_QUIET), "true") - .desc("Don't write to the stdout, unless the command-line " - + "arguments are wrong. Print warning and error " + "messages to the stderr."); - if (impliedQuiet == 1) { - setAsDefault(od); - } - od = ap.addOption("Q", "really-quiet") - .property(cln(Settings.NAME_QUIET), - Settings.VALUE_REALLY_QUIET) - .desc("As -q, but doesn't even write to the stderr."); - if (impliedQuiet == 2) { - setAsDefault(od); - } - ap.addOption("F FORMAT", cln(Settings.NAME_ECHO_FORMAT)) - .implied(echoFormatToString(impliedEchoFormat)) - .desc("The format used for displaying the progress. " - + " is n[ormal], t[erse] or q[uiet] " - + "(or v[erbose], which is the same as normal). " - + "The default is " - + echoFormatToString(impliedEchoFormat) + "."); - ap.addOption(null, cln(Settings.NAME_COLUMNS) + "=COLS") - .desc("The number of columns on the console screen. Use when auto-detection gives bad result."); - od = ap.addOption(null, cln(Settings.NAME_PRINT_STACK_TRACE)) - .property(cln(Settings.NAME_PRINT_STACK_TRACE), "true") - .desc("Print stack trace on error."); - if (impliedPrintStackTrace) { - setAsDefault(od); - } - od = ap.addOption(null, "dont-" + cln(Settings.NAME_PRINT_STACK_TRACE)) - .property(cln(Settings.NAME_PRINT_STACK_TRACE), "false") - .desc("Don't print stack trace on error, just cause chain."); - if (!impliedPrintStackTrace) { - setAsDefault(od); - } - od = ap.addOption(null, cln(Settings.NAME_SNIP)) - .property(cln(Settings.NAME_PRINT_STACK_TRACE), "false") - .desc("Deprecated; alias of dont-" + Settings.NAME_PRINT_STACK_TRACE + "."); - od = ap.addOption(null, "dont-" + cln(Settings.NAME_SNIP)) - .property(cln(Settings.NAME_PRINT_STACK_TRACE), "true") - .desc("Deprecated; alias of " + Settings.NAME_PRINT_STACK_TRACE + "."); - ap.addOption(null, OPTION_PRINT_LOCALES) - .desc("Prints the locale codes that Java platform knows."); - ap.addOption(null, OPTION_VERSION) - .desc("Prints version information."); - ap.addOption("h", OPTION_HELP) - .desc("Prints help on options."); - ap.addOption(null, OPTION_LONG_HELP) - .desc("Deprecated; same as -h"); - - Properties impliedOps = new Properties(); - Properties ops; - ap.setDefaultProperties(impliedOps); - try { - ops = ap.parse(args); - args = ap.getNonOptions(); - } catch (ArgsParser.BadArgsException e) { - throw new SettingException( - "Bad command-line: " + MiscUtil.causeMessages(e)); - } - Settings.fixVersion08SettingNames(ops); - - // ----------------------------------------------------------------- - // Pre-interpret some options - - i = Settings.quietSettingValueToInt( - ops.getProperty(cln(Settings.NAME_QUIET)), - cln(Settings.NAME_QUIET)); - if (i > 0) { - quiet = true; - tOut.flush(); - tOut = new PrintWriter(NullOutputStream.INSTANCE); - if (i == 1) { - eOut = stderr; - } else { - eOut = tOut; - } - } else { - quiet = false; - } - - final int screenColsOr0 = opToInt( - ops.getProperty(cln(Settings.NAME_COLUMNS)), - cln(Settings.NAME_COLUMNS)); - if (screenColsOr0 != 0) { - screenCols = new Integer(screenColsOr0); - } - - // ----------------------------------------------------------------- - // Do a special task instead of processing? - - if (ops.containsKey(OPTION_HELP) || ops.containsKey(OPTION_LONG_HELP)) { - printHelp(ap); - throw FinishedException.INSTANCE; - } - - if (ops.containsKey(OPTION_VERSION)) { - p("FMPP version " + Engine.getVersionNumber() - + ", build " + Engine.getBuildInfo()); - p("Currently using FreeMarker version " - + Engine.getFreeMarkerVersionNumber()); - p("For the latest version visit: " + "http://fmpp.sourceforge.net/"); - throw FinishedException.INSTANCE; - } - - if (ops.containsKey(OPTION_PRINT_LOCALES)) { - Locale[] locales = Locale.getAvailableLocales(); - Arrays.sort(locales, new Comparator() { - - public int compare(Object o1, Object o2) { - Locale loc1 = (Locale) o1; - Locale loc2 = (Locale) o2; - int r = ("" + loc1.getLanguage()).compareTo("" + loc2.getLanguage()); - if (r != 0) { - return r; - } - r = ("" + loc1.getCountry()).compareTo("" + loc2.getCountry()); - if (r != 0) { - return r; - } - return ("" + loc1.getVariant()).compareTo("" + loc2.getVariant()); - } - - }); - - StringBuffer sb = new StringBuffer(); - for (i = 0; i < locales.length; i++) { - sb.setLength(0); - - String la = locales[i].getLanguage(); - String co = locales[i].getCountry(); - String va = locales[i].getVariant(); - - sb.append(la); - if (co.length() != 0) { - sb.append("_"); - sb.append(co); - if (va.length() != 0) { - sb.append("_"); - sb.append(va); - } - } - sb.append(" ("); - sb.append(locales[i].getDisplayLanguage()); - if (co.length() != 0) { - sb.append(", "); - sb.append(locales[i].getDisplayCountry()); - if (va.length() != 0) { - sb.append(", "); - sb.append(locales[i].getDisplayVariant()); - } - } - sb.append(")"); - - p(sb.toString(), 0, 3); - } - throw FinishedException.INSTANCE; - } - - // ----------------------------------------------------------------- - // Create the settings - - // Delete implied values, so they don't hide cfg settings - Properties savedImpliedOps = new Properties(); - savedImpliedOps.putAll(impliedOps); - impliedOps.clear(); - - final String opCfg = ops.getProperty(OPTION_CONFIGURATION); - ops.remove(OPTION_CONFIGURATION); // remove non-setting - - Settings settings = new Settings(new File(".")); - settings.undashNames(ops); - settings.addWithStrings(ops); - ops = null; - - // Load cfg file - final File cfgToLoad; - if (opCfg != null) { - cfgToLoad = !opCfg.equals(Settings.VALUE_NONE) ? new File(opCfg) : null; - } else if (defaultCfg != null) { - cfgToLoad = defaultCfg; - p("Note: Using the " + cfgToLoad.getName() + " in the working directory."); - } else { - cfgToLoad = null; - } - if (cfgToLoad != null) { - settings.loadDefaults(cfgToLoad); - } - - // Add implied options - settings.undashNames(savedImpliedOps); - settings.addDefaultsWithStrings(savedImpliedOps); - savedImpliedOps = null; - - // ----------------------------------------------------------------- - // Interpret pre-interpreted options again - - i = Settings.quietSettingValueToInt((String) - settings.get(Settings.NAME_QUIET), Settings.NAME_QUIET); - if (i > 0) { - quiet = true; - tOut.flush(); - tOut = new PrintWriter(NullOutputStream.INSTANCE); - if (i == 1) { - eOut = stderr; - } else { - eOut = tOut; - } - } else { - quiet = false; - } - - final Integer colsOrNull = (Integer) settings.get(Settings.NAME_COLUMNS); - if (colsOrNull != null) { - screenCols = colsOrNull; - } - - // ----------------------------------------------------------------- - // Tool specific setup - - boolean singleFileMode - = settings.get(Settings.NAME_OUTPUT_FILE) != null; - - // - Start logging: - FileWithSettingValue logFile = (FileWithSettingValue) settings.get(Settings.NAME_LOG_FILE); - if (!logFile.getSettingValue().equals("none")) { - startLogging( - logFile, - ((Boolean) settings.get(Settings.NAME_APPEND_LOG_FILE)).booleanValue()); - } - if (logListener != null) { - settings.addProgressListener(logListener); - } - - // - Add non-options - if (args.length != 0) { - settings.add(Settings.NAME_SOURCES, args); - } - - // - Echo format - int ef = echoFormatOpToInt( - (String) settings.get(Settings.NAME_ECHO_FORMAT), - true, Settings.NAME_ECHO_FORMAT); - if (!singleFileMode && !quiet) { - if (ef == EF_NORMAL) { - settings.addProgressListener( - new ConsoleProgressListener(tOut)); - } else if (ef == EF_TERSE) { - settings.addProgressListener( - new TerseConsoleProgressListener(tOut)); - } else if (ef == EF_QUIET) { - settings.addProgressListener( - new ConsoleProgressListener(tOut, true)); - } - } else { - settings.addProgressListener( - new ConsoleProgressListener(eOut, true)); - } - - // - printStackTrace - printStackTrace = ((Boolean) settings.get(Settings.NAME_PRINT_STACK_TRACE)).booleanValue(); - - // - Stats - StatisticsProgressListener stats = new StatisticsProgressListener(); - settings.addProgressListener(stats); - - // - Default source root - if (!singleFileMode) { - settings.addDefault(Settings.NAME_SOURCE_ROOT, "."); - } - - // ----------------------------------------------------------------- - // Processing - - Throwable abortingExc = null; - try { - settings.execute(); - } catch (ProcessingException e) { - abortingExc = e; - } - - if (!singleFileMode) { - p(); - } - if (abortingExc != null) { - pe(">>> ABORTED! <<<"); - } else { - if (stats.getFailed() == 0) { - p("*** DONE ***"); - } else { - p(">>> DONE WITH ERRORS <<<"); - } - } - if (!singleFileMode) { - p(); - p(stats.getExecuted() + " executed + " - + stats.getXmlRendered() + " rendered + " - + stats.getCopied() + " copied = " - + stats.getSuccesful() + " successfully processed\n" - + stats.getFailed() + " failed, " - + stats.getWarnings() + " warning(s) "); - p("Time elapsed: " - + (stats.getProcessingTime()) / 1000.0 - + " seconds"); - } - if (abortingExc != null) { - pe(""); - pe("The cause of aborting was: "); - if (abortingExc instanceof ProcessingException) { - ProcessingException procExc = (ProcessingException) abortingExc; - if (!singleFileMode && procExc.getSourceFile() != null) { - pe("Error when processing this file: " - + FileUtil.getRelativePath(procExc.getSourceRoot(), procExc.getSourceFile())); - } - abortingExc = procExc.getCause(); - } - if (printStackTrace) { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - abortingExc.printStackTrace(pw); - pw.flush(); - pe(sw.toString()); - } else { - pe(MiscUtil.causeMessages(abortingExc)); - } - exitCode = -2; - } - } catch (IOException e) { - pe("I/O error:"); - pe(e); - - pl(">>> TERMINATED WITH I/O ERROR <<<"); - pl(MiscUtil.causeMessages(e)); - if (logListener != null) { - logListener.printStackTrace(e); - } - exitCode = -2; - } catch (SettingException e) { - pe("Failed!"); - pe(MiscUtil.causeMessages(e)); - - pl(">>> TERMINATED WITH SETTING ERROR <<<"); - pl(MiscUtil.causeMessages(e)); - if (logListener != null) { - logListener.printStackTrace(e); - } - - exitCode = -1; - } catch (FinishedException e) { - exitCode = 0; - } catch (Throwable e) { - pe("INTERNAL ERROR:"); - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - e.printStackTrace(pw); - pw.close(); - pTrace(sw.toString()); - - pl(">>> TERMINATED WITH INTERNAL ERROR <<<"); - if (logListener != null) { - logListener.printStackTrace(e); - } - - exitCode = -2; - } finally { - tOut.println(); - tOut.flush(); - eOut.flush(); - if (logListener != null) { - logListener.close(); - } - } - return exitCode; - } - - private void printHelp(ArgsParser ap) { - p("Typical usages:"); - p("fmpp -C configfile", 3); - p("fmpp -S sourcedir -O outputdir", 3); - p("fmpp sourcefile -o outputfile", 3); - p("For more examples: http://fmpp.sourceforge.net/commandline.html"); - if (ap == null) { - p("To see all options: fmpp -h"); - } else { - p(); - p("Options:"); - tOut.println(ap.getOptionsHelp(getScreenColumnsOrDefault())); - p(); - p( - "Most options above directly correspond to FMPP settings. " - + "See their full descriptions here: " - + "http://fmpp.sourceforge.net/settings.html"); - } - p(); - tOut.flush(); - } - - private int getScreenColumnsOrDefault() { - return screenCols != null ? screenCols.intValue() : DEFAULT_CONSOLE_COLS; - } - - private void p() { - tOut.println(); - } - - /*unused - private void pt(Object obj) { - pt(obj.toString()); - } - */ - - private void p(String text) { - p(text, 0); - } - - private void p(String text, int indent) { - p(text, indent, indent); - } - - private void p(String text, int firstIndent, int furtherIndent) { - if (screenCols == null && (furtherIndent == firstIndent || furtherIndent == 0)) { - // Fall back to printing without wrapping - tOut.println(StringUtil.repeat(" ", firstIndent) + text); - } else { - tOut.println(StringUtil.wrap(text, getScreenColumnsOrDefault(), firstIndent, furtherIndent)); - } - } - - private void pe(Object obj) { - pe(obj.toString()); - } - - private void pe(String text) { - pe(text, 0); - } - - private void pTrace(String text) { - tOut.println(StringUtil.wrapTrace(text, getScreenColumnsOrDefault())); - } - - private void pe(String text, int indent) { - if (screenCols == null) { - eOut.println(StringUtil.repeat(" ", indent) + text); - } else { - eOut.println(StringUtil.wrap(text, screenCols.intValue(), indent)); - } - } - - private void pl(Object obj) { - if (logListener == null) { - return; - } - logListener.println(obj); - } - - private void startLogging(File logFile, boolean append) - throws SettingException { - if (loggingStarted) { - return; - } - - try { - logListener = new LoggerProgressListener(logFile, append); - } catch (IOException e) { - throw new SettingException("Failed to create log file.", e); - } - - loggingStarted = true; - } - - private static void setAsDefault(OptionDefinition od) { - od.implied(); - od.desc(od.getDescription() + " This is the default."); - } - - private static int echoFormatOpToInt( - String s, boolean ignoreError, String name) - throws SettingException { - s = s.toLowerCase(); - if (s.equals("n") || s.equals("normal") - || s.equals("verbose") || s.equals("v")) { - return EF_NORMAL; - } else if (s.equals("t") || s.equals("terse")) { - return EF_TERSE; - } else if (s.equals("q") || s.equals("quiet")) { - return EF_QUIET; - } else if (ignoreError) { - return EF_NORMAL; - } else { - throw new SettingException( - "Invalid value " + StringUtil.jQuote(s) + " for setting " - + StringUtil.jQuote(name) + ". " - + " Valid values are (case insensitive): " + "\"normal\", \"n\", \"terse\", \"t\", \"quiet\", \"q\"."); - } - } - - private static String echoFormatToString(int ef) { - if (ef == EF_NORMAL) { - return "normal"; - } else if (ef == EF_TERSE) { - return "terse"; - } else if (ef == EF_QUIET) { - return "quiet"; - } else { - return null; - } - } - - private static int opToInt(String value, String name) - throws SettingException { - if (value == null || value.length() == 0) { - return 0; - } else { - try { - return Integer.parseInt(value); - } catch (NumberFormatException e) { - throw new SettingException("The value of setting \"" + name - + "\" has to be a valid integer."); - } - } - } - - private String cln(String name) { - return Settings.getDashedName(name); - } - - private static class FinishedException extends Exception { - private static final long serialVersionUID = 1L; - private static final FinishedException INSTANCE = new FinishedException(); - } -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/tools/package.html b/fmpp/src/main/java/fmpp/tools/package.html deleted file mode 100644 index b26e205..0000000 --- a/fmpp/src/main/java/fmpp/tools/package.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    Tools (front-ends) that end-user can use out-of-the-box. - \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/util/ArgsParser.java b/fmpp/src/main/java/fmpp/util/ArgsParser.java deleted file mode 100644 index 6f6bb82..0000000 --- a/fmpp/src/main/java/fmpp/util/ArgsParser.java +++ /dev/null @@ -1,1100 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Properties; -import java.util.Set; - -/** - * Simple command-line argument parser that mimics the logic of UN*X - * tools as {@code ls}. It does not support the logic of tools like - * {@code gcc}. - * - *

    Features: short (1 character) and long option names, options - * with no argument, with optional argument and with mandatory argument, option - * groups (a.k.a. mutually exclusive options), implied options, alias options, - * retrieval of non-options, automatically generates formatted options help. - * - *

    For example, here it is a typical "UN*X command-line": - * - *

    {@code $ ls -laT4 --color=auto --quote-name etc etc/mysql} - * - *

    Here, we have 3 options given with short-name: "l", "a" and "T", and - * 2 options given with long-name: "color" and "quote-name". Two options have - * argument: "T" and "color". Also, we have 2 non-option arguments: - * "etc" and "etc/mysql". According to Java logic, the - * main method doesn't get the program name (here: "ls"), so we don't deal with - * that. - * - *

    A short example, that defines a subset of {@code ls} options: - *

    - * // 1. Create parser instance:
    - * ArgsParser ap = new ArgsParser();
    - * 
    - * // 2. Define the options:
    - * ap.addOption("a", "all")
    - *         .desc("do not hide entries starting with .");
    - * ap.addOption("A", "almost-all")
    - *         .desc("do not list implied . and ..");
    - * ap.addOption("l", null)
    - *         .desc("use a long list format");
    - * ap.addOption("T", "tabsize=COLS")
    - *         .desc("assume tab stops at each COLS instead of 8");
    - * ap.addOption(null, "color=WHEN")
    - *         .defaultArg("always")
    - *         .desc("control whether color is used ...[too long].");
    - * ap.addOption("Q", "quote-name")
    - *         .desc("enclose entry names in double-quotes");
    - * 
    - * // 3. Parse args[]:
    - * try {
    - *     ap.parse(args);
    - * } catch (ArgsParser.BadArgsException exc) {
    - *     System.out.println(exc.getMessage());
    - *     System.exit(-1);
    - * }
    - * 
    - * // 4. Get the results:
    - * Properties ops = ap.getOptions();
    - * String[] nonOps = ap.getNonOptions();
    - *
    - * // 5. Print the results for the sake of testing:
    - * System.out.println("Options:");
    - * Iterator it = ops.entrySet().iterator();
    - * while (it.hasNext()) {
    - *     Map.Entry e = (Map.Entry) it.next();
    - *     System.out.println(
    - *             "- " + e.getKey() + " = " + e.getValue());
    - * }
    - * System.out.println("Non-options:");
    - * for (int i = 0; i < nonOps.length; i++) {
    - *     System.out.println("- " + nonOps[i]);
    - * }
    - * 
    - * - *

    This defines the following options:

    - * - *
    short-namelong-nameargument? - *
    aallno - *
    Aalmost-allno - *
    l no - *
    Ttabsizemandatory - *
     coloroptional, defaults to "always" - *
    Qquote-nameno - *
    - *

    and will parse command-line arguments like: - *
    {@code -laT4 --color=auto --quote-name etc etc/mysql} - * - *

    The resulting properties will be:

    - * - * - *
    namevalue - *
    all"" - *
    l"" - *
    tabsize"4" - *
    color"auto" - *
    quote-name"" - *
    - * - *

    Note that the property name is always the long-name of the option if the - * option has a long-name, otherwise the short-name. Also note that the value of - * options that do not allow argument is 0 length String when the option is - * present, otherwise no property is made for the option (there is no - * "almost-all" propery). - * - *

    For options that has argument it is maybe practical to use implied values - * as: - *

    - * ...
    - * ap.addOption("T", "tabsize=COLS")
    - *         .implied("8")
    - *         .desc("assume tab stops at each COLS instead of 8");
    - * ap.addOption(null, "color=WHEN")
    - *         .implied("none")
    - *         .defaultArg("always")
    - *         .desc("control whether color is used ...[too long].");
    - * ...
    - * 
    - * - *

    If you parse this with the above modification: - *
    {@code -la --quote-name etc etc/mysql}
    - * then the "tabsize" property will be "8", and the - * "color" property will be "none". If you parse this: - *
    {@code -laT4 --color --quote-name etc etc/mysql}
    - * then the "tabsize" property will be "4", and the - * "color" property will be "always" (note that it is - * the default argument of "color", as there was no argument given for that in - * the command-line). - * - *

    You may want to use the same propery name but different value for options - * as "a" and "A". They should be mutually exclusive options anyway: - * - *

    - * ...
    - * ap.addOption("a", "all")
    - *         .property("show", "all")
    - *         .desc("do not hide entries starting with .");
    - * ap.addOption("A", "almost-all")
    - *         .property("show", "almost-all")
    - *         .desc("do not list implied . and ..");
    - * ...
    - * 
    - * - *

    Here you say that both option sets the value of the "show" property - * (instead of setting "all" and "almost-all" properties) to the given values - * ("all" and "almost-all") if the option is present. As usually you want the - * option long-name (or short-name if there is no long-name) as the value of - * the property, there is a conveniece method for this: - * - *

    - * ...
    - * ap.addOption("a", "all")
    - *         .group("show")
    - *         .desc("do not hide entries starting with .");
    - * ap.addOption("A", "almost-all")
    - *         .group("show")
    - *         .desc("do not list implied . and ..");
    - * ...
    - * 
    - * - *

    The {@code parse} method will throw exception if two options in - * args[] tries to set the same property, so the two options will mutually - * exclude each other here. - * - *

    For grouped options you may want to choose an implied option. Say, assume - * you have "format-normal", and a "format-terse" and a "format-verbose" options - * that are mutually exclusively set the value of "format" property. If the user - * do not use any of the "format-..." options, then you want see it as if it - * were a "--format-nomal" in the command-line: - * - *

    - * ...
    - * ap.addOption(null, "format-normal")
    - *         .property("format", "normal")
    - *         .implied();
    - * ap.addOption(null, "format-terse")
    - *         .property("format", "terse");
    - * ap.addOption(null, "format-verbose")
    - *         .property("format", "verbose");
    - * ...
    - * 
    - * - *

    You can print the options help to the screen: - *

    - * System.out.println(ap.getOptionsHelp(80));
    - * 
    - * - *

    For more information please read the documentation of methods. - */ -public class ArgsParser implements java.io.Serializable { - - private static final int WRAP_INDENT = 2; - - private static final int COL_DISTANCE = 3; - - private static final int MAX_LEFT_COL_WIDTH = 30; - - private static final long serialVersionUID = 1L; - - private static final Comparator CMPRTR_OP_KEY = new OptionDefinitionKeyComparator(); - private static final Comparator CMPRTR_OP_SNAME = new OptionDefinitionShortNameComparator(); - private static final Comparator CMPRTR_OP_LNAME = new OptionDefinitionLongNameComparator(); - - // Settings: - private Properties defaultProperties; - private Properties messages; - - // Option definitions: - private ArrayList odsByKey = new ArrayList(); - private ArrayList odsBySName = new ArrayList(); - private ArrayList odsByLName = new ArrayList(); - - // Parsing results: - private Properties prsdOps = new Properties(); - private ArrayList prsdNonOps = new ArrayList(); - private String[] prsdNonOpsArray; - - // Messages - public static final String MSG_OPTION_CONFLICT = "OPTION_CONFLICT"; - public static final String MSG_ARG_MISSING = "ARG_MISSING"; - public static final String MSG_OPTION_UNKNOWN = "OPTION_UNKNOWN"; - public static final String MSG_ARG_NOT_ALLOWED = "NOT_ALLOWED"; - private Properties defaultMessages; - { - defaultMessages = new Properties(); - defaultMessages.put( - MSG_OPTION_CONFLICT, - "This option conflicts with a preceding option: "); - defaultMessages.put( - MSG_ARG_MISSING, - "The argument is missing for this option: "); - defaultMessages.put( - MSG_OPTION_UNKNOWN, - "Unknown option: "); - defaultMessages.put( - MSG_ARG_NOT_ALLOWED, - "This option does not allow argument: "); - } - - /** - * Creates a parser. - */ - public ArgsParser() { - } - - /** - * Parses the args[]. After this, you can get the options and non-options - * with {@link #getOptions getOptions} and - * {@link #getNonOptions getNonOptions}. - * - * @param args the array of Strings that you get as the parameter of - * {@code main} method. - * @throws BadArgsException if the user has entered bad command-line - * arguments. The message in the exception (call - * {@code exception.getMessage()}) contains the (relatively) - * user-frinedly desription of the problem. - * @return the properties object that stores the options. This is the - * same object as {@code getOptions()} returns. - */ - public Properties parse(String[] args) throws BadArgsException { - if (defaultProperties == null) { - prsdOps = new Properties(); - } else { - prsdOps = new Properties(defaultProperties); - } - prsdNonOps.clear(); - prsdNonOpsArray = null; - - OptionDefinition dummy = new OptionDefinition(); - OptionDefinition op; - int opi, x; - args: for (int i = 0; i < args.length; i++) { - String arg = args[i]; - if (arg.startsWith("--")) { - if (arg.equals("--")) { - for (i++; i < args.length; i++) { - prsdNonOps.add(args[i]); - } - break args; - } - arg = arg.substring(2); - x = arg.indexOf('='); - if (x != -1) { - dummy.lName = arg.substring(0, x); - } else { - dummy.lName = arg; - } - opi = Collections.binarySearch( - odsByLName, dummy, CMPRTR_OP_LNAME); - if (opi < 0) { - throw new BadArgsException( - getMessage(MSG_OPTION_UNKNOWN) + dummy.lName); - } - op = (OptionDefinition) odsByLName.get(opi); - if (prsdOps.get(op.pName) != null) { - throw new BadArgsException( - getMessage(MSG_OPTION_CONFLICT) - + dummy.lName); - } - if (op.argType != OptionDefinition.ARGT_NONE) { - if (x == -1) { - if (op.argType == OptionDefinition.ARGT_OPTIONAL) { - prsdOps.put(op.pName, op.defaultArg); - } else { - if (i == args.length - 1) { - throw new BadArgsException( - getMessage(MSG_ARG_MISSING) - + dummy.lName); - } - i++; - prsdOps.put(op.pName, args[i]); - } - } else { - prsdOps.put(op.pName, arg.substring(x + 1)); - } - } else { - if (x != -1) { - throw new BadArgsException( - getMessage(MSG_ARG_NOT_ALLOWED) + dummy.lName); - } - prsdOps.put(op.pName, op.pValue); - } - } else if (arg.startsWith("-")) { - if (arg.equals("-")) { - prsdNonOps.add(arg); - } else { - arg = arg.substring(1); - arg: for (x = 0; x < arg.length(); x++) { - dummy.sName = arg.substring(x, x + 1); - opi = Collections.binarySearch( - odsBySName, dummy, CMPRTR_OP_SNAME); - if (opi < 0) { - throw new BadArgsException( - getMessage(MSG_OPTION_UNKNOWN) - + dummy.sName); - } - op = (OptionDefinition) odsBySName.get(opi); - if (prsdOps.get(op.pName) != null) { - throw new BadArgsException( - getMessage(MSG_OPTION_CONFLICT) - + dummy.sName); - } - if (op.argType == OptionDefinition.ARGT_NONE) { - prsdOps.put(op.pName, op.pValue); - continue arg; //! - } else { - if (arg.length() - 1 > x) { - prsdOps.put(op.pName, arg.substring(x + 1)); - } else { - if (op.argType - == OptionDefinition.ARGT_OPTIONAL) { - prsdOps.put(op.pName, op.defaultArg); - } else { - if (i == args.length - 1) { - throw new BadArgsException( - getMessage(MSG_ARG_MISSING) - + dummy.sName); - } - i++; - prsdOps.put(op.pName, args[i]); - } - } - break arg; //! - } - } // for x in arg - } - } else { - prsdNonOps.add(arg); - } - } // for i in args - - Properties eps; - if (defaultProperties != null) { - eps = defaultProperties; - } else { - eps = prsdOps; - } - Iterator it = odsByKey.iterator(); - while (it.hasNext()) { - op = (OptionDefinition) it.next(); - if (op.isImplied && prsdOps.get(op.pName) == null) { - if (op.impliedArg != null) { - eps.put(op.pName, op.impliedArg); - } else { - eps.put(op.pName, op.pValue); - } - } - } - - return prsdOps; - } - - /** - * Returns the options resulting from the latest {@link #parse parse} - * call as {@link Properties} object. An empty - * {@link Properties} object will be returned if there was no - * {@code parse} call yet. - */ - public Properties getOptions() { - return prsdOps; - } - - /** - * Convenience funtcion to read the option {@link Properties} object. - */ - public String getOption(String name) { - return (String) prsdOps.get(name); - } - - /** - * Retruns the non-options resulting from the latest {@link #parse parse} - * call. An empty array will be returned if there was no {@code parse} - * call yet. - * - *

    Non-options are the elements of args[] that are not not options - * (as "{@code -l}" or "{@code --quote-name}"), nor option - * arguments (as the "{@code 4}" after "{@code --tabsize 4}", - * assuming that "{@code tabsize}" has mandatory argument). For - * example, in "{@code -l etc --tabsize 8 etc/mysql}" there are 2 - * non-options: "{@code etc}" and "{@code etc/mysql}". - */ - public String[] getNonOptions() { - if (prsdNonOpsArray == null) { - int ln = prsdNonOps.size(); - prsdNonOpsArray = new String[ln]; - for (int i = 0; i < ln; i++) { - prsdNonOpsArray[i] = (String) prsdNonOps.get(i); - } - } - return prsdNonOpsArray; - } - - /** - * Returns the property names used in the options. - */ - public Set getPropertyNames() { - Set res = new HashSet(); - - Iterator it = odsByKey.iterator(); - while (it.hasNext()) { - OptionDefinition op = (OptionDefinition) it.next(); - res.add(op.pName); - } - - return res; - } - - /** - * Defines an option for the parser. - * - *

    Note that if you create an option that supports argument, then - * the argument will be initially mandatory. To have optional argument, - * you have to give a default argument value by calling the - * {@link OptionDefinition#defaultArg defaultArg} method of the returned - * object. - * @param shortName the short-name of option or null. Examples of - * short-names are "{@code a}" and "{@code l}" in - * "{@code $ ls -la}" If the option has argument, then this - * parameter has to be in the form "s ARGNAME" or - * "s=ARGNAME"; for example: {@code "T COLS"}. - * The space or {@code =} indicates that the option supports - * argument. - * The ARGNAME is used only for showing the help, otherwise its - * value is unimportant. - * Note that if you will indicate in the {@code longName} - * parameter that the option has argument, you don't have to indicate it - * here. - * @param longName the long-name of option or null. An example of long-name - * is {@code "quote-name"} in "{@code $ ls --quote-name}" - * If the option supports argument, then this parameter has to - * be in the form "long-name=ARGNAME" or - * "long-name ARGNAME"; for example: - * {@code "tabsize=COLS"}. The {@code =} or space indicates - * that the option supports argument. The ARGNAME is used only - * for showing the help, otherwise its value is unimportant. - * Note that if you have already indicated in the {@code shortName} - * parameter that the option has argument, you don't have to indicate it - * agian here. - * @return the newly created {@code OptionDefinition}; this is - * returned to let you addjust the new option with methods like - * {@link OptionDefinition#desc(String) desc}, - * {@link OptionDefinition#property(String, String) property}, - * {@link OptionDefinition#implied(String) implied} - * or {@link OptionDefinition#defaultArg defaultArg}. - * @throws IllegalArgumentException If an option with the same long-name or - * short-name is already added, or if the given long- or short-name is - * malformed. - */ - public OptionDefinition addOption(String shortName, String longName) { - OptionDefinition op = new OptionDefinition(); - int i; - - op.argType = OptionDefinition.ARGT_NONE; - if (longName != null - && ( - ((i = longName.indexOf("=")) != -1) - || - ((i = longName.indexOf(" ")) != -1) - )) { - op.argType = OptionDefinition.ARGT_REQUIRED; - op.argName = longName.substring(i + 1); - longName = longName.substring(0, i); - } - if (shortName != null - && ( - ((i = shortName.indexOf("=")) != -1) - || - ((i = shortName.indexOf(" ")) != -1) - )) { - op.argType = OptionDefinition.ARGT_REQUIRED; - op.argName = shortName.substring(i + 1); - shortName = shortName.substring(0, i); - } - - checkOptionNames(shortName, longName); - - op.lName = longName; - op.sName = shortName; - op.key = shortName != null ? shortName : longName; - op.pName = longName != null ? longName : shortName; - if (op.argType == OptionDefinition.ARGT_NONE) { - op.pValue = ""; - } - - insertOp(op); - - return op; - } - - /** - * Sets the properies object that will be the default properties object for - * the properies object that {@code parse} creates for the options - * (See {@link java.util.Properties#Properties(Properties defaults)}). - * Also, {@code parse} will put the implied option values into - * the default properties object. - * By default there is no default properties object. - * - *

    This setting takes effect only when you call {@code parse} next - * time. - */ - public void setDefaultProperties(Properties defaultProperties) { - this.defaultProperties = defaultProperties; - } - - /** - * Customizes the error messages shown to the user. - * The {@link Properties} should contain the following keys, - * associated with the translation of the following sentences: - *

      - *
    • "OPTION_CONFLICT": - * "This option conflicts with a preceding option: " - *
    • "ARG_MISSING": "The argument is missing for this option: " - *
    • "OPTION_UNKNOWN": "Unknown option: " - *
    • "ARG_NOT_ALLOWED": "This option does not allow argument: " - *
    - * You may use the {@code MSG_...} constants for the key values. - */ - public void setMessages(Properties messages) { - this.messages = messages; - } - - /** - * Describes and option. It does not store the actual value of the - * option after parsing; it is just the definition of the option. - */ - public class OptionDefinition implements Cloneable { - private static final int ARGT_NONE = 0; - private static final int ARGT_OPTIONAL = 1; - private static final int ARGT_REQUIRED = 2; - - private String key; - private String pName; - private String lName; - private String sName; - private String pValue; - private boolean isImplied; - private int argType; - private String impliedArg; - private String defaultArg; - private String desc; - private String argName; - private boolean hidden; - - /** - * Sets the property name for this option. - * If you don't override the property name with this, it will be - * the long-name of the option if the option has long-name, otherwise - * the short-name of the option. - * - * @see #property(String, String) - */ - public OptionDefinition property(String pName) { - this.pName = pName; - return this; - } - - /** - * Sets the property value for this option. - * This only allowed for options that do no support argument, as - * the value of options that has argument will be the actual value - * of the argument. - * If you don't override the property value with this, it will be - * "" (0 length String) for those options. - * - * @throws IllegalArgumentException if the option has argument. - * - * @see #property(String, String) - */ - public OptionDefinition propertyValue(String value) { - if (argType != ARGT_NONE) { - throw new IllegalArgumentException( - "This option supports argument."); - } - this.pValue = value; - return this; - } - - /** - * Convenience method; same as calling {@code property(String)} and - * then {@code propertyValue}. This method only applies for - * options that do no support argument. - * - * @see #property(String) - * @see #propertyValue - */ - public OptionDefinition property( - String propertyName, String propertyValue) { - if (argType != ARGT_NONE) { - throw new IllegalArgumentException( - "This option supports argument."); - } - property(propertyName); - propertyValue(propertyValue); - return this; - } - - /** - * Convenience method; same as calling - * {@code property(propertyName, optionName)}, where optionName - * is the long-name if that exists, otherwise the short-name. - * This method only applies for options that do no support argument. - * - * @see #property(String) - * @see #propertyValue - */ - public OptionDefinition group(String propertyName) { - property(propertyName, lName != null ? lName : sName); - return this; - } - - /** - * Ensures that the option will be seemingly present if the - * args[] does not contains this option or any other option that - * mutually excludes this option. Note that if the option supports - * argument, you have to use {@link #implied(String)}. - * - * @throws IllegalArgumentException if the option has argument. - * - * @see #implied(String) - */ - public OptionDefinition implied() { - if (argType != ARGT_NONE) { - throw new IllegalArgumentException( - "This overload is for options that don't " - + "support argument."); - } - this.isImplied = true; - return this; - } - - /** - * Ensures that the option will be seemingly present with the given - * argument value if args[] does not contains this option, or any - * other option that mutually excludes this option. - * This version of the method applies only for options that support - * argument. - * - * @throws IllegalArgumentException if the option has no argument. - * - * @see #implied() - */ - public OptionDefinition implied(String impliedArg) { - if (argType == ARGT_NONE) { - throw new IllegalArgumentException( - "This overload is for options that support argument."); - } - this.isImplied = true; - this.impliedArg = impliedArg; - return this; - } - - /** - * Gives default argument value for an option that supports arguments, - * thus it will be optional to specify the argument value in the - * command-line. - * - *

    Note that introducing default value for an option is not a - * backward compatible step. For example if "color" has no default - * value, then "{@code --color red}" is interpreted as "color" - * has an argument that is "red". But, if "color" has a default value, - * then it is interpreted as "color" has the default value, and - * we have a non-option "red". Of coruse, there would not be problem - * if we use "{@code --color=red}". - */ - public OptionDefinition defaultArg(String defaultValue) { - if (argType == ARGT_NONE) { - throw new IllegalArgumentException( - "This option has no argument."); - } - this.defaultArg = defaultValue; - argType = ARGT_OPTIONAL; - return this; - } - - /** - * Sets the description (used in help) of the option. - */ - public OptionDefinition desc(String desc) { - if (desc != null && desc.length() == 0) { - desc = null; - } - this.desc = desc; - return this; - } - - /** - * Hides option, that is, it will not be shown in the option help. - */ - public void hide() { - hidden = true; - } - - /** - * Creates a copy of the option with different short- and long-name, - * but with the same property name (and other attributes). - * This is mostly useful to create alias options. - * - * @param longName the long-name of option or null. - * Do not use the long-name=ARGNAME form here. - * @param shortName the short-name of option or null. - * Do not use the s=ARGNAME form here. - * @return the newly created {@code OptionDefinition}. - * @throws IllegalArgumentException If an option with the same - * long-name or short-name is already added, or if the given long- - * or short-name is malformed. - */ - public OptionDefinition copy(String shortName, String longName) { - OptionDefinition op; - - checkOptionNames(shortName, longName); - try { - op = (OptionDefinition) this.clone(); - } catch (CloneNotSupportedException e) { - // it is supprted... - throw new RuntimeException("Bug: " + e); - } - op.lName = longName; - op.sName = shortName; - op.key = shortName != null ? shortName : longName; - - insertOp(op); - - return op; - } - - /** - * Returns the name of the argument, or null if the option does not - * support argument. - */ - public String getArgName() { - return argName; - } - - /** - * Returns the default argument of the option, or null if the option - * has no default argument. - */ - public String getDefaultArg() { - return defaultArg; - } - - /** - * Returns the description of the option, or null if no description is - * available. - */ - public String getDescription() { - return desc; - } - - /** - * Returns the long-name of the option, or null if the option has no - * long-name. - */ - public String getLongName() { - return lName; - } - - /** - * Returns the short-name of the option, or null if the option has no - * short-name. - */ - public String getShortName() { - return sName; - } - - } - - /** - * Returns the list of {@link OptionDefinition}-s, sorted as they should - * appear in an option help. - */ - public Iterator getOptionDefintions() { - ArrayList odsByHelp = (ArrayList) odsByKey.clone(); - Collections.sort(odsByHelp, new OptionDefinitionHelpComparator()); - return odsByHelp.iterator(); - } - - /** - * Returns the {@link OptionDefinition} for the given option name. - * The name can be either short- or long-name. - */ - public OptionDefinition getOptionDefinition(String name) { - int i = Collections.binarySearch(odsByKey, name, CMPRTR_OP_KEY); - return i < 0 ? null : (OptionDefinition) odsByKey.get(i); - } - - /** - * Generates options help for the defined options. - * @param screenWidth the (minimum) width of the console screen. - */ - public String getOptionsHelp(int screenWidth) { - int i, ln; - String s; - - int lColW = 0; - ArrayList lCols = new ArrayList(); - ArgsParser.OptionDefinition od; - StringBuffer res = new StringBuffer(); - - // Collect the left column contents: - Iterator it = getOptionDefintions(); - while (it.hasNext()) { - od = (ArgsParser.OptionDefinition) it.next(); - if (!od.hidden) { - s = createOptionLeftColumn(od); - lCols.add(s); - int width = s.length(); - if (width > lColW) { - lColW = width <= MAX_LEFT_COL_WIDTH ? width : MAX_LEFT_COL_WIDTH; - } - } - } - - if (screenWidth - 1 - (lColW + 3 + 2) < 16) { - if (screenWidth - 1 < lColW) { - return StringUtil.wrap("Unable to display option help: " - + "Screen is too narrow.", screenWidth); - } else { - res.append(StringUtil.wrap( - "Warning: Unable to display option descriptions: " - + "Screen is too narrow.", screenWidth)) - .append(StringUtil.LINE_BREAK); - ln = lCols.size(); - for (i = 0; i < ln; i++) { - res.append((String) lCols.get(i)); - if (i != ln - 1) { - res.append(StringUtil.LINE_BREAK); - } - } - return res.toString(); - } - } else { - i = 0; - it = getOptionDefintions(); - while (it.hasNext()) { - od = (ArgsParser.OptionDefinition) it.next(); - if (!od.hidden) { - String lCol = (String) lCols.get(i); - i++; - if (od.getDescription() != null) { - final int lColWithPaddingW = lColW + COL_DISTANCE; - if (lCol.length() <= lColW) { // Has space to use two columns - StringBuffer desc = StringUtil.wrap( - new StringBuffer(od.getDescription()), - screenWidth, - lColWithPaddingW, lColWithPaddingW + WRAP_INDENT); - desc.replace(0, lCol.length(), lCol); - res.append(desc); - } else { // No space for two columns, use a single line - String lColAndSep= lCol.length() >= lColWithPaddingW - ? lCol + " " - : freemarker.template.utility.StringUtil.rightPad(lCol, lColWithPaddingW); - res.append(StringUtil.wrap( - new StringBuffer(lColAndSep + od.getDescription()), - screenWidth, - 0, lColWithPaddingW + WRAP_INDENT)); - } - } else { - res.append(lCol); - } - if (it.hasNext()) { - res.append(StringUtil.LINE_BREAK); - } - } - } - return res.toString(); - } - } - - private static String createOptionLeftColumn( - ArgsParser.OptionDefinition od) { - StringBuffer b = new StringBuffer(30); - b.append(" "); - - String sn = od.getShortName(); - String ln = od.getLongName(); - String an = od.getArgName(); - - if (sn != null) { - b.append("-"); - b.append(sn); - if (an != null && ln == null) { - b.append("<"); - b.append(an); - b.append(">"); - } - } - if (ln != null) { - if (sn == null) { - b.append(" --"); - } else { - b.append(", --"); - } - b.append(ln); - if (an != null) { - b.append("=<"); - b.append(an); - b.append(">"); - } - } - - return b.toString(); - } - - private String getMessage(String key) { - String r = null; - if (messages != null) { - r = messages.getProperty(key); - } - if (r == null) { - r = defaultMessages.getProperty(key); - if (r == null) { - r = "??? (message not found): "; - } - } - return r; - } - - private void insertOp(OptionDefinition op) { - int ki, li = 0, ni = 0; - - if (op.sName != null) { - li = Collections.binarySearch(odsBySName, op, CMPRTR_OP_SNAME); - if (li >= 0) { - throw new IllegalArgumentException( - "An option with this short-name is already defined: " - + op.sName); - } - } - if (op.lName != null) { - ni = Collections.binarySearch(odsByLName, op, CMPRTR_OP_LNAME); - if (ni >= 0) { - throw new IllegalArgumentException( - "An option with this long-name is already defined: " - + op.lName); - } - } - ki = Collections.binarySearch(odsByKey, op, CMPRTR_OP_KEY); - if (ki >= 0) { - throw new IllegalArgumentException( - "An option with this short- or long-name is " - + "already defined: " + op.key); - }; - - odsByKey.add(-ki - 1, op); - if (op.sName != null) { - odsBySName.add(-li - 1, op); - } - if (op.lName != null) { - odsByLName.add(-ni - 1, op); - } - } - - private void checkOptionNames(String shortName, String longName) { - checkOptionName(longName); - checkOptionName(shortName); - if (shortName != null && shortName.length() != 1) { - throw new IllegalArgumentException( - "Short-name must be 1 character long."); - } - if (shortName == null && longName == null) { - throw new IllegalArgumentException("At least one of the option " - + "short- and the long-names must be non-null."); - } - } - - private static void checkOptionName(String name) - throws IllegalArgumentException { - if (name == null) { - return; - } - if (name.length() == 0) { - throw new IllegalArgumentException( - "Option name can't be 0 character long."); - } - int ln = name.length(); - if (name.charAt(0) == '-') { - throw new IllegalArgumentException( - "Option name can't start with -."); - } - for (int i = 0; i < ln; i++) { - char c = name.charAt(i); - if (!((c >= '0' && c <= '9') - || (c >= 'a' && c <= 'z') - || (c >= 'A' && c <= 'Z') - || (c == '-') || (c == '_') || (c == '@') || (c == '#') - )) { - throw new IllegalArgumentException( - "Option name can contain only: " - + "0-9, a-z, A-Z, -, _, @, #"); - } - } - } - - private static class OptionDefinitionShortNameComparator - implements Comparator { - public int compare(Object o1, Object o2) { - return ((OptionDefinition) o1).sName - .compareTo(((OptionDefinition) o2).sName); - } - } - - private static class OptionDefinitionLongNameComparator - implements Comparator { - public int compare(Object o1, Object o2) { - return ((OptionDefinition) o1).lName - .compareTo(((OptionDefinition) o2).lName); - } - } - - private static class OptionDefinitionKeyComparator - implements Comparator { - public int compare(Object o1, Object o2) { - return ((OptionDefinition) o1).key - .compareTo(((OptionDefinition) o2).key); - } - } - - private static class OptionDefinitionHelpComparator - implements Comparator { - public int compare(Object o1, Object o2) { - String s1 = ((OptionDefinition) o1).key; - String s2 = ((OptionDefinition) o2).key; - int x = s1.toLowerCase().compareTo(s2.toLowerCase()); - if (x != 0) { - return x; - } - return -s1.compareTo(s2); - } - } - - /** - * The user has entered invalid options in the command-line. - * Use the {@code getMessage()} method to get the description of the - * problem, that you can directly print to the terminal for the user. - */ - public static class BadArgsException extends Exception { - private BadArgsException(String message) { - super(message); - } - } -} diff --git a/fmpp/src/main/java/fmpp/util/BorderedReader.java b/fmpp/src/main/java/fmpp/util/BorderedReader.java deleted file mode 100644 index d6375ca..0000000 --- a/fmpp/src/main/java/fmpp/util/BorderedReader.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.io.IOException; -import java.io.Reader; - - -/** - * Reader that can insert a string before and after an encapsulated - * character stream. - */ -public class BorderedReader extends Reader { - private static final int PHASE_HEADER = 0; - private static final int PHASE_BODY = 1; - private static final int PHASE_FOOTER = 2; - - private String header; - private int headerLength; - - private Reader body; - - private String footer; - private int footerLength; - - private int phase = PHASE_HEADER; - private int index = 0; - - public BorderedReader(String header, Reader body, String footer) { - this.header = header; - if (header == null) { - headerLength = 0; - } else { - headerLength = header.length(); - } - - this.footer = footer; - if (footer == null) { - footerLength = 0; - } else { - footerLength = footer.length(); - } - - this.body = body; - } - - public void close() throws IOException { - body.close(); - } - - public int read() throws IOException { - switch (phase) { - case PHASE_HEADER: - if (index < headerLength) { - return header.charAt(index++); //! - } - phase = PHASE_BODY; - //! falls through - case PHASE_BODY: - int i = body.read(); - if (i != -1) { - return i; //! - } - phase = PHASE_FOOTER; - index = 0; - //! falls through - case PHASE_FOOTER: - if (index < footerLength) { - return footer.charAt(index++); //! - } else { - return -1; //! - } - //! falls through - default: - throw new BugException("Illegal phase: " + phase); - } - } - - public int read(char[] cbuf, int off, int len) throws IOException { - int i; - int clen; - int total = 0; - switch (phase) { - case PHASE_HEADER: - clen = headerLength - index; - if (clen > 0) { - clen = clen > len ? len : clen; - for (i = 0; i < clen; i++) { - cbuf[off++] = header.charAt(index++); - } - len -= clen; - total = clen; - } - if (len == 0) { - break; //! - } - phase = PHASE_BODY; - //! falls through - case PHASE_BODY: - i = body.read(cbuf, off, len); - if (i != -1) { - total += i; - break; //! - } - phase = PHASE_FOOTER; - index = 0; - //! falls through - case PHASE_FOOTER: - clen = footerLength - index; - if (clen > 0) { - clen = clen > len ? len : clen; - for (i = 0; i < clen; i++) { - cbuf[off++] = footer.charAt(index++); - } - total += clen; - } else { - if (total == 0) { - total = -1; - } - } - break; - default: - throw new BugException("Illegal phase: " + phase); - } - return total; - } - - public long skip(long n) throws IOException { - long i; - long clen; - long total = 0; - - if (n < 0L) { - throw new IllegalArgumentException( - "skip value is negative"); - } - - switch (phase) { - case PHASE_HEADER: - clen = headerLength - index; - clen = clen > n ? n : clen; - total = clen; - index += clen; - if (n == total) { - break; //! - } - phase = PHASE_BODY; - //! falls through - case PHASE_BODY: - do { - i = body.skip(n - total); - if (i == 0) { - break; - } - total += i; - } while (n > total); - if (n == total) { - break; - } - phase = PHASE_FOOTER; - index = 0; - //! falls through - case PHASE_FOOTER: - clen = footerLength - index; - clen = clen > (n - total) ? (n - total) : clen; - index += clen; - total += clen; - } - return total; - } -} diff --git a/fmpp/src/main/java/fmpp/util/BugException.java b/fmpp/src/main/java/fmpp/util/BugException.java deleted file mode 100644 index f638c43..0000000 --- a/fmpp/src/main/java/fmpp/util/BugException.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -/** - * A bug has been detected. - */ -public class BugException extends RuntimeExceptionCC { - - private static final String MESSAGE = - "Internal error; it's maybe a bug or some other low-level malfunction. " + "If you think it's a bug, please report it to me: " + "ddekanyREMOVEME@freemail.hu, delete the REMOVEME. Details: "; - - public BugException(String message) { - super(MESSAGE + message); - } - - public BugException(String message, Throwable cause) { - super(MESSAGE + message, cause); - } -} diff --git a/fmpp/src/main/java/fmpp/util/DataLoaderUtil.java b/fmpp/src/main/java/fmpp/util/DataLoaderUtil.java deleted file mode 100644 index 4e0c460..0000000 --- a/fmpp/src/main/java/fmpp/util/DataLoaderUtil.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.util.List; - -/** - * Utility methods for writing data loaders. - */ -public class DataLoaderUtil { - - public static final String OPTION_NAME_ENCODING = "encoding"; - - public static String getStringArgument(int index, Object value) { - return getStringSomething(argumentX(index), value); - } - - public static String getStringOption(String name, Object value) { - return getStringSomething(theXOption(name), value); - } - - public static char getCharArgument(int index, Object value) { - return getCharSomething(argumentX(index), value); - } - - public static char getCharOption(String name, Object value) { - return getCharSomething(theXOption(name), value); - } - - public static boolean getBooleanArgument(int index, Object value) { - return getBooleanSomething(argumentX(index), value); - } - - public static boolean getBooleanOption(String name, Object value) { - return getBooleanSomething(theXOption(name), value); - } - - public static int getIntArgument(int index, Object value) { - return parseIntSomething(argumentX(index), value); - } - - public static int getIntOption(String name, Object value) { - return parseIntSomething(theXOption(name), value); - } - - public static String[] getStringArrayArgument(int index, Object value) { - return getStringArrayArgument(index, value, false); - } - - public static String[] getStringArrayOption(String name, Object value) { - return getStringArrayOption(name, value, false); - } - - /** - * @param allowString if true a value that is a single string - * will be treated as a 1 long sequence that contains that string. - */ - public static String[] getStringArrayArgument(int index, Object value, - boolean allowString) { - return parseStringArraySomething(argumentX(index), value, allowString); - } - - /** - * @param allowString if true a value that is a single string - * will be treated as a 1 long sequence that contains that string. - */ - public static String[] getStringArrayOption(String name, Object value, - boolean allowString) { - return parseStringArraySomething(theXOption(name), value, allowString); - } - - private static String theXOption(String name) { - return "the \"" + name + "\" option"; - } - - private static String argumentX(int index) { - return "argument " + index; - } - - private static String getStringSomething( - String what, Object value) { - if (value instanceof String) { - return (String) value; - } else { - throw new IllegalArgumentException("The value of " + what - + " must be a string."); - } - } - - private static char getCharSomething( - String what, Object value) { - if (value instanceof String) { - String s = (String) value; - if (s.equalsIgnoreCase("tab")) { - return '\t'; - } - if (s.length() != 1) { - throw new IllegalArgumentException( - "The value of " + what - + " must be 1 character long or tab."); - } - return s.charAt(0); - } else { - throw new IllegalArgumentException("The value of " + what - + " must be a character."); - } - } - - private static boolean getBooleanSomething( - String what, Object value) { - if (value instanceof Boolean) { - return ((Boolean) value).booleanValue(); - } else { - throw new IllegalArgumentException("The value of " + what - + " must be a boolean."); - } - } - - private static int parseIntSomething( - String what, Object value) { - if (value instanceof Number) { - try { - return MiscUtil.numberToInt((Number) value); - } catch (IllegalArgumentException e) { - throw new IllegalArgumentException("The value of " + what - + " must be an integer. (Detail: " - + e.getMessage() + ")"); - } - } else { - throw new IllegalArgumentException("The value of " + what - + " must be an integer."); - } - } - - private static String[] parseStringArraySomething( - String what, Object value, boolean allowString) { - Object o; - String[] res; - if (value instanceof List) { - List ls = (List) value; - int ln = ls.size(); - res = new String[ln]; - for (int i = 0; i < ln; i++) { - o = ls.get(i); - if (!(o instanceof String)) { - throw new IllegalArgumentException("The value of " + what - + " must be a sequence of strings, but the item at " - + "index " + i + " is not a string."); - } - res[i] = (String) o; - } - return res; - } else if (value instanceof String[]) { - return (String[]) value; - } else if (value instanceof Object[]) { - Object[] ls = (Object[]) value; - res = new String[ls.length]; - for (int i = 0; i < ls.length; i++) { - o = ls[i]; - if (!(o instanceof String)) { - throw new IllegalArgumentException("The value of " + what - + " must be a sequence of strings, but the item at " - + "index " + i + " is not a string."); - } - res[i] = (String) o; - } - return res; - } else if (allowString && value instanceof String) { - res = new String[1]; - res[0] = (String) value; - return res; - } else { - if (allowString) { - throw new IllegalArgumentException("The value of " + what - + " must be a sequence of strings or a single string, " - + "but it is neither."); - } else { - throw new IllegalArgumentException("The value of " + what - + " must be a sequence of strings, but it is not even " - + "a sequence."); - } - } - } - -} diff --git a/fmpp/src/main/java/fmpp/util/ExceptionCC.java b/fmpp/src/main/java/fmpp/util/ExceptionCC.java deleted file mode 100644 index cfa814c..0000000 --- a/fmpp/src/main/java/fmpp/util/ExceptionCC.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - - -/** - * This was used for emulating cause-chains on Java earlier than 1.4, but as FMPP now requires 1.4, it just dispatches - * to {@link Exception}. - * Not that in FMPP error messages, the message of this exception is trusted (i.e. no need to print the class name), as - * it is inside an {@code fmpp} package. - */ -public class ExceptionCC extends Exception { - - private static final long serialVersionUID = 1L; - - public ExceptionCC() { - super(); - } - - public ExceptionCC(String s) { - super(s); - } - - public ExceptionCC(Throwable cause) { - super(cause); - } - - public ExceptionCC(String s, Throwable cause) { - super(s, cause); - } - -} diff --git a/fmpp/src/main/java/fmpp/util/FileUtil.java b/fmpp/src/main/java/fmpp/util/FileUtil.java deleted file mode 100644 index f35ac45..0000000 --- a/fmpp/src/main/java/fmpp/util/FileUtil.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.Reader; - -/** - * Collection of file and path related functions. - */ -public class FileUtil { - /** - * Reaturns the path of a file or directory relative to a directory, - * in native format. - * @return The relative path. - * It never starts with separator char (/ on UN*X). - * @throws IOException if the two paths has no common parent directory - * (such as C:\foo.txt and D:\foo.txt), or - * the the paths are malformed. - */ - public static String getRelativePath(File fromDir, File toFileOrDir) - throws IOException { - char sep = File.separatorChar; - String ofrom = fromDir.getCanonicalPath(); - String oto = toFileOrDir.getCanonicalPath(); - boolean needSepEndForDirs; - if (!ofrom.endsWith(File.separator)) { - ofrom += sep; - needSepEndForDirs = false; - } else { - needSepEndForDirs = true; - } - boolean otoEndsWithSep; - if (!oto.endsWith(File.separator)) { - oto += sep; - otoEndsWithSep = false; - } else { - otoEndsWithSep = true; - } - String from = ofrom.toLowerCase(); - String to = oto.toLowerCase(); - - StringBuffer path = new StringBuffer(oto.length()); - - int fromln = from.length(); - goback: while (true) { - if (to.regionMatches(0, from, 0, fromln)) { - File fromf = new File(ofrom.substring( - 0, needSepEndForDirs ? fromln : fromln - 1)); - File tof = new File(oto.substring( - 0, needSepEndForDirs ? fromln : fromln - 1)); - if (fromf.equals(tof)) { - break goback; - } - } - path.append(".." + sep); - fromln--; - while (fromln > 0 && from.charAt(fromln - 1) != sep) { - fromln--; - } - if (fromln == 0) { - throw new IOException( - "Could not find common parent directory in these " - + "paths: " + ofrom + " and " + oto); - } - } - path.append(oto.substring(fromln)); - if (!otoEndsWithSep && path.length() != 0) { - path.setLength(path.length() - 1); - } - - return path.toString(); - } - - /** - * Copies a file; silently overwrites the destination if already exists. - * - * @param copyLMD tells if the last modification time of the original - * file will be copied too. - */ - public static void copyFile(File src, File dst, boolean copyLMD) - throws IOException { - byte[] buffer = new byte[1024 * 64]; - InputStream in = new FileInputStream(src); - try { - long srcLMD = 0L; - if (copyLMD) { - srcLMD = src.lastModified(); - if (srcLMD == 0) { - throw new IOException("Failed to get the last modification " - + "time of " + src.getAbsolutePath()); - } - } - OutputStream out = new FileOutputStream(dst); - try { - int ln; - while ((ln = in.read(buffer)) != -1) { - out.write(buffer, 0, ln); - } - } finally { - out.close(); - } - if (srcLMD != 0L) { - dst.setLastModified(srcLMD); - } - } finally { - in.close(); - } - } - - /** - * Same as {@link #copyFile(File, File, boolean) copyFile(src, dst, true))}. - */ - public static void copyFile(File src, File dst) throws IOException { - copyFile(src, dst, true); - } - - /** - * Returns true if file is inside ascendant or - * file is the same as the ascendant, otherwise - * returns false. - */ - public static boolean isInsideOrEquals(File file, File ascendant) { - while (!file.equals(ascendant)) { - file = file.getParentFile(); - if (file == null) { - return false; - } - } - return true; - } - - /** - * Returns true if file is inside ascendant, - * otherwise returns false. - */ - public static boolean isInside(File file, File ascendant) { - if (!file.equals(ascendant)) { - return false; - } - do { - file = file.getParentFile(); - if (file == null) { - return false; - } - } while (!file.equals(ascendant)); - return true; - } - - /** - * Resolves relative UN*X path based on given root and working directory. - * @param root root directory - * @param wd working directory (current direcory) - */ - public static File resolveRelativeUnixPath(File root, File wd, String path) - throws IOException { - File c; - int i; - if (path.startsWith("/")) { - i = 1; - c = root.getAbsoluteFile(); - } else { - i = 0; - c = wd.getAbsoluteFile(); - } - int ln = path.length(); - while (i < ln) { - String step; - int si = path.indexOf(i, '/'); - if (si == -1) { - si = ln; - } - step = path.substring(i, si); - i = si + 1; - if (step.equals(".")) { - continue; - } else if (step.equals("..")) { - c = c.getParentFile(); - if (c == null) { - throw new IOException("Parent directory not found."); - } - } else { - c = new File(c, step); - } - } - c = c.getCanonicalFile(); - - if (!isInsideOrEquals(c, root)) { - throw new IOException("Attempt to leave the root directory."); - } - - return c; - } - - /** - * Returns a compressed version of the path. - * For example, /foo/ba.../baaz.txt instead of - * /foo/bar/blah/blah/blah/baaz.txt. - * @param path the path to compress. Either native or UNIX format. - * @param maxPathLength the maximum length of the result. - * Must be at least 4. - */ - public static String compressPath(String path, int maxPathLength) { - if (path.length() > maxPathLength) { - int r = path.length() - maxPathLength + 3; - int i = path.lastIndexOf(File.separatorChar); - if (i == -1) { - i = path.lastIndexOf('/'); - } - if (i <= r) { - return "..." + path.substring(r); - } else { - return path.substring(0, i - r) + "..." + path.substring(i); - } - } else { - return path; - } - } - - /** - * Brings the path to UNI*X style format, so that it can be handled - * with path pattern handling functions. - */ - public static String pathToUnixStyle(String path) { - path = path.replace(File.separatorChar, '/'); - if (File.separatorChar != '\\') { - path = path.replace('\\', '/'); // Protection from Win users... :) - } - return path; - } - - public static String removeSlashPrefix(String path) { - if (path.startsWith("/") && !path.startsWith("//")) { - return path.substring(1); - } else { - return path; - } - } - - /** - * Converts UN*X style path to regular expression (originally, for Perl 5 dialect, but also works for Java's - * dialect). - * In additional to standard UN*X path meta characters (*, - * ?) it understands **, that is the same as - * in Ant. It assumes that the paths what you will later match - * with the pattern are always starting with slash (they are absoulte paths - * to an imaginary base). - */ - public static String pathPatternToPerl5Regex(String text) { - StringBuffer sb = new StringBuffer(); - - if (!text.startsWith("/")) { - text = "/" + text; - } - if (text.endsWith("/")) { - text += "**"; - } - - char[] chars = text.toCharArray(); - int ln = chars.length; - for (int i = 0; i < ln; i++) { - char c = chars[i]; - if (c == '\\' || c == '^' || c == '.' || c == '$' || c == '|' - || c == '(' || c == ')' || c == '[' || c == ']' - || c == '+' || c == '{' - || c == '}' || c == '@') { - sb.append('\\'); - sb.append(c); - } else if (i == 0 && ln > 2 - && chars[0] == '*' && chars[1] == '*' - && chars[2] == '/') { - sb.append(".*/"); - i += 2; - } else if (c == '/' && i + 2 < ln - && chars[i + 1] == '*' && chars[i + 2] == '*') { - if (i + 3 == ln) { - sb.append("/.*"); - } else { - sb.append("(/.*)?"); - } - i += 2; - } else if (c == '*') { - sb.append("[^/]*"); - } else if (c == '?') { - sb.append("[^/]"); - } else { - sb.append(c); - } - } - - return sb.toString(); - } - - public static String loadString(InputStream in, String charset) - throws IOException { - Reader r = charset != null ? new InputStreamReader(in, charset) : new InputStreamReader(in); - StringBuffer sb = new StringBuffer(1024); - try { - char[] buf = new char[4096]; - int ln; - while ((ln = r.read(buf)) != -1) { - sb.append(buf, 0, ln); - } - } finally { - r.close(); - } - return sb.toString(); - } - - public static byte[] loadByteArray(InputStream in) throws IOException { - int size = 0; - int bcap = 1024; - byte[] b = new byte[bcap]; - try { - int rdn; - while ((rdn = in.read(b, size, bcap - size)) != -1) { - size += rdn; - if (bcap == size) { - bcap *= 2; - byte[] newB = new byte[bcap]; - System.arraycopy(b, 0, newB, 0, size); - b = newB; - } - } - } finally { - in.close(); - } - if (b.length != size) { - byte[] newB = new byte[size]; - System.arraycopy(b, 0, newB, 0, size); - return newB; - } else { - return b; - } - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/util/FreemarkerUtil.java b/fmpp/src/main/java/fmpp/util/FreemarkerUtil.java deleted file mode 100644 index 138034b..0000000 --- a/fmpp/src/main/java/fmpp/util/FreemarkerUtil.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import freemarker.ext.util.WrapperTemplateModel; -import freemarker.template.TemplateBooleanModel; -import freemarker.template.TemplateCollectionModel; -import freemarker.template.TemplateDateModel; -import freemarker.template.TemplateHashModel; -import freemarker.template.TemplateHashModelEx; -import freemarker.template.TemplateModel; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateModelIterator; -import freemarker.template.TemplateNumberModel; -import freemarker.template.TemplateScalarModel; -import freemarker.template.TemplateSequenceModel; - -/** - * FreeMarker related utilities. - */ -public class FreemarkerUtil { - - /** - * Converts TemplateModel-s to java.util.* and - * java.lang.* objects. - *

      - *
    • FTL hash will be converted to java.util.Map - *
    • FTL sequence and collection will be converted to - * java.util.List - *
    • FTL numbers will be converted to java.lang.Number - *
    • FTL dates will be converted to java.util.Date - *
    • FTL booleans will be converted to java.lang.Boolean - *
    • FTL strings will be converted to java.lang.String - *
    • Other FTL variables (transforms, methods, etc.) will be returned as - * is. - *
    - * - *

    Container types (hash, equence, etc.) will be converted recursively, - * so the subvariables are also converted, and the subvariables of - * subvariables are converted, etc. - * - *

    For multi-type variables a single type will be choosen, which is the - * first type in the above list. - * - *

    If the TemplateModel supports - * WrapperTemplateModel, unwrapping will be used only if - * the type of the unwrapped object is proper according to the above list. - * - * @return The converted object. You may do not modify the returned - * objects, as it is unpredicalbe if it has effect on the converted - * TemplateModel-s. - */ - public static Object ftlVarToCoreJavaObject(TemplateModel m) - throws TemplateModelException { - Object o; - - if (m instanceof TemplateHashModel) { - if (m instanceof WrapperTemplateModel) { - o = ((WrapperTemplateModel) m).getWrappedObject(); - if (o instanceof Map) { - return o; //!! - } - } - if (m instanceof TemplateHashModelEx) { - Map res = new HashMap(); - TemplateHashModelEx hash = (TemplateHashModelEx) m; - TemplateModelIterator tit = hash.keys().iterator(); - while (tit.hasNext()) { - String key = ((TemplateScalarModel) tit.next()) - .getAsString(); - res.put(key, ftlVarToCoreJavaObject(hash.get(key))); - } - return res; //!! - } else { - throw new TemplateModelException( - "Can't convert hash variable to java.util.Map, " - + "because it is not a TemplateHashModelEx, so the " - + "keys can't be enumerated."); - } - } else if (m instanceof TemplateSequenceModel) { - if (m instanceof WrapperTemplateModel) { - o = ((WrapperTemplateModel) m).getWrappedObject(); - if (o instanceof List) { - return o; //!! - } - } - TemplateSequenceModel seq = (TemplateSequenceModel) m; - int ln = seq.size(); - List res = new ArrayList(ln); - for (int i = 0; i < ln; i++) { - res.add(ftlVarToCoreJavaObject(seq.get(i))); - } - return res; //!! - } else if (m instanceof TemplateCollectionModel) { - TemplateModelIterator tit = ((TemplateCollectionModel) m) - .iterator(); - List res = new ArrayList(); - while (tit.hasNext()) { - res.add(ftlVarToCoreJavaObject(tit.next())); - } - return res; //!! - } else if (m instanceof TemplateNumberModel) { - return ((TemplateNumberModel) m).getAsNumber(); //!! - } else if (m instanceof TemplateDateModel) { - return ((TemplateDateModel) m).getAsDate(); - } else if (m instanceof TemplateBooleanModel) { - return ((TemplateBooleanModel) m).getAsBoolean() - ? Boolean.TRUE : Boolean.FALSE; //!! - } else if (m instanceof TemplateScalarModel) { - return ((TemplateScalarModel) m).getAsString(); //!! - } else { - // Do not convert - return m; //!! - } - } -} diff --git a/fmpp/src/main/java/fmpp/util/InstallationException.java b/fmpp/src/main/java/fmpp/util/InstallationException.java deleted file mode 100644 index 8435c95..0000000 --- a/fmpp/src/main/java/fmpp/util/InstallationException.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -/** - * There is a problem with the software environment. - */ -public class InstallationException extends ExceptionCC { - - public InstallationException(String s) { - super(s); - } - - public InstallationException(String s, Throwable cause) { - super(s, cause); - } - -} diff --git a/fmpp/src/main/java/fmpp/util/JSONParseException.java b/fmpp/src/main/java/fmpp/util/JSONParseException.java deleted file mode 100644 index c928c3d..0000000 --- a/fmpp/src/main/java/fmpp/util/JSONParseException.java +++ /dev/null @@ -1,21 +0,0 @@ -package fmpp.util; - -public class JSONParseException extends ExceptionCC { - - private static final long serialVersionUID = 1L; - - public JSONParseException( - String message, String text, int position, String fileName) { - super(StringUtil.createSourceCodeErrorMessage( - message, text, position, fileName, 56)); - } - - public JSONParseException( - String message, String text, int position, String fileName, - Throwable cause) { - super(StringUtil.createSourceCodeErrorMessage( - message, text, position, fileName, 56), - cause); - } - -} diff --git a/fmpp/src/main/java/fmpp/util/JSONParser.java b/fmpp/src/main/java/fmpp/util/JSONParser.java deleted file mode 100644 index d3614fc..0000000 --- a/fmpp/src/main/java/fmpp/util/JSONParser.java +++ /dev/null @@ -1,434 +0,0 @@ -package fmpp.util; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import freemarker.template.utility.NumberUtil; - -/** - * Simple JSON parser where JSON objects create {@link Map}-s, JSON array-s create {@link List}-s, and the others - * create the obvious Java equivalents. Numbers will be {@link Integer}-s where they fit into that, otherwise they - * will be {@link Long}-s, and if not even can store the value or if the value is not whole, {@link BigDecimal}-s. - * - * @since 0.9.15 - */ -public class JSONParser { - - private static final String UNCLOSED_OBJECT_MESSAGE - = "This {...} was still unclosed when the end of the file was reached. (Look for a missing \"}\")"; - - private static final String UNCLOSED_ARRAY_MESSAGE - = "This [...] was still unclosed when the end of the file was reached. (Look for a missing \"]\")"; - - private static final Object JSON_NULL = new Object(); - - private static final BigDecimal MIN_INT_AS_BIGDECIMAL = BigDecimal.valueOf(Integer.MIN_VALUE); - private static final BigDecimal MAX_INT_AS_BIGDECIMAL = BigDecimal.valueOf(Integer.MAX_VALUE); - private static final BigDecimal MIN_LONG_AS_BIGDECIMAL = BigDecimal.valueOf(Long.MIN_VALUE); - private static final BigDecimal MAX_LONG_AS_BIGDECIMAL = BigDecimal.valueOf(Long.MAX_VALUE); - - private final String src; - private final String sourceLocation; - private final int ln; - - private int p; - - public static Object parse(String src, String sourceLocation) throws JSONParseException { - return new JSONParser(src, sourceLocation).parse(); - } - - /** - * @param sourceLocation Only used in error messages, maybe {@code null}. - */ - private JSONParser(String src, String sourceLocation) { - this.src = src; - this.sourceLocation = sourceLocation; - this.ln = src.length(); - } - - private Object parse() throws JSONParseException { - // Skip BOM: - if (ln > 0 && src.charAt(0) == '\uFEFF') { - p++; - } - - skipWS(); - Object result = consumeValue("Empty JSON (contains no value)", p); - - skipWS(); - if (p != ln) { - throw newParseException("End-of-file was expected but found further non-whitespace characters."); - } - - return result; - } - - private Object consumeValue(String eofErrorMessage, int eofBlamePosition) throws JSONParseException { - if (p == ln) { - throw newParseException( - eofErrorMessage == null - ? "A value was expected here, but end-of-file was reached." : eofErrorMessage, - eofBlamePosition == -1 ? p : eofBlamePosition); - } - - Object result; - - result = tryConsumeString(); - if (result != null) return result; - - result = tryConsumeNumber(); - if (result != null) return result; - - result = tryConsumeObject(); - if (result != null) return result; - - result = tryConsumeArray(); - if (result != null) return result; - - result = tryConsumeTrueFalseNull(); - if (result != null) return result != JSON_NULL ? result : null; - - // Better error message for a frequent mistake: - if (p < ln && src.charAt(p) == '\'') { - throw newParseException("Unexpected apostrophe-quote character. " - + "JSON strings must be quoted with quotation mark."); - } - - throw newParseException( - "Expected either the beginning of a (negative) number or the beginning of one of these: " - + "{...}, [...], \"...\", true, false, null. Found character " + StringUtil.jQuote(src.charAt(p)) - + " instead."); - } - - private Object tryConsumeTrueFalseNull() throws JSONParseException { - int startP = p; - if (p < ln && isIdentifierStart(src.charAt(p))) { - p++; - while (p < ln && isIdentifierPart(src.charAt(p))) { - p++; - } - } - - if (startP == p) return null; - - String keyword = src.substring(startP, p); - if (keyword.equals("true")) { - return Boolean.TRUE; - } else if (keyword.equals("false")) { - return Boolean.FALSE; - } else if (keyword.equals("null")) { - return JSON_NULL; - } - - throw newParseException( - "Invalid JSON keyword: " + keyword + ". Should be one of: true, false, null. " - + "If it meant to be a string then it must be quoted.", startP); - } - - private Number tryConsumeNumber() throws JSONParseException { - char c = src.charAt(p); - boolean negative = c == '-'; - if (!(negative || isDigit(c) || c == '.')) { - return null; - } - - int startP = p; - - if (negative) { - if (p + 1 >= ln) { - throw newParseException("Expected a digit after \"-\", but reached end-of-file."); - } - char lookAheadC = src.charAt(p + 1); - if (!(isDigit(lookAheadC) || lookAheadC == '.')) { - return null; - } - p++; // Consume "-" only, not the digit - } - - long longSum = 0; - boolean firstDigit = true; - consumeLongFittingHead: do { - c = src.charAt(p); - - if (!isDigit(c)) { - if (c == '.' && firstDigit) { - throw newParseException("JSON doesn't allow numbers starting with \".\"."); - } - break consumeLongFittingHead; - } - - int digit = c - '0'; - if (longSum == 0) { - if (!firstDigit) { - throw newParseException("JSON doesn't allow superfluous leading 0-s.", p - 1); - } - - longSum = !negative ? digit : -digit; - p++; - } else { - long prevLongSum = longSum; - longSum = longSum * 10 + (!negative ? digit : -digit); - if (!negative && prevLongSum > longSum || negative && prevLongSum < longSum) { - // We had an overflow => Can't consume this digit as long-fitting - break consumeLongFittingHead; - } - p++; - } - firstDigit = false; - } while (p < ln); - - if (p < ln && isBigDecimalFittingTailCharacter(c)) { - char lastC = c; - p++; - - consumeBigDecimalFittingTail: while (p < ln) { - c = src.charAt(p); - if (isBigDecimalFittingTailCharacter(c)) { - p++; - } else if ((c == '+' || c == '-') && isE(lastC)) { - p++; - } else { - break consumeBigDecimalFittingTail; - } - lastC = c; - } - - String numStr = src.substring(startP, p); - BigDecimal bd; - try { - bd = new BigDecimal(numStr); - } catch (NumberFormatException e) { - throw new JSONParseException("Malformed number: " + numStr, src, startP, sourceLocation, e); - } - - if (bd.compareTo(MIN_INT_AS_BIGDECIMAL) >= 0 && bd.compareTo(MAX_INT_AS_BIGDECIMAL) <= 0) { - if (NumberUtil.isIntegerBigDecimal(bd)) { - return new Integer(bd.intValue()); - } - } else if (bd.compareTo(MIN_LONG_AS_BIGDECIMAL) >= 0 && bd.compareTo(MAX_LONG_AS_BIGDECIMAL) <= 0) { - if (NumberUtil.isIntegerBigDecimal(bd)) { - return new Long(bd.longValue()); - } - } - return bd; - } else { - return longSum <= Integer.MAX_VALUE && longSum >= Integer.MIN_VALUE - ? (Number) new Integer((int) longSum) : new Long(longSum); - } - } - - private String tryConsumeString() throws JSONParseException { - int startP = p; - if (!tryConsumeChar('"')) return null; - - StringBuffer sb = new StringBuffer(); - char c = 0; - while (p < ln) { - c = src.charAt(p); - - if (c == '"') { - p++; - return sb.toString(); // Call normally returns here! - } else if (c == '\\') { - p++; - sb.append(consumeAfterBackslash()); - } else if (c <= 0x1F) { - if (c == '\t') { - throw newParseException("JSON doesn't allow unescaped tab character in string literals; " - + "use \\t instead."); - } - if (c == '\r') { - throw newParseException("JSON doesn't allow unescaped CR character in string literals; " - + "use \\r instead."); - } - if (c == '\n') { - throw newParseException("JSON doesn't allow unescaped LF character in string literals; " - + "use \\n instead."); - } - throw newParseException("JSON doesn't allow unescaped control characters in string literals, " - + "but found character with code (decimal): " + (int) c); - } else { - p++; - sb.append(c); - } - } - - throw newParseException("String literal was still unclosed when the end of the file was reached. " - + "(Look for missing or accidentally escaped closing quotation mark.)", startP); - } - - private List/**/ tryConsumeArray() throws JSONParseException { - int startP = p; - if (!tryConsumeChar('[')) return null; - - skipWS(); - if (tryConsumeChar(']')) return Collections.EMPTY_LIST; - - boolean afterComma = false; - List elements = new ArrayList(); - do { - skipWS(); - elements.add(consumeValue(afterComma ? null : UNCLOSED_ARRAY_MESSAGE, afterComma ? -1 : startP)); - - skipWS(); - afterComma = true; - } while (consumeChar(',', ']', UNCLOSED_ARRAY_MESSAGE, startP) == ','); - return elements; - } - - private Map/**/ tryConsumeObject() throws JSONParseException { - int startP = p; - if (!tryConsumeChar('{')) return null; - - skipWS(); - if (tryConsumeChar('}')) return Collections.EMPTY_MAP; - - boolean afterComma = false; - Map map = new LinkedHashMap(); // Must keeps original order! - do { - skipWS(); - int keyStartP = p; - Object key = consumeValue(afterComma ? null : UNCLOSED_OBJECT_MESSAGE, afterComma ? -1 : startP); - if (!(key instanceof String)) { - throw newParseException("Wrong key type. JSON only allows string keys inside {...}.", keyStartP); - } - - skipWS(); - consumeChar(':'); - - skipWS(); - map.put(key, consumeValue(null, -1)); - - skipWS(); - afterComma = true; - } while (consumeChar(',', '}', UNCLOSED_OBJECT_MESSAGE, startP) == ','); - return map; - } - - private boolean isE(char c) { - return c == 'e' || c == 'E'; - } - - private boolean isBigDecimalFittingTailCharacter(char c) { - return c == '.' || isE(c) || isDigit(c); - } - - private char consumeAfterBackslash() throws JSONParseException { - if (p == ln) { - throw newParseException("Reached the end of the file, but the escape is unclosed."); - } - - final char c = src.charAt(p); - switch (c) { - case '"': - case '\\': - case '/': - p++; - return c; - case 'b': - p++; - return '\b'; - case 'f': - p++; - return '\f'; - case 'n': - p++; - return '\n'; - case 'r': - p++; - return '\r'; - case 't': - p++; - return '\t'; - case 'u': - p++; - return consumeAfterBackslashU(); - } - throw newParseException("Unsupported escape: \\" + c); - } - - private char consumeAfterBackslashU() throws JSONParseException { - if (p + 3 >= ln) { - throw newParseException("\\u must be followed by exactly 4 hexadecimal digits"); - } - final String hex = src.substring(p, p + 4); - try { - char r = (char) Integer.parseInt(hex, 16); - p += 4; - return r; - } catch (NumberFormatException e) { - throw newParseException("\\u must be followed by exactly 4 hexadecimal digits, but was followed by " - + StringUtil.jQuote(hex) + "."); - } - } - - private boolean tryConsumeChar(char c) { - if (p < ln && src.charAt(p) == c) { - p++; - return true; - } else { - return false; - } - } - - private void consumeChar(char expected) throws JSONParseException { - consumeChar(expected, (char) 0, null, -1); - } - - private char consumeChar(char expected1, char expected2, String eofErrorHint, int eofErrorP) throws JSONParseException { - if (p >= ln) { - throw newParseException(eofErrorHint == null - ? "Expected " + StringUtil.jQuote(expected1) - + ( expected2 != 0 ? " or " + StringUtil.jQuote(expected2) : "") - + " character, but reached end-of-file. " - : eofErrorHint, - eofErrorP == -1 ? p : eofErrorP); - } - char c = src.charAt(p); - if (c == expected1 || (expected2 != 0 && c == expected2)) { - p++; - return c; - } - throw newParseException("Expected " + StringUtil.jQuote(expected1) - + ( expected2 != 0 ? " or " + StringUtil.jQuote(expected2) : "") - + " character, but found " + StringUtil.jQuote(c) + " instead."); - } - - private void skipWS() { - while (p < ln && isWS(src.charAt(p))) { - p++; - } - } - - /** - * Whitespace as specified by JSON. - */ - private boolean isWS(char c) { - return c == ' ' || c == '\t' || c == '\r' || c == '\n'; - } - - private boolean isIdentifierStart(char c) { - return Character.isLetter(c) || c == '_' || c == '$'; - } - - private boolean isDigit(char c) { - return c >= '0' && c <= '9'; - } - - private boolean isIdentifierPart(char c) { - return isIdentifierStart(c) || isDigit(c); - } - - private JSONParseException newParseException(String message) { - return newParseException(message, p); - } - - private JSONParseException newParseException(String message, int p) { - return new JSONParseException(message, src, p, sourceLocation); - } - -} diff --git a/fmpp/src/main/java/fmpp/util/MiscUtil.java b/fmpp/src/main/java/fmpp/util/MiscUtil.java deleted file mode 100644 index 3250151..0000000 --- a/fmpp/src/main/java/fmpp/util/MiscUtil.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.lang.reflect.Method; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.Dictionary; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import freemarker.core.ParseException; -import freemarker.template.TemplateException; -import freemarker.template.TemplateModelException; - -/** - * Miscellaneous utility methods. - */ -public class MiscUtil { - - public static final Class[] EMPTY_CLASS_ARRAY = new Class[]{}; - public static final Object[] EMPTY_OBJECT_ARRAY = new Object[]{}; - public static final String[] EMPTY_STRING_ARRAY = new String[]{}; - - private static final BigInteger MAX_INT_AS_BIG_INTEGER - = BigInteger.valueOf(Integer.MAX_VALUE); - private static final BigInteger MIN_INT_AS_BIG_INTEGER - = BigInteger.valueOf(Integer.MIN_VALUE); - - /** - * This is the same as {@link #causeTrace}, but it doesn't print the - * exception class name if the class is inside an fmpp package. - */ - public static String causeMessages(Throwable e) { - return causeTrace_common(e, true); - } - - /** - * Returns the cause trace of an exception. This is similar to a J2SE 1.4+ - * stack-trace, but it's shorter, because it does not contain the "at" - * lines. - */ - public static String causeTrace(Throwable e) { - return causeTrace_common(e, false); - } - - private static String causeTrace_common( - Throwable e, boolean hideUninterstingClasses) { - if (e == null) { - return "??? (the error was described with a null object)"; - } - - StringBuffer res = new StringBuffer(); - String lastShownMsg = null; - - boolean first = true; - traceBack: while (true) { - String msg = e.getMessage(); - if (msg != null) { - if (lastShownMsg == null || !msg.equals(lastShownMsg)) { - if (!first) { - appendCausedBy(res); - } - lastShownMsg = msg; - String cn = e.getClass().getName(); - if (!hideUninterstingClasses || !cn.startsWith("fmpp.")) { - int prevLen = res.length(); - appendClassAndLocation(e, hideUninterstingClasses, res); - if (res.length() != prevLen) { - res.append(": "); - } - } - res.append(msg); - } - } else { - if (!first) { - appendCausedBy(res); - } - appendClassAndLocation(e, false, res); - } - e = getCauseException(e); - if (e == null) { - break traceBack; - } - first = false; - } - - return res.toString(); - } - - private static void appendCausedBy(StringBuffer res) { - res.append(StringUtil.LINE_BREAK); - res.append(StringUtil.LINE_BREAK); - res.append("Caused by:"); - res.append(StringUtil.LINE_BREAK); - } - - private static void appendClassAndLocation(Throwable e, boolean hideUninterstingClasses, StringBuffer res) { - StackTraceElement[] stackTrace = e.getStackTrace(); - if (stackTrace != null && stackTrace.length >= 1) { - StackTraceElement thrower = stackTrace[0]; - String throwerC = thrower.getClassName(); - if (!hideUninterstingClasses || !technicalDetailsNeedNotBeShown(throwerC, e)) { - res.append(e.getClass().getName()); - res.append(" (at "); - res.append(throwerC); - String m = thrower.getMethodName(); - if (m != null) { - res.append('.'); - res.append(m); - } - int line = thrower.getLineNumber(); - if (line > 0) { - res.append(':'); - res.append(line); - } - res.append(")"); - } else if (e instanceof TemplateException) { - res.append("FreeMarker template error"); - } - } else { // Shouldn't ever occur - res.append(e.getClass().getName()); - } - } - - private static boolean technicalDetailsNeedNotBeShown(String throwerClassName, Throwable thrownExc) { - return - ( - thrownExc instanceof ExceptionCC - || thrownExc instanceof RuntimeExceptionCC - || thrownExc instanceof TemplateException - || thrownExc instanceof ParseException - || thrownExc instanceof TemplateModelException - ) - && - ( - throwerClassName.startsWith("freemarker.") - || throwerClassName.startsWith("fmpp.") - ); - } - - /** - * Tries to load the class with the current context class loader, - * and only then with the current defining class loader. - */ - public static Class classForName(String className) - throws ClassNotFoundException { - try { - return Class.forName( - className, true, - Thread.currentThread().getContextClassLoader()); - } catch (ClassNotFoundException e) { - ; // ignored - } catch (SecurityException e) { - ; // ignored - } - return Class.forName(className); - } - - public static Map dictionaryToMap(Dictionary dict) { - Map m = new HashMap(dict.size()); - Enumeration en = dict.keys(); - while (en.hasMoreElements()) { - Object key = en.nextElement(); - m.put(key, dict.get(key)); - } - return m; - } - - public static Throwable getCauseException(Throwable e) { - Throwable cause = e.getCause(); - if (cause != null) { - return cause; - } - - try { - Method m = e.getClass().getMethod("getTarget", EMPTY_CLASS_ARRAY); - Throwable targetE = (Throwable) m.invoke(e, EMPTY_OBJECT_ARRAY); - if (targetE != null) { - return targetE; - } - } catch (Throwable exc) { - ; // ignore - } - - try { - Method m = e.getClass().getMethod( - "getRootCause", EMPTY_CLASS_ARRAY); - Throwable rootCauseE = (Throwable) m.invoke(e, EMPTY_OBJECT_ARRAY); - if (rootCauseE != null) { - return rootCauseE; - } - } catch (Throwable exc) { - ; // ignore - } - - return null; - } - - /** - * Checks if the list contains the given object (exactly the same instance). - */ - public static boolean listContainsObject(List list, Object o) { - if (list instanceof ArrayList) { - int ln = list.size(); - int i = 0; - while (i < ln && list.get(i) != o) { - i++; - } - return i < ln; - } else { - Iterator it = list.iterator(); - while (it.hasNext()) { - if (it.next() == o) { - return true; - } - } - return false; - } - } - - /** - * Checks if the map contains the given object (exactly the same instance) - * as value. - */ - public static boolean mapContainsObject(Map map, Object o) { - Iterator it = map.entrySet().iterator(); - while (it.hasNext()) { - if (((Map.Entry) it.next()).getValue() == o) { - return true; - } - } - return false; - } - - /** - * Returns the first index of the given object (exactly the same instance) - * in the list. - * @return the index of the first occurance, or -1 if not found. - */ - public static int findObject(List list, Object o) { - if (list instanceof ArrayList) { - int ln = list.size(); - int i = 0; - while (i < ln) { - if (list.get(i) == o) { - return i; - } - i++; - } - return -1; - } else { - int i = 0; - Iterator it = list.iterator(); - while (it.hasNext()) { - if (it.next() == o) { - return i; - } - i++; - } - return -1; - } - } - - private static final String MSG_XML_NOT_AVAIL - = "XML support is not available. " - + "You need to use Java2 platform 1.4 or later, or " - + "you have to install XML support."; - - /** - * Checks if XML API-s (JAXP, SAX2, DOM) are present. - * Can be a bit slow depending on the actual class loader setup. - * - * @param requiredForThis a short sentence that describes for human reader - * if for what do we need the XML support (e.g. - * "Usage of xml data loader." or - * "Set XML entity resolver."). This sentence is used - * in error message of the {@link fmpp.util.InstallationException}. - * Can be null. - */ - public static void checkXmlSupportAvailability(String requiredForThis) - throws InstallationException { - Throwable error = null; - try { - classForName("javax.xml.parsers.DocumentBuilderFactory"); - classForName("org.w3c.dom.Element"); - classForName("org.xml.sax.XMLReader"); - } catch (ClassNotFoundException e) { - error = e; - } catch (SecurityException e) { - error = e; - } - if (error != null) { - if (requiredForThis != null) { - throw new InstallationException( - MSG_XML_NOT_AVAIL - + " Note that XML support was required for this: " - + requiredForThis, error); - } else { - throw new InstallationException(MSG_XML_NOT_AVAIL, error); - } - } - } - - /** - * Loseless convertion to int. - * - * @throws IllegalArgumentException if the loseless conversion is not - * possible. The error message contains the details. - */ - public static int numberToInt(Number value) { - if (value instanceof Integer || value instanceof Short - || value instanceof Byte) { - return value.intValue(); - } else if (value instanceof Long) { - long lv = ((Long) value).longValue(); - if (lv >= Integer.MIN_VALUE && lv <= Integer.MAX_VALUE) { - return (int) lv; - } else { - throw new IllegalArgumentException( - "Can't convert this long value to int, because " - + "it's out of range: " + lv); - } - } else if (value instanceof Double) { - double dv = ((Double) value).doubleValue(); - int iv = (int) dv; - if (dv == (int) dv) { - return iv; - } else { - throw new IllegalArgumentException( - "Can't convert this double value to int " - + "without loss: " + dv); - } - } else if (value instanceof Float) { - float fv = ((Float) value).floatValue(); - int iv = (int) fv; - if (fv == (int) fv) { - return iv; - } else { - throw new IllegalArgumentException( - "Can't convert this float value to int " - + "without loss: " + fv); - } - } else if (value instanceof BigDecimal) { - BigDecimal bv = (BigDecimal) value; - int iv = bv.intValue(); - if (bv.compareTo(BigDecimal.valueOf(iv)) == 0) { - return iv; - } else { - throw new IllegalArgumentException( - "Can't convert this BigDecimal value to int " - + "without loss: " + bv); - } - } else if (value instanceof BigInteger) { - BigInteger bv = (BigInteger) value; - if (bv.compareTo(MIN_INT_AS_BIG_INTEGER) >= 0 - && bv.compareTo(MAX_INT_AS_BIG_INTEGER) <= 0) { - return bv.intValue(); - } else { - throw new IllegalArgumentException( - "Can't convert this BigInteger value to int " - + "without loss: " + bv); - } - } else { - throw new IllegalArgumentException( - "Can't convert a " + value.getClass().getName() - + " to integer number."); - } - } - - /** - * Concatenates two arrays. - */ - public static String[] add(String[] a1, String[] a2) { - String[] r = new String[a1.length + a2.length]; - System.arraycopy(a1, 0, r, 0, a1.length); - System.arraycopy(a2, 0, r, a1.length, a2.length); - return r; - } - -} \ No newline at end of file diff --git a/fmpp/src/main/java/fmpp/util/MultiListIterator.java b/fmpp/src/main/java/fmpp/util/MultiListIterator.java deleted file mode 100644 index 55db7d0..0000000 --- a/fmpp/src/main/java/fmpp/util/MultiListIterator.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; - -/** - * Iterates over multiple List-s. The elements of a list that was - * added earlier will be iterated earlier. - */ -public class MultiListIterator implements Iterator { - private List lists[] = new List[6]; - private int listCount; - private int currentList; - private Iterator currentIterator; - - public MultiListIterator() { - } - - public MultiListIterator(List ls1) { - addList(ls1); - } - - public MultiListIterator(List ls1, List ls2) { - addList(ls1); - addList(ls2); - } - - public MultiListIterator(List ls1, List ls2, List ls3) { - addList(ls1); - addList(ls2); - addList(ls3); - } - - public MultiListIterator(List ls1, List ls2, List ls3, List ls4) { - addList(ls1); - addList(ls2); - addList(ls3); - addList(ls4); - } - - /** - * Use this to add more lists after the constructor. - */ - public void addList(List ls) { - if (ls.size() != 0) { - if (listCount == lists.length) { - List[] newLists = new List[listCount * 2]; - System.arraycopy(lists, 0, newLists, 0, listCount); - lists = newLists; - } - lists[listCount++] = ls; - } - } - - public boolean hasNext() { - if (currentIterator == null) { - if (listCount != 0) { - currentIterator = lists[0].iterator(); - } else { - return false; - } - } - boolean hasNext = currentIterator.hasNext(); - if (!hasNext && currentList < listCount - 1) { - return true; - } else { - return hasNext; - } - } - - public Object next() { - if (currentIterator == null) { - if (listCount != 0) { - currentIterator = lists[0].iterator(); - } else { - throw new NoSuchElementException( - "No next element; the list is empty."); - } - } - if (currentIterator.hasNext() || currentList == listCount - 1) { - return currentIterator.next(); - } else { - currentList++; - currentIterator = lists[currentList].iterator(); - return currentIterator.next(); - } - } - - public void remove() { - currentIterator.remove(); - } -} diff --git a/fmpp/src/main/java/fmpp/util/NullOutputStream.java b/fmpp/src/main/java/fmpp/util/NullOutputStream.java deleted file mode 100644 index 94d444c..0000000 --- a/fmpp/src/main/java/fmpp/util/NullOutputStream.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.io.IOException; -import java.io.OutputStream; - -/** - * OutputStream that simply drops what it gets. - */ -public class NullOutputStream extends OutputStream { - - public static final NullOutputStream INSTANCE = new NullOutputStream(); - - private NullOutputStream() { - } - - public void write(int b) throws IOException { - //nop - } - - public void write(byte[] b, int off, int len) throws IOException { - //nop - } - -} diff --git a/fmpp/src/main/java/fmpp/util/NullWriter.java b/fmpp/src/main/java/fmpp/util/NullWriter.java deleted file mode 100644 index d30d06b..0000000 --- a/fmpp/src/main/java/fmpp/util/NullWriter.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.io.IOException; -import java.io.Writer; - -/** - * Writer that simply drops what it gets. - */ -public class NullWriter extends Writer { - - public static final NullWriter INSTANCE = new NullWriter(); - - private NullWriter() { - } - - public void write(char[] cbuf, int off, int len) throws IOException { - } - - public void flush() throws IOException { - } - - public void close() throws IOException { - } - -} diff --git a/fmpp/src/main/java/fmpp/util/RuntimeExceptionCC.java b/fmpp/src/main/java/fmpp/util/RuntimeExceptionCC.java deleted file mode 100644 index dd1fabd..0000000 --- a/fmpp/src/main/java/fmpp/util/RuntimeExceptionCC.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.io.PrintStream; -import java.io.PrintWriter; - -/** - * RuntimeException that emulates J2SE 1.4+ cause-chains if it runs - * on earlier versions. Furthermore, in FMPP error messages, the message of this - * exception is trusted (i.e. no need to print the class name), as it is inside - * an fmpp.* package. - */ -public class RuntimeExceptionCC extends RuntimeException { - private Throwable cause; - - private static final boolean BEFORE_1_4 = before14(); - private static boolean before14() { - Class ec = Exception.class; - try { - ec.getMethod("getCause", new Class[]{}); - } catch (NoSuchMethodException e) { - return true; - } - return false; - } - - public RuntimeExceptionCC() { - super(); - } - - public RuntimeExceptionCC(String s) { - super(s); - } - - public RuntimeExceptionCC(Throwable cause) { - super(); - this.cause = cause; - } - - public RuntimeExceptionCC(String s, Throwable cause) { - super(s); - this.cause = cause; - } - - public Throwable getCause() { - return cause; - } - - public void printStackTrace() { - super.printStackTrace(); - if (BEFORE_1_4 && cause != null) { - System.err.print("Caused by: "); - cause.printStackTrace(); - } - } - - public void printStackTrace(PrintStream s) { - super.printStackTrace(s); - if (BEFORE_1_4 && cause != null) { - s.print("Caused by: "); - cause.printStackTrace(s); - } - } - - public void printStackTrace(PrintWriter s) { - super.printStackTrace(s); - if (BEFORE_1_4 && cause != null) { - s.print("Caused by: "); - cause.printStackTrace(s); - } - } -} diff --git a/fmpp/src/main/java/fmpp/util/StringUtil.java b/fmpp/src/main/java/fmpp/util/StringUtil.java deleted file mode 100644 index 9a03401..0000000 --- a/fmpp/src/main/java/fmpp/util/StringUtil.java +++ /dev/null @@ -1,1548 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.util; - -import java.io.UnsupportedEncodingException; -import java.math.BigDecimal; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Locale; -import java.util.TimeZone; - -import freemarker.template.SimpleDate; -import freemarker.template.TemplateDateModel; - -/** - * Collection of string manipulation functions. - */ -public class StringUtil { - - private static final DateFormat DTF4 - = new SimpleDateFormat("yyyy-MM-dd H:mm:ss'|'", Locale.US); - private static final DateFormat DTF3 - = new SimpleDateFormat("yyyy-MM-dd h:mm:ss a'|'", Locale.US); - private static final DateFormat DTF2 - = new SimpleDateFormat("yyyy-MM-dd H:mm:ss z'|'", Locale.US); - private static final DateFormat DTF1 - = new SimpleDateFormat("yyyy-MM-dd h:mm:ss a z'|'", Locale.US); - private static final DateFormat DF1 - = new SimpleDateFormat("yyyy-MM-dd'|'", Locale.US); - private static final DateFormat DF2 - = new SimpleDateFormat("yyyy-MM-dd z'|'", Locale.US); - private static final DateFormat TF1 - = new SimpleDateFormat("H:mm:ss'|'", Locale.US); - private static final DateFormat TF2 - = new SimpleDateFormat("h:mm:ss a'|'", Locale.US); - private static final DateFormat TF3 - = new SimpleDateFormat("H:mm:ss z'|'", Locale.US); - private static final DateFormat TF4 - = new SimpleDateFormat("h:mm:ss a z'|'", Locale.US); - - static { - DF1.setLenient(false); - DF2.setLenient(false); - DTF1.setLenient(false); - DTF2.setLenient(false); - DTF3.setLenient(false); - DTF4.setLenient(false); - TF1.setLenient(false); - TF2.setLenient(false); - TF3.setLenient(false); - TF4.setLenient(false); - } - - /** - * The default line-break string used by the methods in this class. - */ - public static final String LINE_BREAK = - System.getProperty("line.separator"); - - /** - * HTML encoding (does not convert line breaks). - * Replaces all '>' '<' '&' and '"' with entity reference - */ - public static String htmlEnc(String s) { - int ln = s.length(); - for (int i = 0; i < ln; i++) { - char c = s.charAt(i); - if (c == '<' || c == '>' || c == '&' || c == '"') { - StringBuffer b = - new StringBuffer(s.substring(0, i)); - switch (c) { - case '<': b.append("<"); break; - case '>': b.append(">"); break; - case '&': b.append("&"); break; - case '"': b.append("""); break; - default: throw new BugException("Illegal char"); - } - i++; - int next = i; - while (i < ln) { - c = s.charAt(i); - if (c == '<' || c == '>' || c == '&' || c == '"') { - b.append(s.substring(next, i)); - switch (c) { - case '<': b.append("<"); break; - case '>': b.append(">"); break; - case '&': b.append("&"); break; - case '"': b.append("""); break; - default: throw new BugException("Illegal char"); - } - next = i + 1; - } - i++; - } - if (next < ln) { - b.append(s.substring(next)); - } - s = b.toString(); - break; - } // if c == - } // for - return s; - } - - /** - * XML Encoding. - * Replaces all '>' '<' '&', "'" and '"' with entity reference - */ - public static String xmlEnc(String s) { - int ln = s.length(); - for (int i = 0; i < ln; i++) { - char c = s.charAt(i); - if (c == '<' || c == '>' || c == '&' || c == '"' || c == '\'') { - StringBuffer b = - new StringBuffer(s.substring(0, i)); - switch (c) { - case '<': b.append("<"); break; - case '>': b.append(">"); break; - case '&': b.append("&"); break; - case '"': b.append("""); break; - case '\'': b.append("'"); break; - default: throw new BugException("Illegal char"); - } - i++; - int next = i; - while (i < ln) { - c = s.charAt(i); - if (c == '<' || c == '>' || c == '&' - || c == '"' || c == '\'') { - b.append(s.substring(next, i)); - switch (c) { - case '<': b.append("<"); break; - case '>': b.append(">"); break; - case '&': b.append("&"); break; - case '"': b.append("""); break; - case '\'': b.append("'"); break; - default: throw new BugException("Illegal char"); - } - next = i + 1; - } - i++; - } - if (next < ln) { - b.append(s.substring(next)); - } - s = b.toString(); - break; - } // if c == - } // for - return s; - } - - /** - * XML encoding without replacing apostrophes and quotation marks. - * @see #xmlEnc(String) - */ - public static String xmlEncNQ(String s) { - int ln = s.length(); - for (int i = 0; i < ln; i++) { - char c = s.charAt(i); - if (c == '<' || c == '>' || c == '&') { - StringBuffer b = - new StringBuffer(s.substring(0, i)); - switch (c) { - case '<': b.append("<"); break; - case '>': b.append(">"); break; - case '&': b.append("&"); break; - default: throw new BugException("Illegal char"); - } - i++; - int next = i; - while (i < ln) { - c = s.charAt(i); - if (c == '<' || c == '>' || c == '&') { - b.append(s.substring(next, i)); - switch (c) { - case '<': b.append("<"); break; - case '>': b.append(">"); break; - case '&': b.append("&"); break; - default: throw new BugException("Illegal char"); - } - next = i + 1; - } - i++; - } - if (next < ln) { - b.append(s.substring(next)); - } - s = b.toString(); - break; - } // if c == - } // for - return s; - } - - /** - * Rich Text Format encoding (does not replace line breaks). - * Escapes all '\' '{' '}' and '"' - */ - public static String rtfEnc(String s) { - int ln = s.length(); - for (int i = 0; i < ln; i++) { - char c = s.charAt(i); - if (c == '\\' || c == '{' || c == '}') { - StringBuffer b = - new StringBuffer(s.substring(0, i)); - switch (c) { - case '\\': b.append("\\\\"); break; - case '{': b.append("\\{"); break; - case '}': b.append("\\}"); break; - default: throw new BugException("Illegal char"); - } - i++; - int next = i; - while (i < ln) { - c = s.charAt(i); - if (c == '\\' || c == '{' || c == '}') { - b.append(s.substring(next, i)); - switch (c) { - case '\\': b.append("\\\\"); break; - case '{': b.append("\\{"); break; - case '}': b.append("\\}"); break; - default: throw new BugException("Illegal char"); - } - next = i + 1; - } - i++; - } - if (next < ln) { - b.append(s.substring(next)); - } - s = b.toString(); - break; - } // if c == - } // for - return s; - } - - /** - * Quotes character as Java language character, except quote characters, - * which are referred with name. - */ - public static String jQuoteOrName(char c) { - if (c == '\\' || c == '\'' || c == '"' || c < 0x20) { - switch (c) { - case '\\': - return "'\\\\'"; - case '\'': - return "apostrophe-quote"; - case '"': - return "quotation mark"; - case '\n': - return "'\\n'"; - case '\r': - return "'\\r'"; - case '\t': - return "'\\t'"; - case '\b': - return "'\\b'"; - case '\f': - return "'\\f'"; - default: - String s = Integer.toHexString(c); - int ln = s.length(); - if (ln == 1) { - return "'\\u000" + s + "'"; - } else if (ln == 2) { - return "'\\u00" + s + "'"; - } else if (ln == 3) { - return "'\\u0" + s + "'"; - } else { - return "'\\u" + s + "'"; - } - } - } else { - return "'" + c + "'"; - } - } - - /** - * Quotes string as Java language character. - */ - public static String jQuote(char c) { - if (c == '\\' || c == '\'' || c < 0x20) { - switch (c) { - case '\\': - return "'\\\\'"; - case '\'': - return "'\\''"; - case '\n': - return "'\\n'"; - case '\r': - return "'\\r'"; - case '\t': - return "'\\t'"; - case '\b': - return "'\\b'"; - case '\f': - return "'\\f'"; - default: - String s = Integer.toHexString(c); - int ln = s.length(); - if (ln == 1) { - return "'\\u000" + s + "'"; - } else if (ln == 2) { - return "'\\u00" + s + "'"; - } else if (ln == 3) { - return "'\\u0" + s + "'"; - } else { - return "'\\u" + s + "'"; - } - } - } else { - return "'" + c + "'"; - } - } - - /** - * Quotes string as Java language string literal. - */ - public static String jQuote(String s) { - if (s == null) { - return "null"; - } - String s2; - int ln = s.length(); - int next = 0; - int i = 0; - StringBuffer b = new StringBuffer(ln + 3); - b.append("\""); - while (i < ln) { - char c = s.charAt(i); - if (c == '\\' || c == '"' || c < 0x20) { - b.append(s.substring(next, i)); - switch (c) { - case '\\': - b.append("\\\\"); break; - case '"': - b.append("\\\""); break; - case '\n': - b.append("\\n"); break; - case '\r': - b.append("\\r"); break; - case '\t': - b.append("\\t"); break; - case '\b': - b.append("\\b"); break; - case '\f': - b.append("\\f"); break; - default: - b.append("\\u0000"); - int x = b.length(); - s2 = Integer.toHexString(c); - b.replace(x - s2.length(), x, s2); - } - next = i + 1; - } - i++; - } - if (next < ln) { - b.append(s.substring(next)); - } - b.append("\""); - return b.toString(); - } - - /** - * FTL string literal decoding. - * - * \\, \", \', \n, \t, \r, \b and \f will be replaced according to - * Java rules. In additional, it knows \g, \l, \a and \{ which are - * replaced with <, >, & and { respectively. - * \x works as hexadecimal character code escape. The character - * codes are interpreted according to UCS basic plane (Unicode). - * "f\x006Fo", "f\x06Fo" and "f\x6Fo" will be "foo". - * "f\x006F123" will be "foo123" as the maximum number of digits is 4. - * - * All other \X (where X is any character not mentioned above or - * End-of-string) will cause a {@link ParseException}. - * - * @param s String literal without the surrounding quotation marks - * @return String with all escape sequences resolved - * @throws ParseException if there string contains illegal escapes - */ - public static String ftlStringLiteralDec(String s) throws ParseException { - - int idx = s.indexOf('\\'); - if (idx == -1) { - return s; - } - - int lidx = s.length() - 1; - int bidx = 0; - StringBuffer buf = new StringBuffer(lidx); - do { - buf.append(s.substring(bidx, idx)); - if (idx >= lidx) { - throw new ParseException( - "The last character of string literal is backslash"); - } - char c = s.charAt(idx + 1); - switch (c) { - case '"': - buf.append('"'); - bidx = idx + 2; - break; - case '\'': - buf.append('\''); - bidx = idx + 2; - break; - case '\\': - buf.append('\\'); - bidx = idx + 2; - break; - case 'n': - buf.append('\n'); - bidx = idx + 2; - break; - case 'r': - buf.append('\r'); - bidx = idx + 2; - break; - case 't': - buf.append('\t'); - bidx = idx + 2; - break; - case 'f': - buf.append('\f'); - bidx = idx + 2; - break; - case 'b': - buf.append('\b'); - bidx = idx + 2; - break; - case 'g': - buf.append('>'); - bidx = idx + 2; - break; - case 'l': - buf.append('<'); - bidx = idx + 2; - break; - case 'a': - buf.append('&'); - bidx = idx + 2; - break; - case '{': - buf.append('{'); - bidx = idx + 2; - break; - case 'x': { - idx += 2; - int x = idx; - int y = 0; - int z = lidx > idx + 3 ? idx + 3 : lidx; - while (idx <= z) { - char b = s.charAt(idx); - if (b >= '0' && b <= '9') { - y <<= 4; - y += b - '0'; - } else if (b >= 'a' && b <= 'f') { - y <<= 4; - y += b - 'a' + 10; - } else if (b >= 'A' && b <= 'F') { - y <<= 4; - y += b - 'A' + 10; - } else { - break; - } - idx++; - } - if (x < idx) { - buf.append((char) y); - } else { - throw new ParseException( - "Invalid \\x escape in a string literal"); - } - bidx = idx; - break; - } - default: - throw new ParseException( - "Invalid escape sequence (\\" + c + ") in " + "a string literal"); - } - idx = s.indexOf('\\', bidx); - } while (idx != -1); - buf.append(s.substring(bidx)); - - return buf.toString(); - } - - /** - * Convers string to Perl 5 regular expression. - * This means that regular expression metacharacters will be escaped. - */ - public static String stringToPerl5Regex(String text) { - StringBuffer sb = new StringBuffer(); - char[] chars = text.toCharArray(); - int ln = chars.length; - for (int i = 0; i < ln; i++) { - char c = chars[i]; - if (c == '\\' || c == '^' || c == '.' || c == '$' || c == '|' - || c == '(' || c == ')' || c == '[' || c == ']' - || c == '*' || c == '+' || c == '?' || c == '{' - || c == '}' || c == '@') { - sb.append('\\'); - } - sb.append(c); - } - - return sb.toString(); - } - - /** - * Same as {@link #split(String, char, boolean) split(s, c, false)}. - */ - public static String[] split(String s, char c) { - return split(s, c, false); - } - - /** - * Splits a string at the specified character, and optionally trims the - * items. - */ - public static String[] split(String s, char c, boolean trim) { - int i, b, e; - int cnt; - String res[]; - int ln = s.length(); - - i = 0; - cnt = 1; - while ((i = s.indexOf(c, i)) != -1) { - cnt++; - i++; - } - res = new String[cnt]; - - i = 0; - b = 0; - while (b <= ln) { - e = s.indexOf(c, b); - if (e == -1) { - e = ln; - } - if (!trim) { - res[i++] = s.substring(b, e); - } else { - int e2 = e - 1; - while (e2 >= 0 && Character.isWhitespace(s.charAt(e2))) { - e2--; - } - e2++; - while (b < ln && Character.isWhitespace(s.charAt(b))) { - b++; - } - if (b < e) { - res[i++] = s.substring(b, e2); - } else { - res[i++] = ""; - } - } - b = e + 1; - } - return res; - } - - /** - * Splits a string at the specified string. - */ - public static String[] split(String s, String sep) { - int i, b, e; - int cnt; - String res[]; - int ln = s.length(); - int sln = sep.length(); - - if (sln == 0) { - throw new IllegalArgumentException( - "The separator string has 0 length"); - } - - i = 0; - cnt = 1; - while ((i = s.indexOf(sep, i)) != -1) { - cnt++; - i += sln; - } - res = new String[cnt]; - - i = 0; - b = 0; - while (b <= ln) { - e = s.indexOf(sep, b); - if (e == -1) { - e = ln; - } - res[i++] = s.substring(b, e); - b = e + sln; - } - return res; - } - - /** - * Splits a string at white-spaces. A continous sequence of one or more - * white-space is considered as a single separator. If the string is - * starting or ending with a separator, then that separator is silently - * ignored. Thus, the result array contains only trimmed non-0-length - * strings. - */ - public static String[] splitAtWS(String text) { - int i = 0; - int ln = text.length(); - - int cnt = 0; - countWords: while (true) { - while (i < ln && Character.isWhitespace(text.charAt(i))) { - i++; - } - if (i < ln) { - cnt++; - while (i < ln && !Character.isWhitespace(text.charAt(i))) { - i++; - } - } else { - break countWords; - } - } - - String[] res = new String[cnt]; - int x = 0; - i = 0; - fillResult: while (true) { - int b; - while (i < ln && Character.isWhitespace(text.charAt(i))) { - i++; - } - b = i; - if (i < ln) { - cnt++; - while (i < ln && !Character.isWhitespace(text.charAt(i))) { - i++; - } - res[x++] = text.substring(b, i); - } else { - break fillResult; - } - } - return res; - } - - /** - * Replaces all occurances of a sub-string in a string. - * @param text The string where it will replace {@code oldsub} with - * {@code newsub}. - * @return String The string after the replacements. - */ - public static String replace(String text, String oldsub, String newsub) { - int e = text.indexOf(oldsub); - if (e == -1) { - return text; - } - int b = 0; - int tln = text.length(); - int oln = oldsub.length(); - StringBuffer buf = new StringBuffer(tln + 16); - do { - buf.append(text.substring(b, e)); - buf.append(newsub); - b = e + oln; - e = text.indexOf(oldsub, b); - } while (e != -1); - buf.append(text.substring(b)); - return buf.toString(); - } - - /** - * Same as {@code expandTabs(text, tabWidth, 0)}. - * @see #expandTabs(String, int, int) - */ - public static String expandTabs(String text, int tabWidth) { - return expandTabs(text, tabWidth, 0); - } - - /** - * Replaces all occurances of character tab with spaces. - * @param tabWidth the distance of tab stops. - * @param startCol the index of the column in which the first character of - * the string is from the left edge of the page. The index of the first - * column is 0. - * @return String The string after the replacements. - */ - public static String expandTabs(String text, int tabWidth, int startCol) { - int e = text.indexOf('\t'); - if (e == -1) { - return text; - } - int b = 0; - int tln = text.length(); - StringBuffer buf = new StringBuffer(tln + 16); - do { - buf.append(text.substring(b, e)); - int col = buf.length() + startCol; - for (int i = tabWidth * (1 + col / tabWidth) - col; i > 0; i--) { - buf.append(' '); - } - b = e + 1; - e = text.indexOf('\t', b); - } while (e != -1); - buf.append(text.substring(b)); - return buf.toString(); - } - - /** - * Removes the line-break from the end of the string. - */ - public static String chomp(String s) { - if (s.endsWith("\r\n")) { - return s.substring(0, s.length() - 2); - } - if (s.endsWith("\r") || s.endsWith("\n")) { - return s.substring(0, s.length() - 1); - } - return s; - } - - /** - * Removes the line-break from the end of the {@link StringBuffer}. - */ - public static void chomp(StringBuffer sb) { - int ln = sb.length(); - if (ln >= 2 && sb.charAt(ln - 2) == '\r' && sb.charAt(ln - 1) == '\n') { - sb.setLength(ln - 2); - } else if (ln >= 1) { - char c = sb.charAt(ln - 1); - if (c == '\n' || c == '\r') { - sb.setLength(ln - 1); - } - } - } - - /** - * URL encoding (like%20this). - */ - public static String urlEnc(String s, String enc) - throws UnsupportedEncodingException { - int ln = s.length(); - int i; - for (i = 0; i < ln; i++) { - char c = s.charAt(i); - if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' - || c >= '0' && c <= '9' - || c == '_' || c == '-' || c == '.' || c == '!' || c == '~' - || c >= '\'' && c <= '*')) { - break; - } - } - if (i == ln) { - // Nothing to escape - return s; - } - - StringBuffer b = new StringBuffer((int) (ln * 1.333) + 2); - b.append(s.substring(0, i)); - - int encstart = i; - for (i++; i < ln; i++) { - char c = s.charAt(i); - if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' - || c >= '0' && c <= '9' - || c == '_' || c == '-' || c == '.' || c == '!' || c == '~' - || c >= '\'' && c <= '*') { - if (encstart != -1) { - byte[] o = s.substring(encstart, i).getBytes(enc); - for (int j = 0; j < o.length; j++) { - b.append('%'); - byte bc = o[j]; - int c1 = bc & 0x0F; - int c2 = (bc >> 4) & 0x0F; - b.append((char) (c2 < 10 ? c2 + '0' : c2 - 10 + 'A')); - b.append((char) (c1 < 10 ? c1 + '0' : c1 - 10 + 'A')); - } - encstart = -1; - } - b.append(c); - } else { - if (encstart == -1) { - encstart = i; - } - } - } - if (encstart != -1) { - byte[] o = s.substring(encstart, i).getBytes(enc); - for (int j = 0; j < o.length; j++) { - b.append('%'); - byte bc = o[j]; - int c1 = bc & 0x0F; - int c2 = (bc >> 4) & 0x0F; - b.append((char) (c2 < 10 ? c2 + '0' : c2 - 10 + 'A')); - b.append((char) (c1 < 10 ? c1 + '0' : c1 - 10 + 'A')); - } - } - - return b.toString(); - } - - /** - * URL encoding without escaping slashes. - */ - public static String urlPathEnc(String s, String enc) - throws UnsupportedEncodingException { - int ln = s.length(); - int i; - for (i = 0; i < ln; i++) { - char c = s.charAt(i); - if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' - || c >= '0' && c <= '9' || c == '/' - || c == '_' || c == '-' || c == '.' || c == '!' || c == '~' - || c >= '\'' && c <= '*')) { - break; - } - } - if (i == ln) { - // Nothing to escape - return s; - } - - StringBuffer b = new StringBuffer((int) (ln * 1.333) + 2); - b.append(s.substring(0, i)); - - int encstart = i; - for (i++; i < ln; i++) { - char c = s.charAt(i); - if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' - || c >= '0' && c <= '9' || c == '/' - || c == '_' || c == '-' || c == '.' || c == '!' || c == '~' - || c >= '\'' && c <= '*') { - if (encstart != -1) { - byte[] o = s.substring(encstart, i).getBytes(enc); - for (int j = 0; j < o.length; j++) { - b.append('%'); - byte bc = o[j]; - int c1 = bc & 0x0F; - int c2 = (bc >> 4) & 0x0F; - b.append((char) (c2 < 10 ? c2 + '0' : c2 - 10 + 'A')); - b.append((char) (c1 < 10 ? c1 + '0' : c1 - 10 + 'A')); - } - encstart = -1; - } - b.append(c); - } else { - if (encstart == -1) { - encstart = i; - } - } - } - if (encstart != -1) { - byte[] o = s.substring(encstart, i).getBytes(enc); - for (int j = 0; j < o.length; j++) { - b.append('%'); - byte bc = o[j]; - int c1 = bc & 0x0F; - int c2 = (bc >> 4) & 0x0F; - b.append((char) (c2 < 10 ? c2 + '0' : c2 - 10 + 'A')); - b.append((char) (c1 < 10 ? c1 + '0' : c1 - 10 + 'A')); - } - } - - return b.toString(); - } - - /** - * Hard-wraps flow-text. This is a convenience method that equivalent with - * {@code wrap(text, screenWidth, 0, 0, LINE_BREAK, false)}. - * - * @see #wrap(String, int, int, int, String, boolean) - */ - public static String wrap(String text, int screenWidth) { - return wrap(text, screenWidth, 0, 0, LINE_BREAK, false); - } - - /** - * Hard-wraps flow-text. This is a convenience method that equivalent with - * {@code wrap(text, screenWidth, 0, 0, LINE_BREAK, true)}. - * - * @see #wrap(String, int, int, int, String, boolean) - */ - public static String wrapTrace(String text, int screenWidth) { - return wrap(text, screenWidth, 0, 0, LINE_BREAK, true); - } - - /** - * Hard-wraps flow-text. This is a convenience method that equivalent with - * {@code wrap(text, screenWidth, 0, 0, lineBreak, false)}. - * - * @see #wrap(String, int, int, int, String, boolean) - */ - public static String wrap(String text, int screenWidth, String lineBreak) { - return wrap(text, screenWidth, 0, 0, lineBreak, false); - } - - /** - * Hard-wraps flow-text. This is a convenience method that equivalent with - * {@code wrap(text, screenWidth, indent, indent, LINE_BREAK, false)}. - * - * @see #wrap(String, int, int, int, String, boolean) - */ - public static String wrap(String text, int screenWidth, int indent) { - return wrap(text, screenWidth, indent, indent, LINE_BREAK, false); - } - - /** - * Hard-wraps flow-text. This is a convenience method that equivalent with - * wrap(text, screenWidth, firstIndent, indent, LINE_BREAK, - * false). - * - * @see #wrap(String, int, int, int, String, boolean) - */ - public static String wrap( - String text, int screenWidth, int firstIndent, int indent) { - return wrap(text, screenWidth, firstIndent, indent, LINE_BREAK, false); - } - - /** - * Hard-wraps flow-text. This is a convenience method that equivalent with - * {@code wrap(text, screenWidth, indent, indent, lineBreak, false)}. - * - * @see #wrap(String, int, int, int, String, boolean) - */ - public static String wrap( - String text, int screenWidth, int indent, String lineBreak) { - return wrap(text, screenWidth, indent, indent, lineBreak, false); - } - - /** - * Hard-wraps flow-text. This is a convenience method that equivalent with - * wrap(text, screenWidth, firstIndent, indent, lineBreak, - * false). - * - * @see #wrap(String, int, int, int, String, boolean) - */ - public static String wrap( - String text, int screenWidth, int firstIndent, int indent, - String lineBreak) { - return wrap(text, screenWidth, firstIndent, indent, lineBreak, false); - } - - /** - * Hard-wraps flow-text. Uses StringBuffer-s instead of String-s. - * This is a convenience method that equivalent with - * {@code wrap(text, screenWidth, firstIndent, indent, LINE_BREAK)}. - * - * @see #wrap(StringBuffer, int, int, int, String, boolean) - */ - public static StringBuffer wrap( - StringBuffer text, int screenWidth, int firstIndent, int indent) { - return wrap(text, screenWidth, firstIndent, indent, LINE_BREAK, false); - } - - /** - * Hard-wraps flow-text. - * - * @param text The flow-text to wrap. The explicit line-breaks of the - * source text will be kept. All types of line-breaks (UN*X, Mac, DOS/Win) - * are understood. - * @param screenWidth The (minimum) width of the screen. It does not - * utilize the {@code screenWidth}-th column of the screen to store - * characters, except line-breaks (because some terminals/editors - * do an automatic line-break when you write visible character there, - * and some doesn't... so it is unpredictable if an explicit line-break - * is needed or not.). - * @param firstIndent The indentation of the first line - * @param indent The indentation of all lines but the first line - * @param lineBreak The String used for line-breaks - * @param traceMode Set this true if the input text is a Java stack - * trace. In this mode, all lines starting with - * optional indentation + {@code 'at'} + space are treated as location - * lines, and will be indented and wrapped in a slightly special way. - * @throws IllegalArgumentException if the number of columns remaining for - * the text is less than 2. - */ - public static String wrap( - String text, int screenWidth, int firstIndent, int indent, - String lineBreak, boolean traceMode) { - return wrap( - new StringBuffer(text), screenWidth, firstIndent, indent, - lineBreak, traceMode).toString(); - } - - /** - * Hard-wraps flow-text. Uses StringBuffer-s instead of String-s. - * This is the method that is internally used by all other {@code wrap} - * variations, so if you are working with StringBuffers anyway, it gives - * better performance. - * - * @see #wrap(String, int, int, int, String, boolean) - */ - public static StringBuffer wrap( - StringBuffer text, int screenWidth, int firstIndent, int indent, - String lineBreak, boolean traceMode) { - - if (firstIndent < 0 || indent < 0 || screenWidth < 0) { - throw new IllegalArgumentException("Negative dimension"); - } - - int allowedCols = screenWidth - 1; - - if ((allowedCols - indent) < 2 || (allowedCols - firstIndent) < 2) { - throw new IllegalArgumentException("Usable columns < 2"); - } - - int ln = text.length(); - int defaultNextLeft = allowedCols - indent; - int b = 0; - int e = 0; - - StringBuffer res = new StringBuffer((int) (ln * 1.2)); - int left = allowedCols - firstIndent; - for (int i = 0; i < firstIndent; i++) { - res.append(' '); - } - StringBuffer tempb = new StringBuffer(indent + 2); - tempb.append(lineBreak); - for (int i = 0; i < indent; i++) { - tempb.append(' '); - } - String defaultBreakAndIndent = tempb.toString(); - - boolean firstSectOfSrcLine = true; - boolean firstWordOfSrcLine = true; - int traceLineState = 0; - int nextLeft = defaultNextLeft; - String breakAndIndent = defaultBreakAndIndent; - int wln = 0, x; - char c, c2; - do { - word: while (e <= ln) { - if (e != ln) { - c = text.charAt(e); - } else { - c = ' '; - } - if (traceLineState > 0 && e > b) { - if (c == '.' && traceLineState == 1) { - c = ' '; - } else { - c2 = text.charAt(e - 1); - if (c2 == ':') { - c = ' '; - } else if (c2 == '(') { - traceLineState = 2; - c = ' '; - } - } - } - if (c != ' ' && c != '\n' && c != '\r' && c != '\t') { - e++; - } else { - wln = e - b; - if (left >= wln) { - res.append(text.substring(b, e)); - left -= wln; - b = e; - } else { - wln = e - b; - if (wln > nextLeft || firstWordOfSrcLine) { - int ob = b; - while (wln > left) { - if (left > 2 || (left == 2 - && (firstWordOfSrcLine - || !(b == ob && nextLeft > 2)) - )) { - res.append(text.substring(b, b + left - 1)); - res.append("-"); - res.append(breakAndIndent); - wln -= left - 1; - b += left - 1; - left = nextLeft; - } else { - x = res.length() - 1; - if (x >= 0 && res.charAt(x) == ' ') { - res.delete(x, x + 1); - } - res.append(breakAndIndent); - left = nextLeft; - } - } - res.append(text.substring(b, b + wln)); - b += wln; - left -= wln; - } else { - x = res.length() - 1; - if (x >= 0 && res.charAt(x) == ' ') { - res.delete(x, x + 1); - } - res.append(breakAndIndent); - res.append(text.substring(b, e)); - left = nextLeft - wln; - b = e; - } - } - firstSectOfSrcLine = false; - firstWordOfSrcLine = false; - break word; - } - } - int extra = 0; - space: while (e < ln) { - c = text.charAt(e); - if (c == ' ') { - e++; - } else if (c == '\t') { - e++; - extra += 7; - } else if (c == '\n' || c == '\r') { - nextLeft = defaultNextLeft; - breakAndIndent = defaultBreakAndIndent; - res.append(breakAndIndent); - e++; - if (e < ln) { - c2 = text.charAt(e); - if ((c2 == '\n' || c2 == '\r') && c != c2) { - e++; - } - } - left = nextLeft; - b = e; - firstSectOfSrcLine = true; - firstWordOfSrcLine = true; - traceLineState = 0; - } else { - wln = e - b + extra; - if (firstSectOfSrcLine) { - int y = allowedCols - indent - wln; - if (traceMode && ln > e + 2 - && text.charAt(e) == 'a' - && text.charAt(e + 1) == 't' - && text.charAt(e + 2) == ' ') { - if (y > 5 + 3) { - y -= 3; - } - traceLineState = 1; - } - if (y > 5) { - y = allowedCols - y; - nextLeft = allowedCols - y; - tempb = new StringBuffer(indent + 2); - tempb.append(lineBreak); - for (int i = 0; i < y; i++) { - tempb.append(' '); - } - breakAndIndent = tempb.toString(); - } - } - if (wln <= left) { - res.append(text.substring(b, e)); - left -= wln; - b = e; - } else { - res.append(breakAndIndent); - left = nextLeft; - b = e; - } - firstSectOfSrcLine = false; - break space; - } - } - } while (e < ln); - - return res; - } - - public static String createSourceCodeErrorMessage( - String message, String srcCode, int position, String fileName, - int maxQuotLength) { - int ln = srcCode.length(); - if (position < 0) { - position = 0; - } - if (position >= ln) { - if (position == ln) { - return message + StringUtil.LINE_BREAK - + "Error location: The very end of " - + (fileName == null ? "the text" : fileName) - + "."; - } else { - return message + StringUtil.LINE_BREAK - + "Error location: ??? (after the end of " - + (fileName == null ? "the text" : fileName) - + ")"; - } - } - - int i; - char c; - int rowBegin = 0; - int rowEnd; - int row = 1; - char lastChar = 0; - for (i = 0; i <= position; i++) { - c = srcCode.charAt(i); - if (lastChar == 0xA) { - rowBegin = i; - row++; - } else if (lastChar == 0xD && c != 0xA) { - rowBegin = i; - row++; - } - lastChar = c; - } - for (i = position; i < ln; i++) { - c = srcCode.charAt(i); - if (c == 0xA || c == 0xD) { - if (c == 0xA && i > 0 && srcCode.charAt(i - 1) == 0xD) { - i--; - } - break; - } - } - rowEnd = i - 1; - if (position > rowEnd + 1) { - position = rowEnd + 1; - } - int col = position - rowBegin + 1; - if (rowBegin > rowEnd) { - return message + StringUtil.LINE_BREAK - + "Error location: line " - + row + ", column " + col - + (fileName == null ? ":" : " in " + fileName + ":") - + StringUtil.LINE_BREAK - + "(Can't show the line because it is empty.)"; - } - String s1 = srcCode.substring(rowBegin, position); - String s2 = srcCode.substring(position, rowEnd + 1); - s1 = StringUtil.expandTabs(s1, 8); - int ln1 = s1.length(); - s2 = StringUtil.expandTabs(s2, 8, ln1); - int ln2 = s2.length(); - if (ln1 + ln2 > maxQuotLength) { - int newLn2 = ln2 - ((ln1 + ln2) - maxQuotLength); - if (newLn2 < 6) { - newLn2 = 6; - } - if (newLn2 < ln2) { - s2 = s2.substring(0, newLn2 - 3) + "..."; - ln2 = newLn2; - } - if (ln1 + ln2 > maxQuotLength) { - s1 = "..." + s1.substring((ln1 + ln2) - maxQuotLength + 3); - } - } - StringBuffer res = new StringBuffer(message.length() + 80); - res.append(message); - res.append(StringUtil.LINE_BREAK); - res.append("Error location: line "); - res.append(row); - res.append(", column "); - res.append(col); - if (fileName != null) { - res.append(" in "); - res.append(fileName); - } - res.append(":"); - res.append(StringUtil.LINE_BREAK); - res.append(s1); - res.append(s2); - res.append(StringUtil.LINE_BREAK); - int x = s1.length(); - while (x != 0) { - res.append(' '); - x--; - } - res.append('^'); - - return res.toString(); - } - - /** - * Converts a string to {@link BigDecimal}. - */ - public static BigDecimal stringToBigDecimal(String s) - throws ParseException { - s = s.trim(); - try { - return new BigDecimal(s); - } catch (NumberFormatException e) { - throw new ParseException("Value " + jQuote(s) - + " is not a valid number."); - } - } - - public static boolean stringToBoolean(String s) - throws ParseException { - s = s.trim().toLowerCase(); - if (s.equals("yes") || s.equals("true") || s.equals("y") - || s.equals("1")) { - return true; - } else if (s.equals("no") || s.equals("false") - || s.equals("n") || s.equals("0")) { - return false; - } else { - throw new StringUtil.ParseException("Value " + jQuote(s) + " is " - + "not a valid boolean."); - } - } - - /** - * Parses a date of format {@code "yyyy-MM-dd"} - * or {@code "yyyy-MM-dd z"} and returns it as - * {@link TemplateDateModel}. - */ - public static TemplateDateModel stringToDate(String s, TimeZone tz) - throws ParseException { - String orig = s; - s = s.trim() + "|"; - if (tz == null) { - tz = TimeZone.getDefault(); - } - synchronized (DF1) { - DF1.setTimeZone(tz); - try { - return new SimpleDate(DF1.parse(s), TemplateDateModel.DATE); - } catch (java.text.ParseException e) { - ; // ignore - } - DF2.setTimeZone(tz); - try { - return new SimpleDate(DF2.parse(s), TemplateDateModel.DATE); - } catch (java.text.ParseException e) { - throw new ParseException("Failed to parse " - + jQuote(orig) + " as date. Use format " - + "\"yyyy-MM-dd\" or \"yyyy-MM-dd z\"."); - } - } - } - - /** - * Parses a time of format {@code "H:mm:ss"} - * or {@code "h:mm:ss a"} or {@code "H:mm:ss z"} - * or {@code "h:mm:ss a z"} and returns it as - * {@link TemplateDateModel}. - */ - public static TemplateDateModel stringToTime(String s, TimeZone tz) - throws ParseException { - String orig = s; - s = s.trim() + "|"; - if (tz == null) { - tz = TimeZone.getDefault(); - } - synchronized (TF1) { - TF1.setTimeZone(tz); - try { - return new SimpleDate(TF1.parse(s), TemplateDateModel.TIME); - } catch (java.text.ParseException e) { - ; // ignore - } - TF2.setTimeZone(tz); - try { - return new SimpleDate(TF2.parse(s), TemplateDateModel.TIME); - } catch (java.text.ParseException e) { - ; // ignore - } - TF3.setTimeZone(tz); - try { - return new SimpleDate(TF3.parse(s), TemplateDateModel.TIME); - } catch (java.text.ParseException e) { - ; // ignore - } - TF4.setTimeZone(tz); - try { - return new SimpleDate(TF4.parse(s), TemplateDateModel.TIME); - } catch (java.text.ParseException e) { - throw new ParseException("Failed to parse " - + jQuote(orig) + " as time. Use format " - + "\"H:mm:ss\" or \"h:mm:ss a\" " + "or \"H:mm:ss z\" or \"h:mm:ss a z\"."); - } - } - } - - /** - * Parses a date-time of format {@code "yyyy-MM-dd H:mm:ss"} - * or {@code "yyyy-MM-dd h:mm:ss a"} or - * {@code "yyyy-MM-dd H:mm:ss z"} - * or {@code "yyyy-MM-dd h:mm:ss a z"} and returns it as - * {@link TemplateDateModel}. - */ - public static TemplateDateModel stringToDateTime(String s, TimeZone tz) - throws ParseException { - String orig = s; - s = s.trim() + "|"; - if (tz == null) { - tz = TimeZone.getDefault(); - } - synchronized (DTF1) { - DTF1.setTimeZone(tz); - try { - return new SimpleDate( - DTF1.parse(s), TemplateDateModel.DATETIME); - } catch (java.text.ParseException e) { - ; // ignore - } - DTF2.setTimeZone(tz); - try { - return new SimpleDate( - DTF2.parse(s), TemplateDateModel.DATETIME); - } catch (java.text.ParseException e) { - ; // ignore - } - DTF3.setTimeZone(tz); - try { - return new SimpleDate( - DTF3.parse(s), TemplateDateModel.DATETIME); - } catch (java.text.ParseException e) { - ; // ignore - } - DTF4.setTimeZone(tz); - try { - return new SimpleDate( - DTF4.parse(s), TemplateDateModel.DATETIME); - } catch (java.text.ParseException e) { - throw new ParseException("Failed to parse " - + jQuote(orig) + " as date-time. Use format " - + "\"yyyy-MM-dd H:mm:ss\" " + "or \"yyyy-MM-dd h:mm:ss a\" " - + "or \"yyyy-MM-dd H:mm:ss z\" " + "or \"yyyy-MM-dd h:mm:ss a z\"."); - } - } - } - - /** - * Converts all line-breaks to UN*X linebreaks ({@code "\n"}). The - * input text can contain UN*X, DOS (Windows) and Mac linebreaks mixed. - */ - public static String normalizeLinebreaks(String s) { - int ln = s.length(); - char c; - int i; - for (i = 0; i < ln; i++) { - c = s.charAt(i); - if (c == 0x0D) { - break; - } - } - if (i == ln) { - return s; - } - StringBuffer res = new StringBuffer(ln); - for (int x = 0; x < i; x++) { - res.append(s.charAt(x)); - } - outer: while (true) { - if (i + 1 < ln && s.charAt(i + 1) == 0xA) { - i++; - } - res.append('\n'); - inner: while (true) { - i++; - if (i == ln) { - break outer; - } - c = s.charAt(i); - if (c == 0xD) { - break inner; - } - res.append(c); - } - } - return res.toString(); - } - - /** - * Formal (syntactical) problem with the text. - */ - public static class ParseException extends ExceptionCC { - - public ParseException(String message) { - super(message); - } - - public ParseException(String message, int position) { - super(message + StringUtil.LINE_BREAK - + "Error location: character " + (position + 1)); - } - - public ParseException( - String message, String text, int position, String fileName) { - super(createSourceCodeErrorMessage( - message, text, position, fileName, 56)); - } - - - public ParseException(String message, Throwable cause) { - super(message, cause); - } - - public ParseException(String message, int position, Throwable cause) { - super(message + StringUtil.LINE_BREAK - + "Error location: character " + (position + 1), - cause); - } - - public ParseException( - String message, String text, int position, String fileName, - Throwable cause) { - super(createSourceCodeErrorMessage( - message, text, position, fileName, 56), - cause); - } - } - - /** - * @since 0.9.15 - */ - public static String repeat(String s, int n) { - if (n == 0) return ""; - if (n == 1) return s; - if (n < 0) { - throw new IllegalArgumentException("Negative repeat count: " + n); - } - StringBuffer sb = new StringBuffer(s.length() * n); - for (int i = 0; i < n; i++) { - sb.append(s); - } - return sb.toString(); - } - - /** - * @since 0.9.15 - */ - public static String capitalizeFirst(String s) { - if (s == null || s.length() == 0) return s; - char c = s.charAt(0); - return Character.isLowerCase(c) ? Character.toUpperCase(c) + s.substring(1) : s; - } -} diff --git a/fmpp/src/main/java/fmpp/util/package.html b/fmpp/src/main/java/fmpp/util/package.html deleted file mode 100644 index 9df7c9f..0000000 --- a/fmpp/src/main/java/fmpp/util/package.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    Collection of more-less FMPP independent utility classes. - \ No newline at end of file diff --git a/fmpp/src/main/resources/META-INF/LICENSE.txt b/fmpp/src/main/resources/META-INF/LICENSE.txt deleted file mode 100644 index 4e14d05..0000000 --- a/fmpp/src/main/resources/META-INF/LICENSE.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/fmpp/src/main/resources/fmpp/version.properties b/fmpp/src/main/resources/fmpp/version.properties deleted file mode 100644 index 1ec91f9..0000000 --- a/fmpp/src/main/resources/fmpp/version.properties +++ /dev/null @@ -1,9 +0,0 @@ -# Format: major.minor.micro -# Nightly version of upcoming version x.y.z should look like: x.y.z.5 -# No letters are allowed for META-INF compatibility. -version=0.9.15 - -# Same as "version" above, except that for nightly use "-SNAPSHOT" instead of ".5". -mavenVersion=0.9.15 - -buildInfo=@TIMESTAMP@ \ No newline at end of file diff --git a/fmpp/src/test/java/fmpp/testsuite/ConsoleTestProgressListener.java b/fmpp/src/test/java/fmpp/testsuite/ConsoleTestProgressListener.java deleted file mode 100644 index a52407b..0000000 --- a/fmpp/src/test/java/fmpp/testsuite/ConsoleTestProgressListener.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.testsuite; - -/** - * Prints test suite progress to the console. - */ -public class ConsoleTestProgressListener implements TestProgressListener { - - public void sendMessage(String message) { - System.out.println(message); - } - -} diff --git a/fmpp/src/test/java/fmpp/testsuite/SortAttrsTransform.java b/fmpp/src/test/java/fmpp/testsuite/SortAttrsTransform.java deleted file mode 100644 index 140dbe3..0000000 --- a/fmpp/src/test/java/fmpp/testsuite/SortAttrsTransform.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.testsuite; - -import java.io.IOException; -import java.io.Writer; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateTransformModel; - -/** - * Sorts the attributes of elements to alphabetical order. - */ -public class SortAttrsTransform implements TemplateTransformModel { - - public SortAttrsTransform() { - } - - public Writer getWriter(Writer out, Map args) - throws TemplateModelException, IOException { - return new AttributeSorterWriter(out); - } - - private class AttributeSorterWriter extends Writer { - private final Writer out; - private StringBuffer buf = new StringBuffer(); - - private AttributeSorterWriter(Writer out) { - this.out = out; - } - - public void close() throws IOException { - sendBuffer(); - } - - public void flush() throws IOException { - sendBuffer(); - out.flush(); - } - - public void write(char[] cbuf, int off, int len) throws IOException { - buf.append(cbuf, off, len); - } - - private void sendBuffer() throws IOException { - String src = buf.toString(); - int ln = src.length(); - char[] dst = new char[ln]; - List attrs = new ArrayList(); - int dp = 0, sp = 0; - normalMode: while (sp < ln) { - char c = src.charAt(sp++); - dst[dp++] = c; - - if (c == '<' && sp < ln && Character.isLetter(src.charAt(sp))) { - tagNameMode: while (sp < ln) { - c = src.charAt(sp++); - dst[dp++] = c; - if (c == '>' || c == '/') { - continue normalMode; - } - if (Character.isWhitespace(c)) { - break tagNameMode; - } - } - findFirstAttrMode: while (sp < ln) { - c = src.charAt(sp); - if (!Character.isWhitespace(c)) { - break findFirstAttrMode; - } - sp++; - dst[dp++] = c; - } - if (sp == ln || c == '>' || c == '/') { - continue normalMode; - } - int attrStart; - attrs.clear(); - fetchAttrsMode: while (true) { - attrStart = sp; - findAttrNameEndMode: while (true) { - if (sp == ln) { - break findAttrNameEndMode; - } - c = src.charAt(sp); - if (Character.isWhitespace(c) || c == '=') { - break findAttrNameEndMode; - } - if (c == '>' || c == '/') { - break findAttrNameEndMode; - } - sp++; - } - boolean foundEqS = false; - findAttrValueStartMode: while (true) { - if (sp == ln) { - break findAttrValueStartMode; - } - c = src.charAt(sp); - if (c == '=') { - foundEqS = true; - } else if (!Character.isWhitespace(c)) { - break findAttrValueStartMode; - } - sp++; - } - if (!foundEqS) { - int x = sp - 1; - while (x >= attrStart - && Character.isWhitespace(src.charAt(x))) { - x--; - } - attrs.add(src.substring(attrStart, x + 1)); - sp = x + 1; - } else { - char q = ' '; - findAttrValueEndMode: while (true) { - if (sp == ln) { - attrs.add(src.substring(attrStart, sp)); - break findAttrValueEndMode; - } - c = src.charAt(sp); - if (c == '"' || c == '\'') { - if (q == c) { - q = ' '; - } else if (q == ' ') { - q = c; - } - } - if (q == ' ') { - if (Character.isWhitespace(c)) { - attrs.add(src.substring(attrStart, sp)); - break findAttrValueEndMode; - } else if (c == '>' || c == '/') { - attrs.add(src.substring(attrStart, sp)); - break findAttrValueEndMode; - } - } - sp++; - } - } - int lastSp = sp; - while (true) { - if (sp == ln) { - sp = lastSp; - break fetchAttrsMode; - } - c = src.charAt(sp); - if (c == '>' || c == '/') { - sp = lastSp; - break fetchAttrsMode; - } - if (!Character.isWhitespace(c)) { - break; - } - sp++; - } - } // fetchAttrsMode loop - Collections.sort(attrs); - int aln = attrs.size(); - for (int i = 0; i < aln; i++) { - if (i != 0) { - dst[dp++] = ' '; - } - String s = (String) attrs.get(i); - int sln = s.length(); - for (int x = 0; x < sln; x++) { - dst[dp++] = s.charAt(x); - } - } - } // if element tag start - } // normalMode loop; - buf.setLength(0); - out.write(dst, 0, dp); - } - } -} diff --git a/fmpp/src/test/java/fmpp/testsuite/TestLocalDataBuilder.java b/fmpp/src/test/java/fmpp/testsuite/TestLocalDataBuilder.java deleted file mode 100644 index 5895671..0000000 --- a/fmpp/src/test/java/fmpp/testsuite/TestLocalDataBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.testsuite; - -import java.util.HashMap; -import java.util.Map; - -import fmpp.Engine; -import fmpp.LocalDataBuilder; -import fmpp.TemplateEnvironment; - -/** - */ -public class TestLocalDataBuilder implements LocalDataBuilder { - - public Map build(Engine eng, TemplateEnvironment env) throws Exception { - Map res = new HashMap(); - String path = env.toSourceRootRelativePath(env.getSourceFile()); - res.put("id", "Z:" + path); - res.put("id2", "ZZ:" + path); - res.put("id3", "ZZZ:" + path); - return res; - } - -} diff --git a/fmpp/src/test/java/fmpp/testsuite/TestProgressListener.java b/fmpp/src/test/java/fmpp/testsuite/TestProgressListener.java deleted file mode 100644 index a499a18..0000000 --- a/fmpp/src/test/java/fmpp/testsuite/TestProgressListener.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.testsuite; - -/** - * Contains callback method for monitoring test suite execution. - */ -public interface TestProgressListener { - - void sendMessage(String message); -} diff --git a/fmpp/src/test/java/fmpp/testsuite/TestSuite.java b/fmpp/src/test/java/fmpp/testsuite/TestSuite.java deleted file mode 100644 index abcb8cf..0000000 --- a/fmpp/src/test/java/fmpp/testsuite/TestSuite.java +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.testsuite; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.io.Writer; -import java.util.ArrayList; -import java.util.List; - -import fmpp.tools.CommandLine; -import fmpp.util.FileUtil; -import fmpp.util.MiscUtil; -import fmpp.util.StringUtil; - -/** - * FMPP test suite. - */ -public class TestSuite { - private final File projsParentDir; - private final File refsParentDir; - private final File suiteOutputDir; - private final String testcase; - private Writer suiteLogWriter; - private TestProgressListener progressListener; - - private int countSuccessfull; - private int countDiffers; - private int countError; - private List differProjectNames = new ArrayList(); - private List errorProjectNames = new ArrayList(); - - /** - * Commandline interface for the test suite. - * - *

    Command-line parameters: - *

      - *
    1. FMPP home directory. Required. - *
    2. The name of the testcase to run. If omitted or empty string, - * then all testcases will be executed. - *
        - */ - public static void main(String[] args) throws Exception { - int argsln = args.length; - if (argsln != 1 && argsln != 2) { - System.out.println( - "Usage: java fmpp.testsuite.TestSuite " + " [testcase]"); - System.out.println(); - System.exit(-1); - } - File fmppHomeDir = new File(args[0]); - if (!fmppHomeDir.isDirectory()) { - System.out.println( - "The specified FMPP home directory does not exist."); - System.out.println(); - System.exit(-1); - } - File outputDir = new File( - fmppHomeDir, "build" + File.separator + "test-output"); - String testcase = null; - if (argsln > 1) { - testcase = args[1]; - if (testcase.length() == 0) { - testcase = null; - } - } - TestSuite testSuite = new TestSuite( - new File(fmppHomeDir, - "src" + File.separator + "test" + File.separator + "resources" - + File.separator + "tests"), - new File(fmppHomeDir, - "src" + File.separator + "test" + File.separator + "resources" - + File.separator + "expected"), - outputDir, - testcase); - testSuite.progressListener = new ConsoleTestProgressListener(); - testSuite.run(); - System.out.println("================================================="); - System.out.println("OK: " + testSuite.countSuccessfull - + ", Differs: " + testSuite.countDiffers - + ", Error: " + testSuite.countError); - System.out.println(); - if (testSuite.countError != 0 || testSuite.countDiffers != 0) { - System.out.println("/\\/\\/ TEST SUITE FAILED! \\/\\/\\"); - if (testSuite.countError != 0) { - System.out.println("Projects failed with errors were:"); - for (int i = 0; i < testSuite.errorProjectNames.size(); i++) { - System.out.print("- "); - System.out.println(testSuite.errorProjectNames.get(i)); - } - } - if (testSuite.countDiffers != 0) { - System.out.println( - "Projects where the output and the reference differs:"); - for (int i = 0; i < testSuite.differProjectNames.size(); i++) { - System.out.print("- "); - System.out.println(testSuite.differProjectNames.get(i)); - } - } - System.out.println(""); - System.out.println("Look into build/testsuite/ for more details."); - System.exit(-1); - } else { - System.out.println("*** TEST SUITE SUCCESSFULL ***"); - System.exit(0); - } - } - - public TestSuite( - File projsParentDir, File refsParentDir, File suiteOutputDir, - String testcase) - throws IOException { - this.projsParentDir = projsParentDir; - this.refsParentDir = refsParentDir; - this.suiteOutputDir = suiteOutputDir; - this.testcase = testcase; - } - - public void run() throws IOException { - File[] projects; - if (testcase == null) { - projects = removeCVSAndSVNFiles(projsParentDir.listFiles()); - } else { - projects = new File[] {new File(projsParentDir, testcase)}; - } - if (projects == null) { - throw new FileNotFoundException("Project directory not found: " - + projsParentDir.getCanonicalPath()); - } - createEmptyDir(suiteOutputDir, "compile"); - this.suiteLogWriter = new FileWriter( - new File(suiteOutputDir, "suitelog.txt")); - try { - for (int i = 0; i < projects.length; i++) { - if (projects[i].isDirectory()) { - String projName = projects[i].getName(); - File projOutDir = new File( - suiteOutputDir, - "projects" + File.separator + projName); - createEmptyDir(projOutDir, null); - String[] args = new String[] { - "-C", projects[i].getAbsolutePath(), - "-O", new File(projOutDir, "out") - .getAbsolutePath(), - "-L", new File(projOutDir, "projlog.txt") - .getAbsolutePath(), - "--columns", "76", - "-q"}; - File argsFile = new File(projects[i], "args.txt"); - if (argsFile.exists()) { - String[] oldArgs = args; - String[] extraArgs = loadArgs(argsFile); - args = new String[ - oldArgs.length + extraArgs.length]; - int x; - for (x = 0; x < oldArgs.length; x++) { - args[x] = oldArgs[x]; - } - int y = 0; - for (; x < args.length; x++) { - args[x] = extraArgs[y]; - y++; - } - } - StringWriter capturedStderr = new StringWriter(); - PrintWriter pwr = new PrintWriter(capturedStderr); - int exitCode = CommandLine.execute(args, pwr, pwr); - if (exitCode != 0) { - pwr.close(); - log(projName + ": Error!"); - logIndented( - StringUtil.chomp( - capturedStderr.toString())); - countError++; - errorProjectNames.add(projName); - if (progressListener != null) { - progressListener.sendMessage( - "- " + projName + ": Error!"); - } - } else { - String diffs = checkProjectOutput( - new File(refsParentDir, projName), - new File(projOutDir, "out")); - if (diffs == null) { - log(projName + ": OK"); - countSuccessfull++; - if (progressListener != null) { - progressListener.sendMessage( - "- " + projName + ": OK"); - } - } else { - log(projName + ": Differs!"); - logIndented(diffs); - differProjectNames.add(projName); - countDiffers++; - if (progressListener != null) { - progressListener.sendMessage( - "- " + projName + ": Differs!"); - } - } - } - } else if (!projects[i].exists()) { - throw new FileNotFoundException(projects[i].getPath()); - } - } - } catch (IOException e) { - log("Test suite aborted with I/O error: "); - log(MiscUtil.causeTrace(e)); - throw e; - } finally { - this.suiteLogWriter.close(); - this.suiteLogWriter = null; - } - } - - private static void createEmptyDir(File dir, String keepDir) - throws IOException { - if (!dir.exists()) { - dir.mkdirs(); - } else { - emptyDir(dir, keepDir); - } - } - - private static void emptyDir(File dir, String keepDir) throws IOException { - String path = dir.getCanonicalPath(); - if (path.indexOf(File.separator + "build" + File.separator) == -1) { - throw new IOException("Safety restriction: " - + "The directory to empty must be inside directory " - + "\"build\". This does not stand for this path: " + path); - } - - File[] files = removeCVSAndSVNFiles(dir.listFiles()); - for (int i = 0; i < files.length; i++) { - if (files[i].isDirectory()) { - if (keepDir == null || !files[i].getName().equals(keepDir)) { - emptyDir(files[i], null); - files[i].delete(); - } - } else { - files[i].delete(); - } - } - } - - /** - * Compares two directories and its content for equality. - * @return null if the two directory is identical, otherwise - * the text that describes the difference. - */ - private String checkProjectOutput( - File currentProjRefDir, File currentProjOutputDir) - throws IOException { - ComparsionEnvironment env = new ComparsionEnvironment(); - env.currentProjOutputDir = currentProjOutputDir; - env.currentProjRefDir = currentProjRefDir; - checkProjectOutput_compareDirs( - env, currentProjRefDir, currentProjOutputDir); - StringUtil.chomp(env.diffs); - return env.diffs.length() == 0 ? null : env.diffs.toString(); - } - - private void checkProjectOutput_compareDirs( - ComparsionEnvironment env, File refDir, File chkedDir) - throws IOException { - File[] refDirFiles = refDir.listFiles(); - if (refDirFiles == null) { - throw new IOException("Reference directory not found: " - + refDir.getAbsolutePath()); - } - refDirFiles = removeCVSAndSVNFiles(refDirFiles); - - File[] chkedDirFiles = chkedDir.listFiles(); - if (chkedDirFiles == null) { - throw new IOException("Checked directory not found: " - + chkedDir.getAbsolutePath()); - } - chkedDirFiles = removeCVSAndSVNFiles(chkedDirFiles); - - for (int ci = 0; ci < chkedDirFiles.length; ci++) { - File cf = chkedDirFiles[ci]; - boolean isDir = cf.isDirectory(); - int ri = findCounterpart(refDirFiles, cf); - if (ri != -1) { - if (isDir) { - checkProjectOutput_compareDirs(env, refDirFiles[ri], cf); - } else { - checkProjectOutput_compareFiles(env, refDirFiles[ri], cf); - } - refDirFiles[ri] = null; - } else { - env.logDiff( - FileUtil.getRelativePath(env.currentProjOutputDir, cf) - + ": " - + (isDir ? "Directory" : "File") - + " shouldn't exist."); - } - } - - for (int ri = 0; ri < refDirFiles.length; ri++) { - File rf = refDirFiles[ri]; - if (rf != null) { - env.logDiff( - FileUtil.getRelativePath(env.currentProjRefDir, rf) - + ": " - + (rf.isDirectory() ? "Directory" : "File") - + " is missing."); - } - } - } - - private void checkProjectOutput_compareFiles( - ComparsionEnvironment env, File refFile, File chkdFile) - throws IOException { - InputStream in; - - byte[] ref; - int refln; - int refi; - in = new FileInputStream(refFile); - try { - ref = FileUtil.loadByteArray(in); - } finally { - in.close(); - } - refln = ref.length; - refi = 0; - - byte[] chkd; - int chkdln; - int chkdi; - in = new FileInputStream(chkdFile); - try { - chkd = FileUtil.loadByteArray(in); - } finally { - in.close(); - } - chkdln = chkd.length; - chkdi = 0; - - int refc; - int chkdc; - readLoop: do { - if (refi < refln) { - refc = ref[refi++]; - if (refc == 0xD) { - refc = 0xA; - if (refi < refln) { - if (ref[refi] == 0xA) { - refi++; - } - } - } - } else { - refc = -1; - } - - - if (chkdi < chkdln) { - chkdc = chkd[chkdi++]; - if (chkdc == 0xD) { - chkdc = 0xA; - if (chkdi < chkdln) { - if (chkd[chkdi] == 0xA) { - chkdi++; - } - } - } - } else { - chkdc = -1; - } - - if (refc != chkdc) { - if (refc == -1) { - env.logDiff( - FileUtil.getRelativePath( - env.currentProjRefDir, refFile) - + ": The file is longer than the reference file."); - break readLoop; - } else if (chkdc == -1) { - env.logDiff( - FileUtil.getRelativePath( - env.currentProjRefDir, refFile) - + ": The file is shorter than the reference file."); - break readLoop; - } else { - env.logDiff( - FileUtil.getRelativePath( - env.currentProjRefDir, refFile) - + ": Different byte(s) at output file position " - + (chkdi)); - break readLoop; - } - } - } while (!(refc == -1 && chkdc == -1)); - } - - private static int findCounterpart(File[] files, File file) { - String fName = file.getName(); - for (int i = 0; i < files.length; i++) { - if (files[i] != null && files[i].getName().equals(fName) - && (files[i].isDirectory() == file.isDirectory())) { - return i; - } - } - return -1; - } - - private void log(String text) throws IOException { - suiteLogWriter.write(StringUtil.wrap(text, 80)); - suiteLogWriter.write(StringUtil.LINE_BREAK); - } - - private void logIndented(String text) throws IOException { - suiteLogWriter.write(StringUtil.wrap(text, 80, 4)); - suiteLogWriter.write(StringUtil.LINE_BREAK); - } - - private class ComparsionEnvironment { - StringBuffer diffs = new StringBuffer(); - File currentProjOutputDir; - File currentProjRefDir; - byte[] wb1 = new byte[8192]; - byte[] wb2 = new byte[8192]; - - void logDiff(String message) { - diffs.append(message); - diffs.append(StringUtil.LINE_BREAK); - } - } - - private String[] loadArgs(File f) throws IOException { - String s = FileUtil.loadString(new FileInputStream(f), "UTF-8"); - int ln = s.length(); - List ls = new ArrayList(); - int next = 0; - for (int i = 0; i <= ln; i++) { - char c; - if (i != ln) { - c = s.charAt(i); - } else { - c = 0xA; - } - if (c == 0xA || c == 0xD) { - String s2 = s.substring(next, i); - next = i + 1; - s2 = s2.trim(); - if (s2.length() != 0 && !s2.startsWith("#")) { - ls.add(s2); - } - } - } - ln = ls.size(); - String[] res = new String[ln]; - for (int i = 0; i < ln; i++) { - res[i] = (String) ls.get(i); - } - return res; - } - - private static File[] removeCVSAndSVNFiles(File[] files) { - int ln = files.length; - ArrayList list = new ArrayList(ln); - boolean changed = false; - for (int i = 0; i < ln; i++) { - String name = files[i].getName().toLowerCase(); - if (!name.equals("cvs") && !name.startsWith(".#") - && !name.equals(".svn") && !name.equals(".gitignore")) { - list.add(files[i]); - } else { - changed = true; - } - } - if (changed) { - ln = list.size(); - files = new File[ln]; - for (int i = 0; i < ln; i++) { - files[i] = (File) list.get(i); - } - } - return files; - } -} \ No newline at end of file diff --git a/fmpp/src/test/java/fmpp/testsuite/TestXmlLocalDataBuilder.java b/fmpp/src/test/java/fmpp/testsuite/TestXmlLocalDataBuilder.java deleted file mode 100644 index 378c7f1..0000000 --- a/fmpp/src/test/java/fmpp/testsuite/TestXmlLocalDataBuilder.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.testsuite; - -import java.util.HashMap; -import java.util.Map; - -import org.w3c.dom.Document; - -import fmpp.Engine; -import fmpp.LocalDataBuilder; -import fmpp.TemplateEnvironment; - -/** - */ -public class TestXmlLocalDataBuilder implements LocalDataBuilder { - - public Map build(Engine eng, TemplateEnvironment env) throws Exception { - Document doc = (Document) env.getXmlDocument(); - - Map ld = new HashMap(); - - ld.put("a", doc.getDocumentElement().getLocalName()); - - return ld; - } -} \ No newline at end of file diff --git a/fmpp/src/test/java/fmpp/testsuite/TestXmlLocalDataBuilder2.java b/fmpp/src/test/java/fmpp/testsuite/TestXmlLocalDataBuilder2.java deleted file mode 100644 index ba6b44c..0000000 --- a/fmpp/src/test/java/fmpp/testsuite/TestXmlLocalDataBuilder2.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2014 Attila Szegedi, Daniel Dekany, Jonathan Revusky - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package fmpp.testsuite; - -import java.util.HashMap; -import java.util.Map; - -import fmpp.Engine; -import fmpp.LocalDataBuilder; -import fmpp.TemplateEnvironment; -import freemarker.template.TemplateNodeModel; - -/** - */ -public class TestXmlLocalDataBuilder2 implements LocalDataBuilder { - - public Map build(Engine eng, TemplateEnvironment env) throws Exception { - TemplateNodeModel wdoc = env.getWrappedXmlDocument(); - - Map ld = new HashMap(); - - ld.put("a", "bad"); - ld.put("b", ((TemplateNodeModel) wdoc.getChildNodes().get(0)) - .getNodeName()); - - return ld; - } - -} \ No newline at end of file diff --git a/fmpp/src/test/java/fmpp/util/JSONParserTest.java b/fmpp/src/test/java/fmpp/util/JSONParserTest.java deleted file mode 100644 index 249ca1f..0000000 --- a/fmpp/src/test/java/fmpp/util/JSONParserTest.java +++ /dev/null @@ -1,356 +0,0 @@ -package fmpp.util; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import junit.framework.TestCase; -import fmpp.models.JSONNode; -import freemarker.template.TemplateModelException; -import freemarker.template.TemplateNodeModel; -import freemarker.template.TemplateSequenceModel; - -public class JSONParserTest extends TestCase { - - public void testKeywords() throws JSONParseException { - assertJSONEquals(Boolean.TRUE, "true"); - assertJSONEquals(Boolean.FALSE, "false"); - assertJSONEquals(null, "null"); - - assertJSONEquals(Boolean.TRUE, " true "); - } - - public void testMalformedKeywords() throws JSONParseException { - assertJSONParsingFails("keyword: True", "True"); - assertJSONParsingFails("keyword: _true$1", "_true$1"); - assertJSONParsingFails("keyword: truefalse", "truefalse"); - assertJSONParsingFails("found further non-whitespace", "true[]"); - assertJSONParsingFails("found further non-whitespace", "true{}"); - } - - public void testStrings() throws JSONParseException { - assertJSONEquals("", "\"\""); - assertJSONEquals("a", "\"a\""); - assertJSONEquals("ab cd", "\"ab cd\""); - assertJSONEquals(" ", "\" \""); - assertJSONEquals(" ", "\" \""); - - assertJSONEquals("a\"c", "\"a\\\"c\""); - assertJSONEquals("a\"c\"", "\"a\\\"c\\\"\""); - assertJSONEquals("a\\\"c", "\"a\\\\\\\"c\""); - assertJSONEquals("\"\\/\b\f\n\r\t", "\"\\\"\\\\\\/\\b\\f\\n\\r\\t\""); - assertJSONEquals(" \" \\ / \b \f \n \r \t ", "\" \\\" \\\\ \\/ \\b \\f \\n \\r \\t \" "); - assertJSONEquals("\n", "\"\\n\""); - assertJSONEquals("\"", "\"\\\"\""); - - assertJSONEquals("a\nb", "\"a\\nb\""); - assertJSONEquals("\n", "\"\\n\""); - - assertJSONEquals("a", " \"a\" "); - - assertJSONEquals("a", " \"a\" "); - - assertJSONEquals("\f", " \"\\u000c\" "); - assertJSONEquals("\f", " \"\\u000C\" "); - assertJSONEquals(" AB3", " \"\\u0020\\u0041\\u00423\" "); - } - - public void testMalformedStrings() throws JSONParseException { - assertJSONParsingFails("apostrophe", "'a'"); - assertJSONParsingFails("string literal was still unclosed", "\"a"); - assertJSONParsingFails("LF", "\"\n\""); - assertJSONParsingFails("CR", "\"\r\""); - assertJSONParsingFails("tab", "\"\t\""); - - assertJSONParsingFails("unsupported escape", "\"\\x\""); - assertJSONParsingFails("unsupported escape", "\"\\U0000\""); - - assertJSONParsingFails("4 hex", "\"\\u\""); - assertJSONParsingFails("4 hex", "\"\\uc\""); - assertJSONParsingFails("4 hex", "\"\\u0c\""); - assertJSONParsingFails("4 hex", "\"\\u00c\""); - assertJSONParsingFails("4 hex", "\"\\u00q0\""); - } - - public void testPlainWholeNumbers() throws JSONParseException { - assertJSONEquals(new Integer(0), "0"); - assertJSONEquals(new Integer(1), "1"); - assertJSONEquals(new Integer(10), "10"); - assertJSONEquals(new Integer(9999001), "9999001"); - assertJSONEquals(new Integer(Integer.MAX_VALUE), "" + Integer.MAX_VALUE); - - assertJSONEquals(new Integer(0), "-0"); - assertJSONEquals(new Integer(-1), "-1"); - assertJSONEquals(new Integer(-10), "-10"); - assertJSONEquals(new Integer(-9999001), "-9999001"); - assertJSONEquals(new Integer(Integer.MIN_VALUE), "" + Integer.MIN_VALUE); - - assertJSONEquals(new Long(Integer.MAX_VALUE + 1L), "" + (Integer.MAX_VALUE + 1L)); - assertJSONEquals(new Long(Integer.MIN_VALUE - 1L), "" + (Integer.MIN_VALUE - 1L)); - assertJSONEquals(new Long(Long.MAX_VALUE), "" + Long.MAX_VALUE); - assertJSONEquals(new Long(Long.MIN_VALUE), "" + Long.MIN_VALUE); - - assertJSONEquals(new BigDecimal("9223372036854775808"), "9223372036854775808"); - assertJSONEquals(new BigDecimal("-9223372036854775809"), "-9223372036854775809"); - assertJSONEquals(new BigDecimal("123456789012345678901234567890"), "123456789012345678901234567890"); - assertJSONEquals(new BigDecimal("-123456789012345678901234567890"), "-123456789012345678901234567890"); - } - - public void testDecimalNumbers() throws JSONParseException { - assertJSONEquals(new Integer(0), "0.0"); - assertJSONEquals(new Integer(0), "0.000"); - assertJSONEquals(new BigDecimal("0.1"), "0.1"); - assertJSONEquals(new BigDecimal("0.01"), "0.01"); - assertJSONEquals(new BigDecimal("0.001"), "0.001"); - assertJSONEquals(new BigDecimal("0.123"), "0.123"); - assertJSONEquals(new BigDecimal("0.12300"), "0.12300"); - assertJSONEquals(new BigDecimal("2345.678"), "2345.678"); - assertJSONEquals(new BigDecimal("1234567890.1234567890"), "1234567890.1234567890"); - - assertJSONEquals(new Integer(0), "-0.0"); - assertJSONEquals(new BigDecimal("-0.1"), "-0.1"); - assertJSONEquals(new BigDecimal("-0.001"), "-0.001"); - assertJSONEquals(new BigDecimal("-2345.678"), "-2345.678"); - assertJSONEquals(new BigDecimal("-1234567890.1234567890"), "-1234567890.1234567890"); - - assertJSONEquals(new BigDecimal("0.1"), "\n\t 0.1\n "); - } - - public void testENumbers() throws JSONParseException { - assertJSONEquals(new Integer(0), "0E0"); - assertJSONEquals(new Integer(0), "0E-3"); - assertJSONEquals(new Integer(0), "0E3"); - assertJSONEquals(new Integer(0), "0E+3"); - assertJSONEquals(new Integer(100), "1e2"); - assertJSONEquals(new Integer(100), "1e002"); - assertJSONEquals(new BigDecimal("1.5e-2"), "1.5e-2"); - assertJSONEquals(new Integer(150), "1.5e2"); - assertJSONEquals(new Integer(150), "1.5e+2"); - assertJSONEquals(new BigDecimal("1.5"), "1.5e-0"); - assertJSONEquals(new BigDecimal("1.5"), "1.5e+0"); - assertJSONEquals(new BigDecimal("1.5"), "1.5e0"); - assertJSONEquals(new Long(10000000000L), "1E10"); - assertJSONEquals(new Long(10567000000L), "1.0567E10"); - assertJSONEquals(new Long(9223372036854775807L), "9223372036854775807E0"); - assertJSONEquals(new Long(9223372036854775807L), "9223372036854775.807E3"); - assertJSONEquals(new BigDecimal("9223372036854775808"), "9223372036854775808E0"); - assertJSONEquals(new BigDecimal("9223372036854775808"), "9223372036854775.808E3"); - assertJSONEquals(new BigDecimal("3.14E1234567890"), "3.14E1234567890"); - - assertJSONEquals(new Integer(0), "-0E0"); - assertJSONEquals(new Integer(0), "-0E-3"); - assertJSONEquals(new Integer(0), "-0E3"); - assertJSONEquals(new Integer(0), "-0E+3"); - assertJSONEquals(new Integer(-100), "-1e2"); - assertJSONEquals(new BigDecimal("-1.5e-2"), "-1.5e-2"); - assertJSONEquals(new Integer(-150), "-1.5e2"); - assertJSONEquals(new Integer(-150), "-1.5e+2"); - assertJSONEquals(new BigDecimal("-1.5"), "-1.5e-0"); - assertJSONEquals(new BigDecimal("-1.5"), "-1.5e+0"); - assertJSONEquals(new BigDecimal("-1.5"), "-1.5e0"); - assertJSONEquals(new Long(-10000000000L), "-1E10"); - assertJSONEquals(new Long(-10567000000L), "-1.0567E10"); - assertJSONEquals(new Long(-9223372036854775808L), "-9223372036854775808E0"); - assertJSONEquals(new Long(-9223372036854775808L), "-9223372036854775.808E3"); - assertJSONEquals(new BigDecimal("-9223372036854775809"), "-9223372036854775809E0"); - assertJSONEquals(new BigDecimal("-9223372036854775809"), "-9223372036854775.809E3"); - assertJSONEquals(new BigDecimal("-3.14E1234567890"), "-3.14E1234567890"); - } - - public void testMalformedNumbers() throws JSONParseException { - assertJSONParsingFails("superfluous leading 0", "01"); - assertJSONParsingFails("superfluous leading 0", "-01"); - assertJSONParsingFails("beginning", "+1"); - assertJSONParsingFails("starting with \".\"", ".1"); - assertJSONParsingFails("Malformed number: 1e0.1", "1e0.1"); - assertJSONParsingFails("Malformed number: 1.2.3", "1.2.3"); - assertJSONParsingFails("Malformed number: 1e1e1", "1e1e1"); - assertJSONParsingFails("Malformed number: -1e1e1", "-1e1e1"); - assertJSONParsingFails("end-of-file", "-"); - assertJSONParsingFails("beginning", "- "); - assertJSONParsingFails("found further non-whitespace", "1i"); - assertJSONParsingFails("found further non-whitespace", "1-2"); - assertJSONParsingFails("found further non-whitespace", "1+2"); - assertJSONParsingFails("found further non-whitespace", "1[]"); - assertJSONParsingFails("found further non-whitespace", "1{}"); - assertJSONParsingFails("found further non-whitespace", "1true"); - } - - public void testArray() throws JSONParseException { - assertJSONEquals(Collections.EMPTY_LIST, "[]"); - assertJSONEquals(Collections.EMPTY_LIST, "[ \r\n\t ]"); - - ArrayList list = new ArrayList(); - list.add(new Integer(1)); - list.add("x"); - list.add(null); - list.add(new Integer(-140)); - list.add(Boolean.TRUE); - assertJSONEquals(list, "[1, \"x\", null, -1.4e2, true]"); - assertJSONEquals(list, "[\n\t1,\"x\",null,-1.4e2,true\n]"); - assertJSONEquals(list, "\n[\n\t1 ,\n\t\"x\" , null,-1.4e2,true]\n"); - } - - public void testMalformedArray() throws JSONParseException { - assertJSONParsingFails("[...] was still unclosed", "["); - assertJSONParsingFails("[...] was still unclosed", "[1"); - assertJSONParsingFails("value was expected", "[1,"); - assertJSONParsingFails("beginning of", "[1,,"); - assertJSONParsingFails("expected ','", "[1 2"); - } - - public void testObject() throws JSONParseException { - assertJSONEquals(Collections.EMPTY_MAP, "{}"); - assertJSONEquals(Collections.EMPTY_MAP, "{ \r\n\t }"); - - LinkedHashMap map = new LinkedHashMap(); - map.put("a", new Integer(1)); - map.put("k2", "x"); - map.put("ccc", null); - map.put("", new Integer(-140)); - map.put("e", Boolean.TRUE); - assertJSONEquals(map, "{\"a\":1,\"k2\":\"x\",\"ccc\":null,\"\":-1.4e2,\"e\":true}"); - assertJSONEquals(map, "{\n\t\"a\": 1, \"k2\" : \"x\" , \"ccc\" :null , \"\" : -1.4e2 , \"e\" :true\n}"); - - // Source order must be kept: - Map jm = (Map) JSONParser.parse("{\"a\":\"1\", \"x\":\"2\", \"c\":\"3\", \"y\":\"4\"}", null); - assertEquals(Arrays.asList(new Object[] { "a", "x", "c", "y" }), new ArrayList(jm.keySet())); - assertEquals(Arrays.asList(new Object[] { "1", "2", "3", "4" }), new ArrayList(jm.values())); - } - - public void testMalformedObject() throws JSONParseException { - assertJSONParsingFails("{...} was still unclosed", "{"); - assertJSONParsingFails("expected ':'", "{\"x\""); - assertJSONParsingFails("value was expected", "{\"x\":"); - assertJSONParsingFails("{...} was still unclosed", "{\"x\":1"); - assertJSONParsingFails("value was expected", "{\"x\":1, "); - - assertJSONParsingFails("wrong key type", "{1:2}"); - } - - public void testComposites1() throws JSONParseException { - Map subM = new HashMap(); - subM.put("u", new Integer(100)); - subM.put("v", new Integer(200)); - - Map subM2 = new HashMap(); - subM2.put("i", Arrays.asList(new Object[] { "i1", "i2" })); - subM2.put("j", Arrays.asList(new Object[] { "j1", "j2" })); - - Map rootM = new HashMap(); - rootM.put("a", new BigDecimal("0.5")); - rootM.put("b", Arrays.asList(new Object[] { - new Integer(11), - Arrays.asList(new Object[] { "x", "y" }), - Arrays.asList(new Object[] { "X", "Y" }), - new Integer(22), - subM - })); - rootM.put("c", null); - rootM.put("d", subM); - rootM.put("e", subM2); - rootM.put("f", Collections.EMPTY_LIST); - rootM.put("g", Collections.EMPTY_MAP); - rootM.put("h", Collections.singletonList(Collections.EMPTY_LIST)); - rootM.put("i", Collections.singletonMap("", Collections.EMPTY_MAP)); - - assertJSONEquals(rootM, - "{" - + " \"a\": 0.5," - + " \"b\": [11, [\"x\", \"y\"], [\"X\", \"Y\"], 22, {\"u\": 100, \"v\": 200}]," - + " \"c\": null," - + " \"d\": {\"u\": 100, \"v\": 200}," - + " \"e\": {\"i\": [\"i1\", \"i2\"], \"j\": [\"j1\", \"j2\"]}," - + " \"f\": []," - + " \"g\": {}," - + " \"h\": [[]]," - + " \"i\": {\"\":{}}" - + "}"); - } - - public void testComposites2() throws JSONParseException { - Map subM = new HashMap(); - subM.put("u", new Integer(100)); - subM.put("v", new Integer(200)); - - List list = Arrays.asList(new Object[] { - subM, - Arrays.asList(new Object[] { "x", "y" }), - Collections.EMPTY_LIST, - Collections.EMPTY_LIST, - null - }); - assertJSONEquals(list, "[{\"u\": 100, \"v\": 200}, [\"x\", \"y\"], [], [], null]"); - } - - public void testEmptyFile() throws JSONParseException { - assertJSONParsingFails("Empty JSON", ""); - assertJSONParsingFails("Empty JSON", " \n "); - } - - public void testIOOBMessages() throws JSONParseException, TemplateModelException { - { - TemplateNodeModel node = JSONNode.wrap(Arrays.asList(new String[] { "a", "b", "c" })); - try { - node.getChildNodes().get(-1); - } catch (TemplateModelException e) { - assertTrue(e.getMessage().indexOf("0..2") != -1); - } - try { - node.getChildNodes().get(3); - } catch (TemplateModelException e) { - assertTrue(e.getMessage().indexOf("0..2") != -1); - } - - TemplateSequenceModel seq = (TemplateSequenceModel) node; - try { - seq.get(-1); - } catch (TemplateModelException e) { - assertTrue(e.getMessage().indexOf("0..2") != -1); - } - try { - seq.get(3); - } catch (TemplateModelException e) { - assertTrue(e.getMessage().indexOf("0..2") != -1); - } - } - - { - Map m = new HashMap(); - m.put("a", "A"); - m.put("b", "B"); - m.put("c", "C"); - TemplateNodeModel node = JSONNode.wrap(m); - try { - node.getChildNodes().get(-1); - } catch (TemplateModelException e) { - assertTrue(e.getMessage().indexOf("0..2") != -1); - } - try { - node.getChildNodes().get(3); - } catch (TemplateModelException e) { - assertTrue(e.getMessage().indexOf("0..2") != -1); - } - } - } - - private static void assertJSONEquals(Object expected, String json) throws JSONParseException { - assertEquals(expected, JSONParser.parse(json, null)); - } - - private static void assertJSONParsingFails(String expectedMsgContains, String json) throws JSONParseException { - try { - JSONParser.parse(json, null); - } catch (JSONParseException e) { - final String message = e.getMessage(); - assertTrue("Message didn't contain " + StringUtil.jQuote(expectedMsgContains) + ":\n" - + message, message.toLowerCase().indexOf(expectedMsgContains.toLowerCase()) >= 0); - } - } - -} diff --git a/fmpp/src/test/resources/README.txt b/fmpp/src/test/resources/README.txt deleted file mode 100644 index ff639a0..0000000 --- a/fmpp/src/test/resources/README.txt +++ /dev/null @@ -1,18 +0,0 @@ -FMPP test suite ---------------- - -Directories: - -- tests: FMPP projects (test cases) -- expected: The expected output of the FMPP projects - -The test suite can be run from the FMPP home directory with: - - ant test - -To run only a single test case: - - ant test -Dfmpp.testcase= - -where is the name of the subdirectory in the -"tests" directory. diff --git a/fmpp/src/test/resources/expected/always_create_dirs_off/sub/t3.txt b/fmpp/src/test/resources/expected/always_create_dirs_off/sub/t3.txt deleted file mode 100644 index e440e5c..0000000 --- a/fmpp/src/test/resources/expected/always_create_dirs_off/sub/t3.txt +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/always_create_dirs_off/t.txt b/fmpp/src/test/resources/expected/always_create_dirs_off/t.txt deleted file mode 100644 index 5b5b93f..0000000 --- a/fmpp/src/test/resources/expected/always_create_dirs_off/t.txt +++ /dev/null @@ -1,38 +0,0 @@ - ELEM: I'm the PARAMS element. - I'm belonging the http://example.com/1 namespace. - ATT: I'm the xmlns attribute - of an PARAMS element. - I'm belonging to the http://www.w3.org/2000/xmlns/ namespace. - My value is: http://example.com/1 - ATT: I'm the x attribute - of an PARAMS element. - I'm belonging to the http://www.w3.org/2000/xmlns/ namespace. - My value is: http://example.com/2 - - ELEM: I'm the PARAM element. - I'm belonging the http://example.com/1 namespace. - ATT: I'm the name attribute - of an PARAM element. - I'm belonging to the void namespace. - My value is: Color - ATT: I'm the value attribute - of an PARAM element. - I'm belonging to the void namespace. - My value is: Red - - ELEM: I'm the PARAM element. - I'm belonging the http://example.com/2 namespace. - ATT: I'm the name attribute - of an PARAM element. - I'm belonging to the void namespace. - My value is: Height - ATT: I'm the value attribute - of an PARAM element. - I'm belonging to the void namespace. - My value is: 34 inches - ATT: I'm the foo attribute - of an PARAM element. - I'm belonging to the http://example.com/2 namespace. - My value is: bar - - diff --git a/fmpp/src/test/resources/expected/always_create_dirs_on/sub/t3.txt b/fmpp/src/test/resources/expected/always_create_dirs_on/sub/t3.txt deleted file mode 100644 index e440e5c..0000000 --- a/fmpp/src/test/resources/expected/always_create_dirs_on/sub/t3.txt +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/always_create_dirs_on/t.txt b/fmpp/src/test/resources/expected/always_create_dirs_on/t.txt deleted file mode 100644 index 5b5b93f..0000000 --- a/fmpp/src/test/resources/expected/always_create_dirs_on/t.txt +++ /dev/null @@ -1,38 +0,0 @@ - ELEM: I'm the PARAMS element. - I'm belonging the http://example.com/1 namespace. - ATT: I'm the xmlns attribute - of an PARAMS element. - I'm belonging to the http://www.w3.org/2000/xmlns/ namespace. - My value is: http://example.com/1 - ATT: I'm the x attribute - of an PARAMS element. - I'm belonging to the http://www.w3.org/2000/xmlns/ namespace. - My value is: http://example.com/2 - - ELEM: I'm the PARAM element. - I'm belonging the http://example.com/1 namespace. - ATT: I'm the name attribute - of an PARAM element. - I'm belonging to the void namespace. - My value is: Color - ATT: I'm the value attribute - of an PARAM element. - I'm belonging to the void namespace. - My value is: Red - - ELEM: I'm the PARAM element. - I'm belonging the http://example.com/2 namespace. - ATT: I'm the name attribute - of an PARAM element. - I'm belonging to the void namespace. - My value is: Height - ATT: I'm the value attribute - of an PARAM element. - I'm belonging to the void namespace. - My value is: 34 inches - ATT: I'm the foo attribute - of an PARAM element. - I'm belonging to the http://example.com/2 namespace. - My value is: bar - - diff --git a/fmpp/src/test/resources/expected/basic_usecase/index.html b/fmpp/src/test/resources/expected/basic_usecase/index.html deleted file mode 100644 index b7f4a33..0000000 --- a/fmpp/src/test/resources/expected/basic_usecase/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Die maggots! - - -

        Die maggots!

        -

        -

        Rattrah - diff --git a/fmpp/src/test/resources/expected/basic_usecase/mi.png b/fmpp/src/test/resources/expected/basic_usecase/mi.png deleted file mode 100644 index 902e942..0000000 Binary files a/fmpp/src/test/resources/expected/basic_usecase/mi.png and /dev/null differ diff --git a/fmpp/src/test/resources/expected/basic_usecase/sub/rattrah.html b/fmpp/src/test/resources/expected/basic_usecase/sub/rattrah.html deleted file mode 100644 index 292ca3c..0000000 --- a/fmpp/src/test/resources/expected/basic_usecase/sub/rattrah.html +++ /dev/null @@ -1,7 +0,0 @@ - - Rattrah - - -

        Rattrah

        -

        Rattrahad - diff --git a/fmpp/src/test/resources/expected/basic_usecase/sub/subsub/rattrahad.html b/fmpp/src/test/resources/expected/basic_usecase/sub/subsub/rattrahad.html deleted file mode 100644 index 1e08df2..0000000 --- a/fmpp/src/test/resources/expected/basic_usecase/sub/subsub/rattrahad.html +++ /dev/null @@ -1,7 +0,0 @@ - - Rattrahad - - -

        Rattrahad

        -

        Index - diff --git a/fmpp/src/test/resources/expected/borders/1.txt b/fmpp/src/test/resources/expected/borders/1.txt deleted file mode 100644 index f11ac3e..0000000 --- a/fmpp/src/test/resources/expected/borders/1.txt +++ /dev/null @@ -1 +0,0 @@ -H0{H1{ROOTH2{@}ROOTF3}F1}F0 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/borders/1.x b/fmpp/src/test/resources/expected/borders/1.x deleted file mode 100644 index 8880660..0000000 --- a/fmpp/src/test/resources/expected/borders/1.x +++ /dev/null @@ -1,2 +0,0 @@ -H0{H1{ROOTH2{@}ROOTF3}F1}F0 ----X--- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/borders/1.y b/fmpp/src/test/resources/expected/borders/1.y deleted file mode 100644 index 0841f41..0000000 --- a/fmpp/src/test/resources/expected/borders/1.y +++ /dev/null @@ -1,2 +0,0 @@ -H0{H1{ROOTH2{@}ROOTF3}F1}F0 ----Y--- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/borders/sub/1.txt b/fmpp/src/test/resources/expected/borders/sub/1.txt deleted file mode 100644 index e775735..0000000 --- a/fmpp/src/test/resources/expected/borders/sub/1.txt +++ /dev/null @@ -1 +0,0 @@ -H0{H1{SUBH3{@}SUBF2}F1}F0 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/borders/sub/1.x b/fmpp/src/test/resources/expected/borders/sub/1.x deleted file mode 100644 index 0c9ae8d..0000000 --- a/fmpp/src/test/resources/expected/borders/sub/1.x +++ /dev/null @@ -1,2 +0,0 @@ -H0{H1{SUBH3{@}SUBF2}F1}F0 ----X--- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/borders/sub/1.y b/fmpp/src/test/resources/expected/borders/sub/1.y deleted file mode 100644 index 86d1b4d..0000000 --- a/fmpp/src/test/resources/expected/borders/sub/1.y +++ /dev/null @@ -1,2 +0,0 @@ -H0{H1{SUBH3{@}SUBF2}F1}F0 ----Y--- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/borders/sub/foo/1.txt b/fmpp/src/test/resources/expected/borders/sub/foo/1.txt deleted file mode 100644 index e775735..0000000 --- a/fmpp/src/test/resources/expected/borders/sub/foo/1.txt +++ /dev/null @@ -1 +0,0 @@ -H0{H1{SUBH3{@}SUBF2}F1}F0 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/cfg_base/index.html b/fmpp/src/test/resources/expected/cfg_base/index.html deleted file mode 100644 index 70f8cd2..0000000 --- a/fmpp/src/test/resources/expected/cfg_base/index.html +++ /dev/null @@ -1 +0,0 @@ -

        Rattrah \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/cfg_base/sub/rattrah.html b/fmpp/src/test/resources/expected/cfg_base/sub/rattrah.html deleted file mode 100644 index 7adb375..0000000 --- a/fmpp/src/test/resources/expected/cfg_base/sub/rattrah.html +++ /dev/null @@ -1 +0,0 @@ -

        Rattrah. \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/cfg_inheritance/1.txt b/fmpp/src/test/resources/expected/cfg_inheritance/1.txt deleted file mode 100644 index f0e2262..0000000 --- a/fmpp/src/test/resources/expected/cfg_inheritance/1.txt +++ /dev/null @@ -1,3 +0,0 @@ -HDR1 -1 -FTR \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/cfg_inheritance/2.txt b/fmpp/src/test/resources/expected/cfg_inheritance/2.txt deleted file mode 100644 index 4e356e7..0000000 --- a/fmpp/src/test/resources/expected/cfg_inheritance/2.txt +++ /dev/null @@ -1,3 +0,0 @@ -HDR2 -2 -FTR \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/cfg_inheritance/3.txt b/fmpp/src/test/resources/expected/cfg_inheritance/3.txt deleted file mode 100644 index 1535895..0000000 --- a/fmpp/src/test/resources/expected/cfg_inheritance/3.txt +++ /dev/null @@ -1,3 +0,0 @@ -HDR3 -3 -FTR \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/cfg_inheritance/4.txt b/fmpp/src/test/resources/expected/cfg_inheritance/4.txt deleted file mode 100644 index 1383e1a..0000000 --- a/fmpp/src/test/resources/expected/cfg_inheritance/4.txt +++ /dev/null @@ -1,3 +0,0 @@ -HDR3 -4 -FTR \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/cfg_inheritance/test.txt b/fmpp/src/test/resources/expected/cfg_inheritance/test.txt deleted file mode 100644 index 48b83b8..0000000 --- a/fmpp/src/test/resources/expected/cfg_inheritance/test.txt +++ /dev/null @@ -1 +0,0 @@ -ABC \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/dl_csv/test.html b/fmpp/src/test/resources/expected/dl_csv/test.html deleted file mode 100644 index 91fa691..0000000 --- a/fmpp/src/test/resources/expected/dl_csv/test.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - -

        Header query and row hashes: - - -
        nameprotectedpriceenteredxy -
        arctic-terntrue10,000.00Jan 25, 2003 03:10:06 AMJan 20, 200112:05:00 PM -
        N/AN/AN/AN/AN/A -
        house-sparrowfalse50.00Feb 15, 2003 01:20:30 AMN/AN/A -
        moooN/AN/AN/AN/AN/A -
        N/AN/AN/AN/AN/A -
        mooo2N/AN/AN/AN/AN/A -
        - -

        Row sequences: - - -
        arctic-terntrue10,000.00Jan 25, 2003 03:10:06 AMJan 20, 200112:05:00 PM -
        N/AN/AN/AN/AN/A -
        house-sparrowfalse50.00Feb 15, 2003 01:20:30 AMN/AN/A -
        moooN/AN/AN/AN/AN/A -
        N/AN/AN/AN/AN/A -
        mooo2N/AN/AN/AN/AN/A -
        - -

        CSV2 headers replaced: - - -
        r1r2r3 -
        1.002.003.00 -
        4.005.00N/A -
        6.00N/AN/A -
        - -

        CSV2 headers added: - - -
        a1a2a3 -
        abc -
        123 -
        45N/A -
        6N/AN/A -
        - -

        CSV3 headers replaced: - - -
        r1r2r3 -
        - -

        CSV3 headers added: - - -
        a1a2a3 -
        abc -
        - -

        CSV4 headers replaced: - - -
        r1r2r3 -
        - -

        CSV4 headers added: - - -
        a1a2a3 -
        - -

        Header normalization: - - -
        nameprotectedprice_netenteredx_y_zy -
        arctic-terntrue10,000.00Jan 25, 2003 03:10:06 AMJan 20, 200112:05:00 PM -
        N/AN/AN/AN/AN/A -
        house-sparrowfalse50.00Feb 15, 2003 01:20:30 AMN/AN/A -
        moooN/AN/AN/AN/AN/A -
        N/AN/AN/AN/AN/A -
        mooo2N/AN/AN/AN/AN/A -
        - -

        UTF-8 BOM: - - -
        árvíztűrőfúrógép -
        1122 -
        - - - diff --git a/fmpp/src/test/resources/expected/dl_eval/test.txt b/fmpp/src/test/resources/expected/dl_eval/test.txt deleted file mode 100644 index 01dd2b9..0000000 --- a/fmpp/src/test/resources/expected/dl_eval/test.txt +++ /dev/null @@ -1,4 +0,0 @@ -2 -2 -2 -2 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/dl_get/test.txt b/fmpp/src/test/resources/expected/dl_get/test.txt deleted file mode 100644 index 1f30c63..0000000 --- a/fmpp/src/test/resources/expected/dl_get/test.txt +++ /dev/null @@ -1,4 +0,0 @@ -A -B -C -D \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/dl_json/explicit-traversal.html b/fmpp/src/test/resources/expected/dl_json/explicit-traversal.html deleted file mode 100644 index 29e844b..0000000 --- a/fmpp/src/test/resources/expected/dl_json/explicit-traversal.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        NameAgeSkillsTest resultsDecided
        - Jean Test - (m.n.: Jean Test) - 20 - HTML, - CSS - - a: 10.5, - b: 20.0, - c: 30.0 - - Y -
        - José Test - - 30 - Ruby, - C++, - Cuda - - a: 20.0, - b: 30.0, - c: 40.0 - - N -
        - - - diff --git a/fmpp/src/test/resources/expected/dl_json/visitor-traversal.html b/fmpp/src/test/resources/expected/dl_json/visitor-traversal.html deleted file mode 100644 index 4e244c2..0000000 --- a/fmpp/src/test/resources/expected/dl_json/visitor-traversal.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        NameAgeSkillsTest resultsDecided
        - Jean Test - (m.n.: Jean Test) - 20 - HTML, - CSS - - a: 10.5, - b: 20.0, - c: 30.0 - Y
        - José Test - - 30 - Ruby, - C++, - Cuda - - a: 20.0, - b: 30.0, - c: 40.0 - N
        - - - - diff --git a/fmpp/src/test/resources/expected/dl_slicedtext/test.txt b/fmpp/src/test/resources/expected/dl_slicedtext/test.txt deleted file mode 100644 index cb87903..0000000 --- a/fmpp/src/test/resources/expected/dl_slicedtext/test.txt +++ /dev/null @@ -1,174 +0,0 @@ - -[a ] -[ b] -[ c ] -== -[a] -[ b] -[ c ] - ---------- - -[a ] -[ b] -[ c ] -[] -== -[a] -[ b] -[ c ] -[] - -[a] -[b] -[c] -== -[a] -[b] -[c] - ---------- - -[a] -[b] -[c] -== -[a] -[b] -[c] - ---------- - -[--- - a - A ] -[b --- B ] -[ c ----] -== -[--- - a - A ] -[ b --- B ] -[ c ----] - -[--- - a - A ] -[b --- B ] -[ c ] -[] -== -[--- - a - A ] -[ b --- B ] -[ c ] -[] - -[--- - a - A ] -[b --- B ] -[ c ----x] -== -[--- - a - A ] -[ b --- B ] -[ c ----x] - -[a] -[ b] -[ c] -[ d ] -[e ] -== -[a] -[ b] -[ c] -[ d ] -[e ] -== -[a] -[ b] -[ c] -[ d ] -[e ] -== -[a] -[ b] -[ c] -[ d ] -[e ] - -[reg] -[green] -[blue] -== -[red] -[green] -[blue] - -[A a a -aaa -a] -[Separate items like this: ---8<-- -But don't forget to put empty lines around it! - -Separate items like this: - ---8<-- -But don't forget to put empty lines around it! - -Separate items like this: ---8<-- - -But don't forget to put empty lines around it!] -[C c c -ccc -c] -== -[A a a -aaa -a] -[Separate items like this: ---8<-- -But don't forget to put empty lines around it! - -Separate items like this: - ---8<-- -But don't forget to put empty lines around it! - -Separate items like this: ---8<-- - -But don't forget to put empty lines around it!] -[C c c -ccc -c] - -[a] -[b] -[] -[] -[] -[c] -== -[a] -[b] -[] -[] -[] -[c] - -== - -[] -== -[] \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/dl_text/test.txt b/fmpp/src/test/resources/expected/dl_text/test.txt deleted file mode 100644 index d263d1b..0000000 --- a/fmpp/src/test/resources/expected/dl_text/test.txt +++ /dev/null @@ -1,8 +0,0 @@ -[bla1 -bla2 -bla3 -] -[bla1 -bla2 -bla3 -] \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/encoding/test.txt b/fmpp/src/test/resources/expected/encoding/test.txt deleted file mode 100644 index f8a1577..0000000 --- a/fmpp/src/test/resources/expected/encoding/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -UTF-8 áő - diff --git a/fmpp/src/test/resources/expected/encoding/test2.txt b/fmpp/src/test/resources/expected/encoding/test2.txt deleted file mode 100644 index a495b16..0000000 --- a/fmpp/src/test/resources/expected/encoding/test2.txt +++ /dev/null @@ -1,2 +0,0 @@ -ISO-8859-2 áő -ISO-8859-2 áő \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/encoding/test2_iso-8859-1.txt b/fmpp/src/test/resources/expected/encoding/test2_iso-8859-1.txt deleted file mode 100644 index 2e024f3..0000000 --- a/fmpp/src/test/resources/expected/encoding/test2_iso-8859-1.txt +++ /dev/null @@ -1 +0,0 @@ -ISO-8859-1 á? diff --git a/fmpp/src/test/resources/expected/encoding/text_UTF-8_2.txt b/fmpp/src/test/resources/expected/encoding/text_UTF-8_2.txt deleted file mode 100644 index 96cef21..0000000 --- a/fmpp/src/test/resources/expected/encoding/text_UTF-8_2.txt +++ /dev/null @@ -1,3 +0,0 @@ -UTF-8 áő -áő -áő diff --git a/fmpp/src/test/resources/expected/encoding/text_iso-8859-2.txt b/fmpp/src/test/resources/expected/encoding/text_iso-8859-2.txt deleted file mode 100644 index c5d8d14..0000000 --- a/fmpp/src/test/resources/expected/encoding/text_iso-8859-2.txt +++ /dev/null @@ -1,2 +0,0 @@ -ISO-8859-2 áő - diff --git a/fmpp/src/test/resources/expected/encoding/text_utf-16.txt b/fmpp/src/test/resources/expected/encoding/text_utf-16.txt deleted file mode 100644 index fab18a5..0000000 Binary files a/fmpp/src/test/resources/expected/encoding/text_utf-16.txt and /dev/null differ diff --git a/fmpp/src/test/resources/expected/ex_border/test.c.html b/fmpp/src/test/resources/expected/ex_border/test.c.html deleted file mode 100644 index a092440..0000000 --- a/fmpp/src/test/resources/expected/ex_border/test.c.html +++ /dev/null @@ -1,25 +0,0 @@ -

        #include <string.h>
        -#include "futil_i.h"
        -
        -zxz_ec_t
        -zxz_f_child_path_can_match(zxz_bool_t *pbMatches,
        -        const char *sPath, const char *sPattern)
        -{
        -    zxz_ec_t ec;
        -    int i;
        -    char *sNew = NULL;
        -
        -    i = strlen(sPath);
        -    if (i != 0 && sPath[i-1] != ZXZ_CFGM_PATH_SEPARATOR_CHR
        -            && sPath[i-1] != ZXZ_CFGM_PATH_SEPARATOR2_CHR) {
        -        sNew = malloc(i+2);  /* <-- +sNew  */
        -        strcpy(sNew, sPath);
        -        sNew[i] = ZXZ_CFGM_PATH_SEPARATOR_CHR;
        -        sNew[i+1] = '\0';
        -        sPath = sNew;
        -    }
        -    ec = zxz_f_path_matches_ex(pbMatches, sPath, sPattern, FALSE, 1);
        -    free(sNew);  /* <-- -sNew  */
        -    return ec;
        -}
        -
        \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_border/test.html b/fmpp/src/test/resources/expected/ex_border/test.html deleted file mode 100644 index 6484820..0000000 --- a/fmpp/src/test/resources/expected/ex_border/test.html +++ /dev/null @@ -1,3 +0,0 @@ -Hello -

        a < b & c -

        A C program \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_capture/test.html b/fmpp/src/test/resources/expected/ex_capture/test.html deleted file mode 100644 index 76b9f0d..0000000 --- a/fmpp/src/test/resources/expected/ex_capture/test.html +++ /dev/null @@ -1,111 +0,0 @@ - Contents: -

        -
        - - -

        Foo

        - - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - - -

        Bar

        - - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - - -

        Baaz

        - - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - -

        Blah blah blah blah blah blah blah blah blah blah blah blah -blah blah blah blah blah blah blah blah blah - - diff --git a/fmpp/src/test/resources/expected/ex_check_links/good_target.html b/fmpp/src/test/resources/expected/ex_check_links/good_target.html deleted file mode 100644 index 2f9031f..0000000 --- a/fmpp/src/test/resources/expected/ex_check_links/good_target.html +++ /dev/null @@ -1 +0,0 @@ -Hi! \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_check_links/index.html b/fmpp/src/test/resources/expected/ex_check_links/index.html deleted file mode 100644 index 6a9a183..0000000 --- a/fmpp/src/test/resources/expected/ex_check_links/index.html +++ /dev/null @@ -1,2 +0,0 @@ -

        Working link -

        Broken link \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_csv/test.html b/fmpp/src/test/resources/expected/ex_csv/test.html deleted file mode 100644 index cda725d..0000000 --- a/fmpp/src/test/resources/expected/ex_csv/test.html +++ /dev/null @@ -1,7 +0,0 @@ - -
        nameprotectedpriceentered -
        arctic-terntrue10,000.00Jan 25, 2003 03:10:06 AM -
        house-sparrowfalse50.00Feb 15, 2003 01:20:30 PM -
        hoachimtrueN/AN/A -
        sakerettrue200,000.00Dec 18, 2002 08:45:00 PM -
        \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_img_dims/falcon.png b/fmpp/src/test/resources/expected/ex_img_dims/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/test/resources/expected/ex_img_dims/falcon.png and /dev/null differ diff --git a/fmpp/src/test/resources/expected/ex_img_dims/index.html b/fmpp/src/test/resources/expected/ex_img_dims/index.html deleted file mode 100644 index 7b948a6..0000000 --- a/fmpp/src/test/resources/expected/ex_img_dims/index.html +++ /dev/null @@ -1,9 +0,0 @@ -

        All calcualted: -Falcon -

        Width calculated: -Falcon - -

        Height calculated: -Falcon -

        Nothing calculated: -Falcon \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/index.html b/fmpp/src/test/resources/expected/ex_local_data/index.html deleted file mode 100644 index a8e9ff3..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - -

        Test

        -

        Other pages: -

        - -

        Here it is the config file used: -
        -
        sourceRoot: src
        -outputRoot: out
        -logFile: log.fmpp
        -
        -modes: ignore(**/*.bsh)
        -
        -data: {
        -    bgColor: green
        -    author: Anonymous
        -}
        -
        -localData: [
        -    # Run the attached BeanShell script for HTML-s, if there is one available.
        -    case(**/*.htm, **/*.html, bsh({ignoreMissing}))
        -    
        -    # Independently of the above,
        -    # set "bgColor" to "yellow" when processing the files of the "sub" folder:
        -    # except for the files in "sun/sky/**", where use "blue".
        -    # But, never override the "bgColor" if the file name starts with "foo"
        -    layer()
        -    case(**/foo*, {})
        -    case(sub/sky/**, {bgColor: blue})
        -    case(sub/**, sub2/**, {bgColor: yellow})
        -    
        -    # Independently of all above, set the "author"...
        -    layer()
        -    case(**/*_j.*, {author: Joe})
        -    case(**/*_a.*, {author: Amy})
        -]
        -
        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/1.html b/fmpp/src/test/resources/expected/ex_local_data/sub/1.html deleted file mode 100644 index e1ed4ce..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/1.html +++ /dev/null @@ -1,8 +0,0 @@ - - -

        1

        -

        Author: Anonymous -

        x: Just for test: Anonymous -

        y: Blah for 1... - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/2.html b/fmpp/src/test/resources/expected/ex_local_data/sub/2.html deleted file mode 100644 index 61382dc..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        2

        -

        Author: Anonymous - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/3_j.html b/fmpp/src/test/resources/expected/ex_local_data/sub/3_j.html deleted file mode 100644 index 8f71d3b..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/3_j.html +++ /dev/null @@ -1,8 +0,0 @@ - - -

        3_j

        -

        Author: Joe -

        x: Just for test: Joe -

        y: Blah for 3_j... - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/food.html b/fmpp/src/test/resources/expected/ex_local_data/sub/food.html deleted file mode 100644 index 8345052..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/food.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        Food

        -

        Author: Anonymous - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/sky/1.html b/fmpp/src/test/resources/expected/ex_local_data/sub/sky/1.html deleted file mode 100644 index 5fc1f99..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/sky/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        1

        -

        Author: Anonymous - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/sky/2.html b/fmpp/src/test/resources/expected/ex_local_data/sub/sky/2.html deleted file mode 100644 index 00fd5bc..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/sky/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        2

        -

        Author: Anonymous - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/sky/3_a.html b/fmpp/src/test/resources/expected/ex_local_data/sub/sky/3_a.html deleted file mode 100644 index 5e0e130..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/sky/3_a.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        3_a

        -

        Author: Amy - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/subsub/1.html b/fmpp/src/test/resources/expected/ex_local_data/sub/subsub/1.html deleted file mode 100644 index e192f3f..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/subsub/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        1

        -

        Author: Anonymous - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub/subsub/2.html b/fmpp/src/test/resources/expected/ex_local_data/sub/subsub/2.html deleted file mode 100644 index 61382dc..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub/subsub/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        2

        -

        Author: Anonymous - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub2/1.html b/fmpp/src/test/resources/expected/ex_local_data/sub2/1.html deleted file mode 100644 index e192f3f..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub2/1.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        1

        -

        Author: Anonymous - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_local_data/sub2/2.html b/fmpp/src/test/resources/expected/ex_local_data/sub2/2.html deleted file mode 100644 index 61382dc..0000000 --- a/fmpp/src/test/resources/expected/ex_local_data/sub2/2.html +++ /dev/null @@ -1,6 +0,0 @@ - - -

        2

        -

        Author: Anonymous - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_multipage_list/result1.html b/fmpp/src/test/resources/expected/ex_multipage_list/result1.html deleted file mode 100644 index 477de4e..0000000 --- a/fmpp/src/test/resources/expected/ex_multipage_list/result1.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Results - page 1 of 6 - - -

        Results

        - -

        1. Qweqwe: http://qweqwe.com -

        2. Asdasd: http://asdasd.com -

        3. Cvbcvbcv: http://cvbcvbcvb.com -

        4. Iopiopi: http://iopiopo.com -

        5. Bmbnmbm: http://bnmnbmb.com - -


        - Pages:   - <<  - 1 - | - 2 - | - 3 - | - 4 - | - 5 - | - 6 - -  >> - - diff --git a/fmpp/src/test/resources/expected/ex_multipage_list/result2.html b/fmpp/src/test/resources/expected/ex_multipage_list/result2.html deleted file mode 100644 index 2f75ffd..0000000 --- a/fmpp/src/test/resources/expected/ex_multipage_list/result2.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Results - page 2 of 6 - - -

        Results

        - -

        6. Uiouioui: http://uiouiouio.com -

        7. Bvnbvnbv: http://bvnbvnbvnbv.com -

        8. Hghjghjghjg: http://hghjghjghjg.com -

        9. Werwer: http://werwerr.com -

        10. Mnmbnbm: http://mbnmbnmb.com - -


        - Pages:   - <<  - 1 - | - 2 - | - 3 - | - 4 - | - 5 - | - 6 - -  >> - - diff --git a/fmpp/src/test/resources/expected/ex_multipage_list/result3.html b/fmpp/src/test/resources/expected/ex_multipage_list/result3.html deleted file mode 100644 index dea7b99..0000000 --- a/fmpp/src/test/resources/expected/ex_multipage_list/result3.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Results - page 3 of 6 - - -

        Results

        - -

        11. Gfhfghgfgfh: http://fghgfhgfhg.com -

        12. Asdasas: http://asdasdasd.com -

        13. Yuuiyiyu: http://yuiyuiyui.com -

        14. Rtytryytr: http://rttryytr.com -

        15. Kjhkjhk: http://khjkhjkhjk.com - -


        - Pages:   - <<  - 1 - | - 2 - | - 3 - | - 4 - | - 5 - | - 6 - -  >> - - diff --git a/fmpp/src/test/resources/expected/ex_multipage_list/result4.html b/fmpp/src/test/resources/expected/ex_multipage_list/result4.html deleted file mode 100644 index 93613d0..0000000 --- a/fmpp/src/test/resources/expected/ex_multipage_list/result4.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Results - page 4 of 6 - - -

        Results

        - -

        16. Rrrrr: http://rrrrr.com -

        17. Ddfdgfgf: http://ddffdg.com -

        18. Jhjhhgjh: http://jghjjhj.com -

        19. Zzzzzzzz: http://zzzzzzzz.com -

        20. Zxzxxzzx: http://zzxzxzxzx.com - -


        - Pages:   - <<  - 1 - | - 2 - | - 3 - | - 4 - | - 5 - | - 6 - -  >> - - diff --git a/fmpp/src/test/resources/expected/ex_multipage_list/result5.html b/fmpp/src/test/resources/expected/ex_multipage_list/result5.html deleted file mode 100644 index 49af391..0000000 --- a/fmpp/src/test/resources/expected/ex_multipage_list/result5.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Results - page 5 of 6 - - -

        Results

        - -

        21. Cvvcvvcv: http://ccvvcvcvcv.com -

        22. Bnvvbnvb: http://vbnvbnnvbnb.com -

        23. Asdsadasd: http://asdasdasd.com -

        24. Vvvvvv: http://vvvvvvv.com -

        25. Ssssss: http://sssss.com - -


        - Pages:   - <<  - 1 - | - 2 - | - 3 - | - 4 - | - 5 - | - 6 - -  >> - - diff --git a/fmpp/src/test/resources/expected/ex_multipage_list/result6.html b/fmpp/src/test/resources/expected/ex_multipage_list/result6.html deleted file mode 100644 index e937850..0000000 --- a/fmpp/src/test/resources/expected/ex_multipage_list/result6.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Results - page 6 of 6 - - -

        Results

        - -

        26. Qqqqqqq: http://qqqqqq.com -

        27. Xxxxxxx: http://xxxxx.com -

        28. Vvvvv: http://vvvvv.com -

        29. Aaaaaaa: http://aaaaaaaa.com - -


        - Pages:   - <<  - 1 - | - 2 - | - 3 - | - 4 - | - 5 - | - 6 - -  >> - - - - diff --git a/fmpp/src/test/resources/expected/ex_qtour_step1/falcon.png b/fmpp/src/test/resources/expected/ex_qtour_step1/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/test/resources/expected/ex_qtour_step1/falcon.png and /dev/null differ diff --git a/fmpp/src/test/resources/expected/ex_qtour_step1/index.html b/fmpp/src/test/resources/expected/ex_qtour_step1/index.html deleted file mode 100644 index cc440b0..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step1/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Index - - -

        Index

        -

        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_qtour_step1/subdir/something.html b/fmpp/src/test/resources/expected/ex_qtour_step1/subdir/something.html deleted file mode 100644 index fd4daec..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step1/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

        Something else

        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_qtour_step2/falcon.png b/fmpp/src/test/resources/expected/ex_qtour_step2/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/test/resources/expected/ex_qtour_step2/falcon.png and /dev/null differ diff --git a/fmpp/src/test/resources/expected/ex_qtour_step2/index.html b/fmpp/src/test/resources/expected/ex_qtour_step2/index.html deleted file mode 100644 index cc440b0..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step2/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Index - - -

        Index

        -

        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_qtour_step2/subdir/something.html b/fmpp/src/test/resources/expected/ex_qtour_step2/subdir/something.html deleted file mode 100644 index fd4daec..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step2/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

        Something else

        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_qtour_step3/falcon.png b/fmpp/src/test/resources/expected/ex_qtour_step3/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/test/resources/expected/ex_qtour_step3/falcon.png and /dev/null differ diff --git a/fmpp/src/test/resources/expected/ex_qtour_step3/index.html b/fmpp/src/test/resources/expected/ex_qtour_step3/index.html deleted file mode 100644 index 148bcce..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step3/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - Index - - -

        Index

        -

        Birds: -

          -
        • Arctic-tern: Flies very long distances all years. - Favorite food: sardine -
        • House-sparrow: Don't you say you don't know it... - Favorite food: sunflower -
        • Sakeret: Great hunter of the sky. - Favorite food: pigeon -
        -
        -

        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_qtour_step3/subdir/something.html b/fmpp/src/test/resources/expected/ex_qtour_step3/subdir/something.html deleted file mode 100644 index fd4daec..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step3/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

        Something else

        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_qtour_step4/arctic-tern.html b/fmpp/src/test/resources/expected/ex_qtour_step4/arctic-tern.html deleted file mode 100644 index bccb61a..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step4/arctic-tern.html +++ /dev/null @@ -1,12 +0,0 @@ - - - Arctic-tern - - -

        Arctic-tern

        - -

        Flies very long distances all years.

        - -

        Favorite food: sardine

        - - diff --git a/fmpp/src/test/resources/expected/ex_qtour_step4/falcon.png b/fmpp/src/test/resources/expected/ex_qtour_step4/falcon.png deleted file mode 100644 index fec5243..0000000 Binary files a/fmpp/src/test/resources/expected/ex_qtour_step4/falcon.png and /dev/null differ diff --git a/fmpp/src/test/resources/expected/ex_qtour_step4/house-sparrow.html b/fmpp/src/test/resources/expected/ex_qtour_step4/house-sparrow.html deleted file mode 100644 index ecf02f2..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step4/house-sparrow.html +++ /dev/null @@ -1,12 +0,0 @@ - - - House-sparrow - - -

        House-sparrow

        - -

        Don't you say you don't know it...

        - -

        Favorite food: sunflower

        - - diff --git a/fmpp/src/test/resources/expected/ex_qtour_step4/index.html b/fmpp/src/test/resources/expected/ex_qtour_step4/index.html deleted file mode 100644 index b87e8d0..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step4/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - Index - - -

        Index

        -

        Birds: -

        -
        -

        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_qtour_step4/sakeret.html b/fmpp/src/test/resources/expected/ex_qtour_step4/sakeret.html deleted file mode 100644 index c4559c2..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step4/sakeret.html +++ /dev/null @@ -1,12 +0,0 @@ - - - Sakeret - - -

        Sakeret

        - -

        Great hunter of the sky.

        - -

        Favorite food: pigeon

        - - diff --git a/fmpp/src/test/resources/expected/ex_qtour_step4/subdir/something.html b/fmpp/src/test/resources/expected/ex_qtour_step4/subdir/something.html deleted file mode 100644 index fd4daec..0000000 --- a/fmpp/src/test/resources/expected/ex_qtour_step4/subdir/something.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Something else - - -

        Something else

        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_session/01_foo.html b/fmpp/src/test/resources/expected/ex_session/01_foo.html deleted file mode 100644 index d68b5ad..0000000 --- a/fmpp/src/test/resources/expected/ex_session/01_foo.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Foo - - -

        Foo

        - -

        Blah blah blah - - diff --git a/fmpp/src/test/resources/expected/ex_session/02_bar.html b/fmpp/src/test/resources/expected/ex_session/02_bar.html deleted file mode 100644 index 53f43a5..0000000 --- a/fmpp/src/test/resources/expected/ex_session/02_bar.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Bar - - -

        Bar

        - -

        Blah blah blah - - diff --git a/fmpp/src/test/resources/expected/ex_session/03_baaz.html b/fmpp/src/test/resources/expected/ex_session/03_baaz.html deleted file mode 100644 index 1d7f074..0000000 --- a/fmpp/src/test/resources/expected/ex_session/03_baaz.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Baaz - - -

        Baaz

        - -

        Blah blah blah - - diff --git a/fmpp/src/test/resources/expected/ex_session/04_wombat.html b/fmpp/src/test/resources/expected/ex_session/04_wombat.html deleted file mode 100644 index 8c25b0a..0000000 --- a/fmpp/src/test/resources/expected/ex_session/04_wombat.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - Wombat - - -

        Wombat

        - -

        Blah blah blah - - diff --git a/fmpp/src/test/resources/expected/ex_session/index.html b/fmpp/src/test/resources/expected/ex_session/index.html deleted file mode 100644 index 0ec490c..0000000 --- a/fmpp/src/test/resources/expected/ex_session/index.html +++ /dev/null @@ -1,12 +0,0 @@ - -Index - -

        Index

        - - - diff --git a/fmpp/src/test/resources/expected/ex_tdd/index.html b/fmpp/src/test/resources/expected/ex_tdd/index.html deleted file mode 100644 index 6dda2ff..0000000 --- a/fmpp/src/test/resources/expected/ex_tdd/index.html +++ /dev/null @@ -1,10 +0,0 @@ -

        Hello Big Joe!

        - -

        Our offers: -

          -
        • White mouse for 30 credits -
        • Black mouse for 25 credits -
        • Green mouse for 150 credits -
        - -

        Note that we know that you are tall, Big Joe.

        \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_xml/test.html b/fmpp/src/test/resources/expected/ex_xml/test.html deleted file mode 100644 index 24240e8..0000000 --- a/fmpp/src/test/resources/expected/ex_xml/test.html +++ /dev/null @@ -1,10 +0,0 @@ -

        The XML Test

        -

        Preface

        -

        Preface blah blah...

        -

        And preface blah blah...

        -

        Blah

        -

        Blah blah blah...

        -

        And blah blah blah...

        -

        Foo

        -

        Foo blah blah...

        -

        And foo blah blah...

        diff --git a/fmpp/src/test/resources/expected/ex_xml2/index.html b/fmpp/src/test/resources/expected/ex_xml2/index.html deleted file mode 100644 index 87bb006..0000000 --- a/fmpp/src/test/resources/expected/ex_xml2/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - Product Catalog - - - -

        Product Catalog

        - -

        The available products are: - -

        - - diff --git a/fmpp/src/test/resources/expected/ex_xml2/product_1.html b/fmpp/src/test/resources/expected/ex_xml2/product_1.html deleted file mode 100644 index 74e2de5..0000000 --- a/fmpp/src/test/resources/expected/ex_xml2/product_1.html +++ /dev/null @@ -1,25 +0,0 @@ - - - K8 Widget - - - -

        K8 Widget

        - -

        Price: $500 - -

        Description: -
        This is a standard widget with highly durable thingamy. -

        - -

        Manufacturer: -
        Name: Foo Incorporated -
        Address: 3 Traktor Road, Budapest, 1234, Hungary -
        Phone: 45-456-7461 -
        Homepage: http://www.foo.hu/ - - -


        -Back... - - diff --git a/fmpp/src/test/resources/expected/ex_xml2/product_2.html b/fmpp/src/test/resources/expected/ex_xml2/product_2.html deleted file mode 100644 index 6109985..0000000 --- a/fmpp/src/test/resources/expected/ex_xml2/product_2.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Giant/S2 Widget - - - -

        Giant/S2 Widget

        - -

        Price: $2500 - -

        Description: -
        This is an extra-large widget. -

        - -

        Manufacturer: -
        Name: Acmee Incorporated -
        Address: 5 Kili Street, Tarawa, Kiribati - -
        Homepage: http://www.acmee.com/ -
        Email: bounche@acmee.com - -


        -Back... - - diff --git a/fmpp/src/test/resources/expected/ex_xml2/product_3.html b/fmpp/src/test/resources/expected/ex_xml2/product_3.html deleted file mode 100644 index 3c4130b..0000000 --- a/fmpp/src/test/resources/expected/ex_xml2/product_3.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Micro Widget - - - -

        Micro Widget

        - -

        Price: $800 - -

        Description: -
        This widget can even fit into your suitcase. -

        - -

        Manufacturer: -
        Name: Acmee Incorporated -
        Address: 5 Kili Street, Tarawa, Kiribati - -
        Homepage: http://www.acmee.com/ -
        Email: bounche@acmee.com - -


        -Back... - - diff --git a/fmpp/src/test/resources/expected/ex_xml2/product_4.html b/fmpp/src/test/resources/expected/ex_xml2/product_4.html deleted file mode 100644 index bc6bd65..0000000 --- a/fmpp/src/test/resources/expected/ex_xml2/product_4.html +++ /dev/null @@ -1,25 +0,0 @@ - - - CXC Widget - - - -

        CXC Widget

        - -

        Price: $350 - -

        Description: -
        I have no idea... this is just a stupid example, OK? -

        - -

        Manufacturer: -
        Name: Batman International -
        Address: 77 Cash Square, Palo Alto, California 94531, U.S.A -
        Phone: 07-798-456-985 -
        Homepage: http://www.batmaninternational.com/ -
        Email: devnul@batmaninternational.com - -


        -Back... - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/bigwidget.html b/fmpp/src/test/resources/expected/ex_xml_rendering/bigwidget.html deleted file mode 100644 index cb026df..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/bigwidget.html +++ /dev/null @@ -1,16 +0,0 @@ - - - Product: Big widget - - -

        Big widget

        -

        Price: only $15 -

        Description:
        - - This is an extra large widget, manufactured with a technology - developed by the NASA. - -


        - Back... - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_2_1.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_2_1.html deleted file mode 100644 index e9f9e4f..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_2_1.html +++ /dev/null @@ -1,29 +0,0 @@ - - - An example chapter - - -Prev | -Up | - Next - | - ToC | Home -
        -

        An example chapter

        - -

        A paragraph with emphasized and marked sections.

        - - -
        A quotation with emphasized and marked sections.
        - - -

        A emphasized section with a marked section in it.

        - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_2_2.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_2_2.html deleted file mode 100644 index 84fb50c..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_2_2.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Another example chapter - - -Prev | -Up | - Next - | - ToC | Home -
        -

        Another example chapter

        - -

        Blah...

        - -

        Blah blah...

        - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_1.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_1.html deleted file mode 100644 index ca4a593..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_1.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Yet another example chapter - - -Prev | -Up | - Next - | - ToC | Home -
        -

        Yet another example chapter

        - -

        Blah blah blah...

        - -

        Blah blah blah blah...

        - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_2.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_2.html deleted file mode 100644 index be9a144..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_2.html +++ /dev/null @@ -1,25 +0,0 @@ - - - And... yet another example chapter - - -Prev | -Up | - Next - | - ToC | Home -
        -

        And... yet another example chapter

        - -

        Blah blah blah blah blah...

        - -

        Blah blah blah blah blah blah...

        - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_3.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_3.html deleted file mode 100644 index e019569..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_chapter_3_3.html +++ /dev/null @@ -1,23 +0,0 @@ - - - The last example chapter - - -Prev | -Up | -Next | - ToC | Home -
        -

        The last example chapter

        - -

        Blah blah blah blah blah blah blah...

        - -

        Blah blah blah blah blah blah blah blah...

        - -
        -Prev | -Up | -Next | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_index.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_index.html deleted file mode 100644 index 5fa723d..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Example 1 - - - Prev | Up | Next | ToC | Home -
        -

        Example 1

        -

        Table of Contents

        - - - - - - -
        - Prev | Up | Next | ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_1.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_1.html deleted file mode 100644 index 0fdc3f0..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_1.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Preface - - -Prev | -Up | - Next - | - ToC | Home -
        -

        Preface

        - -

        This is an example "book" that demonstrates FreeMarker and FMPP.

        - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_2.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_2.html deleted file mode 100644 index 6ff6fb6..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_2.html +++ /dev/null @@ -1,29 +0,0 @@ - - - An Example Part - - -Prev | -Up | - Next - | - ToC | Home -
        -

        An Example Part

        -

        Part Contents

        - - - - - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_3.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_3.html deleted file mode 100644 index 6aac3e2..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example1_part_3.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Another Example Part - - -Prev | -Up | - Next - | - ToC | Home -
        -

        Another Example Part

        -

        Part Contents

        - - - - - - - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example2_chapter_2_1.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example2_chapter_2_1.html deleted file mode 100644 index 0bbe1db..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example2_chapter_2_1.html +++ /dev/null @@ -1,21 +0,0 @@ - - - Blah blah - - -Prev | -Up | -Next | - ToC | Home -
        -

        Blah blah

        - -

        So you have seen that you can have more books...

        - -
        -Prev | -Up | -Next | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example2_index.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example2_index.html deleted file mode 100644 index 47e5fdd..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example2_index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - Example 2 - - - Prev | Up | Next | ToC | Home -
        -

        Example 2

        -

        Table of Contents

        - - - - - -
        - Prev | Up | Next | ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example2_part_1.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example2_part_1.html deleted file mode 100644 index 298e5f6..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example2_part_1.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Preface - - -Prev | -Up | - Next - | - ToC | Home -
        -

        Preface

        - -

        Yet another example book.

        - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/example2_part_2.html b/fmpp/src/test/resources/expected/ex_xml_rendering/example2_part_2.html deleted file mode 100644 index f759373..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/example2_part_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - Blah - - -Prev | -Up | - Next - | - ToC | Home -
        -

        Blah

        -

        Part Contents

        - - - -
        -Prev | -Up | - Next - | - ToC | Home - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/index.html b/fmpp/src/test/resources/expected/ex_xml_rendering/index.html deleted file mode 100644 index 8154588..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - XML rendering example - - -

        XML rendering example

        -

        The "books": -

        -

        The "products": -

        - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/normalwidget.html b/fmpp/src/test/resources/expected/ex_xml_rendering/normalwidget.html deleted file mode 100644 index 02281f8..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/normalwidget.html +++ /dev/null @@ -1,15 +0,0 @@ - - - Product: Normal widget - - -

        Normal widget

        -

        Price: only $5 -

        Description:
        - - This is a standard widget, with great quality pink painting. - -


        - Back... - - diff --git a/fmpp/src/test/resources/expected/ex_xml_rendering/smallwidget.html b/fmpp/src/test/resources/expected/ex_xml_rendering/smallwidget.html deleted file mode 100644 index 57e42f0..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_rendering/smallwidget.html +++ /dev/null @@ -1,16 +0,0 @@ - - - Product: Small widget - - -

        Small widget

        -

        Price: only $10 -

        Description:
        - - Always wanted a small widget, but never found it? - Now, then this one is for You! - -


        - Back... - - diff --git a/fmpp/src/test/resources/expected/ex_xml_validating/test.txt b/fmpp/src/test/resources/expected/ex_xml_validating/test.txt deleted file mode 100644 index ba658a1..0000000 --- a/fmpp/src/test/resources/expected/ex_xml_validating/test.txt +++ /dev/null @@ -1,12 +0,0 @@ - -Title: -Test - -Paragraphs: -- p1 -- p2 -- p3 - -Paragraphs where class is "foo": -- p1 -- p3 diff --git a/fmpp/src/test/resources/expected/filename/a b/fmpp/src/test/resources/expected/filename/a deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/a +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/a.foo b/fmpp/src/test/resources/expected/filename/a.foo deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/a.foo +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/a.foo.bar b/fmpp/src/test/resources/expected/filename/a.foo.bar deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/a.foo.bar +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/bt b/fmpp/src/test/resources/expected/filename/bt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/bt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/bt.x b/fmpp/src/test/resources/expected/filename/bt.x deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/bt.x +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/c b/fmpp/src/test/resources/expected/filename/c deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/c +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/c.x b/fmpp/src/test/resources/expected/filename/c.x deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/c.x +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/d b/fmpp/src/test/resources/expected/filename/d deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/d +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/d.pok b/fmpp/src/test/resources/expected/filename/d.pok deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/d.pok +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/e b/fmpp/src/test/resources/expected/filename/e deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/e +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/f1.wq b/fmpp/src/test/resources/expected/filename/f1.wq deleted file mode 100644 index 81f4282..0000000 --- a/fmpp/src/test/resources/expected/filename/f1.wq +++ /dev/null @@ -1 +0,0 @@ -qw \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/f2.qw b/fmpp/src/test/resources/expected/filename/f2.qw deleted file mode 100644 index 918c841..0000000 --- a/fmpp/src/test/resources/expected/filename/f2.qw +++ /dev/null @@ -1 +0,0 @@ -wq \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/gxx b/fmpp/src/test/resources/expected/filename/gxx deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/gxx +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/rme_casesens b/fmpp/src/test/resources/expected/filename/rme_casesens deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/rme_casesens +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/rmp_casesens b/fmpp/src/test/resources/expected/filename/rmp_casesens deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/rmp_casesens +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename/rpe_casesens.wq b/fmpp/src/test/resources/expected/filename/rpe_casesens.wq deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename/rpe_casesens.wq +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/a b/fmpp/src/test/resources/expected/filename_casesens/a deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/a +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/a.foo b/fmpp/src/test/resources/expected/filename_casesens/a.foo deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/a.foo +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/a.foo.bar b/fmpp/src/test/resources/expected/filename_casesens/a.foo.bar deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/a.foo.bar +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/bt b/fmpp/src/test/resources/expected/filename_casesens/bt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/bt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/bt.x b/fmpp/src/test/resources/expected/filename_casesens/bt.x deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/bt.x +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/c b/fmpp/src/test/resources/expected/filename_casesens/c deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/c +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/c.x b/fmpp/src/test/resources/expected/filename_casesens/c.x deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/c.x +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/d b/fmpp/src/test/resources/expected/filename_casesens/d deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/d +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/d.pok b/fmpp/src/test/resources/expected/filename_casesens/d.pok deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/d.pok +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/e b/fmpp/src/test/resources/expected/filename_casesens/e deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/e +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/f1.wq b/fmpp/src/test/resources/expected/filename_casesens/f1.wq deleted file mode 100644 index 81f4282..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/f1.wq +++ /dev/null @@ -1 +0,0 @@ -qw \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/f2.qw b/fmpp/src/test/resources/expected/filename_casesens/f2.qw deleted file mode 100644 index 918c841..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/f2.qw +++ /dev/null @@ -1 +0,0 @@ -wq \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/gxx b/fmpp/src/test/resources/expected/filename_casesens/gxx deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/gxx +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/rme_casesens.Man b/fmpp/src/test/resources/expected/filename_casesens/rme_casesens.Man deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/rme_casesens.Man +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/rmp_casesensXx b/fmpp/src/test/resources/expected/filename_casesens/rmp_casesensXx deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/rmp_casesensXx +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/filename_casesens/rpe_casesens.Qw b/fmpp/src/test/resources/expected/filename_casesens/rpe_casesens.Qw deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/filename_casesens/rpe_casesens.Qw +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/fm_ici_2.3.21/test.txt b/fmpp/src/test/resources/expected/fm_ici_2.3.21/test.txt deleted file mode 100644 index 77662ba..0000000 --- a/fmpp/src/test/resources/expected/fm_ici_2.3.21/test.txt +++ /dev/null @@ -1,5 +0,0 @@ -2147483647 - - s - -- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/fm_ici_2.3.21_ow/test.txt b/fmpp/src/test/resources/expected/fm_ici_2.3.21_ow/test.txt deleted file mode 100644 index a3489f8..0000000 --- a/fmpp/src/test/resources/expected/fm_ici_2.3.21_ow/test.txt +++ /dev/null @@ -1,5 +0,0 @@ -2147483647 - - s - -bar \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/fm_ici_null/test.txt b/fmpp/src/test/resources/expected/fm_ici_null/test.txt deleted file mode 100644 index 20c4715..0000000 --- a/fmpp/src/test/resources/expected/fm_ici_null/test.txt +++ /dev/null @@ -1,5 +0,0 @@ -0 - - Failed - -- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/fm_ici_null_ow/test.txt b/fmpp/src/test/resources/expected/fm_ici_null_ow/test.txt deleted file mode 100644 index 62f09bd..0000000 --- a/fmpp/src/test/resources/expected/fm_ici_null_ow/test.txt +++ /dev/null @@ -1,5 +0,0 @@ -0 - - Failed - -bar \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/format_settings/test.txt b/fmpp/src/test/resources/expected/format_settings/test.txt deleted file mode 100644 index c7930af..0000000 --- a/fmpp/src/test/resources/expected/format_settings/test.txt +++ /dev/null @@ -1,6 +0,0 @@ -1.00 -Y/N -1995-06-07T15:16:17 -19950607 -15:16:17 -16:16:17 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/freemarker_links/@test4 b/fmpp/src/test/resources/expected/freemarker_links/@test4 deleted file mode 100644 index 0095f13..0000000 --- a/fmpp/src/test/resources/expected/freemarker_links/@test4 +++ /dev/null @@ -1 +0,0 @@ -INTERNAL @test4 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/freemarker_links/sub/t.txt b/fmpp/src/test/resources/expected/freemarker_links/sub/t.txt deleted file mode 100644 index dc121a5..0000000 --- a/fmpp/src/test/resources/expected/freemarker_links/sub/t.txt +++ /dev/null @@ -1,19 +0,0 @@ -INTERNAL @inc/test1.ftl == INTERNAL @inc/test1.ftl -EXTERNAL inc1/test2.ftl == EXTERNAL inc1/test2.ftl -EXTERNAL inc2/test3.ftl == EXTERNAL inc2/test3.ftl - -INTERNAL @inc/test1.ftl == INTERNAL @inc/test1.ftl -EXTERNAL inc1/test2.ftl == EXTERNAL inc1/test2.ftl -EXTERNAL inc2/test3.ftl == EXTERNAL inc2/test3.ftl - -INTERNAL @test4 == INTERNAL @test4 -EXTERNAL inc1/test5.ftl == EXTERNAL inc1/test5.ftl -EXTERNAL inc2/test6.ftl == EXTERNAL inc2/test6.ftl - -INTERNAL @test4 == INTERNAL @test4 -EXTERNAL inc1/test5.ftl == EXTERNAL inc1/test5.ftl -EXTERNAL inc2/test6.ftl == EXTERNAL inc2/test6.ftl - -GODZILLA == GODZILLA - -GODZILLA == GODZILLA \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/freemarker_links/t.txt b/fmpp/src/test/resources/expected/freemarker_links/t.txt deleted file mode 100644 index dc121a5..0000000 --- a/fmpp/src/test/resources/expected/freemarker_links/t.txt +++ /dev/null @@ -1,19 +0,0 @@ -INTERNAL @inc/test1.ftl == INTERNAL @inc/test1.ftl -EXTERNAL inc1/test2.ftl == EXTERNAL inc1/test2.ftl -EXTERNAL inc2/test3.ftl == EXTERNAL inc2/test3.ftl - -INTERNAL @inc/test1.ftl == INTERNAL @inc/test1.ftl -EXTERNAL inc1/test2.ftl == EXTERNAL inc1/test2.ftl -EXTERNAL inc2/test3.ftl == EXTERNAL inc2/test3.ftl - -INTERNAL @test4 == INTERNAL @test4 -EXTERNAL inc1/test5.ftl == EXTERNAL inc1/test5.ftl -EXTERNAL inc2/test6.ftl == EXTERNAL inc2/test6.ftl - -INTERNAL @test4 == INTERNAL @test4 -EXTERNAL inc1/test5.ftl == EXTERNAL inc1/test5.ftl -EXTERNAL inc2/test6.ftl == EXTERNAL inc2/test6.ftl - -GODZILLA == GODZILLA - -GODZILLA == GODZILLA \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/htmlutils/test.bmp b/fmpp/src/test/resources/expected/htmlutils/test.bmp deleted file mode 100644 index 72289e6..0000000 Binary files a/fmpp/src/test/resources/expected/htmlutils/test.bmp and /dev/null differ diff --git a/fmpp/src/test/resources/expected/htmlutils/test.gif b/fmpp/src/test/resources/expected/htmlutils/test.gif deleted file mode 100644 index cc29e79..0000000 Binary files a/fmpp/src/test/resources/expected/htmlutils/test.gif and /dev/null differ diff --git a/fmpp/src/test/resources/expected/htmlutils/test.html b/fmpp/src/test/resources/expected/htmlutils/test.html deleted file mode 100644 index a110107..0000000 --- a/fmpp/src/test/resources/expected/htmlutils/test.html +++ /dev/null @@ -1,4 +0,0 @@ -

        GIF -

        PNG -

        -

        diff --git a/fmpp/src/test/resources/expected/htmlutils/test.jpg b/fmpp/src/test/resources/expected/htmlutils/test.jpg deleted file mode 100644 index cc8871f..0000000 Binary files a/fmpp/src/test/resources/expected/htmlutils/test.jpg and /dev/null differ diff --git a/fmpp/src/test/resources/expected/htmlutils/test.png b/fmpp/src/test/resources/expected/htmlutils/test.png deleted file mode 100644 index 7ef3cc0..0000000 Binary files a/fmpp/src/test/resources/expected/htmlutils/test.png and /dev/null differ diff --git a/fmpp/src/test/resources/expected/localdata/1.html b/fmpp/src/test/resources/expected/localdata/1.html deleted file mode 100644 index ef6fae1..0000000 --- a/fmpp/src/test/resources/expected/localdata/1.html +++ /dev/null @@ -1,3 +0,0 @@ -HTML -- -HTMLHTMLHTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/1_x.html b/fmpp/src/test/resources/expected/localdata/1_x.html deleted file mode 100644 index 43d191a..0000000 --- a/fmpp/src/test/resources/expected/localdata/1_x.html +++ /dev/null @@ -1,3 +0,0 @@ -HTML -XX -HTMLHTMLHTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/1_z.html b/fmpp/src/test/resources/expected/localdata/1_z.html deleted file mode 100644 index 6c0de48..0000000 --- a/fmpp/src/test/resources/expected/localdata/1_z.html +++ /dev/null @@ -1,3 +0,0 @@ -HTML -ZZ:1_z.html -HTMLHTMLHTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/1_z.htmlx b/fmpp/src/test/resources/expected/localdata/1_z.htmlx deleted file mode 100644 index 2c8c9b8..0000000 --- a/fmpp/src/test/resources/expected/localdata/1_z.htmlx +++ /dev/null @@ -1,3 +0,0 @@ -Z:1_z.htmlx -ZZ:1_z.htmlx -HX \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/2.htm b/fmpp/src/test/resources/expected/localdata/2.htm deleted file mode 100644 index ef6fae1..0000000 --- a/fmpp/src/test/resources/expected/localdata/2.htm +++ /dev/null @@ -1,3 +0,0 @@ -HTML -- -HTMLHTMLHTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/2_y.htm b/fmpp/src/test/resources/expected/localdata/2_y.htm deleted file mode 100644 index ccd0102..0000000 --- a/fmpp/src/test/resources/expected/localdata/2_y.htm +++ /dev/null @@ -1,3 +0,0 @@ -HTML -YY -HTMLHTMLHTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/sub/1.html b/fmpp/src/test/resources/expected/localdata/sub/1.html deleted file mode 100644 index 2dfd158..0000000 --- a/fmpp/src/test/resources/expected/localdata/sub/1.html +++ /dev/null @@ -1,3 +0,0 @@ -SUB_HTML -- -SUB_HTMLSUB_HTMLSUB_HTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/sub/1_x.html b/fmpp/src/test/resources/expected/localdata/sub/1_x.html deleted file mode 100644 index c01ee83..0000000 --- a/fmpp/src/test/resources/expected/localdata/sub/1_x.html +++ /dev/null @@ -1,3 +0,0 @@ -SUB_HTML -XX -SUB_HTMLSUB_HTMLSUB_HTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/sub/1_z.html b/fmpp/src/test/resources/expected/localdata/sub/1_z.html deleted file mode 100644 index 74837ad..0000000 --- a/fmpp/src/test/resources/expected/localdata/sub/1_z.html +++ /dev/null @@ -1,3 +0,0 @@ -SUB_HTML -ZZ:sub/1_z.html -SUB_HTMLSUB_HTMLSUB_HTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/sub/1_z.htmlx b/fmpp/src/test/resources/expected/localdata/sub/1_z.htmlx deleted file mode 100644 index 5244918..0000000 --- a/fmpp/src/test/resources/expected/localdata/sub/1_z.htmlx +++ /dev/null @@ -1,3 +0,0 @@ -Z:sub/1_z.htmlx -ZZ:sub/1_z.htmlx -HX \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/sub/2.htm b/fmpp/src/test/resources/expected/localdata/sub/2.htm deleted file mode 100644 index 2dfd158..0000000 --- a/fmpp/src/test/resources/expected/localdata/sub/2.htm +++ /dev/null @@ -1,3 +0,0 @@ -SUB_HTML -- -SUB_HTMLSUB_HTMLSUB_HTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/sub/2_y.htm b/fmpp/src/test/resources/expected/localdata/sub/2_y.htm deleted file mode 100644 index 88699de..0000000 --- a/fmpp/src/test/resources/expected/localdata/sub/2_y.htm +++ /dev/null @@ -1,3 +0,0 @@ -SUB_HTML -YY -SUB_HTMLSUB_HTMLSUB_HTML \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/sub/test.txt b/fmpp/src/test/resources/expected/localdata/sub/test.txt deleted file mode 100644 index f1d8263..0000000 --- a/fmpp/src/test/resources/expected/localdata/sub/test.txt +++ /dev/null @@ -1,3 +0,0 @@ -- -- -- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/localdata/test.txt b/fmpp/src/test/resources/expected/localdata/test.txt deleted file mode 100644 index f1d8263..0000000 --- a/fmpp/src/test/resources/expected/localdata/test.txt +++ /dev/null @@ -1,3 +0,0 @@ -- -- -- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/locale/test.txt b/fmpp/src/test/resources/expected/locale/test.txt deleted file mode 100644 index ba883b1..0000000 --- a/fmpp/src/test/resources/expected/locale/test.txt +++ /dev/null @@ -1,5 +0,0 @@ -Locale: fr_FR -Day: dimanche - -Locale: en_US -Day: Sunday \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/nested_output/n0.txt b/fmpp/src/test/resources/expected/nested_output/n0.txt deleted file mode 100644 index 26cc011..0000000 --- a/fmpp/src/test/resources/expected/nested_output/n0.txt +++ /dev/null @@ -1,3 +0,0 @@ -n0[ - -=N0=- -]n0 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/nested_output/n1.txt b/fmpp/src/test/resources/expected/nested_output/n1.txt deleted file mode 100644 index a46ee3d..0000000 --- a/fmpp/src/test/resources/expected/nested_output/n1.txt +++ /dev/null @@ -1,3 +0,0 @@ - n1 - -=N1=- - ]n1 diff --git a/fmpp/src/test/resources/expected/nested_output/n2.1.txt b/fmpp/src/test/resources/expected/nested_output/n2.1.txt deleted file mode 100644 index 0f855e5..0000000 --- a/fmpp/src/test/resources/expected/nested_output/n2.1.txt +++ /dev/null @@ -1,3 +0,0 @@ - n1 - -=N2.1=- - ]n1 diff --git a/fmpp/src/test/resources/expected/nested_output/n2.txt b/fmpp/src/test/resources/expected/nested_output/n2.txt deleted file mode 100644 index eeb460c..0000000 --- a/fmpp/src/test/resources/expected/nested_output/n2.txt +++ /dev/null @@ -1,3 +0,0 @@ - n2 - -=N2=- - ]n2 diff --git a/fmpp/src/test/resources/expected/nested_output/n3.txt b/fmpp/src/test/resources/expected/nested_output/n3.txt deleted file mode 100644 index 1b168b0..0000000 --- a/fmpp/src/test/resources/expected/nested_output/n3.txt +++ /dev/null @@ -1,3 +0,0 @@ - n3[ - -=N3=- - ]n3 diff --git a/fmpp/src/test/resources/expected/nested_output/nestings2.txt b/fmpp/src/test/resources/expected/nested_output/nestings2.txt deleted file mode 100644 index 1a035c2..0000000 --- a/fmpp/src/test/resources/expected/nested_output/nestings2.txt +++ /dev/null @@ -1,3 +0,0 @@ -n2.0[ - -=N2.0=- -]n2.0 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/objectwrapper1/test.txt b/fmpp/src/test/resources/expected/objectwrapper1/test.txt deleted file mode 100644 index f395853..0000000 --- a/fmpp/src/test/resources/expected/objectwrapper1/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -X = X -missing = missing \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/objectwrapper2/test.txt b/fmpp/src/test/resources/expected/objectwrapper2/test.txt deleted file mode 100644 index eb76d9c..0000000 --- a/fmpp/src/test/resources/expected/objectwrapper2/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -X = X -java.util.HashMap = java.util.HashMap \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/1.txt b/fmpp/src/test/resources/expected/pathpattern1/1.txt deleted file mode 100644 index eff935d..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/1.txt +++ /dev/null @@ -1 +0,0 @@ -h1_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/2.txt b/fmpp/src/test/resources/expected/pathpattern1/2.txt deleted file mode 100644 index 471f507..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/2.txt +++ /dev/null @@ -1 +0,0 @@ -h2_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/3.txt b/fmpp/src/test/resources/expected/pathpattern1/3.txt deleted file mode 100644 index bbccbd8..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/3.txt +++ /dev/null @@ -1 +0,0 @@ -h3_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/4.txt b/fmpp/src/test/resources/expected/pathpattern1/4.txt deleted file mode 100644 index 49b7685..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/4.txt +++ /dev/null @@ -1 +0,0 @@ -h4_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/sub/1.txt b/fmpp/src/test/resources/expected/pathpattern1/sub/1.txt deleted file mode 100644 index 52bb230..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/sub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x_f1 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/sub/2.txt b/fmpp/src/test/resources/expected/pathpattern1/sub/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/sub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/sub/3.txt b/fmpp/src/test/resources/expected/pathpattern1/sub/3.txt deleted file mode 100644 index 124c288..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/sub/3.txt +++ /dev/null @@ -1 +0,0 @@ -h3_x_f3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/sub/4.txt b/fmpp/src/test/resources/expected/pathpattern1/sub/4.txt deleted file mode 100644 index 49b7685..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/sub/4.txt +++ /dev/null @@ -1 +0,0 @@ -h4_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/1.txt b/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/2.txt b/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/2.txt deleted file mode 100644 index 56f060d..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x_f2 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/3.txt b/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/3.txt deleted file mode 100644 index 124c288..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/3.txt +++ /dev/null @@ -1 +0,0 @@ -h3_x_f3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/4.txt b/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/4.txt deleted file mode 100644 index 416a8d7..0000000 --- a/fmpp/src/test/resources/expected/pathpattern1/sub/subsub/4.txt +++ /dev/null @@ -1 +0,0 @@ -h4_x_f4 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/1.txt b/fmpp/src/test/resources/expected/pathpattern2/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/2.txt b/fmpp/src/test/resources/expected/pathpattern2/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/3.txt b/fmpp/src/test/resources/expected/pathpattern2/3.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/3.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/4.txt b/fmpp/src/test/resources/expected/pathpattern2/4.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/4.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/1.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/1.txt deleted file mode 100644 index 8eea64a..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/1.txt +++ /dev/null @@ -1 +0,0 @@ -h1_x_f1 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/2.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/2.txt deleted file mode 100644 index 471f507..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/2.txt +++ /dev/null @@ -1 +0,0 @@ -h2_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/3.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/3.txt deleted file mode 100644 index 14318ba..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/3.txt +++ /dev/null @@ -1 +0,0 @@ -x_f3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/4.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/4.txt deleted file mode 100644 index 49b7685..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/4.txt +++ /dev/null @@ -1 +0,0 @@ -h4_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/1.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/2.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/2.txt deleted file mode 100644 index 56f060d..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x_f2 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/3.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/3.txt deleted file mode 100644 index 124c288..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/3.txt +++ /dev/null @@ -1 +0,0 @@ -h3_x_f3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/4.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/4.txt deleted file mode 100644 index 416a8d7..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/4.txt +++ /dev/null @@ -1 +0,0 @@ -h4_x_f4 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/1.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/2.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/3.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/3.txt deleted file mode 100644 index 14318ba..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/3.txt +++ /dev/null @@ -1 +0,0 @@ -x_f3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/4.txt b/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/4.txt deleted file mode 100644 index 416a8d7..0000000 --- a/fmpp/src/test/resources/expected/pathpattern2/sub/subsub/subsubsub/4.txt +++ /dev/null @@ -1 +0,0 @@ -h4_x_f4 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/Bar.Txt b/fmpp/src/test/resources/expected/pathpattern3/Bar.Txt deleted file mode 100644 index ca26d01..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/Bar.Txt +++ /dev/null @@ -1 +0,0 @@ -*.txt_Bar.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/Bar.t1 b/fmpp/src/test/resources/expected/pathpattern3/Bar.t1 deleted file mode 100644 index 4f3ac4e..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/Bar.t1 +++ /dev/null @@ -1 +0,0 @@ -Bar.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/Foo.t2 b/fmpp/src/test/resources/expected/pathpattern3/Foo.t2 deleted file mode 100644 index 765fda0..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/Foo.t2 +++ /dev/null @@ -1 +0,0 @@ -foo.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/Foo.txt b/fmpp/src/test/resources/expected/pathpattern3/Foo.txt deleted file mode 100644 index 33dedcd..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/Foo.txt +++ /dev/null @@ -1 +0,0 @@ -*.txt_foo.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/bar.t2 b/fmpp/src/test/resources/expected/pathpattern3/bar.t2 deleted file mode 100644 index 4f3ac4e..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/bar.t2 +++ /dev/null @@ -1 +0,0 @@ -Bar.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/foo.t1 b/fmpp/src/test/resources/expected/pathpattern3/foo.t1 deleted file mode 100644 index 765fda0..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/foo.t1 +++ /dev/null @@ -1 +0,0 @@ -foo.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/sub/t.txt b/fmpp/src/test/resources/expected/pathpattern3/sub/t.txt deleted file mode 100644 index 9f6ba2e..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/sub/t.txt +++ /dev/null @@ -1 +0,0 @@ -*.txt_SUB/*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/t1.txt b/fmpp/src/test/resources/expected/pathpattern3/t1.txt deleted file mode 100644 index 4f867ba..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/t1.txt +++ /dev/null @@ -1 +0,0 @@ -*.txt_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3/t2.Txt b/fmpp/src/test/resources/expected/pathpattern3/t2.Txt deleted file mode 100644 index 4f867ba..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3/t2.Txt +++ /dev/null @@ -1 +0,0 @@ -*.txt_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/Bar.Txt b/fmpp/src/test/resources/expected/pathpattern3_casesens/Bar.Txt deleted file mode 100644 index 4f3ac4e..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/Bar.Txt +++ /dev/null @@ -1 +0,0 @@ -Bar.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/Bar.t1 b/fmpp/src/test/resources/expected/pathpattern3_casesens/Bar.t1 deleted file mode 100644 index 4f3ac4e..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/Bar.t1 +++ /dev/null @@ -1 +0,0 @@ -Bar.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/Foo.t2 b/fmpp/src/test/resources/expected/pathpattern3_casesens/Foo.t2 deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/Foo.t2 +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/Foo.txt b/fmpp/src/test/resources/expected/pathpattern3_casesens/Foo.txt deleted file mode 100644 index 4f867ba..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/Foo.txt +++ /dev/null @@ -1 +0,0 @@ -*.txt_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/bar.t2 b/fmpp/src/test/resources/expected/pathpattern3_casesens/bar.t2 deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/bar.t2 +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/foo.t1 b/fmpp/src/test/resources/expected/pathpattern3_casesens/foo.t1 deleted file mode 100644 index 765fda0..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/foo.t1 +++ /dev/null @@ -1 +0,0 @@ -foo.*_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/sub/t.txt b/fmpp/src/test/resources/expected/pathpattern3_casesens/sub/t.txt deleted file mode 100644 index 4f867ba..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/sub/t.txt +++ /dev/null @@ -1 +0,0 @@ -*.txt_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/t1.txt b/fmpp/src/test/resources/expected/pathpattern3_casesens/t1.txt deleted file mode 100644 index 4f867ba..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/t1.txt +++ /dev/null @@ -1 +0,0 @@ -*.txt_x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/pathpattern3_casesens/t2.Txt b/fmpp/src/test/resources/expected/pathpattern3_casesens/t2.Txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/pathpattern3_casesens/t2.Txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/relative_paths/s.txt b/fmpp/src/test/resources/expected/relative_paths/s.txt deleted file mode 100644 index 56a6051..0000000 --- a/fmpp/src/test/resources/expected/relative_paths/s.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/relative_paths/sub/s.txt b/fmpp/src/test/resources/expected/relative_paths/sub/s.txt deleted file mode 100644 index 3cacc0b..0000000 --- a/fmpp/src/test/resources/expected/relative_paths/sub/s.txt +++ /dev/null @@ -1 +0,0 @@ -12 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/relative_paths/sub/test.txt b/fmpp/src/test/resources/expected/relative_paths/sub/test.txt deleted file mode 100644 index d8263ee..0000000 --- a/fmpp/src/test/resources/expected/relative_paths/sub/test.txt +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/relative_paths/test.txt b/fmpp/src/test/resources/expected/relative_paths/test.txt deleted file mode 100644 index 0bc999a..0000000 --- a/fmpp/src/test/resources/expected/relative_paths/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -1 -1 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/relative_paths2/sub/subsub/test.txt b/fmpp/src/test/resources/expected/relative_paths2/sub/subsub/test.txt deleted file mode 100644 index 837624d..0000000 --- a/fmpp/src/test/resources/expected/relative_paths2/sub/subsub/test.txt +++ /dev/null @@ -1,8 +0,0 @@ -/ == / -/ == / -/sub/ == /sub/ -/sub/ == /sub/ -/sub/subsub/ == /sub/subsub/ -/sub/subsub/ == /sub/subsub/ -/ == / -/ == / \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/relative_paths2/sub/test.txt b/fmpp/src/test/resources/expected/relative_paths2/sub/test.txt deleted file mode 100644 index 837624d..0000000 --- a/fmpp/src/test/resources/expected/relative_paths2/sub/test.txt +++ /dev/null @@ -1,8 +0,0 @@ -/ == / -/ == / -/sub/ == /sub/ -/sub/ == /sub/ -/sub/subsub/ == /sub/subsub/ -/sub/subsub/ == /sub/subsub/ -/ == / -/ == / \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/relative_paths2/test.txt b/fmpp/src/test/resources/expected/relative_paths2/test.txt deleted file mode 100644 index 837624d..0000000 --- a/fmpp/src/test/resources/expected/relative_paths2/test.txt +++ /dev/null @@ -1,8 +0,0 @@ -/ == / -/ == / -/sub/ == /sub/ -/sub/ == /sub/ -/sub/subsub/ == /sub/subsub/ -/sub/subsub/ == /sub/subsub/ -/ == / -/ == / \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/rename/4.rtxt b/fmpp/src/test/resources/expected/rename/4.rtxt deleted file mode 100644 index bf0d87a..0000000 --- a/fmpp/src/test/resources/expected/rename/4.rtxt +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/rename/5.rtxt b/fmpp/src/test/resources/expected/rename/5.rtxt deleted file mode 100644 index 7813681..0000000 --- a/fmpp/src/test/resources/expected/rename/5.rtxt +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/rename/6.foo.rtxt b/fmpp/src/test/resources/expected/rename/6.foo.rtxt deleted file mode 100644 index 62f9457..0000000 --- a/fmpp/src/test/resources/expected/rename/6.foo.rtxt +++ /dev/null @@ -1 +0,0 @@ -6 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/rename/r/3.txt b/fmpp/src/test/resources/expected/rename/r/3.txt deleted file mode 100644 index c14e6a1..0000000 --- a/fmpp/src/test/resources/expected/rename/r/3.txt +++ /dev/null @@ -1,2 +0,0 @@ -3 -. \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/rename/r1.txt b/fmpp/src/test/resources/expected/rename/r1.txt deleted file mode 100644 index 56a6051..0000000 --- a/fmpp/src/test/resources/expected/rename/r1.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/rename/r2.txt b/fmpp/src/test/resources/expected/rename/r2.txt deleted file mode 100644 index b29d3be..0000000 --- a/fmpp/src/test/resources/expected/rename/r2.txt +++ /dev/null @@ -1,2 +0,0 @@ -2 -. \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/rename/r7.rtxt b/fmpp/src/test/resources/expected/rename/r7.rtxt deleted file mode 100644 index 3027542..0000000 --- a/fmpp/src/test/resources/expected/rename/r7.rtxt +++ /dev/null @@ -1,3 +0,0 @@ -7 -. -.. \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/sources/1.txt b/fmpp/src/test/resources/expected/sources/1.txt deleted file mode 100644 index 56a6051..0000000 --- a/fmpp/src/test/resources/expected/sources/1.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/sources/2.txt b/fmpp/src/test/resources/expected/sources/2.txt deleted file mode 100644 index d8263ee..0000000 --- a/fmpp/src/test/resources/expected/sources/2.txt +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/sources/3.txt b/fmpp/src/test/resources/expected/sources/3.txt deleted file mode 100644 index e440e5c..0000000 --- a/fmpp/src/test/resources/expected/sources/3.txt +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/sources/4.txt b/fmpp/src/test/resources/expected/sources/4.txt deleted file mode 100644 index bf0d87a..0000000 --- a/fmpp/src/test/resources/expected/sources/4.txt +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/sources/6.txt b/fmpp/src/test/resources/expected/sources/6.txt deleted file mode 100644 index 62f9457..0000000 --- a/fmpp/src/test/resources/expected/sources/6.txt +++ /dev/null @@ -1 +0,0 @@ -6 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/sources/sub/a.txt b/fmpp/src/test/resources/expected/sources/sub/a.txt deleted file mode 100644 index 2e65efe..0000000 --- a/fmpp/src/test/resources/expected/sources/sub/a.txt +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/sources/sub/b.txt b/fmpp/src/test/resources/expected/sources/sub/b.txt deleted file mode 100644 index 2e65efe..0000000 --- a/fmpp/src/test/resources/expected/sources/sub/b.txt +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_1/test1.txt b/fmpp/src/test/resources/expected/tag_syntax_1/test1.txt deleted file mode 100644 index 7ca45bf..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_1/test1.txt +++ /dev/null @@ -1 +0,0 @@ -[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_1/test2.txt b/fmpp/src/test/resources/expected/tag_syntax_1/test2.txt deleted file mode 100644 index 7ca45bf..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_1/test2.txt +++ /dev/null @@ -1 +0,0 @@ -[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_1/test3.txt b/fmpp/src/test/resources/expected/tag_syntax_1/test3.txt deleted file mode 100644 index dabd0fd..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_1/test3.txt +++ /dev/null @@ -1 +0,0 @@ -<#-- I'm not a comment --> \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_2/test1.txt b/fmpp/src/test/resources/expected/tag_syntax_2/test1.txt deleted file mode 100644 index dabd0fd..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_2/test1.txt +++ /dev/null @@ -1 +0,0 @@ -<#-- I'm not a comment --> \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_2/test2.txt b/fmpp/src/test/resources/expected/tag_syntax_2/test2.txt deleted file mode 100644 index 7ca45bf..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_2/test2.txt +++ /dev/null @@ -1 +0,0 @@ -[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_2/test3.txt b/fmpp/src/test/resources/expected/tag_syntax_2/test3.txt deleted file mode 100644 index dabd0fd..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_2/test3.txt +++ /dev/null @@ -1 +0,0 @@ -<#-- I'm not a comment --> \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_3/test1a.txt b/fmpp/src/test/resources/expected/tag_syntax_3/test1a.txt deleted file mode 100644 index 7ca45bf..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_3/test1a.txt +++ /dev/null @@ -1 +0,0 @@ -[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_3/test1b.txt b/fmpp/src/test/resources/expected/tag_syntax_3/test1b.txt deleted file mode 100644 index dabd0fd..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_3/test1b.txt +++ /dev/null @@ -1 +0,0 @@ -<#-- I'm not a comment --> \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_3/test2.txt b/fmpp/src/test/resources/expected/tag_syntax_3/test2.txt deleted file mode 100644 index 7ca45bf..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_3/test2.txt +++ /dev/null @@ -1 +0,0 @@ -[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tag_syntax_3/test3.txt b/fmpp/src/test/resources/expected/tag_syntax_3/test3.txt deleted file mode 100644 index dabd0fd..0000000 --- a/fmpp/src/test/resources/expected/tag_syntax_3/test3.txt +++ /dev/null @@ -1 +0,0 @@ -<#-- I'm not a comment --> \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tdd/comments.txt b/fmpp/src/test/resources/expected/tdd/comments.txt deleted file mode 100644 index 2239e48..0000000 --- a/fmpp/src/test/resources/expected/tdd/comments.txt +++ /dev/null @@ -1,8 +0,0 @@ -c1: - - (a) : str (#A) - - (b) : str ( -#B<#-- -) -c2: - - (a) : str (A) - - (b) : str (B) diff --git a/fmpp/src/test/resources/expected/tdd/encoding.txt b/fmpp/src/test/resources/expected/tdd/encoding.txt deleted file mode 100644 index 639cf66..0000000 --- a/fmpp/src/test/resources/expected/tdd/encoding.txt +++ /dev/null @@ -1 +0,0 @@ -bálnabél \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tdd/hashes.txt b/fmpp/src/test/resources/expected/tdd/hashes.txt deleted file mode 100644 index 0cde47d..0000000 --- a/fmpp/src/test/resources/expected/tdd/hashes.txt +++ /dev/null @@ -1,35 +0,0 @@ -m1: - - (k1) : num (1) - - (k2) : num (2) - - (k3) : num (3) - - (k4) : num (4) - - (k5) : num (5) - - (k6) : num (6) - - (k7) : num (7) - - (k8) : num (8) - - (k9) : num (9) -m2: - - (a) : str (b:c:d) - - (a:b) : str (c:d) - - (a:b:c) : str (d) -m3: - - (1) : num (1) - - (true) : bool (true) -m4: - - (a) : str (A) - - (b) : str (B) - - (c) : str (C) - - (d) : str (D) -m5: - - (a) : seq [(num (1)), (num (2)), (num (3))] - - (b) : hash {(a):(num (11))], (b):(num (22))], (c):(num (33))]} - - (c) : num (3) -m6: - - (a) : num (111) - - (b) : num (222) - - (c) : num (333) - - (d) : num (444) - -a: 111 -b: 222 -c: 333 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/tdd/nestedscalars.txt b/fmpp/src/test/resources/expected/tdd/nestedscalars.txt deleted file mode 100644 index f90f0db..0000000 --- a/fmpp/src/test/resources/expected/tdd/nestedscalars.txt +++ /dev/null @@ -1,33 +0,0 @@ - [foo-bar/**/baz.txt] - [C:\windows\system32] - [25%] - [7.txt] - [1-2] - [True] - [contains space] - [a'b] - [(c)] - [] - [7] - [true] - [x"y] - [x'y] - [x'y] - [x"y] - [a\'b] - [a\"b] - [line1 - line2 - line3] - [!?] - [d-dd-dd0] - [A B C D] - [X - Y - - Z] - [true] - [false] - [7] - [0.7] - [-0.7] diff --git a/fmpp/src/test/resources/expected/tdd/scalars.txt b/fmpp/src/test/resources/expected/tdd/scalars.txt deleted file mode 100644 index f90f0db..0000000 --- a/fmpp/src/test/resources/expected/tdd/scalars.txt +++ /dev/null @@ -1,33 +0,0 @@ - [foo-bar/**/baz.txt] - [C:\windows\system32] - [25%] - [7.txt] - [1-2] - [True] - [contains space] - [a'b] - [(c)] - [] - [7] - [true] - [x"y] - [x'y] - [x'y] - [x"y] - [a\'b] - [a\"b] - [line1 - line2 - line3] - [!?] - [d-dd-dd0] - [A B C D] - [X - Y - - Z] - [true] - [false] - [7] - [0.7] - [-0.7] diff --git a/fmpp/src/test/resources/expected/tdd/seqmode.txt b/fmpp/src/test/resources/expected/tdd/seqmode.txt deleted file mode 100644 index e5ad504..0000000 --- a/fmpp/src/test/resources/expected/tdd/seqmode.txt +++ /dev/null @@ -1,5 +0,0 @@ -num (1) -str (2) -seq [(num (3)), (str (4))] -hash {(5):(num (5))], (6):(str (6))]} -bool (true) diff --git a/fmpp/src/test/resources/expected/terminated_output/correct.html b/fmpp/src/test/resources/expected/terminated_output/correct.html deleted file mode 100644 index 0e1c94f..0000000 --- a/fmpp/src/test/resources/expected/terminated_output/correct.html +++ /dev/null @@ -1 +0,0 @@ -x-mooo \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/terminated_output/flushedzero.html b/fmpp/src/test/resources/expected/terminated_output/flushedzero.html deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/expected/terminated_output/n1.txt b/fmpp/src/test/resources/expected/terminated_output/n1.txt deleted file mode 100644 index 5c66153..0000000 --- a/fmpp/src/test/resources/expected/terminated_output/n1.txt +++ /dev/null @@ -1 +0,0 @@ - n1 diff --git a/fmpp/src/test/resources/expected/terminated_output/n2.txt b/fmpp/src/test/resources/expected/terminated_output/n2.txt deleted file mode 100644 index 34d2aaf..0000000 --- a/fmpp/src/test/resources/expected/terminated_output/n2.txt +++ /dev/null @@ -1 +0,0 @@ - n2 diff --git a/fmpp/src/test/resources/expected/terminated_output/n3.txt b/fmpp/src/test/resources/expected/terminated_output/n3.txt deleted file mode 100644 index 8d110c3..0000000 --- a/fmpp/src/test/resources/expected/terminated_output/n3.txt +++ /dev/null @@ -1 +0,0 @@ - n3 \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/terminated_output/nZero.txt b/fmpp/src/test/resources/expected/terminated_output/nZero.txt deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/expected/terminated_output/nestings.html b/fmpp/src/test/resources/expected/terminated_output/nestings.html deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/expected/terminated_output/one.html b/fmpp/src/test/resources/expected/terminated_output/one.html deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/expected/terminated_output/one.html +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/url_escaping/test.txt b/fmpp/src/test/resources/expected/url_escaping/test.txt deleted file mode 100644 index 1157393..0000000 --- a/fmpp/src/test/resources/expected/url_escaping/test.txt +++ /dev/null @@ -1,18 +0,0 @@ - -output_encoding: ISO-8859-2 = ISO-8859-2 -url_escaping_charset: - = - -%2Fa%20n%F5%FCgy%2Faz -%2Fa%20n%F5%FCgy%2Faz -/a%20n%F5%FCgy/az - -output_encoding: utf-8 = utf-8 -url_escaping_charset: - = - -%2Fa%20n%C5%91%C3%BCgy%2Faz -%2Fa%20n%C5%91%C3%BCgy%2Faz -/a%20n%C5%91%C3%BCgy/az - -output_encoding: utf-8 = utf-8 -url_escaping_charset: utf-16 = utf-16 -%FE%FF%00%2Fa%FE%FF%00%20n%FE%FF%01%51%00%FCgy%FE%FF%00%2Faz -%FE%FF%00%2Fa%FE%FF%00%20n%FE%FF%01%51%00%FCgy%FE%FF%00%2Faz -/a%FE%FF%00%20n%FE%FF%01%51%00%FCgy/az \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/url_escaping2/test.txt b/fmpp/src/test/resources/expected/url_escaping2/test.txt deleted file mode 100644 index bd75bd5..0000000 --- a/fmpp/src/test/resources/expected/url_escaping2/test.txt +++ /dev/null @@ -1,15 +0,0 @@ - -output_encoding: ISO-8859-2 = ISO-8859-2 -url_escaping_charset: UTF-16 = UTF-16 -b%FE%FF%00%E9ka -b%FE%FF%00%E9ka - -output_encoding: utf-8 = utf-8 -url_escaping_charset: UTF-16 = UTF-16 -b%FE%FF%00%E9ka -b%FE%FF%00%E9ka - -output_encoding: utf-8 = utf-8 -url_escaping_charset: ISO-8859-2 = ISO-8859-2 -b%E9ka -b%E9ka \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/writable_hash/test.txt b/fmpp/src/test/resources/expected/writable_hash/test.txt deleted file mode 100644 index cdb1041..0000000 --- a/fmpp/src/test/resources/expected/writable_hash/test.txt +++ /dev/null @@ -1,20 +0,0 @@ - -stuff: - - a = A - - b = B - -x: - - a = A - - b = B - - c = C - -y: - - a = A - - b = B - - c = C - - d = D - -z: - - x = X - - z = Z - diff --git a/fmpp/src/test/resources/expected/writable_sequence/test.txt b/fmpp/src/test/resources/expected/writable_sequence/test.txt deleted file mode 100644 index bc1c6c1..0000000 --- a/fmpp/src/test/resources/expected/writable_sequence/test.txt +++ /dev/null @@ -1,21 +0,0 @@ - -stuff: - - A - - B - -x: - - A - - B - - C - -y: - - A - - B - - C - - D - -z: - - X - - Y - - Z - diff --git a/fmpp/src/test/resources/expected/xinclude/index.html b/fmpp/src/test/resources/expected/xinclude/index.html deleted file mode 100644 index 4e47c7f..0000000 --- a/fmpp/src/test/resources/expected/xinclude/index.html +++ /dev/null @@ -1,128 +0,0 @@ - - - XML Tree Dump - - - - -

        XML Tree Dump

        - -
          -
        • document -
            -
          • <?foo bar baaz ?> -
          • <book 'http://www.w3.org/2000/xmlns/':xi="http://www.w3.org/2001/XInclude"> -
              -
            • "&#xA;  " -
            • <!-- This is a comment --> -
            • "&#xA;  " -
            • <part id="1" title="Part 1" 'http://www.w3.org/XML/1998/namespace':base="part1.xml"> -
                -
              • "&#xA;  " -
              • <chapter id="2" title="Chapter 1.1"> -
                  -
                • "&#xA;    " -
                • <para id="3"> -
                    -
                  • "A" -
                  -
                • "&#xA;    " -
                • <para id="4"> -
                    -
                  • "CDATA is just text." -
                  -
                • "&#xA;  " -
                -
              • "&#xA;  " -
              • <chapter id="5" title="Chapter 1.2"> -
                  -
                • "&#xA;    " -
                • <para id="6"> -
                    -
                  • "A" -
                  -
                • "&#xA;    " -
                • <para id="7"> -
                    -
                  • "B" -
                  -
                • "&#xA;  " -
                -
              • "&#xA;  " -
              • <chapter id="8" title="Chapter 1.3"> -
                  -
                • "&#xA;    " -
                • <para id="9"> -
                    -
                  • "A" -
                  -
                • "&#xA;    " -
                • <para id="10"> -
                    -
                  • "B" -
                  -
                • "&#xA;  " -
                -
              • "&#xA;" -
              -
            • "&#xA;  " -
            • <part id="11" title="Part 2" 'http://www.w3.org/XML/1998/namespace':base="part2.xml"> -
                -
              • "&#xA;  " -
              • <chapter id="12" title="Chapter 2.1"> -
                  -
                • "&#xA;    " -
                • <para id="13"> -
                    -
                  • "A" -
                  -
                • "&#xA;    " -
                • <para id="14"> -
                    -
                  • "B" -
                  -
                • "&#xA;    " -
                • <para id="15"> -
                    -
                  • "C" -
                  -
                • "&#xA;  " -
                -
              • "&#xA;  " -
              • <chapter id="16" title="Chapter 2.2"> -
                  -
                • "&#xA;    " -
                • <para id="17"> -
                    -
                  • "A" -
                  -
                • "&#xA;    " -
                • <para id="18"> -
                    -
                  • "B" -
                  -
                • "&#xA;    " -
                • <para id="19"> -
                    -
                  • "C" -
                  -
                • "&#xA;  " -
                -
              • "&#xA;" -
              -
            • "&#xA;" -
            -
          -
        - -

        Legend: -

          -
        • <foo bar="123">: Element node -
        • "Blah blah": Text node -
        • <?foo bar ?>: Processing instruction node -
        • <!-- Blah blah -->: Comment node -
        • foo: Other node -
        - - - diff --git a/fmpp/src/test/resources/expected/xml_catalogs/test.txt b/fmpp/src/test/resources/expected/xml_catalogs/test.txt deleted file mode 100644 index dc44d2d..0000000 --- a/fmpp/src/test/resources/expected/xml_catalogs/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -- Test2 - diff --git a/fmpp/src/test/resources/expected/xml_rendering/a.xml b/fmpp/src/test/resources/expected/xml_rendering/a.xml deleted file mode 100644 index fd9856e..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/a.xml +++ /dev/null @@ -1,4 +0,0 @@ - - Aá - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/b.xml b/fmpp/src/test/resources/expected/xml_rendering/b.xml deleted file mode 100644 index 8c7e37a..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/b.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - B - B - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/c.xml b/fmpp/src/test/resources/expected/xml_rendering/c.xml deleted file mode 100644 index d66881e..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/c.xml +++ /dev/null @@ -1,4 +0,0 @@ - - C - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/copy.txt b/fmpp/src/test/resources/expected/xml_rendering/copy.txt deleted file mode 100644 index 67930f0..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/copy.txt +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/d.xml b/fmpp/src/test/resources/expected/xml_rendering/d.xml deleted file mode 100644 index 8da9335..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/d.xml +++ /dev/null @@ -1,4 +0,0 @@ - - D - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/e.xml b/fmpp/src/test/resources/expected/xml_rendering/e.xml deleted file mode 100644 index 826d586..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/e.xml +++ /dev/null @@ -1,4 +0,0 @@ - - E - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/f.xml b/fmpp/src/test/resources/expected/xml_rendering/f.xml deleted file mode 100644 index 601373b..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/f.xml +++ /dev/null @@ -1,4 +0,0 @@ - - F - - \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/g.txt b/fmpp/src/test/resources/expected/xml_rendering/g.txt deleted file mode 100644 index ec6b8fc..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/g.txt +++ /dev/null @@ -1,4 +0,0 @@ - - G - ----[6]--- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/h.txt b/fmpp/src/test/resources/expected/xml_rendering/h.txt deleted file mode 100644 index 38e669c..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/h.txt +++ /dev/null @@ -1,4 +0,0 @@ - - H - ----[6]--- \ No newline at end of file diff --git a/fmpp/src/test/resources/expected/xml_rendering/ldb.xml b/fmpp/src/test/resources/expected/xml_rendering/ldb.xml deleted file mode 100644 index 5ec8af4..0000000 --- a/fmpp/src/test/resources/expected/xml_rendering/ldb.xml +++ /dev/null @@ -1,3 +0,0 @@ -test -test -3 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/config.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_off/config.fmpp deleted file mode 100644 index 700e506..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_off/config.fmpp +++ /dev/null @@ -1,6 +0,0 @@ -sourceRoot: src -outputRoot: out -dataRoot: src/data -data: { - doc: xml(test.xml) -} diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/a/r.txt b/fmpp/src/test/resources/tests/always_create_dirs_off/src/a/r.txt deleted file mode 100644 index ac017d0..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_off/src/a/r.txt +++ /dev/null @@ -1 +0,0 @@ -<@pp.dropOutputFile /> \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/q/q2/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/q/q2/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/x/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/x/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/x/x.txt b/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/x/x.txt deleted file mode 100644 index ca1584d..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/x/x.txt +++ /dev/null @@ -1 +0,0 @@ -sd \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/y/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_off/src/b/c/y/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/c/d/createdir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_off/src/c/d/createdir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/d/createdir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_off/src/d/createdir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/d/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_off/src/d/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_off/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/data/test.xml b/fmpp/src/test/resources/tests/always_create_dirs_off/src/data/test.xml deleted file mode 100644 index 9197392..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_off/src/data/test.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/sub/t3.txt b/fmpp/src/test/resources/tests/always_create_dirs_off/src/sub/t3.txt deleted file mode 100644 index e440e5c..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_off/src/sub/t3.txt +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/always_create_dirs_off/src/t.txt b/fmpp/src/test/resources/tests/always_create_dirs_off/src/t.txt deleted file mode 100644 index db9512e..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_off/src/t.txt +++ /dev/null @@ -1,21 +0,0 @@ -<#visit doc> - -<#macro @element> - ELEM: I'm the ${.node?node_name} element. - I'm belonging the ${.node?node_namespace} namespace. - <@recurseAttributes /> - <#recurse> - - -<#macro recurseAttributes> - <#list .node["@*"] as att> - <@@attribute att /> - - - -<#macro @attribute att> - ATT: I'm the ${att?node_name} attribute - of an ${.node?node_name} element. - I'm belonging to the ${att?node_namespace!'void'} namespace. - My value is: ${att} - diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/config.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_on/config.fmpp deleted file mode 100644 index 86223e2..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_on/config.fmpp +++ /dev/null @@ -1,8 +0,0 @@ -sourceRoot: src -outputRoot: out -dataRoot: src/data -alwaysCreateDirectories: true -modes: [ignore(.gitignore)] -data: { - doc: xml(test.xml) -} diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/a/r.txt b/fmpp/src/test/resources/tests/always_create_dirs_on/src/a/r.txt deleted file mode 100644 index ac017d0..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_on/src/a/r.txt +++ /dev/null @@ -1 +0,0 @@ -<@pp.dropOutputFile /> \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/q/q2/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/q/q2/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/x/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/x/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/x/x.txt b/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/x/x.txt deleted file mode 100644 index ca1584d..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/x/x.txt +++ /dev/null @@ -1 +0,0 @@ -sd \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/y/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_on/src/b/c/y/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/c/d/createdir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_on/src/c/d/createdir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/d/createdir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_on/src/d/createdir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/d/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_on/src/d/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/always_create_dirs_on/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/data/test.xml b/fmpp/src/test/resources/tests/always_create_dirs_on/src/data/test.xml deleted file mode 100644 index 9197392..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_on/src/data/test.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/sub/t3.txt b/fmpp/src/test/resources/tests/always_create_dirs_on/src/sub/t3.txt deleted file mode 100644 index e440e5c..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_on/src/sub/t3.txt +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/always_create_dirs_on/src/t.txt b/fmpp/src/test/resources/tests/always_create_dirs_on/src/t.txt deleted file mode 100644 index db9512e..0000000 --- a/fmpp/src/test/resources/tests/always_create_dirs_on/src/t.txt +++ /dev/null @@ -1,21 +0,0 @@ -<#visit doc> - -<#macro @element> - ELEM: I'm the ${.node?node_name} element. - I'm belonging the ${.node?node_namespace} namespace. - <@recurseAttributes /> - <#recurse> - - -<#macro recurseAttributes> - <#list .node["@*"] as att> - <@@attribute att /> - - - -<#macro @attribute att> - ATT: I'm the ${att?node_name} attribute - of an ${.node?node_name} element. - I'm belonging to the ${att?node_namespace!'void'} namespace. - My value is: ${att} - diff --git a/fmpp/src/test/resources/tests/basic_usecase/fmpp.cfg b/fmpp/src/test/resources/tests/basic_usecase/fmpp.cfg deleted file mode 100644 index c4c7f09..0000000 --- a/fmpp/src/test/resources/tests/basic_usecase/fmpp.cfg +++ /dev/null @@ -1,5 +0,0 @@ -## $id$ -source-root = src -output-root = out -log-file = fmpp.log -data = properties(data/style.properties), message:'Die maggots!' \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/basic_usecase/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/basic_usecase/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/basic_usecase/src/data/style.properties b/fmpp/src/test/resources/tests/basic_usecase/src/data/style.properties deleted file mode 100644 index 5858f70..0000000 --- a/fmpp/src/test/resources/tests/basic_usecase/src/data/style.properties +++ /dev/null @@ -1,2 +0,0 @@ -backgroundColor=black -textColor=red \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/basic_usecase/src/include/ignoredir.fmpp b/fmpp/src/test/resources/tests/basic_usecase/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/basic_usecase/src/include/page.ftl b/fmpp/src/test/resources/tests/basic_usecase/src/include/page.ftl deleted file mode 100644 index 19f03b2..0000000 --- a/fmpp/src/test/resources/tests/basic_usecase/src/include/page.ftl +++ /dev/null @@ -1,12 +0,0 @@ -<#-- $Id: page.ftl,v 1.1 2003/10/11 11:29:23 ddekany Exp $ --> -<#macro page title> -<#escape x as x?html> - - ${title?cap_first} - - -

        ${title?cap_first}

        - <#nested> - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/basic_usecase/src/index.html b/fmpp/src/test/resources/tests/basic_usecase/src/index.html deleted file mode 100644 index de797f8..0000000 --- a/fmpp/src/test/resources/tests/basic_usecase/src/index.html +++ /dev/null @@ -1,7 +0,0 @@ -<#-- $Id: index.html,v 1.1 2003/10/11 11:29:23 ddekany Exp $ --> -<#include "/include/page.ftl"> - -<@page title=message> -

        -

        Rattrah - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/basic_usecase/src/mi.png b/fmpp/src/test/resources/tests/basic_usecase/src/mi.png deleted file mode 100644 index 902e942..0000000 Binary files a/fmpp/src/test/resources/tests/basic_usecase/src/mi.png and /dev/null differ diff --git a/fmpp/src/test/resources/tests/basic_usecase/src/sub/rattrah.html b/fmpp/src/test/resources/tests/basic_usecase/src/sub/rattrah.html deleted file mode 100644 index 816a4dd..0000000 --- a/fmpp/src/test/resources/tests/basic_usecase/src/sub/rattrah.html +++ /dev/null @@ -1,5 +0,0 @@ -<#-- $Id: rattrah.html,v 1.1 2003/10/11 11:29:23 ddekany Exp $ --> -<#include "/include/page.ftl"> -<@page title="Rattrah"> -

        Rattrahad - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/basic_usecase/src/sub/subsub/rattrahad.html b/fmpp/src/test/resources/tests/basic_usecase/src/sub/subsub/rattrahad.html deleted file mode 100644 index 2453601..0000000 --- a/fmpp/src/test/resources/tests/basic_usecase/src/sub/subsub/rattrahad.html +++ /dev/null @@ -1,5 +0,0 @@ -<#-- $Id: rattrahad.html,v 1.1 2003/10/11 11:29:23 ddekany Exp $ --> -<#include "/include/page.ftl"> -<@page title="Rattrahad"> -

        Index - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/borders/config.fmpp b/fmpp/src/test/resources/tests/borders/config.fmpp deleted file mode 100644 index b17bd88..0000000 --- a/fmpp/src/test/resources/tests/borders/config.fmpp +++ /dev/null @@ -1,23 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -borders: [ - footer('\n---X---', **/*.x) - footer('\n---Y---', **/*.y) - layer() - border('H', '0') - layer() - border('0', 'F') - layer() - border('{', '}') - layer() - header('H1{') - footer('}F1') - layer() - layer() - header('ROOTH2{', /*) - footer('}SUBF2', sub/) - layer() - header('SUBH3{', sub/) - footer('}ROOTF3', /*) -] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/borders/src/1.txt b/fmpp/src/test/resources/tests/borders/src/1.txt deleted file mode 100644 index b516b2c..0000000 --- a/fmpp/src/test/resources/tests/borders/src/1.txt +++ /dev/null @@ -1 +0,0 @@ -@ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/borders/src/1.x b/fmpp/src/test/resources/tests/borders/src/1.x deleted file mode 100644 index b516b2c..0000000 --- a/fmpp/src/test/resources/tests/borders/src/1.x +++ /dev/null @@ -1 +0,0 @@ -@ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/borders/src/1.y b/fmpp/src/test/resources/tests/borders/src/1.y deleted file mode 100644 index b516b2c..0000000 --- a/fmpp/src/test/resources/tests/borders/src/1.y +++ /dev/null @@ -1 +0,0 @@ -@ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/borders/src/sub/1.txt b/fmpp/src/test/resources/tests/borders/src/sub/1.txt deleted file mode 100644 index b516b2c..0000000 --- a/fmpp/src/test/resources/tests/borders/src/sub/1.txt +++ /dev/null @@ -1 +0,0 @@ -@ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/borders/src/sub/1.x b/fmpp/src/test/resources/tests/borders/src/sub/1.x deleted file mode 100644 index b516b2c..0000000 --- a/fmpp/src/test/resources/tests/borders/src/sub/1.x +++ /dev/null @@ -1 +0,0 @@ -@ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/borders/src/sub/1.y b/fmpp/src/test/resources/tests/borders/src/sub/1.y deleted file mode 100644 index b516b2c..0000000 --- a/fmpp/src/test/resources/tests/borders/src/sub/1.y +++ /dev/null @@ -1 +0,0 @@ -@ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/borders/src/sub/foo/1.txt b/fmpp/src/test/resources/tests/borders/src/sub/foo/1.txt deleted file mode 100644 index b516b2c..0000000 --- a/fmpp/src/test/resources/tests/borders/src/sub/foo/1.txt +++ /dev/null @@ -1 +0,0 @@ -@ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_base/b1/src/index.html b/fmpp/src/test/resources/tests/cfg_base/b1/src/index.html deleted file mode 100644 index 70f8cd2..0000000 --- a/fmpp/src/test/resources/tests/cfg_base/b1/src/index.html +++ /dev/null @@ -1 +0,0 @@ -

        Rattrah \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_base/b1/src/sub/rattrah.html b/fmpp/src/test/resources/tests/cfg_base/b1/src/sub/rattrah.html deleted file mode 100644 index 7adb375..0000000 --- a/fmpp/src/test/resources/tests/cfg_base/b1/src/sub/rattrah.html +++ /dev/null @@ -1 +0,0 @@ -

        Rattrah. \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_base/cfg2/fmpp.cfg b/fmpp/src/test/resources/tests/cfg_base/cfg2/fmpp.cfg deleted file mode 100644 index ec2da29..0000000 --- a/fmpp/src/test/resources/tests/cfg_base/cfg2/fmpp.cfg +++ /dev/null @@ -1,2 +0,0 @@ -configuration-base = .. -data-root = foo/data \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_base/fmpp.cfg b/fmpp/src/test/resources/tests/cfg_base/fmpp.cfg deleted file mode 100644 index d17bb74..0000000 --- a/fmpp/src/test/resources/tests/cfg_base/fmpp.cfg +++ /dev/null @@ -1,7 +0,0 @@ -## $id$ -configuration-base=b1 -inherit-configuration=../cfg2 -source-root = src -output-root = ../out -log-file = ../fmpp.log -data = properties(style.properties), message:'Die maggots!' \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_base/foo/data/style.properties b/fmpp/src/test/resources/tests/cfg_base/foo/data/style.properties deleted file mode 100644 index 5858f70..0000000 --- a/fmpp/src/test/resources/tests/cfg_base/foo/data/style.properties +++ /dev/null @@ -1,2 +0,0 @@ -backgroundColor=black -textColor=red \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_inheritance/cfg2/fmpp2.cfg b/fmpp/src/test/resources/tests/cfg_inheritance/cfg2/fmpp2.cfg deleted file mode 100644 index a47ecea..0000000 --- a/fmpp/src/test/resources/tests/cfg_inheritance/cfg2/fmpp2.cfg +++ /dev/null @@ -1,5 +0,0 @@ -inherit-configuration=../fmpp3.cfg -output-root=../out -source-root=overrideme -data=a:x, b:B -borders=header('HDR2\n', **/2.txt), footer('\nFTR', **/?.txt) \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_inheritance/fmpp.cfg b/fmpp/src/test/resources/tests/cfg_inheritance/fmpp.cfg deleted file mode 100644 index 55ce89a..0000000 --- a/fmpp/src/test/resources/tests/cfg_inheritance/fmpp.cfg +++ /dev/null @@ -1,4 +0,0 @@ -inherit-configuration=cfg2/fmpp2.cfg -source-root=src -data=a:A -borders=header('HDR1\n', **/1.txt) \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_inheritance/fmpp3.cfg b/fmpp/src/test/resources/tests/cfg_inheritance/fmpp3.cfg deleted file mode 100644 index df8d08e..0000000 --- a/fmpp/src/test/resources/tests/cfg_inheritance/fmpp3.cfg +++ /dev/null @@ -1,3 +0,0 @@ -data=a:x, b:x, c:C -source-root=overrideme2 -borders=header('HDR3\n', **/?.txt) \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_inheritance/src/1.txt b/fmpp/src/test/resources/tests/cfg_inheritance/src/1.txt deleted file mode 100644 index 56a6051..0000000 --- a/fmpp/src/test/resources/tests/cfg_inheritance/src/1.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_inheritance/src/2.txt b/fmpp/src/test/resources/tests/cfg_inheritance/src/2.txt deleted file mode 100644 index d8263ee..0000000 --- a/fmpp/src/test/resources/tests/cfg_inheritance/src/2.txt +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_inheritance/src/3.txt b/fmpp/src/test/resources/tests/cfg_inheritance/src/3.txt deleted file mode 100644 index e440e5c..0000000 --- a/fmpp/src/test/resources/tests/cfg_inheritance/src/3.txt +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_inheritance/src/4.txt b/fmpp/src/test/resources/tests/cfg_inheritance/src/4.txt deleted file mode 100644 index bf0d87a..0000000 --- a/fmpp/src/test/resources/tests/cfg_inheritance/src/4.txt +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/cfg_inheritance/src/test.txt b/fmpp/src/test/resources/tests/cfg_inheritance/src/test.txt deleted file mode 100644 index 8d795da..0000000 --- a/fmpp/src/test/resources/tests/cfg_inheritance/src/test.txt +++ /dev/null @@ -1 +0,0 @@ -${a}${b}${c} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_csv/config.fmpp b/fmpp/src/test/resources/tests/dl_csv/config.fmpp deleted file mode 100644 index 38b0c17..0000000 --- a/fmpp/src/test/resources/tests/dl_csv/config.fmpp +++ /dev/null @@ -1,28 +0,0 @@ -sourceRoot: src -outputRoot: out -dataRoot: src/data -logFile: log.fmpp -outputEncoding: utf-8 -data: { - csv: csv(test.txt, { - separator: tab - dateFormat: yyyy.MM.dd - timeFormat: HH-mm-ss - dateTimeFormat: 'yyyy.MM.dd HH-mm-ss' - }) - csv2r: csv(test2.txt, {replaceHeaders: [r1:n, r2:n, r3:n]}) - csv2a: csv(test2.txt, {headers: [a1, a2, a3]}) - csv3r: csv(test3.txt, {replaceHeaders: [r1:n, r2:n, r3:n]}) - csv3a: csv(test3.txt, {headers: [a1, a2, a3]}) - csv4r: csv(test4.txt, {replaceHeaders: [r1:n, r2:n, r3:n]}) - csv4a: csv(test4.txt, {headers: [a1, a2, a3]}) - csv5: csv(test5.txt, { - normalizeHeaders - trimCells - separator: tab - dateFormat: yyyy.MM.dd - timeFormat: HH-mm-ss - dateTimeFormat: 'yyyy.MM.dd HH-mm-ss' - }) - csv_utf8_bom: csv(test-utf8-bom.csv, {encoding: UTF-8}) -} diff --git a/fmpp/src/test/resources/tests/dl_csv/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/dl_csv/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/dl_csv/src/data/test-utf8-bom.csv b/fmpp/src/test/resources/tests/dl_csv/src/data/test-utf8-bom.csv deleted file mode 100644 index 26d3df3..0000000 --- a/fmpp/src/test/resources/tests/dl_csv/src/data/test-utf8-bom.csv +++ /dev/null @@ -1,3 +0,0 @@ -aá;eé -árvíztűrő;fúrógép -11;22 diff --git a/fmpp/src/test/resources/tests/dl_csv/src/data/test.txt b/fmpp/src/test/resources/tests/dl_csv/src/data/test.txt deleted file mode 100644 index 213cf84..0000000 --- a/fmpp/src/test/resources/tests/dl_csv/src/data/test.txt +++ /dev/null @@ -1,7 +0,0 @@ -name protected:b price:n entered:dt x:d y:t -arctic-tern yes 10000 2003.01.25 03-10-06 2001.01.20 12-05-00 - -house-sparrow no 50 2003.02.15 01-20-30 -mooo - -mooo2 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_csv/src/data/test2.txt b/fmpp/src/test/resources/tests/dl_csv/src/data/test2.txt deleted file mode 100644 index c8fc74a..0000000 --- a/fmpp/src/test/resources/tests/dl_csv/src/data/test2.txt +++ /dev/null @@ -1,4 +0,0 @@ -a;b;c -1;2;3 -4;5 -6 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_csv/src/data/test3.txt b/fmpp/src/test/resources/tests/dl_csv/src/data/test3.txt deleted file mode 100644 index 797db92..0000000 --- a/fmpp/src/test/resources/tests/dl_csv/src/data/test3.txt +++ /dev/null @@ -1 +0,0 @@ -a;b;c \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_csv/src/data/test4.txt b/fmpp/src/test/resources/tests/dl_csv/src/data/test4.txt deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/dl_csv/src/data/test5.txt b/fmpp/src/test/resources/tests/dl_csv/src/data/test5.txt deleted file mode 100644 index 41d04f9..0000000 --- a/fmpp/src/test/resources/tests/dl_csv/src/data/test5.txt +++ /dev/null @@ -1,7 +0,0 @@ - Name (English) protected:b price net (blah: x, y, z) : n entered:dt x, y :; , z:d y:t -arctic-tern yes 10000 2003.01.25 03-10-06 2001.01.20 12-05-00 - - house-sparrow no 50 2003.02.15 01-20-30 -mooo - -mooo2 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_csv/src/test.html b/fmpp/src/test/resources/tests/dl_csv/src/test.html deleted file mode 100644 index 2343d74..0000000 --- a/fmpp/src/test/resources/tests/dl_csv/src/test.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - -<#setting number_format=",##0.00"> -<#setting datetime_format="MMM dd, yyyy hh:mm:ss a"> - -

        Header query and row hashes: - - - <#list csv.headers as h><#list csv.headers as h>
        ${h} -<#list csv as row> -
        ${row[h]?default("N/A")?string} - -
        - -

        Row sequences: - - -<#list csv as row> - <#list row as cell>
        ${cell?default("N/A")?string} - -
        - -

        CSV2 headers replaced: - - - <#list csv2r.headers as h><#list csv2r.headers as h>
        ${h} -<#list csv2r as row> -
        ${row[h]?default("N/A")?string} - -
        - -

        CSV2 headers added: - - - <#list csv2a.headers as h><#list csv2a.headers as h>
        ${h} -<#list csv2a as row> -
        ${row[h]?default("N/A")?string} - -
        - -

        CSV3 headers replaced: - - - <#list csv3r.headers as h><#list csv3r.headers as h>
        ${h} -<#list csv3r as row> -
        ${row[h]?default("N/A")?string} - -
        - -

        CSV3 headers added: - - - <#list csv3a.headers as h><#list csv3a.headers as h>
        ${h} -<#list csv3a as row> -
        ${row[h]?default("N/A")?string} - -
        - -

        CSV4 headers replaced: - - - <#list csv4r.headers as h><#list csv4r.headers as h>
        ${h} -<#list csv4r as row> -
        ${row[h]?default("N/A")?string} - -
        - -

        CSV4 headers added: - - - <#list csv4a.headers as h><#list csv4a.headers as h>
        ${h} -<#list csv4a as row> -
        ${row[h]?default("N/A")?string} - -
        - -

        Header normalization: - - - <#list csv5.headers as h><#list csv5.headers as h>
        ${h} -<#list csv5 as row> -
        ${row[h]?default("N/A")?string} - -
        - -

        UTF-8 BOM: - - -<#list csv_utf8_bom as row> -
        ${row.aá}${row.eé} - -
        - - - diff --git a/fmpp/src/test/resources/tests/dl_eval/config.fmpp b/fmpp/src/test/resources/tests/dl_eval/config.fmpp deleted file mode 100644 index 81d0d2b..0000000 --- a/fmpp/src/test/resources/tests/dl_eval/config.fmpp +++ /dev/null @@ -1,9 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - a:4 - e1:eval("1+1") - e2:eval("a / 2", {a:get(a)}) - e3:eval("a - b", {a:get(a), b:get(e2)}) - e4:eval("x = 3; x *= 2; x -= 4; return x;") -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_eval/src/test.txt b/fmpp/src/test/resources/tests/dl_eval/src/test.txt deleted file mode 100644 index 0b63133..0000000 --- a/fmpp/src/test/resources/tests/dl_eval/src/test.txt +++ /dev/null @@ -1,4 +0,0 @@ -${e1} -${e2} -${e3} -${e4} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_get/config.fmpp b/fmpp/src/test/resources/tests/dl_get/config.fmpp deleted file mode 100644 index b280eba..0000000 --- a/fmpp/src/test/resources/tests/dl_get/config.fmpp +++ /dev/null @@ -1,20 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - a: A - ga: get(a) - b:{ - s1: { - s2: B - } - } - gb: get(b, s1, s2) - { - a: C - {gc: get(a)} - } - a: D - gd:[ - {a: BAD, value:get(a)} - ] -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_get/src/test.txt b/fmpp/src/test/resources/tests/dl_get/src/test.txt deleted file mode 100644 index ab91114..0000000 --- a/fmpp/src/test/resources/tests/dl_get/src/test.txt +++ /dev/null @@ -1,4 +0,0 @@ -${ga} -${gb} -${gc} -${gd[0].value} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_json/config.fmpp b/fmpp/src/test/resources/tests/dl_json/config.fmpp deleted file mode 100644 index 4ed70e2..0000000 --- a/fmpp/src/test/resources/tests/dl_json/config.fmpp +++ /dev/null @@ -1,9 +0,0 @@ -sourceRoot: src -outputRoot: out -dataRoot: src/data -logFile: log.fmpp -outputEncoding: utf-8 -data: { - applicants: json(applicants.json) - synthetic: json(synthetic.json, utf-8) -} diff --git a/fmpp/src/test/resources/tests/dl_json/src/data/applicants.json b/fmpp/src/test/resources/tests/dl_json/src/data/applicants.json deleted file mode 100644 index 51640c5..0000000 --- a/fmpp/src/test/resources/tests/dl_json/src/data/applicants.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "name": "Jean Test", - "maidenName": "Jean Test", - "age": 20, - "skills": [ "HTML", "CSS" ], - "testResults": { - "a": 10.5, "b": 20, "c": 30 - }, - "decided": true - }, - { - "name": "José Test", - "maidenName": null, - "age": 30, - "skills": [ "Ruby", "C++", "Cuda" ], - "testResults": { - "a": 20, "b": 30, "c": 40 - }, - "decided": false - } -] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_json/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/dl_json/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/dl_json/src/data/synthetic.json b/fmpp/src/test/resources/tests/dl_json/src/data/synthetic.json deleted file mode 100644 index 7c2a990..0000000 --- a/fmpp/src/test/resources/tests/dl_json/src/data/synthetic.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "aString": "árvĂ­ztűrĹ‘", - "aNumber": 1.23E2, - "aBoolean": true, - "anArray": [ - 1.5, - "foo", - null, - true, - false, - [11, 22], - { "a": 111, "b": 222 } - ], - "anObject": { - "u": "U", - "n": null, - "a": [1111, 2222], - "o": { "a": 11111, "b": 22222 } - } -} diff --git a/fmpp/src/test/resources/tests/dl_json/src/explicit-traversal.html b/fmpp/src/test/resources/tests/dl_json/src/explicit-traversal.html deleted file mode 100644 index 9f7f114..0000000 --- a/fmpp/src/test/resources/tests/dl_json/src/explicit-traversal.html +++ /dev/null @@ -1,42 +0,0 @@ -<#escape x as x?html> - - - - - - - - - - - - - - -<#list applicants as applicant> - - - - - - - - -
        NameAgeSkillsTest resultsDecided
        - ${applicant.name} - <#if applicant.maidenName??>(m.n.: ${applicant.maidenName}) - ${applicant.age} - <#list applicant.skills as s> - ${s}<#if s_has_next>, - - - <#list applicant.testResults?keys as testName> - ${testName}: ${applicant.testResults[testName]?string("0.0")}<#if testName_has_next>, - - - ${applicant.decided?string('Y', 'N')} -
        - - - - diff --git a/fmpp/src/test/resources/tests/dl_json/src/synthetic.ftl b/fmpp/src/test/resources/tests/dl_json/src/synthetic.ftl deleted file mode 100644 index 08f0edf..0000000 --- a/fmpp/src/test/resources/tests/dl_json/src/synthetic.ftl +++ /dev/null @@ -1,148 +0,0 @@ -<#ftl encoding="utf-8"> -<@pp.dropOutputFile /> - -<@assert synthetic?size == 5 /> -<@assert !synthetic?parent?? /> -<@assert synthetic?node_name == "unnamedObject" /> -<@assert synthetic?node_type == "object" /> -<@assert !synthetic?node_namespace?? /> - -<#assign aString = synthetic.aString> -<@assert aString == "árvíztűrő" /> -<@assert aString?is_string /> -<@assert !aString?is_hash /> -<@assert aString?parent?size == 5 /> -<@assert aString?node_name == "aString" /> -<@assert aString?node_type == "string" /> - -<#assign aNumber = synthetic.aNumber> -<@assert aNumber == 123 /> -<@assert aNumber?is_number /> -<@assert !aNumber?is_string /> -<@assert !aNumber?is_hash /> -<@assert aNumber?parent?size == 5 /> -<@assert aNumber?node_name == "aNumber" /> -<@assert aNumber?node_type == "number" /> - -<#assign aBoolean = synthetic.aBoolean> -<@assert aBoolean /> -<@assert aBoolean?is_boolean /> -<@assert !aBoolean?is_string /> -<@assert !aBoolean?is_hash /> -<@assert aBoolean?parent?size == 5 /> -<@assert aBoolean?node_name == "aBoolean" /> -<@assert aBoolean?node_type == "boolean" /> - -<#assign arr = synthetic.anArray> -<@assert arr?size == 7 /> -<@assert arr[0] == 1.5 /> -<@assert arr[0]?node_name == "unnamedNumber" /> -<@assert arr[1] == "foo" /> -<@assert arr[1]?node_name == "unnamedString" /> -<@assert !arr[2]?? /> -<@assert arr[3] /> -<@assert arr[3]?node_name == "unnamedBoolean" /> -<@assert !arr[4] /> -<@assert arr[5]?size == 2 /> -<@assert arr[5][0] == 11 /> -<@assert arr[5][1] == 22 /> -<@assert arr[5][1] == 22 /> -<@assert arr[5][0] == 11 /> -<@assert arr[5]?join(", ") == "11, 22" /> -<@assert arr[5]?node_name == "unnamedArray" /> -<@assert arr[6]?size == 2 /> -<@assert arr[6]?node_name == "unnamedObject" /> -<@assert arr[6].a == 111 /> -<@assert arr[6].a?node_name == "a" /> -<@assert arr[6].b == 222 /> -<@assert arr[6]?parent[0] == 1.5 /> -<@assert arr[6].b?parent?parent[0] == 1.5 /> -<@assert arr[6].b?root.aNumber == 123 /> -<@assert arr[6].b?ancestors('anArray')[0][0] == 1.5 /> -<@assert !arr[7]?? /> -<#list arr as e> - <#if e_index == 1> - <@assert e == "foo" /> - - -<@assert arr?is_sequence /> -<@assert !arr?is_hash /> -<@assert !arr?is_string /> -<@assert arr?parent?size == 5 /> -<@assert arr?node_name == "anArray" /> -<@assert arr?node_type == "array" /> - -<#assign childTypes = ""> -<#list arr?children as child> - <#assign childTypes = childTypes + child?node_type + ";"> - -<@assert childTypes == "number;string;null;boolean;boolean;array;object;", childTypes /> - -<#assign values = ""> -<#list arr as value> - <#assign values = values + ((value?node_type)!'?') + ";"> - -<@assert values == "number;string;?;boolean;boolean;array;object;", values /> - -<#assign anObject = synthetic.anObject> -<@assert anObject?size == 4 /> -<@assert anObject?is_hash /> -<@assert !anObject?is_sequence /> -<@assert !anObject?is_string /> -<@assert anObject.u == 'U' /> -<@assert anObject.n!'null' == 'null' /> -<#list anObject.a as e> - <#if e_index == 0> - <@assert e == 1111 /> - <#elseif e_index == 1> - <@assert e == 2222 /> - <#else> - <@assert false /> - - -<@assert anObject.a?size == 2 /> -<@assert anObject.a[1] == 2222 /> -<@assert anObject.a[0] == 1111 /> -<@assert anObject.a[0] == 1111 /> -<@assert anObject.a[1] == 2222 /> -<@assert anObject.a[1]?parent[0] == 1111 /> -<@assert anObject.o?size == 2 /> -<@assert anObject.o.b == 22222 /> -<@assert anObject.o.a == 11111 /> -<@assert anObject.o.a == 11111 /> -<@assert anObject.o.b == 22222 /> -<@assert anObject.o.b?parent.a == 11111 /> -<@assert !anObject.n?? /> -<@assert !anObject.wrong?? /> -<@assert anObject?parent.aNumber == 123 /> -<@assert anObject?node_name == "anObject" /> -<@assert anObject?node_type == "object" /> - -<#assign childNames = ""> -<#list anObject?children as child> - <#assign childNames = childNames + child?node_name + ";"> - -<@assert childNames == "u;n;a;o;", childNames /> - -<#assign values = ""> -<#list anObject?values as value> - <#assign values = values + ((value?node_name)!'?') + ";"> - -<@assert values == "u;?;a;o;", values /> -<@assert anObject?values[2]?node_type == 'array' /> -<@assert anObject?values[2]?parent.u == 'U' /> - -<@assert anObject?keys?join(";", "?") == "u;n;a;o" /> -<#assign keys = ""> -<#list anObject?keys as key> - <#assign keys = keys + ((key?node_name)!'?') + ";"> - -<@assert keys == "unnamedString;unnamedString;unnamedString;unnamedString;", keys /> -<@assert anObject?keys[2]?node_type == 'string' /> -<@assert anObject?keys[2]?parent.u == 'U' /> - -<#macro assert bool actual=""> - <#if !bool> - <#stop "Assertion failed" + (actual != "")?string(". Actual: " + actual, "")> - - diff --git a/fmpp/src/test/resources/tests/dl_json/src/visitor-traversal.html b/fmpp/src/test/resources/tests/dl_json/src/visitor-traversal.html deleted file mode 100644 index 6718096..0000000 --- a/fmpp/src/test/resources/tests/dl_json/src/visitor-traversal.html +++ /dev/null @@ -1,63 +0,0 @@ -<#escape x as x?html> - - - - - - <#visit applicants> - - - -<#macro @array> - - - - - - - - - <#recurse> -
        NameAgeSkillsTest resultsDecided
        - - -<#macro @object> - - <#recurse> - - - -<#macro name> - - ${.node} - <#if .node?parent.maidenName??>(m.n.: ${.node?parent.maidenName}) - - - -<#macro maidenName><#-- Already extracted in the "name" macro --> - -<#macro age> - ${.node} - - -<#macro skills> - - <#list .node as s> - ${s}<#if s_has_next>, - - - - -<#macro testResults> - - <#list .node?keys as testName> - ${testName}: ${.node[testName]?string("0.0")}<#if testName_has_next>, - - - - -<#macro decided> - ${.node?string('Y', 'N')} - - - diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/config.fmpp b/fmpp/src/test/resources/tests/dl_slicedtext/config.fmpp deleted file mode 100644 index 21c1deb..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -dataRoot: src/data -logFile: log.fmpp \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/empty.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/empty.txt deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t1.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t1.txt deleted file mode 100644 index 685912c..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t1.txt +++ /dev/null @@ -1,3 +0,0 @@ -a - b - c \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t2.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t2.txt deleted file mode 100644 index 10b4e38..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t2.txt +++ /dev/null @@ -1,3 +0,0 @@ -a - b - c diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t3.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t3.txt deleted file mode 100644 index 63f675a..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t3.txt +++ /dev/null @@ -1,8 +0,0 @@ ---- - a - A ---- -b --- B ---- - c ---- \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t4.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t4.txt deleted file mode 100644 index 1ded9eb..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t4.txt +++ /dev/null @@ -1,8 +0,0 @@ ---- - a - A ---- -b --- B ---- - c ---- diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t5.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t5.txt deleted file mode 100644 index 1f2df22..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t5.txt +++ /dev/null @@ -1,8 +0,0 @@ ---- - a - A ---- -b --- B ---- - c ----x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6.txt deleted file mode 100644 index db6f7ee..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6.txt +++ /dev/null @@ -1,9 +0,0 @@ -a ---- - b ---- - c ---- - d ---- -e \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6cr.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6cr.txt deleted file mode 100644 index 6237aa7..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6cr.txt +++ /dev/null @@ -1 +0,0 @@ -a --- b --- c --- d --- e \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6lf.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6lf.txt deleted file mode 100644 index db6f7ee..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t6lf.txt +++ /dev/null @@ -1,9 +0,0 @@ -a ---- - b ---- - c ---- - d ---- -e \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t7.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t7.txt deleted file mode 100644 index 90296e2..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t7.txt +++ /dev/null @@ -1,2 +0,0 @@ -reg, green, -blue \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t8.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t8.txt deleted file mode 100644 index d6cce76..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t8.txt +++ /dev/null @@ -1,25 +0,0 @@ -A a a -aaa -a - ---8<-- - -Separate items like this: ---8<-- -But don't forget to put empty lines around it! - -Separate items like this: - ---8<-- -But don't forget to put empty lines around it! - -Separate items like this: ---8<-- - -But don't forget to put empty lines around it! - ---8<-- - -C c c -ccc -c \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t9.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t9.txt deleted file mode 100644 index 2ef29e8..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/data/t9.txt +++ /dev/null @@ -1 +0,0 @@ -a -> b -> -> ->-> c -> diff --git a/fmpp/src/test/resources/tests/dl_slicedtext/src/test.txt b/fmpp/src/test/resources/tests/dl_slicedtext/src/test.txt deleted file mode 100644 index eb14880..0000000 --- a/fmpp/src/test/resources/tests/dl_slicedtext/src/test.txt +++ /dev/null @@ -1,127 +0,0 @@ -<#ftl encoding="ISO-8859-2"> - -<#macro listFileNoMagic fileName separator> -<#list pp.loadData('slicedText', fileName, {"separator":separator, 'dropEmptyLastItem':false, 'encoding':'utf-8'}) as x> -[${x}] - - - -<#macro listFileTrim fileName separator> -<#list pp.loadData('slicedText', fileName, {"separator":separator, 'trim':true, 'encoding':'utf-8'}) as x> -[${x}] - - - -<@listFileNoMagic 't1.txt', '\n' /> -== -[a] -[ b] -[ c ] - ---------- - -<@listFileNoMagic 't2.txt', '\n' /> -== -[a] -[ b] -[ c ] -[] - -<@listFileTrim 't1.txt', '\n' /> -== -[a] -[b] -[c] - ---------- - -<@listFileTrim 't2.txt', '\n' /> -== -[a] -[b] -[c] - ---------- - -<@listFileNoMagic 't3.txt', '\n---\n' /> -== -[--- - a - A ] -[ b --- B ] -[ c ----] - -<@listFileNoMagic 't4.txt', '\n---\n' /> -== -[--- - a - A ] -[ b --- B ] -[ c ] -[] - -<@listFileNoMagic 't5.txt', '\n---\n' /> -== -[--- - a - A ] -[ b --- B ] -[ c ----x] - -<@listFileNoMagic 't6.txt', '\n---\n' /> -== -<@listFileNoMagic 't6cr.txt', '\n---\n' /> -== -<@listFileNoMagic 't6lf.txt', '\n---\n' /> -== -[a] -[ b] -[ c] -[ d ] -[e ] - -<@listFileTrim 't7.txt', ',' /> -== -[red] -[green] -[blue] - -<@listFileTrim 't8.txt', '\n\n--8<--\n\n' /> -== -[A a a -aaa -a] -[Separate items like this: ---8<-- -But don't forget to put empty lines around it! - -Separate items like this: - ---8<-- -But don't forget to put empty lines around it! - -Separate items like this: ---8<-- - -But don't forget to put empty lines around it!] -[C c c -ccc -c] - -<@listFileTrim 't9.txt', '->' /> -== -[a] -[b] -[] -[] -[] -[c] - -<@listFileTrim 'empty.txt', '\n' /> -== - -<@listFileNoMagic 'empty.txt', '\n' /> -== -[] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_text/config.fmpp b/fmpp/src/test/resources/tests/dl_text/config.fmpp deleted file mode 100644 index e8ed9b1..0000000 --- a/fmpp/src/test/resources/tests/dl_text/config.fmpp +++ /dev/null @@ -1,8 +0,0 @@ -sourceRoot: src -outputRoot: out -dataRoot: src/data -logFile: log.fmpp -data: { - t1: text("1.txt") - t1_utf8_bom: text("1-utf8-bom.txt", UTF-8) -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/dl_text/src/data/1-utf8-bom.txt b/fmpp/src/test/resources/tests/dl_text/src/data/1-utf8-bom.txt deleted file mode 100644 index 0f64b50..0000000 --- a/fmpp/src/test/resources/tests/dl_text/src/data/1-utf8-bom.txt +++ /dev/null @@ -1,3 +0,0 @@ -bla1 -bla2 -bla3 diff --git a/fmpp/src/test/resources/tests/dl_text/src/data/1.txt b/fmpp/src/test/resources/tests/dl_text/src/data/1.txt deleted file mode 100644 index 8c8f461..0000000 --- a/fmpp/src/test/resources/tests/dl_text/src/data/1.txt +++ /dev/null @@ -1,3 +0,0 @@ -bla1 -bla2 -bla3 diff --git a/fmpp/src/test/resources/tests/dl_text/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/dl_text/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/dl_text/src/test.txt b/fmpp/src/test/resources/tests/dl_text/src/test.txt deleted file mode 100644 index 470e50f..0000000 --- a/fmpp/src/test/resources/tests/dl_text/src/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -[${t1}] -[${t1_utf8_bom}] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/encoding/config.fmpp b/fmpp/src/test/resources/tests/encoding/config.fmpp deleted file mode 100644 index 2b87ba6..0000000 --- a/fmpp/src/test/resources/tests/encoding/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -sourceEncoding: ISO-8859-2 -outputEncoding: UTF-8 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/encoding/src/test.txt b/fmpp/src/test/resources/tests/encoding/src/test.txt deleted file mode 100644 index 4dfe28d..0000000 --- a/fmpp/src/test/resources/tests/encoding/src/test.txt +++ /dev/null @@ -1,19 +0,0 @@ -<#-- $Id: test.txt,v 1.1 2003/10/26 23:52:01 ddekany Exp $ --> -UTF-8 áő - -<#flush> -<@pp.changeOutputFile name="text_utf-16.txt" /> -<@pp.setOutputEncoding encoding="UTF-16" /> -UTF-16 áő<#t> -<#t> -<@pp.changeOutputFile name="text_iso-8859-2.txt" /> -ISO-8859-2 áő -<@pp.setOutputEncoding encoding="ISO-8859-2" /> - -<@pp.changeOutputFile name="text_UTF-8_2.txt" /> -UTF-8 áő -<@pp.setOutputEncoding encoding="ISO-8859-1" /> -áő -<@pp.setOutputEncoding encoding="ISO-8859-2" /> -áő -<@pp.setOutputEncoding encoding="UTF-8" /> \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/encoding/src/test2.txt b/fmpp/src/test/resources/tests/encoding/src/test2.txt deleted file mode 100644 index 5508c8f..0000000 --- a/fmpp/src/test/resources/tests/encoding/src/test2.txt +++ /dev/null @@ -1,7 +0,0 @@ -<@pp.setOutputEncoding encoding="source" /> -ISO-8859-2 áő -<@pp.nestOutputFile name="test2_iso-8859-1.txt"> -<@pp.setOutputEncoding encoding="ISO-8859-1" /> -ISO-8859-1 áő - -ISO-8859-2 áő \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_border/fmpp.cfg b/fmpp/src/test/resources/tests/ex_border/fmpp.cfg deleted file mode 100644 index 7ab82bc..0000000 --- a/fmpp/src/test/resources/tests/ex_border/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/border \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_capture/fmpp.cfg b/fmpp/src/test/resources/tests/ex_capture/fmpp.cfg deleted file mode 100644 index 1c63d21..0000000 --- a/fmpp/src/test/resources/tests/ex_capture/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/capture \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_check_links/fmpp.cfg b/fmpp/src/test/resources/tests/ex_check_links/fmpp.cfg deleted file mode 100644 index ac3f699..0000000 --- a/fmpp/src/test/resources/tests/ex_check_links/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/check_links \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_csv/fmpp.cfg b/fmpp/src/test/resources/tests/ex_csv/fmpp.cfg deleted file mode 100644 index 1ca0c74..0000000 --- a/fmpp/src/test/resources/tests/ex_csv/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/csv \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_img_dims/config.fmpp b/fmpp/src/test/resources/tests/ex_img_dims/config.fmpp deleted file mode 100644 index 2acd17d..0000000 --- a/fmpp/src/test/resources/tests/ex_img_dims/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -inheritConfiguration: ../../../../docs/examples/img_dims -borders: border('<@sortAttrs>', '', '*.htm*') -data: {sortAttrs:eval('new fmpp.testsuite.SortAttrsTransform()')} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_local_data/config.fmpp b/fmpp/src/test/resources/tests/ex_local_data/config.fmpp deleted file mode 100644 index 8cfd8b5..0000000 --- a/fmpp/src/test/resources/tests/ex_local_data/config.fmpp +++ /dev/null @@ -1 +0,0 @@ -inheritConfiguration: ../../../../docs/examples/local_data \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_multipage_list/config.fmpp b/fmpp/src/test/resources/tests/ex_multipage_list/config.fmpp deleted file mode 100644 index 112fa78..0000000 --- a/fmpp/src/test/resources/tests/ex_multipage_list/config.fmpp +++ /dev/null @@ -1 +0,0 @@ -inheritConfiguration: ../../../../docs/examples/multipage_list \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_qtour_step1/fmpp.cfg b/fmpp/src/test/resources/tests/ex_qtour_step1/fmpp.cfg deleted file mode 100644 index 1e67b02..0000000 --- a/fmpp/src/test/resources/tests/ex_qtour_step1/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/qtour_step1 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_qtour_step2/fmpp.cfg b/fmpp/src/test/resources/tests/ex_qtour_step2/fmpp.cfg deleted file mode 100644 index 863cca9..0000000 --- a/fmpp/src/test/resources/tests/ex_qtour_step2/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/qtour_step2 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_qtour_step3/fmpp.cfg b/fmpp/src/test/resources/tests/ex_qtour_step3/fmpp.cfg deleted file mode 100644 index a1b4b56..0000000 --- a/fmpp/src/test/resources/tests/ex_qtour_step3/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/qtour_step3 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_qtour_step4/fmpp.cfg b/fmpp/src/test/resources/tests/ex_qtour_step4/fmpp.cfg deleted file mode 100644 index 4be8640..0000000 --- a/fmpp/src/test/resources/tests/ex_qtour_step4/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/qtour_step4 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_session/fmpp.cfg b/fmpp/src/test/resources/tests/ex_session/fmpp.cfg deleted file mode 100644 index cc2bbe9..0000000 --- a/fmpp/src/test/resources/tests/ex_session/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/session \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_tdd/fmpp.cfg b/fmpp/src/test/resources/tests/ex_tdd/fmpp.cfg deleted file mode 100644 index 4de43cd..0000000 --- a/fmpp/src/test/resources/tests/ex_tdd/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/tdd \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_xml/fmpp.cfg b/fmpp/src/test/resources/tests/ex_xml/fmpp.cfg deleted file mode 100644 index c8f5615..0000000 --- a/fmpp/src/test/resources/tests/ex_xml/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/xml \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_xml2/fmpp.cfg b/fmpp/src/test/resources/tests/ex_xml2/fmpp.cfg deleted file mode 100644 index 51330d6..0000000 --- a/fmpp/src/test/resources/tests/ex_xml2/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/xml2 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_xml_rendering/fmpp.cfg b/fmpp/src/test/resources/tests/ex_xml_rendering/fmpp.cfg deleted file mode 100644 index bc3c413..0000000 --- a/fmpp/src/test/resources/tests/ex_xml_rendering/fmpp.cfg +++ /dev/null @@ -1 +0,0 @@ -inherit-configuration=../../../../docs/examples/xml_rendering \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/ex_xml_validating/config.fmpp b/fmpp/src/test/resources/tests/ex_xml_validating/config.fmpp deleted file mode 100644 index 2225126..0000000 --- a/fmpp/src/test/resources/tests/ex_xml_validating/config.fmpp +++ /dev/null @@ -1 +0,0 @@ -inheritConfiguration: ../../../../docs/examples/xml_validating \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/config.fmpp b/fmpp/src/test/resources/tests/filename/config.fmpp deleted file mode 100644 index 506ea20..0000000 --- a/fmpp/src/test/resources/tests/filename/config.fmpp +++ /dev/null @@ -1,5 +0,0 @@ -sourceRoot: src -outputRoot: out -removePostfixes: [t, xxx, xx] -removeExtensions: [bat.man, man, spider.man, spider] -replaceExtensions: [spider, pok, qw, wq, wq, qw] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/at b/fmpp/src/test/resources/tests/filename/src/at deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/at +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/at.foo b/fmpp/src/test/resources/tests/filename/src/at.foo deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/at.foo +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/at.foo.bar b/fmpp/src/test/resources/tests/filename/src/at.foo.bar deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/at.foo.bar +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/btt b/fmpp/src/test/resources/tests/filename/src/btt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/btt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/btt.x b/fmpp/src/test/resources/tests/filename/src/btt.x deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/btt.x +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/cxx b/fmpp/src/test/resources/tests/filename/src/cxx deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/cxx +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/cxx.x b/fmpp/src/test/resources/tests/filename/src/cxx.x deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/cxx.x +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/d.bat.man b/fmpp/src/test/resources/tests/filename/src/d.bat.man deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/d.bat.man +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/d.spider.man b/fmpp/src/test/resources/tests/filename/src/d.spider.man deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/d.spider.man +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/et.spider b/fmpp/src/test/resources/tests/filename/src/et.spider deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/et.spider +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/f1.qw b/fmpp/src/test/resources/tests/filename/src/f1.qw deleted file mode 100644 index 81f4282..0000000 --- a/fmpp/src/test/resources/tests/filename/src/f1.qw +++ /dev/null @@ -1 +0,0 @@ -qw \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/f2.wq b/fmpp/src/test/resources/tests/filename/src/f2.wq deleted file mode 100644 index 918c841..0000000 --- a/fmpp/src/test/resources/tests/filename/src/f2.wq +++ /dev/null @@ -1 +0,0 @@ -wq \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/gxxxxx b/fmpp/src/test/resources/tests/filename/src/gxxxxx deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/gxxxxx +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/rme_casesens.Man b/fmpp/src/test/resources/tests/filename/src/rme_casesens.Man deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/rme_casesens.Man +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/rmp_casesensXx b/fmpp/src/test/resources/tests/filename/src/rmp_casesensXx deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/rmp_casesensXx +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename/src/rpe_casesens.Qw b/fmpp/src/test/resources/tests/filename/src/rpe_casesens.Qw deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/filename/src/rpe_casesens.Qw +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/filename_casesens/config.fmpp b/fmpp/src/test/resources/tests/filename_casesens/config.fmpp deleted file mode 100644 index f625960..0000000 --- a/fmpp/src/test/resources/tests/filename_casesens/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -inheritConfiguration: ../filename/config.fmpp -outputRoot: out -caseSensitive: true \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/fm_ici_2.3.21/config.fmpp b/fmpp/src/test/resources/tests/fm_ici_2.3.21/config.fmpp deleted file mode 100644 index 85ce05a..0000000 --- a/fmpp/src/test/resources/tests/fm_ici_2.3.21/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -inheritConfiguration: ../fm_ici_null -outputRoot: out -freemarkerIncompatibleImprovements: 2.3.21 diff --git a/fmpp/src/test/resources/tests/fm_ici_2.3.21_ow/config.fmpp b/fmpp/src/test/resources/tests/fm_ici_2.3.21_ow/config.fmpp deleted file mode 100644 index db6af16..0000000 --- a/fmpp/src/test/resources/tests/fm_ici_2.3.21_ow/config.fmpp +++ /dev/null @@ -1,9 +0,0 @@ -inheritConfiguration: ../fm_ici_null -outputRoot: out -freemarkerIncompatibleImprovements: 2.3.21 -objectWrapper: ' - owb = new BeansWrapperBuilder(freemarkerIncompatibleImprovements); - owb.setSimpleMapWrapper(true); - owb.setExposeFields(true); - return owb.build(); - ' diff --git a/fmpp/src/test/resources/tests/fm_ici_null/config.fmpp b/fmpp/src/test/resources/tests/fm_ici_null/config.fmpp deleted file mode 100644 index 61d353f..0000000 --- a/fmpp/src/test/resources/tests/fm_ici_null/config.fmpp +++ /dev/null @@ -1,12 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - foo: eval(' - public class Foo { - public String m(String s) { return "s"; } - public String m(int x) { return "i"; } - public String f = "bar"; - } - return new Foo(); - ') -} diff --git a/fmpp/src/test/resources/tests/fm_ici_null/src/test.txt b/fmpp/src/test/resources/tests/fm_ici_null/src/test.txt deleted file mode 100644 index 8b5bb41..0000000 --- a/fmpp/src/test/resources/tests/fm_ici_null/src/test.txt +++ /dev/null @@ -1,9 +0,0 @@ -${(1..)?size} - -<#attempt> - ${foo.m(null)} -<#recover> - Failed - - -${foo.f!'-'} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/fm_ici_null_ow/config.fmpp b/fmpp/src/test/resources/tests/fm_ici_null_ow/config.fmpp deleted file mode 100644 index eb24df5..0000000 --- a/fmpp/src/test/resources/tests/fm_ici_null_ow/config.fmpp +++ /dev/null @@ -1,8 +0,0 @@ -inheritConfiguration: ../fm_ici_null -outputRoot: out -objectWrapper: ' - owb = new BeansWrapperBuilder(freemarkerIncompatibleImprovements); - owb.setSimpleMapWrapper(true); - owb.setExposeFields(true); - return owb.build(); - ' diff --git a/fmpp/src/test/resources/tests/format_settings/config.fmpp b/fmpp/src/test/resources/tests/format_settings/config.fmpp deleted file mode 100644 index 032d0f9..0000000 --- a/fmpp/src/test/resources/tests/format_settings/config.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -sourceRoot: src -outputRoot: out - -timeZone: UTC -sqlDateAndTimeTimeZone: 'GMT+01' - -booleanFormat: 'Y,N' -numberFormat: '0.00' -datetimeFormat: 'iso nz' -timeFormat: 'iso s nz' -dateFormat: yyyyMMdd - -data: { - sqlTime: eval('new java.sql.Time(802538177000L)') -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/format_settings/src/test.txt b/fmpp/src/test/resources/tests/format_settings/src/test.txt deleted file mode 100644 index 3ffd046..0000000 --- a/fmpp/src/test/resources/tests/format_settings/src/test.txt +++ /dev/null @@ -1,7 +0,0 @@ -<#assign dt = "1995-06-07T15:16:17Z"?datetime> -${1} -${true}/${false} -${dt} -${dt?date} -${dt?time} -${sqlTime} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/config.fmpp b/fmpp/src/test/resources/tests/freemarker_links/config.fmpp deleted file mode 100644 index cbfa335..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/config.fmpp +++ /dev/null @@ -1,10 +0,0 @@ -inheritConfiguration: inherited.fmpp -sourceRoot: src -outputRoot: out -logFile: log.fmpp -freemarkerLinks: { - inc: [inc1, inc2] - test4: inc1/test3.ftl - test6: inc1/test6.ftl - monster: inc2/godzilla.ftl -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inc1/test1.ftl b/fmpp/src/test/resources/tests/freemarker_links/inc1/test1.ftl deleted file mode 100644 index 7a35e2c..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inc1/test1.ftl +++ /dev/null @@ -1 +0,0 @@ -EXTERNAL inc1/test1.ftl \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inc1/test2.ftl b/fmpp/src/test/resources/tests/freemarker_links/inc1/test2.ftl deleted file mode 100644 index 395f128..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inc1/test2.ftl +++ /dev/null @@ -1 +0,0 @@ -EXTERNAL inc1/test2.ftl \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inc1/test5.ftl b/fmpp/src/test/resources/tests/freemarker_links/inc1/test5.ftl deleted file mode 100644 index a3239b9..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inc1/test5.ftl +++ /dev/null @@ -1 +0,0 @@ -EXTERNAL inc1/test5.ftl \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inc2/godzilla.ftl b/fmpp/src/test/resources/tests/freemarker_links/inc2/godzilla.ftl deleted file mode 100644 index 4f8d4a0..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inc2/godzilla.ftl +++ /dev/null @@ -1 +0,0 @@ -GODZILLA \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inc2/test2.ftl b/fmpp/src/test/resources/tests/freemarker_links/inc2/test2.ftl deleted file mode 100644 index cd5220a..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inc2/test2.ftl +++ /dev/null @@ -1 +0,0 @@ -EXTERNAL inc2/test2.ftl \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inc2/test3.ftl b/fmpp/src/test/resources/tests/freemarker_links/inc2/test3.ftl deleted file mode 100644 index 7a79c23..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inc2/test3.ftl +++ /dev/null @@ -1 +0,0 @@ -EXTERNAL inc2/test3.ftl \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inc2/test5.ftl b/fmpp/src/test/resources/tests/freemarker_links/inc2/test5.ftl deleted file mode 100644 index 6c7a330..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inc2/test5.ftl +++ /dev/null @@ -1 +0,0 @@ -EXTERNAL inc2/test5.ftl \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inc2/test6.ftl b/fmpp/src/test/resources/tests/freemarker_links/inc2/test6.ftl deleted file mode 100644 index 464e61e..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inc2/test6.ftl +++ /dev/null @@ -1 +0,0 @@ -EXTERNAL inc2/test6.ftl \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/inherited.fmpp b/fmpp/src/test/resources/tests/freemarker_links/inherited.fmpp deleted file mode 100644 index 1401f3f..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/inherited.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -freemarkerLinks: { - test5: [inc1/test5.ftl, inc2/test5.ftl] - test6: inc2/test6.ftl -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/src/@inc/ignoredir.fmpp b/fmpp/src/test/resources/tests/freemarker_links/src/@inc/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/freemarker_links/src/@inc/test1.ftl b/fmpp/src/test/resources/tests/freemarker_links/src/@inc/test1.ftl deleted file mode 100644 index 9fc781a..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/src/@inc/test1.ftl +++ /dev/null @@ -1 +0,0 @@ -INTERNAL @inc/test1.ftl \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/src/@test4 b/fmpp/src/test/resources/tests/freemarker_links/src/@test4 deleted file mode 100644 index 0095f13..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/src/@test4 +++ /dev/null @@ -1 +0,0 @@ -INTERNAL @test4 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/src/sub/t.txt b/fmpp/src/test/resources/tests/freemarker_links/src/sub/t.txt deleted file mode 100644 index 63e1074..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/src/sub/t.txt +++ /dev/null @@ -1,19 +0,0 @@ -<#include "../@inc/test1.ftl"> == INTERNAL @inc/test1.ftl -<#include "../@inc/test2.ftl"> == EXTERNAL inc1/test2.ftl -<#include "../@inc/test3.ftl"> == EXTERNAL inc2/test3.ftl - -<#include "/@inc/test1.ftl"> == INTERNAL @inc/test1.ftl -<#include "/@inc/test2.ftl"> == EXTERNAL inc1/test2.ftl -<#include "/@inc/test3.ftl"> == EXTERNAL inc2/test3.ftl - -<#include "../@test4"> == INTERNAL @test4 -<#include "../@test5"> == EXTERNAL inc1/test5.ftl -<#include "../@test6"> == EXTERNAL inc2/test6.ftl - -<#include "/@test4"> == INTERNAL @test4 -<#include "/@test5"> == EXTERNAL inc1/test5.ftl -<#include "/@test6"> == EXTERNAL inc2/test6.ftl - -<#include "../@monster"> == GODZILLA - -<#include "/@monster"> == GODZILLA \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/freemarker_links/src/t.txt b/fmpp/src/test/resources/tests/freemarker_links/src/t.txt deleted file mode 100644 index 0f1020d..0000000 --- a/fmpp/src/test/resources/tests/freemarker_links/src/t.txt +++ /dev/null @@ -1,19 +0,0 @@ -<#include "@inc/test1.ftl"> == INTERNAL @inc/test1.ftl -<#include "@inc/test2.ftl"> == EXTERNAL inc1/test2.ftl -<#include "@inc/test3.ftl"> == EXTERNAL inc2/test3.ftl - -<#include "/@inc/test1.ftl"> == INTERNAL @inc/test1.ftl -<#include "/@inc/test2.ftl"> == EXTERNAL inc1/test2.ftl -<#include "/@inc/test3.ftl"> == EXTERNAL inc2/test3.ftl - -<#include "@test4"> == INTERNAL @test4 -<#include "@test5"> == EXTERNAL inc1/test5.ftl -<#include "@test6"> == EXTERNAL inc2/test6.ftl - -<#include "/@test4"> == INTERNAL @test4 -<#include "/@test5"> == EXTERNAL inc1/test5.ftl -<#include "/@test6"> == EXTERNAL inc2/test6.ftl - -<#include "@monster"> == GODZILLA - -<#include "/@monster"> == GODZILLA \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/htmlutils/config.fmpp b/fmpp/src/test/resources/tests/htmlutils/config.fmpp deleted file mode 100644 index 8df0f48..0000000 --- a/fmpp/src/test/resources/tests/htmlutils/config.fmpp +++ /dev/null @@ -1,6 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - htmlUtils() - sortAttrs: eval('new fmpp.testsuite.SortAttrsTransform()') -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/htmlutils/src/test.bmp b/fmpp/src/test/resources/tests/htmlutils/src/test.bmp deleted file mode 100644 index 72289e6..0000000 Binary files a/fmpp/src/test/resources/tests/htmlutils/src/test.bmp and /dev/null differ diff --git a/fmpp/src/test/resources/tests/htmlutils/src/test.gif b/fmpp/src/test/resources/tests/htmlutils/src/test.gif deleted file mode 100644 index cc29e79..0000000 Binary files a/fmpp/src/test/resources/tests/htmlutils/src/test.gif and /dev/null differ diff --git a/fmpp/src/test/resources/tests/htmlutils/src/test.html b/fmpp/src/test/resources/tests/htmlutils/src/test.html deleted file mode 100644 index 4a6c791..0000000 --- a/fmpp/src/test/resources/tests/htmlutils/src/test.html +++ /dev/null @@ -1,6 +0,0 @@ -<@sortAttrs> -

        <@img src="test.gif" alt="GIF "/> -

        <@img src="test.png" alt="PNG" border=0 foo='bar' /> -

        <@img src="test.jpg" /> -

        <@img src="test.bmp" /> - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/htmlutils/src/test.jpg b/fmpp/src/test/resources/tests/htmlutils/src/test.jpg deleted file mode 100644 index cc8871f..0000000 Binary files a/fmpp/src/test/resources/tests/htmlutils/src/test.jpg and /dev/null differ diff --git a/fmpp/src/test/resources/tests/htmlutils/src/test.png b/fmpp/src/test/resources/tests/htmlutils/src/test.png deleted file mode 100644 index 7ef3cc0..0000000 Binary files a/fmpp/src/test/resources/tests/htmlutils/src/test.png and /dev/null differ diff --git a/fmpp/src/test/resources/tests/localdata/build.xml b/fmpp/src/test/resources/tests/localdata/build.xml deleted file mode 100644 index 530f358..0000000 --- a/fmpp/src/test/resources/tests/localdata/build.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/config.fmpp b/fmpp/src/test/resources/tests/localdata/config.fmpp deleted file mode 100644 index 04dc647..0000000 --- a/fmpp/src/test/resources/tests/localdata/config.fmpp +++ /dev/null @@ -1,10 +0,0 @@ -inheritConfiguration: inheritedcfg.fmpp -logFile: fmpp.log -sourceRoot: src -outputRoot: out -data: {twoX: 'XX'} -localData: [ - case(sub/**/*.html, sub/**/*.htm, {id:SUB_HTML, id3:SUB_HTMLSUB_HTMLSUB_HTML}) - case(**/*.html, **/*.htm, {id:HTML, id3:HTMLHTMLHTML}) - layer() -] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/inheritedcfg.fmpp b/fmpp/src/test/resources/tests/localdata/inheritedcfg.fmpp deleted file mode 100644 index ae043b8..0000000 --- a/fmpp/src/test/resources/tests/localdata/inheritedcfg.fmpp +++ /dev/null @@ -1,11 +0,0 @@ -localData: [ - case(**/*.htmlx, {id3:HX}) - layer() - layer() - layer() - layer() - case(**/*_x.*, {id:X, id2:get(twoX), id3:XXX}) - case(**/*_y.*, {properties(data/y.properties)}) - case(**/*_z.*, 'new fmpp.testsuite.TestLocalDataBuilder()') - layer() -] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/1.html b/fmpp/src/test/resources/tests/localdata/src/1.html deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/1.html +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/1_x.html b/fmpp/src/test/resources/tests/localdata/src/1_x.html deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/1_x.html +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/1_z.html b/fmpp/src/test/resources/tests/localdata/src/1_z.html deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/1_z.html +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/1_z.htmlx b/fmpp/src/test/resources/tests/localdata/src/1_z.htmlx deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/1_z.htmlx +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/2.htm b/fmpp/src/test/resources/tests/localdata/src/2.htm deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/2.htm +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/2_y.htm b/fmpp/src/test/resources/tests/localdata/src/2_y.htm deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/2_y.htm +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/localdata/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/localdata/src/data/y.properties b/fmpp/src/test/resources/tests/localdata/src/data/y.properties deleted file mode 100644 index 38b6ca9..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/data/y.properties +++ /dev/null @@ -1,3 +0,0 @@ -id=Y -id2=YY -id3=yyy \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/sub/1.html b/fmpp/src/test/resources/tests/localdata/src/sub/1.html deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/sub/1.html +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/sub/1_x.html b/fmpp/src/test/resources/tests/localdata/src/sub/1_x.html deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/sub/1_x.html +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/sub/1_z.html b/fmpp/src/test/resources/tests/localdata/src/sub/1_z.html deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/sub/1_z.html +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/sub/1_z.htmlx b/fmpp/src/test/resources/tests/localdata/src/sub/1_z.htmlx deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/sub/1_z.htmlx +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/sub/2.htm b/fmpp/src/test/resources/tests/localdata/src/sub/2.htm deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/sub/2.htm +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/sub/2_y.htm b/fmpp/src/test/resources/tests/localdata/src/sub/2_y.htm deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/sub/2_y.htm +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/sub/test.txt b/fmpp/src/test/resources/tests/localdata/src/sub/test.txt deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/sub/test.txt +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/localdata/src/test.txt b/fmpp/src/test/resources/tests/localdata/src/test.txt deleted file mode 100644 index 3b13b6f..0000000 --- a/fmpp/src/test/resources/tests/localdata/src/test.txt +++ /dev/null @@ -1,3 +0,0 @@ -${id?default("-")} -${id2?default("-")} -${id3?default("-")} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/locale/config.fmpp b/fmpp/src/test/resources/tests/locale/config.fmpp deleted file mode 100644 index 0b0dbf8..0000000 --- a/fmpp/src/test/resources/tests/locale/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -locale: fr_FR \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/locale/src/test.txt b/fmpp/src/test/resources/tests/locale/src/test.txt deleted file mode 100644 index 71cae5c..0000000 --- a/fmpp/src/test/resources/tests/locale/src/test.txt +++ /dev/null @@ -1,8 +0,0 @@ -<#-- $Id: test.txt,v 1.1 2003/10/26 23:52:02 ddekany Exp $ --> -<#assign d = '2003-10-26'?date('yyyy-mm-dd')> -Locale: ${pp.locale} -Day: ${d?string('EEEE')} - -<#setting locale="en_US"> -Locale: ${pp.locale} -Day: ${d?string('EEEE')} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/nested_output/config.fmpp b/fmpp/src/test/resources/tests/nested_output/config.fmpp deleted file mode 100644 index 925102e..0000000 --- a/fmpp/src/test/resources/tests/nested_output/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/nested_output/src/nestings.txt b/fmpp/src/test/resources/tests/nested_output/src/nestings.txt deleted file mode 100644 index a1583f4..0000000 --- a/fmpp/src/test/resources/tests/nested_output/src/nestings.txt +++ /dev/null @@ -1,29 +0,0 @@ -<@pp.renameOutputFile name="n0.txt" /> -n0[ -<@pp.nestOutputFile name='n1.txt'> - n1 - <@pp.nestOutputFile name='n2.txt'> - n2 - <@pp.nestOutputFile name='n3.txt'> - n3[ - <@pp.nestOutputFile name='n1.txt'> - -=N1=- - <@pp.nestOutputFile name='n0.txt'> - -=N0=- - - - -=N3=- - <@pp.nestOutputFile name='trash.txt'> - Trash - <@pp.nestOutputFile name='n2.txt'> - -=N2=- - - <@pp.dropOutputFile /> - - ]n3 - - ]n2 - - ]n1 - -]n0 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/nested_output/src/nestings2.txt b/fmpp/src/test/resources/tests/nested_output/src/nestings2.txt deleted file mode 100644 index e9bf8a0..0000000 --- a/fmpp/src/test/resources/tests/nested_output/src/nestings2.txt +++ /dev/null @@ -1,12 +0,0 @@ -n2.0[ -<@pp.nestOutputFile name='n2.1.txt'> - n1 - <@pp.nestOutputFile name='nestings2.txt'> - -=N2.0=- - <@pp.nestOutputFile name='n2.1.txt'> - -=N2.1=- - - - ]n1 - -]n2.0 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/objectwrapper1/config.fmpp b/fmpp/src/test/resources/tests/objectwrapper1/config.fmpp deleted file mode 100644 index ee0f554..0000000 --- a/fmpp/src/test/resources/tests/objectwrapper1/config.fmpp +++ /dev/null @@ -1,5 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - o: {'x':'X'} -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/objectwrapper1/src/test.txt b/fmpp/src/test/resources/tests/objectwrapper1/src/test.txt deleted file mode 100644 index 6383378..0000000 --- a/fmpp/src/test/resources/tests/objectwrapper1/src/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -${o.x} = X -${o.class?default('missing')} = missing \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/objectwrapper2/config.fmpp b/fmpp/src/test/resources/tests/objectwrapper2/config.fmpp deleted file mode 100644 index 1fa8db1..0000000 --- a/fmpp/src/test/resources/tests/objectwrapper2/config.fmpp +++ /dev/null @@ -1,6 +0,0 @@ -sourceRoot: src -outputRoot: out -objectWrapper: "new freemarker.ext.beans.BeansWrapper()" -data: { - o: {'x':'X'} -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/objectwrapper2/src/test.txt b/fmpp/src/test/resources/tests/objectwrapper2/src/test.txt deleted file mode 100644 index 0804593..0000000 --- a/fmpp/src/test/resources/tests/objectwrapper2/src/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -${o.x} = X -${o.class.name} = java.util.HashMap \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/config.fmpp b/fmpp/src/test/resources/tests/pathpattern1/config.fmpp deleted file mode 100644 index 44fe68f..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/config.fmpp +++ /dev/null @@ -1,12 +0,0 @@ -sourceRoot: src -outputRoot: out -borders: [ - header("h1_", /1*.*) - header("h2_", 2*.*) - header("h3_", **/3*.*) - header("h4_", /**/4*.*) - footer("_f1", */1*.*) - footer("_f2", */*/2*.*) - footer("_f3", */**/3*.*) - footer("_f4", */*/**/4*.*) -] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/1.txt b/fmpp/src/test/resources/tests/pathpattern1/src/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/2.txt b/fmpp/src/test/resources/tests/pathpattern1/src/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/3.txt b/fmpp/src/test/resources/tests/pathpattern1/src/3.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/3.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/4.txt b/fmpp/src/test/resources/tests/pathpattern1/src/4.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/4.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/sub/1.txt b/fmpp/src/test/resources/tests/pathpattern1/src/sub/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/sub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/sub/2.txt b/fmpp/src/test/resources/tests/pathpattern1/src/sub/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/sub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/sub/3.txt b/fmpp/src/test/resources/tests/pathpattern1/src/sub/3.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/sub/3.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/sub/4.txt b/fmpp/src/test/resources/tests/pathpattern1/src/sub/4.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/sub/4.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/1.txt b/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/2.txt b/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/3.txt b/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/3.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/3.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/4.txt b/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/4.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern1/src/sub/subsub/4.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/config.fmpp b/fmpp/src/test/resources/tests/pathpattern2/config.fmpp deleted file mode 100644 index a6af32a..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/config.fmpp +++ /dev/null @@ -1,12 +0,0 @@ -sourceRoot: src -outputRoot: out -borders: [ - header("h1_", ???/1*.*) - header("h2_", /???/2*.*) - header("h3_", /???/s*b/3*.*) - header("h4_", **/s*b/4*.*) - footer("_f1", /*/1*.*) - footer("_f2", /*/*/2*.*) - footer("_f3", /*/**/3*.*) - footer("_f4", /*/*/**/4*.*) -] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/1.txt b/fmpp/src/test/resources/tests/pathpattern2/src/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/2.txt b/fmpp/src/test/resources/tests/pathpattern2/src/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/3.txt b/fmpp/src/test/resources/tests/pathpattern2/src/3.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/3.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/4.txt b/fmpp/src/test/resources/tests/pathpattern2/src/4.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/4.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/1.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/2.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/3.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/3.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/3.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/4.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/4.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/4.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/1.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/2.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/3.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/3.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/3.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/4.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/4.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/4.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/1.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/2.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/2.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/2.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/3.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/3.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/3.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/4.txt b/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/4.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern2/src/sub/subsub/subsubsub/4.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/config.fmpp b/fmpp/src/test/resources/tests/pathpattern3/config.fmpp deleted file mode 100644 index 72828b5..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/config.fmpp +++ /dev/null @@ -1,11 +0,0 @@ -sourceRoot: src -outputRoot: out -borders: [ - header("*.txt_", **/*.txt) - layer() - header("foo.*_", foo.*) - layer() - header("Bar.*_", Bar.*) - layer() - header("SUB/*_", SUB/*) -] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/Bar.Txt b/fmpp/src/test/resources/tests/pathpattern3/src/Bar.Txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/Bar.Txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/Bar.t1 b/fmpp/src/test/resources/tests/pathpattern3/src/Bar.t1 deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/Bar.t1 +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/Foo.t2 b/fmpp/src/test/resources/tests/pathpattern3/src/Foo.t2 deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/Foo.t2 +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/Foo.txt b/fmpp/src/test/resources/tests/pathpattern3/src/Foo.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/Foo.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/bar.t2 b/fmpp/src/test/resources/tests/pathpattern3/src/bar.t2 deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/bar.t2 +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/foo.t1 b/fmpp/src/test/resources/tests/pathpattern3/src/foo.t1 deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/foo.t1 +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/sub/t.txt b/fmpp/src/test/resources/tests/pathpattern3/src/sub/t.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/sub/t.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/t1.txt b/fmpp/src/test/resources/tests/pathpattern3/src/t1.txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/t1.txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3/src/t2.Txt b/fmpp/src/test/resources/tests/pathpattern3/src/t2.Txt deleted file mode 100644 index c1b0730..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3/src/t2.Txt +++ /dev/null @@ -1 +0,0 @@ -x \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/pathpattern3_casesens/config.fmpp b/fmpp/src/test/resources/tests/pathpattern3_casesens/config.fmpp deleted file mode 100644 index 3b55e8b..0000000 --- a/fmpp/src/test/resources/tests/pathpattern3_casesens/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -inheritConfiguration: ../pathpattern3/config.fmpp -outputRoot: out -caseSensitive: true \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths/config.fmpp b/fmpp/src/test/resources/tests/relative_paths/config.fmpp deleted file mode 100644 index 1a65d4c..0000000 --- a/fmpp/src/test/resources/tests/relative_paths/config.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -sourceRoot: src -outputRoot: out \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths/src/include/ignoredir.fmpp b/fmpp/src/test/resources/tests/relative_paths/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/relative_paths/src/include/s.txt b/fmpp/src/test/resources/tests/relative_paths/src/include/s.txt deleted file mode 100644 index d800886..0000000 --- a/fmpp/src/test/resources/tests/relative_paths/src/include/s.txt +++ /dev/null @@ -1 +0,0 @@ -123 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths/src/include/test.txt b/fmpp/src/test/resources/tests/relative_paths/src/include/test.txt deleted file mode 100644 index 83b30bb..0000000 --- a/fmpp/src/test/resources/tests/relative_paths/src/include/test.txt +++ /dev/null @@ -1 +0,0 @@ -${pp.sourceFileSize('s.txt')} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths/src/s.txt b/fmpp/src/test/resources/tests/relative_paths/src/s.txt deleted file mode 100644 index 56a6051..0000000 --- a/fmpp/src/test/resources/tests/relative_paths/src/s.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths/src/sub/s.txt b/fmpp/src/test/resources/tests/relative_paths/src/sub/s.txt deleted file mode 100644 index 3cacc0b..0000000 --- a/fmpp/src/test/resources/tests/relative_paths/src/sub/s.txt +++ /dev/null @@ -1 +0,0 @@ -12 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths/src/sub/test.txt b/fmpp/src/test/resources/tests/relative_paths/src/sub/test.txt deleted file mode 100644 index 83b30bb..0000000 --- a/fmpp/src/test/resources/tests/relative_paths/src/sub/test.txt +++ /dev/null @@ -1 +0,0 @@ -${pp.sourceFileSize('s.txt')} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths/src/test.txt b/fmpp/src/test/resources/tests/relative_paths/src/test.txt deleted file mode 100644 index fa38474..0000000 --- a/fmpp/src/test/resources/tests/relative_paths/src/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -${pp.sourceFileSize('s.txt')} -<#include '/include/test.txt'> \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths2/config.fmpp b/fmpp/src/test/resources/tests/relative_paths2/config.fmpp deleted file mode 100644 index 006f915..0000000 --- a/fmpp/src/test/resources/tests/relative_paths2/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -modes: ignore(**/*.inc) \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths2/src/sub/subsub/test.inc b/fmpp/src/test/resources/tests/relative_paths2/src/sub/subsub/test.inc deleted file mode 100644 index 9cc9bbf..0000000 --- a/fmpp/src/test/resources/tests/relative_paths2/src/sub/subsub/test.inc +++ /dev/null @@ -1 +0,0 @@ -/sub/subsub/ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths2/src/sub/subsub/test.txt b/fmpp/src/test/resources/tests/relative_paths2/src/sub/subsub/test.txt deleted file mode 100644 index 9a43ec6..0000000 --- a/fmpp/src/test/resources/tests/relative_paths2/src/sub/subsub/test.txt +++ /dev/null @@ -1,8 +0,0 @@ -<#include "../../test.inc"> == / -<#include "/test.inc"> == / -<#include "../test.inc"> == /sub/ -<#include "/sub/test.inc"> == /sub/ -<#include "test.inc"> == /sub/subsub/ -<#include "/sub/subsub/test.inc"> == /sub/subsub/ -<#include "../../test.inc"> == / -<#include "/sub/subsub/../../test.inc"> == / \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths2/src/sub/test.inc b/fmpp/src/test/resources/tests/relative_paths2/src/sub/test.inc deleted file mode 100644 index 490a8e2..0000000 --- a/fmpp/src/test/resources/tests/relative_paths2/src/sub/test.inc +++ /dev/null @@ -1 +0,0 @@ -/sub/ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths2/src/sub/test.txt b/fmpp/src/test/resources/tests/relative_paths2/src/sub/test.txt deleted file mode 100644 index c10b236..0000000 --- a/fmpp/src/test/resources/tests/relative_paths2/src/sub/test.txt +++ /dev/null @@ -1,8 +0,0 @@ -<#include "../test.inc"> == / -<#include "/test.inc"> == / -<#include "test.inc"> == /sub/ -<#include "/sub/test.inc"> == /sub/ -<#include "subsub/test.inc"> == /sub/subsub/ -<#include "/sub/subsub/test.inc"> == /sub/subsub/ -<#include "subsub/../../test.inc"> == / -<#include "/sub/subsub/../../test.inc"> == / \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths2/src/test.inc b/fmpp/src/test/resources/tests/relative_paths2/src/test.inc deleted file mode 100644 index 35ec3b9..0000000 --- a/fmpp/src/test/resources/tests/relative_paths2/src/test.inc +++ /dev/null @@ -1 +0,0 @@ -/ \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/relative_paths2/src/test.txt b/fmpp/src/test/resources/tests/relative_paths2/src/test.txt deleted file mode 100644 index bc4fd18..0000000 --- a/fmpp/src/test/resources/tests/relative_paths2/src/test.txt +++ /dev/null @@ -1,8 +0,0 @@ -<#include "test.inc"> == / -<#include "/test.inc"> == / -<#include "sub/test.inc"> == /sub/ -<#include "/sub/test.inc"> == /sub/ -<#include "sub/subsub/test.inc"> == /sub/subsub/ -<#include "/sub/subsub/test.inc"> == /sub/subsub/ -<#include "sub/subsub/../../test.inc"> == / -<#include "/sub/subsub/../../test.inc"> == / \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/rename/config.fmpp b/fmpp/src/test/resources/tests/rename/config.fmpp deleted file mode 100644 index 1a65d4c..0000000 --- a/fmpp/src/test/resources/tests/rename/config.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -sourceRoot: src -outputRoot: out \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/rename/src/1.txt b/fmpp/src/test/resources/tests/rename/src/1.txt deleted file mode 100644 index 185a227..0000000 --- a/fmpp/src/test/resources/tests/rename/src/1.txt +++ /dev/null @@ -1,2 +0,0 @@ -<@pp.renameOutputFile name="r1.txt" /> -1 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/rename/src/2.txt b/fmpp/src/test/resources/tests/rename/src/2.txt deleted file mode 100644 index c8d2770..0000000 --- a/fmpp/src/test/resources/tests/rename/src/2.txt +++ /dev/null @@ -1,4 +0,0 @@ -2 -<#flush> -<@pp.renameOutputFile name="r2.txt" /> -. \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/rename/src/3.txt b/fmpp/src/test/resources/tests/rename/src/3.txt deleted file mode 100644 index fc39248..0000000 --- a/fmpp/src/test/resources/tests/rename/src/3.txt +++ /dev/null @@ -1,4 +0,0 @@ -3 -<#flush> -<@pp.renameOutputFile name="r/3.txt" /> -. \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/rename/src/4.txt b/fmpp/src/test/resources/tests/rename/src/4.txt deleted file mode 100644 index 0466f03..0000000 --- a/fmpp/src/test/resources/tests/rename/src/4.txt +++ /dev/null @@ -1,2 +0,0 @@ -<@pp.renameOutputFile extension="rtxt" /> -4 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/rename/src/5 b/fmpp/src/test/resources/tests/rename/src/5 deleted file mode 100644 index 7b49b9d..0000000 --- a/fmpp/src/test/resources/tests/rename/src/5 +++ /dev/null @@ -1,2 +0,0 @@ -<@pp.renameOutputFile extension="rtxt" /> -5 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/rename/src/6.foo.txt b/fmpp/src/test/resources/tests/rename/src/6.foo.txt deleted file mode 100644 index c28b636..0000000 --- a/fmpp/src/test/resources/tests/rename/src/6.foo.txt +++ /dev/null @@ -1,2 +0,0 @@ -<@pp.renameOutputFile extension="rtxt" /> -6 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/rename/src/7.txt b/fmpp/src/test/resources/tests/rename/src/7.txt deleted file mode 100644 index 06b19e8..0000000 --- a/fmpp/src/test/resources/tests/rename/src/7.txt +++ /dev/null @@ -1,5 +0,0 @@ -7 -<@pp.renameOutputFile name="r7.txt" /> -. -<@pp.renameOutputFile extension="rtxt" /> -.. \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/args.txt b/fmpp/src/test/resources/tests/sources/args.txt deleted file mode 100644 index 6db06c9..0000000 --- a/fmpp/src/test/resources/tests/sources/args.txt +++ /dev/null @@ -1,2 +0,0 @@ -4.txt -6.txt \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/fmpp.cfg b/fmpp/src/test/resources/tests/sources/fmpp.cfg deleted file mode 100644 index 5b8e998..0000000 --- a/fmpp/src/test/resources/tests/sources/fmpp.cfg +++ /dev/null @@ -1,4 +0,0 @@ -source-root = src -output-root = out -sources = 1.txt, 2.txt, sub -inherit-configuration = fmpp2.cfg \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/fmpp2.cfg b/fmpp/src/test/resources/tests/sources/fmpp2.cfg deleted file mode 100644 index d06f781..0000000 --- a/fmpp/src/test/resources/tests/sources/fmpp2.cfg +++ /dev/null @@ -1,2 +0,0 @@ -## It should NOT process 3.txt, as the "sources" in fmpp.cfg is stronger. -sources = 2.txt, 3.txt \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/src/1.txt b/fmpp/src/test/resources/tests/sources/src/1.txt deleted file mode 100644 index 56a6051..0000000 --- a/fmpp/src/test/resources/tests/sources/src/1.txt +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/src/2.txt b/fmpp/src/test/resources/tests/sources/src/2.txt deleted file mode 100644 index d8263ee..0000000 --- a/fmpp/src/test/resources/tests/sources/src/2.txt +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/src/3.txt b/fmpp/src/test/resources/tests/sources/src/3.txt deleted file mode 100644 index e440e5c..0000000 --- a/fmpp/src/test/resources/tests/sources/src/3.txt +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/src/4.txt b/fmpp/src/test/resources/tests/sources/src/4.txt deleted file mode 100644 index bf0d87a..0000000 --- a/fmpp/src/test/resources/tests/sources/src/4.txt +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/src/5.txt b/fmpp/src/test/resources/tests/sources/src/5.txt deleted file mode 100644 index 7813681..0000000 --- a/fmpp/src/test/resources/tests/sources/src/5.txt +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/src/6.txt b/fmpp/src/test/resources/tests/sources/src/6.txt deleted file mode 100644 index 62f9457..0000000 --- a/fmpp/src/test/resources/tests/sources/src/6.txt +++ /dev/null @@ -1 +0,0 @@ -6 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/src/sub/a.txt b/fmpp/src/test/resources/tests/sources/src/sub/a.txt deleted file mode 100644 index 2e65efe..0000000 --- a/fmpp/src/test/resources/tests/sources/src/sub/a.txt +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/sources/src/sub/b.txt b/fmpp/src/test/resources/tests/sources/src/sub/b.txt deleted file mode 100644 index 2e65efe..0000000 --- a/fmpp/src/test/resources/tests/sources/src/sub/b.txt +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_1/config.fmpp b/fmpp/src/test/resources/tests/tag_syntax_1/config.fmpp deleted file mode 100644 index 187b9c0..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_1/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -tagSyntax: angleBracket \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_1/src/test1.txt b/fmpp/src/test/resources/tests/tag_syntax_1/src/test1.txt deleted file mode 100644 index 372176c..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_1/src/test1.txt +++ /dev/null @@ -1 +0,0 @@ -<#-- I'm a comment -->[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_1/src/test2.txt b/fmpp/src/test/resources/tests/tag_syntax_1/src/test2.txt deleted file mode 100644 index 2f2c630..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_1/src/test2.txt +++ /dev/null @@ -1,2 +0,0 @@ -<#ftl> -<#-- I'm a comment -->[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_1/src/test3.txt b/fmpp/src/test/resources/tests/tag_syntax_1/src/test3.txt deleted file mode 100644 index fb30e42..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_1/src/test3.txt +++ /dev/null @@ -1,2 +0,0 @@ -[#ftl] -<#-- I'm not a comment -->[#-- I'm a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_2/config.fmpp b/fmpp/src/test/resources/tests/tag_syntax_2/config.fmpp deleted file mode 100644 index 2539a15..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_2/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -tagSyntax: squareBracket \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_2/src/test1.txt b/fmpp/src/test/resources/tests/tag_syntax_2/src/test1.txt deleted file mode 100644 index e8c90d1..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_2/src/test1.txt +++ /dev/null @@ -1 +0,0 @@ -<#-- I'm not a comment -->[#-- I'm a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_2/src/test2.txt b/fmpp/src/test/resources/tests/tag_syntax_2/src/test2.txt deleted file mode 100644 index 2f2c630..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_2/src/test2.txt +++ /dev/null @@ -1,2 +0,0 @@ -<#ftl> -<#-- I'm a comment -->[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_2/src/test3.txt b/fmpp/src/test/resources/tests/tag_syntax_2/src/test3.txt deleted file mode 100644 index fb30e42..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_2/src/test3.txt +++ /dev/null @@ -1,2 +0,0 @@ -[#ftl] -<#-- I'm not a comment -->[#-- I'm a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_3/config.fmpp b/fmpp/src/test/resources/tests/tag_syntax_3/config.fmpp deleted file mode 100644 index 8949d2d..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_3/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -tagSyntax: autoDetect \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_3/src/test1a.txt b/fmpp/src/test/resources/tests/tag_syntax_3/src/test1a.txt deleted file mode 100644 index 372176c..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_3/src/test1a.txt +++ /dev/null @@ -1 +0,0 @@ -<#-- I'm a comment -->[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_3/src/test1b.txt b/fmpp/src/test/resources/tests/tag_syntax_3/src/test1b.txt deleted file mode 100644 index b2cdf84..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_3/src/test1b.txt +++ /dev/null @@ -1 +0,0 @@ -[#-- I'm a comment --]<#-- I'm not a comment --> \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_3/src/test2.txt b/fmpp/src/test/resources/tests/tag_syntax_3/src/test2.txt deleted file mode 100644 index 2f2c630..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_3/src/test2.txt +++ /dev/null @@ -1,2 +0,0 @@ -<#ftl> -<#-- I'm a comment -->[#-- I'm not a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tag_syntax_3/src/test3.txt b/fmpp/src/test/resources/tests/tag_syntax_3/src/test3.txt deleted file mode 100644 index fb30e42..0000000 --- a/fmpp/src/test/resources/tests/tag_syntax_3/src/test3.txt +++ /dev/null @@ -1,2 +0,0 @@ -[#ftl] -<#-- I'm not a comment -->[#-- I'm a comment --] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/config.fmpp b/fmpp/src/test/resources/tests/tdd/config.fmpp deleted file mode 100644 index 1a65d4c..0000000 --- a/fmpp/src/test/resources/tests/tdd/config.fmpp +++ /dev/null @@ -1,2 +0,0 @@ -sourceRoot: src -outputRoot: out \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/comments.txt b/fmpp/src/test/resources/tests/tdd/src/comments.txt deleted file mode 100644 index ebf1a6c..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/comments.txt +++ /dev/null @@ -1,11 +0,0 @@ -<#-- $Id: comments.txt,v 1.1 2003/10/30 09:32:08 ddekany Exp $ --> -<#include '/include/common.ftl'> - -<#assign c1 = pp.loadData('tdd', 'data/comment1.tdd')> -<#assign c2 = pp.loadData('tdd', 'data/comment2.tdd')> - -<@pp.restartOutputFile /> -c1: -<@dumpTopLevel c1 /> -c2: -<@dumpTopLevel c2 /> \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/data/comment1.tdd b/fmpp/src/test/resources/tests/tdd/src/data/comment1.tdd deleted file mode 100644 index 7fcc9c0..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/data/comment1.tdd +++ /dev/null @@ -1,10 +0,0 @@ -# foo -# bar -# -a: #A -b: " -#B<#-- -" -# -# baaz -# wombat \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/data/comment2.tdd b/fmpp/src/test/resources/tests/tdd/src/data/comment2.tdd deleted file mode 100644 index 7c4f1f8..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/data/comment2.tdd +++ /dev/null @@ -1,11 +0,0 @@ -a -# foo -: -#foo -A -#foo -b <#-- -# -# --> -<#-- x -->:<#-- -->B<#-- ---> \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/data/encoding.tdd b/fmpp/src/test/resources/tests/tdd/src/data/encoding.tdd deleted file mode 100644 index 23ea7e3..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/data/encoding.tdd +++ /dev/null @@ -1,2 +0,0 @@ - # ENcoDinG : UTF-8 qqqqqqqqqqq -text: bálnabĂ©l \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/data/hash.tdd b/fmpp/src/test/resources/tests/tdd/src/data/hash.tdd deleted file mode 100644 index 4c83371..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/data/hash.tdd +++ /dev/null @@ -1,3 +0,0 @@ -a:111 -b:222 -c:333 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/data/hashes.tdd b/fmpp/src/test/resources/tests/tdd/src/data/hashes.tdd deleted file mode 100644 index 02cc132..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/data/hashes.tdd +++ /dev/null @@ -1,20 +0,0 @@ -m1: {k1:1,k2:2, k3:3 , k4:4 - k5:5 - k6:6, - k7 - : - 7 - , k8:8 - # mooo - k9 <#-- mooo --> : 9 <#-- mooo --> }, m2: {a:b:c:d, 'a:b':c:d, "a:b:c":d} -m3: { - 1:1, true:true -} -m4: { - {a:A, b:BAD, c:BAD} - {b:B, c:BAD} - {c:C}, d:D -} -m5: {a:[1, 2, 3], b:{a:11, b:22, c:33}, {{{c:3}}}} -tdd(data/hash.tdd) -m6: {a:BAD, b:BAD, c:BAD, d:444, tdd(data/hash.tdd)} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/tdd/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/tdd/src/data/nestedscalars.tdd b/fmpp/src/test/resources/tests/tdd/src/data/nestedscalars.tdd deleted file mode 100644 index b840cee..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/data/nestedscalars.tdd +++ /dev/null @@ -1,44 +0,0 @@ -encloser: { -strings: [ - foo-bar/**/baz.txt - C:\windows\system32 - 25% - #FF80FF - 7.txt - 1-2 - True - "contains space" - "a'b" - "(c)" - "" - "7" - "true" - 'x"y' - 'x\'y' - "x\'y" - "x\"y" - r"a\'b" - r'a\"b' - "line1 - line2 - line3" - !? - "\x64-\x64\x64-\x064\x00640" - "A \ - B \ - \ - \ - C D" - 'X \ - - Y \ - - - Z\ - '] -vBoolean1: true -vBoolean2: false -vNumber1: 7 -vNumber2: +0.7 -vNumber3: -0.7 -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/data/scalars.tdd b/fmpp/src/test/resources/tests/tdd/src/data/scalars.tdd deleted file mode 100644 index 8908c70..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/data/scalars.tdd +++ /dev/null @@ -1,42 +0,0 @@ -strings: [ - foo-bar/**/baz.txt - C:\windows\system32 - 25% - #FF80FF - 7.txt - 1-2 - True - "contains space" - "a'b" - "(c)" - "" - "7" - "true" - 'x"y' - 'x\'y' - "x\'y" - "x\"y" - r"a\'b" - r'a\"b' - "line1 - line2 - line3" - !? - "\x64-\x64\x64-\x064\x00640" - "A \ - B \ - \ - \ - C D" - 'X \ - - Y \ - - - Z\ - '] -vBoolean1: true -vBoolean2: false -vNumber1: 7 -vNumber2: +0.7 -vNumber3: -0.7 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/data/seqmode.tdd b/fmpp/src/test/resources/tests/tdd/src/data/seqmode.tdd deleted file mode 100644 index 81f5b5a..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/data/seqmode.tdd +++ /dev/null @@ -1,5 +0,0 @@ -1 -"2" -[3, "4"] -{5:5, 6:"6"} -true \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/encoding.txt b/fmpp/src/test/resources/tests/tdd/src/encoding.txt deleted file mode 100644 index 77f4425..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/encoding.txt +++ /dev/null @@ -1 +0,0 @@ -${pp.loadData('tdd', 'data/encoding.tdd').text} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/hashes.txt b/fmpp/src/test/resources/tests/tdd/src/hashes.txt deleted file mode 100644 index e8a82e3..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/hashes.txt +++ /dev/null @@ -1,22 +0,0 @@ -<#-- $Id: hashes.txt,v 1.3 2005/04/12 20:35:19 ddekany Exp $ --> -<#include '/include/common.ftl'> - -<#assign tdd = pp.loadData('tdd', 'data/hashes.tdd')> - -<@pp.restartOutputFile /> -m1: -<@dumpTopLevel tdd.m1 /> -m2: -<@dumpTopLevel tdd.m2 /> -m3: -<@dumpTopLevel tdd.m3 /> -m4: -<@dumpTopLevel tdd.m4 /> -m5: -<@dumpTopLevel tdd.m5 /> -m6: -<@dumpTopLevel tdd.m6 /> - -a: ${tdd.a} -b: ${tdd.b} -c: ${tdd.c} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/include/common.ftl b/fmpp/src/test/resources/tests/tdd/src/include/common.ftl deleted file mode 100644 index d6c7b42..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/include/common.ftl +++ /dev/null @@ -1,21 +0,0 @@ -<#-- $Id: common.ftl,v 1.2 2007/04/27 12:45:28 ddekany Exp $ --> - -<#macro dumpTopLevel m> - <#list m?keys?sort as k> - - (${k}) : <@dump m[k] /> - - - -<#macro dump v> - <#if v?is_boolean> - bool (${v?string})<#t> - <#elseif v?is_number> - num (${v})<#t> - <#elseif v?is_sequence> - seq [<#list v as x>(<@dump x />)<#if x_has_next>, ]<#t> - <#elseif v?is_string> - str (${v})<#t> - <#elseif v?is_hash> - hash {<#list v?keys?sort as k>(${k}):(<@dump v[k] />)]<#if k_has_next>, }<#t> - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/include/ignoredir.fmpp b/fmpp/src/test/resources/tests/tdd/src/include/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/tdd/src/nestedscalars.txt b/fmpp/src/test/resources/tests/tdd/src/nestedscalars.txt deleted file mode 100644 index f22b361..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/nestedscalars.txt +++ /dev/null @@ -1,34 +0,0 @@ -<#-- $Id: nestedscalars.txt,v 1.1 2007/04/20 22:41:23 ddekany Exp $ --> -<#assign tdd = pp.loadData('tdd', 'data/nestedscalars.tdd').encloser> -<#list tdd.strings as s> - <#if !s?is_string> - Non-string! - <#else> - [${s}] - - -<#if !tdd.vBoolean1?is_boolean> - Non-boolean! -<#else> - [${tdd.vBoolean1?string}] - -<#if !tdd.vBoolean2?is_boolean> - Non-boolean! -<#else> - [${tdd.vBoolean2?string}] - -<#if !tdd.vNumber1?is_number> - Non-number! -<#else> - [${tdd.vNumber1}] - -<#if !tdd.vNumber2?is_number> - Non-number! -<#else> - [${tdd.vNumber2}] - -<#if !tdd.vNumber3?is_number> - Non-number! -<#else> - [${tdd.vNumber3}] - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/scalars.txt b/fmpp/src/test/resources/tests/tdd/src/scalars.txt deleted file mode 100644 index af3563d..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/scalars.txt +++ /dev/null @@ -1,34 +0,0 @@ -<#-- $Id: scalars.txt,v 1.1 2003/10/29 19:28:36 ddekany Exp $ --> -<#assign tdd = pp.loadData('tdd', 'data/scalars.tdd')> -<#list tdd.strings as s> - <#if !s?is_string> - Non-string! - <#else> - [${s}] - - -<#if !tdd.vBoolean1?is_boolean> - Non-boolean! -<#else> - [${tdd.vBoolean1?string}] - -<#if !tdd.vBoolean2?is_boolean> - Non-boolean! -<#else> - [${tdd.vBoolean2?string}] - -<#if !tdd.vNumber1?is_number> - Non-number! -<#else> - [${tdd.vNumber1}] - -<#if !tdd.vNumber2?is_number> - Non-number! -<#else> - [${tdd.vNumber2}] - -<#if !tdd.vNumber3?is_number> - Non-number! -<#else> - [${tdd.vNumber3}] - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/tdd/src/seqmode.txt b/fmpp/src/test/resources/tests/tdd/src/seqmode.txt deleted file mode 100644 index 1086438..0000000 --- a/fmpp/src/test/resources/tests/tdd/src/seqmode.txt +++ /dev/null @@ -1,7 +0,0 @@ -<#-- $Id: seqmode.txt,v 1.1 2007/04/27 12:45:28 ddekany Exp $ --> -<#include '/include/common.ftl'> -<#assign tdd = pp.loadData('tddSequence', 'data/seqmode.tdd')> -<#list tdd as i> -<@dump i /> - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/terminated_output/config.fmpp b/fmpp/src/test/resources/tests/terminated_output/config.fmpp deleted file mode 100644 index efd2212..0000000 --- a/fmpp/src/test/resources/tests/terminated_output/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -stopOnError: false \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/terminated_output/src/correct.html b/fmpp/src/test/resources/tests/terminated_output/src/correct.html deleted file mode 100644 index f4536bf..0000000 --- a/fmpp/src/test/resources/tests/terminated_output/src/correct.html +++ /dev/null @@ -1 +0,0 @@ -x${'-'}mooo \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/terminated_output/src/flushedzero.html b/fmpp/src/test/resources/tests/terminated_output/src/flushedzero.html deleted file mode 100644 index 9ba5a91..0000000 --- a/fmpp/src/test/resources/tests/terminated_output/src/flushedzero.html +++ /dev/null @@ -1 +0,0 @@ -<#flush>${sdfsd}mooo \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/terminated_output/src/nestings.html b/fmpp/src/test/resources/tests/terminated_output/src/nestings.html deleted file mode 100644 index c901977..0000000 --- a/fmpp/src/test/resources/tests/terminated_output/src/nestings.html +++ /dev/null @@ -1,12 +0,0 @@ -<@pp.nestOutputFile name='n1.txt'> - n1 - <@pp.nestOutputFile name='n2.txt'> - n2 - <@pp.nestOutputFile name='nZero.txt'> - <@pp.nestOutputFile name='n3.txt'> - n3${asdsad} - - - - -n0 \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/terminated_output/src/one.html b/fmpp/src/test/resources/tests/terminated_output/src/one.html deleted file mode 100644 index d4dcc90..0000000 --- a/fmpp/src/test/resources/tests/terminated_output/src/one.html +++ /dev/null @@ -1 +0,0 @@ -x${sdfsd}mooo \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/terminated_output/src/zero.html b/fmpp/src/test/resources/tests/terminated_output/src/zero.html deleted file mode 100644 index d49f769..0000000 --- a/fmpp/src/test/resources/tests/terminated_output/src/zero.html +++ /dev/null @@ -1 +0,0 @@ -${sdfsd}mooo \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/url_escaping/config.fmpp b/fmpp/src/test/resources/tests/url_escaping/config.fmpp deleted file mode 100644 index 925102e..0000000 --- a/fmpp/src/test/resources/tests/url_escaping/config.fmpp +++ /dev/null @@ -1,3 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/url_escaping/src/test.txt b/fmpp/src/test/resources/tests/url_escaping/src/test.txt deleted file mode 100644 index deb1df1..0000000 --- a/fmpp/src/test/resources/tests/url_escaping/src/test.txt +++ /dev/null @@ -1,23 +0,0 @@ -<#ftl encoding="ISO-8859-2"> - -<#assign s = "/a nőügy/az"> - -output_encoding: ${.output_encoding?default("-")} = ISO-8859-2 -url_escaping_charset: ${.url_escaping_charset?default("-")} = - -${s?url} -${pp.urlEnc(s)} -${pp.urlPathEnc(s)} - -<@pp.setOutputEncoding encoding="utf-8" /> -output_encoding: ${.output_encoding?default("-")} = utf-8 -url_escaping_charset: ${.url_escaping_charset?default("-")} = - -${s?url} -${pp.urlEnc(s)} -${pp.urlPathEnc(s)} - -<#setting url_escaping_charset="utf-16" /> -output_encoding: ${.output_encoding?default("-")} = utf-8 -url_escaping_charset: ${.url_escaping_charset?default("-")} = utf-16 -${s?url} -${pp.urlEnc(s)} -${pp.urlPathEnc(s)} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/url_escaping2/config.fmpp b/fmpp/src/test/resources/tests/url_escaping2/config.fmpp deleted file mode 100644 index 4434616..0000000 --- a/fmpp/src/test/resources/tests/url_escaping2/config.fmpp +++ /dev/null @@ -1,4 +0,0 @@ -sourceRoot: src -outputRoot: out -urlEscapingCharset: UTF-16 -logFile: log.fmpp \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/url_escaping2/src/test.txt b/fmpp/src/test/resources/tests/url_escaping2/src/test.txt deleted file mode 100644 index 4c68162..0000000 --- a/fmpp/src/test/resources/tests/url_escaping2/src/test.txt +++ /dev/null @@ -1,20 +0,0 @@ -<#ftl encoding="ISO-8859-2"> - -<#assign s = "béka"> - -output_encoding: ${.output_encoding?default("-")} = ISO-8859-2 -url_escaping_charset: ${.url_escaping_charset?default("-")} = UTF-16 -${s?url} -${pp.urlEnc(s)} - -<@pp.setOutputEncoding encoding="utf-8" /> -output_encoding: ${.output_encoding?default("-")} = utf-8 -url_escaping_charset: ${.url_escaping_charset?default("-")} = UTF-16 -${s?url} -${pp.urlEnc(s)} - -<#setting url_escaping_charset="ISO-8859-2" /> -output_encoding: ${.output_encoding?default("-")} = utf-8 -url_escaping_charset: ${.url_escaping_charset?default("-")} = ISO-8859-2 -${s?url} -${pp.urlEnc(s)} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/writable_hash/config.fmpp b/fmpp/src/test/resources/tests/writable_hash/config.fmpp deleted file mode 100644 index 872c570..0000000 --- a/fmpp/src/test/resources/tests/writable_hash/config.fmpp +++ /dev/null @@ -1,5 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - stuff: {a:A, b:B} -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/writable_hash/src/test.txt b/fmpp/src/test/resources/tests/writable_hash/src/test.txt deleted file mode 100644 index 8e1c571..0000000 --- a/fmpp/src/test/resources/tests/writable_hash/src/test.txt +++ /dev/null @@ -1,24 +0,0 @@ -<#assign x = pp.newWritableHash(stuff)> -<@pp.set hash=x key='c' value='C' /> -<#assign y = pp.newWritableHash(x)> -<@pp.set hash=y key='d' value='D' /> -<#assign z = pp.newWritableHash({'x':'X'})> -<@pp.set hash=z key='z' value='Z' /> - -stuff: -<@listMap stuff /> - -x: -<@listMap x /> - -y: -<@listMap y /> - -z: -<@listMap z /> - -<#macro listMap map> - <#list map?keys?sort as k> - - ${k} = ${map[k]} - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/writable_sequence/config.fmpp b/fmpp/src/test/resources/tests/writable_sequence/config.fmpp deleted file mode 100644 index 0904a42..0000000 --- a/fmpp/src/test/resources/tests/writable_sequence/config.fmpp +++ /dev/null @@ -1,5 +0,0 @@ -sourceRoot: src -outputRoot: out -data: { - stuff: [A, B] -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/writable_sequence/src/test.txt b/fmpp/src/test/resources/tests/writable_sequence/src/test.txt deleted file mode 100644 index f93b4a1..0000000 --- a/fmpp/src/test/resources/tests/writable_sequence/src/test.txt +++ /dev/null @@ -1,24 +0,0 @@ -<#assign x = pp.newWritableSequence(stuff)> -<@pp.add seq=x value='C' /> -<#assign y = pp.newWritableSequence(x)> -<@pp.add seq=y value='D' /> -<#assign z = pp.newWritableSequence(['X', 'Y'])> -<@pp.add seq=z value='Z' /> - -stuff: -<@listSequence stuff /> - -x: -<@listSequence x /> - -y: -<@listSequence y /> - -z: -<@listSequence z /> - -<#macro listSequence seq> - <#list seq as i> - - ${i} - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xinclude/config.fmpp b/fmpp/src/test/resources/tests/xinclude/config.fmpp deleted file mode 100644 index ee36f42..0000000 --- a/fmpp/src/test/resources/tests/xinclude/config.fmpp +++ /dev/null @@ -1,13 +0,0 @@ -sourceRoot: src -outputRoot: out -logFile: log.fmpp -data: { - doc: xml( - data/test.xml - { - xincludeAware: true - removeComments: false - index: {element: [part, chapter, para], value: '%n'} - } - ) -} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xinclude/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/xinclude/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/xinclude/src/data/part1.xml b/fmpp/src/test/resources/tests/xinclude/src/data/part1.xml deleted file mode 100644 index d519f25..0000000 --- a/fmpp/src/test/resources/tests/xinclude/src/data/part1.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - A - - - - A - B - - - A - B - - diff --git a/fmpp/src/test/resources/tests/xinclude/src/data/part2.xml b/fmpp/src/test/resources/tests/xinclude/src/data/part2.xml deleted file mode 100644 index 10a1ce1..0000000 --- a/fmpp/src/test/resources/tests/xinclude/src/data/part2.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - A - B - C - - - A - B - C - - diff --git a/fmpp/src/test/resources/tests/xinclude/src/data/test.xml b/fmpp/src/test/resources/tests/xinclude/src/data/test.xml deleted file mode 100644 index f9daccf..0000000 --- a/fmpp/src/test/resources/tests/xinclude/src/data/test.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xinclude/src/index.html b/fmpp/src/test/resources/tests/xinclude/src/index.html deleted file mode 100644 index 8b5883a..0000000 --- a/fmpp/src/test/resources/tests/xinclude/src/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - - XML Tree Dump - - <@pp.setOutputEncoding encoding="UTF-8" /> - - - -

        XML Tree Dump

        - -<@dumpXml doc /> - -

        Legend: -

          -
        • <foo bar="123">: Element node -
        • "Blah blah": Text node -
        • <?foo bar ?>: Processing instruction node -
        • <!-- Blah blah -->: Comment node -
        • foo: Other node -
        - - - -<#function showXmlSource s> - <#return s?xml?xml?replace(" ", r" ")?replace('\n', '&#xA;')?replace('\r', '&#xD;')> - - -<#-- -Prints an XML node tree as colored HTML. ---> -<#macro dumpXml node> -
          - <@dumpXml_internal node /> -
        - - -<#macro dumpXml_internal node> - <#local type = node?node_type> - <#if type == 'element'> -
      1. <<#rt> - <#if node?node_namespace?? && node?node_namespace != ''> - '${node?node_namespace}':<#t> - - ${node?node_name}<#t> - <#list node.@@ as att> - ${' '}<#t> - <#if att?node_namespace?? && att?node_namespace != ''> - '${att?node_namespace}':<#t> - - ${att?node_name}="${showXmlSource(att)}"<#t> - - ><#lt> - <#elseif type == 'text'> -
      2. "${showXmlSource(node)}"<#lt> - <#elseif type == 'pi'> - <#local nodeName = node?node_name> -
      3. <?${nodeName?substring(4)} ${showXmlSource(node)}?><#lt> - <#elseif type == 'comment'> -
      4. <!-- ${node} --><#lt> - <#else> -
      5. ${node?node_type}<#lt> - - <#if node?children?size != 0> -
          - <#list node?children as c> - <@dumpXml_internal c /><#t> - -
        - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_catalogs/config.fmpp b/fmpp/src/test/resources/tests/xml_catalogs/config.fmpp deleted file mode 100644 index acc5988..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/config.fmpp +++ /dev/null @@ -1,7 +0,0 @@ -logFile: fmpp.log -sourceRoot: src -outputRoot: out -data: { - doc:xml(data/test.xhtml) -} -xmlCatalogFiles: [dtds/catalog2, dtds/catalog] \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_catalogs/dtds/catalog b/fmpp/src/test/resources/tests/xml_catalogs/dtds/catalog deleted file mode 100644 index 96ee8b2..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/dtds/catalog +++ /dev/null @@ -1,2 +0,0 @@ -PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd" -PUBLIC "-//TEST" "test.txt" \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_catalogs/dtds/catalog2 b/fmpp/src/test/resources/tests/xml_catalogs/dtds/catalog2 deleted file mode 100644 index d58e52e..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/dtds/catalog2 +++ /dev/null @@ -1 +0,0 @@ -PUBLIC "-//TEST" "test2.txt" \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_catalogs/dtds/test.txt b/fmpp/src/test/resources/tests/xml_catalogs/dtds/test.txt deleted file mode 100644 index d00491f..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/dtds/test.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/fmpp/src/test/resources/tests/xml_catalogs/dtds/test2.txt b/fmpp/src/test/resources/tests/xml_catalogs/dtds/test2.txt deleted file mode 100644 index 0cfbf08..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/dtds/test2.txt +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-lat1.ent b/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-lat1.ent deleted file mode 100644 index ffee223..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-lat1.ent +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-special.ent b/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-special.ent deleted file mode 100644 index ca358b2..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-special.ent +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-symbol.ent b/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-symbol.ent deleted file mode 100644 index 63c2abf..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml-symbol.ent +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml1-transitional.dtd b/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml1-transitional.dtd deleted file mode 100644 index 39f6b25..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/dtds/xhtml1-transitional.dtd +++ /dev/null @@ -1,1201 +0,0 @@ - - - - - -%HTMLlat1; - - -%HTMLsymbol; - - -%HTMLspecial; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fmpp/src/test/resources/tests/xml_catalogs/src/data/ignoredir.fmpp b/fmpp/src/test/resources/tests/xml_catalogs/src/data/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/xml_catalogs/src/data/test.xhtml b/fmpp/src/test/resources/tests/xml_catalogs/src/data/test.xhtml deleted file mode 100644 index 1ab20d3..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/src/data/test.xhtml +++ /dev/null @@ -1,16 +0,0 @@ - - -]> - - - - Test - - - -

        Test

        -

        Test&test;

        - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_catalogs/src/test.txt b/fmpp/src/test/resources/tests/xml_catalogs/src/test.txt deleted file mode 100644 index 8786bfb..0000000 --- a/fmpp/src/test/resources/tests/xml_catalogs/src/test.txt +++ /dev/null @@ -1,4 +0,0 @@ -<#ftl ns_prefixes={"D":"http://www.w3.org/1999/xhtml"}> -<#list doc['//D:p'] as p> -- ${p} - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/config.fmpp b/fmpp/src/test/resources/tests/xml_rendering/config.fmpp deleted file mode 100644 index 51e7ee7..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/config.fmpp +++ /dev/null @@ -1,22 +0,0 @@ -inheritConfiguration: inherited.fmpp -sourceRoot: src -outputRoot: out -logFile: log.fmpp -xmlRenderings: [ - {ifDocumentElementIs:a, template:renderer/test1.ftl, validate} - {ifDocumentElementIs:b, template:renderer/test2.ftl, index:{element:c}} - {ifDocumentElementIs:e:c, template:renderer/test3.ftl, xmlns:{e:'http://e/'}} - { - ifSourceIs:ldb.xml - template:renderer/ldb.ftl - localDataBuilder: [ - "new fmpp.testsuite.TestXmlLocalDataBuilder2()" - "new fmpp.testsuite.TestXmlLocalDataBuilder()" - ] - } - {ifDocumentElementIs:[g, h], template:renderer/test6.ftl} - {ifSourceIs:[**g*, **f*], template:renderer/test5.ftl} - {ifDocumentElementIs:copyMe, copy} -] -xmlCatalogFiles: dtds/catalog.xml -localData: case('ldb.xml', {a:wrong, c:3}) \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/dtds/catalog.xml b/fmpp/src/test/resources/tests/xml_rendering/dtds/catalog.xml deleted file mode 100644 index 6d40818..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/dtds/catalog.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/dtds/test.dtd b/fmpp/src/test/resources/tests/xml_rendering/dtds/test.dtd deleted file mode 100644 index dc3bfca..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/dtds/test.dtd +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/dtds/test2.dtd b/fmpp/src/test/resources/tests/xml_rendering/dtds/test2.dtd deleted file mode 100644 index 74e9e4a..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/dtds/test2.dtd +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/inherited.fmpp b/fmpp/src/test/resources/tests/xml_rendering/inherited.fmpp deleted file mode 100644 index b161ecc..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/inherited.fmpp +++ /dev/null @@ -1 +0,0 @@ -xmlRenderings: {template:renderer/test4.ftl} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/a.xml b/fmpp/src/test/resources/tests/xml_rendering/src/a.xml deleted file mode 100644 index 5e2121a..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/a.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/b.xml b/fmpp/src/test/resources/tests/xml_rendering/src/b.xml deleted file mode 100644 index b8eaa32..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/b.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - B - B - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/c.xml b/fmpp/src/test/resources/tests/xml_rendering/src/c.xml deleted file mode 100644 index 889a75d..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/c.xml +++ /dev/null @@ -1,3 +0,0 @@ - - C - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/copy.txt b/fmpp/src/test/resources/tests/xml_rendering/src/copy.txt deleted file mode 100644 index 67930f0..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/copy.txt +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/d.xml b/fmpp/src/test/resources/tests/xml_rendering/src/d.xml deleted file mode 100644 index c68b17a..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/d.xml +++ /dev/null @@ -1,3 +0,0 @@ - - D - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/e.xml b/fmpp/src/test/resources/tests/xml_rendering/src/e.xml deleted file mode 100644 index e85ac86..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/e.xml +++ /dev/null @@ -1,3 +0,0 @@ - - E - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/f.xml b/fmpp/src/test/resources/tests/xml_rendering/src/f.xml deleted file mode 100644 index 2bdfd4f..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/f.xml +++ /dev/null @@ -1,3 +0,0 @@ - - F - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/g.xml b/fmpp/src/test/resources/tests/xml_rendering/src/g.xml deleted file mode 100644 index ea21d3f..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/g.xml +++ /dev/null @@ -1,3 +0,0 @@ - - G - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/h.xml b/fmpp/src/test/resources/tests/xml_rendering/src/h.xml deleted file mode 100644 index 849161b..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/h.xml +++ /dev/null @@ -1,3 +0,0 @@ - - H - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/ldb.xml b/fmpp/src/test/resources/tests/xml_rendering/src/ldb.xml deleted file mode 100644 index f35425b..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/ldb.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/ignoredir.fmpp b/fmpp/src/test/resources/tests/xml_rendering/src/renderer/ignoredir.fmpp deleted file mode 100644 index e69de29..0000000 diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/ldb.ftl b/fmpp/src/test/resources/tests/xml_rendering/src/renderer/ldb.ftl deleted file mode 100644 index 62788e7..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/ldb.ftl +++ /dev/null @@ -1,3 +0,0 @@ -${a} -${b} -${c} \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test1.ftl b/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test1.ftl deleted file mode 100644 index aaf44c7..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test1.ftl +++ /dev/null @@ -1,3 +0,0 @@ -<#ftl encoding="UTF-8"> -${pp.doc.@@markup} - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test2.ftl b/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test2.ftl deleted file mode 100644 index c5ab12d..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test2.ftl +++ /dev/null @@ -1,2 +0,0 @@ -${pp.doc.@@markup} - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test3.ftl b/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test3.ftl deleted file mode 100644 index ce81ef2..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test3.ftl +++ /dev/null @@ -1,3 +0,0 @@ -<#ftl ns_prefixes={'x':'http://e/'}> -${pp.doc.@@markup} - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test4.ftl b/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test4.ftl deleted file mode 100644 index 04df8ae..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test4.ftl +++ /dev/null @@ -1,3 +0,0 @@ -<#ftl ns_prefixes={'y':'http://f/'}> -${pp.doc.@@markup} - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test5.ftl b/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test5.ftl deleted file mode 100644 index 53c04aa..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test5.ftl +++ /dev/null @@ -1,2 +0,0 @@ -${pp.doc.@@markup} - \ No newline at end of file diff --git a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test6.ftl b/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test6.ftl deleted file mode 100644 index 9b3bb24..0000000 --- a/fmpp/src/test/resources/tests/xml_rendering/src/renderer/test6.ftl +++ /dev/null @@ -1,3 +0,0 @@ -<@pp.renameOutputFile extension="txt" /> -${pp.doc.@@markup} ----[6]--- \ No newline at end of file