From ab19109c401def98469081a0dda783dc061ea1fa Mon Sep 17 00:00:00 2001 From: Ciro Dolce Date: Thu, 17 Sep 2020 11:25:26 +0200 Subject: [PATCH] fix complete javadoc --- .../oawtemplate/utils/EscapeUtils.java | 161 +++++++++++------- voila-runtime-root/.gitignore | 1 + voila-runtime-root/pom.xml | 2 + .../sourceforge/rtf/IRTFDocumentParser.java | 8 +- .../net/sourceforge/rtf/ITemplateEngine.java | 14 +- .../java/net/sourceforge/rtf/RTFTemplate.java | 25 ++- .../rtf/context/AbstractRTFContextReader.java | 5 +- .../rtf/context/DigesterRTFContextFields.java | 24 +-- .../rtf/context/RTFContextUtil.java | 4 +- .../rtf/context/image/FormatBase.java | 5 +- .../rtf/context/image/ImageConstants.java | 2 +- .../rtf/context/image/ImageUtil.java | 2 +- .../sourceforge/rtf/document/RTFBookmark.java | 4 +- .../sourceforge/rtf/document/RTFElement.java | 14 +- .../config/DigesterTransformerConfig.java | 32 ++-- .../transformer/config/TransformerConfig.java | 14 +- .../rtf/format/rtfcode/IRTFCode.java | 4 +- .../rtf/handler/RTFDocumentHandler.java | 24 +-- .../rtf/handler/RTFIndentHandler.java | 4 +- .../rtf/helper/RTFTemplateBuilder.java | 20 +-- .../helper/test/RTFTemplateWithVelocity.java | 2 +- .../RTFTemplateWithVelocityAndXmlFields.java | 2 +- .../rtf/helper/test/TestFreemarkerEngine.java | 2 +- .../test/TestFreemarkerTransformer.java | 2 +- .../rtf/helper/test/TestVelocityEngine.java | 2 +- .../helper/test/TestVelocityTransformer.java | 2 +- .../rtf/parser/AbstractCoreRTFParser.java | 16 +- .../rtf/parser/AbstractDefaultRTFParser.java | 24 +-- .../AbstractRTFDocumentTransformer.java | 2 +- .../rtf/template/AbstractTemplateEngine.java | 13 +- .../sourceforge/rtf/template/IContext.java | 11 +- .../RTFFreemarkerTransformerImpl.java | 4 +- .../velocity/RTFVelocityTransformerImpl.java | 2 +- .../velocity/VelocityContextImpl.java | 3 +- .../velocity/VelocityTemplateEngineImpl.java | 1 - .../rtf/usecases/AbstractRTFUseCase.java | 17 +- .../annotation/RTFAnnotationWithVelocity.java | 5 +- .../RTFTemplateWithBookmarkImbricated.java | 3 +- .../usecases/cache/RTFTemplateWithCache.java | 3 +- .../config/RTFTemplateWithJavaConfig.java | 2 +- .../config/RTFTemplateWithSpringConfig.java | 2 +- .../RTFTemplateWithFormTextWithVelocity.java | 3 +- .../RTFTemplateWithImageWithFreemarker.java | 3 +- .../RTFTemplateWithImageWithVelocity.java | 3 +- ...FJakartaVelocityProjectWithFreemarker.java | 5 +- ...RTFJakartaVelocityProjectWithVelocity.java | 5 +- ...FJakartaVelocityProjectWithFreemarker.java | 5 +- ...RTFJakartaVelocityProjectWithVelocity.java | 3 +- ...mplatePageBeakWithGroupWithFreemarker.java | 3 +- ...TemplatePageBeakWithGroupWithVelocity.java | 3 +- .../RTFTemplatePageBreakWithFreemarker.java | 3 +- .../RTFTemplatePageBreakWithVelocity.java | 3 +- .../usecases/rtfcode/RTFCodeWithVelocity.java | 5 +- .../strategies/RTFTemplateReaderStrategy.java | 2 +- .../servlet/AbstractRTFTemplateServlet.java | 64 +++---- 55 files changed, 330 insertions(+), 269 deletions(-) create mode 100644 voila-runtime-root/.gitignore diff --git a/voila-runtime-oawtemplate/src/main/java/it/mice/voila/runtime/oawtemplate/utils/EscapeUtils.java b/voila-runtime-oawtemplate/src/main/java/it/mice/voila/runtime/oawtemplate/utils/EscapeUtils.java index de093dfa..906df4d7 100644 --- a/voila-runtime-oawtemplate/src/main/java/it/mice/voila/runtime/oawtemplate/utils/EscapeUtils.java +++ b/voila-runtime-oawtemplate/src/main/java/it/mice/voila/runtime/oawtemplate/utils/EscapeUtils.java @@ -19,7 +19,7 @@ import org.w3c.dom.Text; shouldn't need to directly use the services of this class very often.

For Model Objects containing free form user input, - it is highly recommended that you use {@link SafeText}, not String. + it is highly recommended that you use {SafeText}, not String. Free form user input is open to malicious use, such as Cross Site Scripting attacks. @@ -29,11 +29,11 @@ import org.w3c.dom.Text;

The following WEB4J classes will automatically escape special characters for you, when needed :

*/ @@ -46,51 +46,53 @@ public class EscapeUtils { The idea is to neutralize control characters commonly used by scripts, such that they will not be executed by the browser. This is done by replacing the control characters with their escaped equivalents. - See {@link hirondelle.web4j.security.SafeText} as well. + See {hirondelle.web4j.security.SafeText} as well.

The following characters are replaced with corresponding HTML character entities : - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Character Replacement
< <
> >
& &
" "
\t
! !
# #
$ $
% %
' '
( (
) )
* *
+ +
, ,
- -
. .
/ /
: :
; ;
= =
? ?
@ @
[ [
\ \
] ]
^ ^
_ _
` `
{ {
| |
} }
~ ~
< {@code < }
> {@code > }
& {@code & }
" {@code "}
! {@code !}
# {@code #}
$ {@code $}
% {@code %}
' {@code '}
( {@code (}
) {@code )}
* {@code *}
+ {@code +}
, {@code ,}
- {@code -}
. {@code .}
/ {@code /}
: {@code :}
; {@code ;}
= {@code =}
? {@code ?}
@ {@code @}
[ {@code [}
\ {@code \}
] {@code ]}
^ {@code ^}
_ {@code _}
` {@code `}
{ {@code {}
| {@code |}
} {@code }}
~ {@code ~}

Note that JSTL's {@code } escapes only the first five of the above characters. - */ - public static String forHTML(String aText){ + /** + * @param aText the text. + * @return the result. + */ +public static String forHTML(String aText){ final StringBuilder result = new StringBuilder(); final StringCharacterIterator iterator = new StringCharacterIterator(aText); char character = iterator.current(); @@ -208,7 +210,7 @@ public class EscapeUtils { /** Escape all ampersand characters in a URL. -

Replaces all '&' characters with '&'. +

Replaces all '&' characters with '{@code &}'.

An ampersand character may appear in the query string of a URL. The ampersand character is indeed valid in a URL. @@ -216,14 +218,19 @@ public class EscapeUtils { such attributes have the additional constraint that ampersands must be escaped. -

The JSTL tag does indeed perform proper URL encoding of +

The JSTL tag does indeed perform proper URL encoding of query parameters. But it does not, in general, produce text which is valid as an HREF attribute, simply because it does not escape the ampersand character. This is a nuisance when multiple query parameters appear in the URL, since it requires a little extra work. - */ - public static String forHrefAmpersand(String aURL){ + + /** + * @param aURL the aURL. + * @return the result. + */ + +public static String forHrefAmpersand(String aURL){ return aURL.replace("&", "&"); } @@ -237,8 +244,12 @@ public class EscapeUtils { attribute, then there are two issues - ensuring the query string is valid HTTP (it is URL-encoded), and ensuring it is valid HTML (ensuring the ampersand is escaped). - */ - public static String forURL(String aURLFragment){ + + /** + * @param aURLFragment the aURLFragment. + * @return the result. + */ +public static String forURL(String aURLFragment){ String result = null; try { result = URLEncoder.encode(aURLFragment, "UTF-8"); @@ -253,21 +264,24 @@ public class EscapeUtils { Escape characters for text appearing as XML data, between tags.

The following characters are replaced with corresponding character entities : - +
- - - - - + + + + +
Character Encoding
< <
> >
& &
" "
' '
< {@code < }
> {@code > }
& {@code & }
" {@code "}
' {@code '}

Note that JSTL's {@code } escapes the exact same set of characters as this method. That is, {@code } is good for escaping to produce valid XML, but not for producing safe HTML. - */ - public static String forXML(String aText){ + /** + * @param aText the aText. + * @return the result. + */ +public static String forXML(String aText){ final StringBuilder result = new StringBuilder(); final StringCharacterIterator iterator = new StringCharacterIterator(aText); char character = iterator.current(); @@ -303,7 +317,7 @@ public class EscapeUtils { (JSON) data interchange format.

The following commonly used control characters are escaped : - +
@@ -316,8 +330,12 @@ public class EscapeUtils {
Character Escaped As
" \"
\ \\

See RFC 4627 for more information. - */ - public static String forJSON(String aText){ + + /** + * @param aText the aText. + * @return the result. + */ +public static String forJSON(String aText){ final StringBuilder result = new StringBuilder(); StringCharacterIterator iterator = new StringCharacterIterator(aText); char character = iterator.current(); @@ -357,10 +375,13 @@ public class EscapeUtils { } /** - Return aText with all '<' and '>' characters + Return aText with all '<' and '>' characters replaced by their escaped equivalents. - */ - public static String toDisableTags(String aText){ + + * @param aText the aText. + * @return the result. + */ +public static String toDisableTags(String aText){ final StringBuilder result = new StringBuilder(); final StringCharacterIterator iterator = new StringCharacterIterator(aText); char character = iterator.current(); @@ -391,13 +412,16 @@ public class EscapeUtils {

  • .
  • \
  • ?, * , and + -
  • & +
  • &
  • :
  • { and }
  • [ and ]
  • ( and )
  • ^ and $ + * + * @param aRegexFragment the aRegexFragment. + * @return the result */ public static String forRegex(String aRegexFragment){ final StringBuilder result = new StringBuilder(); @@ -481,7 +505,10 @@ public class EscapeUtils {

    If replacement text can contain arbitrary characters, then you will usually need to escape that text, to ensure special characters are interpreted literally. - */ + * + * @param aInput the aInput. + * @return the result. + */ public static String forReplacementString(String aInput){ return Matcher.quoteReplacement(aInput); } @@ -490,8 +517,10 @@ public class EscapeUtils { Disable all SCRIPT tags in aText.

    Insensitive to case. - */ - public static String forScriptTagsOnly(String aText){ + * @param aText the aText. + * @return the result. + */ +public static String forScriptTagsOnly(String aText){ String result = null; Matcher matcher = SCRIPT.matcher(aText); result = matcher.replaceAll("<SCRIPT>"); diff --git a/voila-runtime-root/.gitignore b/voila-runtime-root/.gitignore new file mode 100644 index 00000000..fd39fa3d --- /dev/null +++ b/voila-runtime-root/.gitignore @@ -0,0 +1 @@ +/pom.xml diff --git a/voila-runtime-root/pom.xml b/voila-runtime-root/pom.xml index c6a6d23b..0c884285 100644 --- a/voila-runtime-root/pom.xml +++ b/voila-runtime-root/pom.xml @@ -170,12 +170,14 @@ jar + diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/IRTFDocumentParser.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/IRTFDocumentParser.java index 0a39bbb0..d89b4a02 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/IRTFDocumentParser.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/IRTFDocumentParser.java @@ -18,20 +18,20 @@ public interface IRTFDocumentParser { /** * Parse RTF Reader stream and build a RTFDocumen * @param reader RTF source reader to parse. - * @throws IOException + * @throws IOException the exception. */ public void parse(Reader reader) throws IOException; /** * Parse RTF Input stream and build a RTFDocument. - * @param input stream RTF source reader to parse. - * @throws IOException + * @param inputStream RTF source reader to parse. + * @throws IOException the exception. */ public void parse(InputStream inputStream) throws IOException; /** * Return RTFDocument built. - * @return + * @return the result. */ public RTFDocument getRTFDocument(); } diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/ITemplateEngine.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/ITemplateEngine.java index 809254f8..9d63a0e5 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/ITemplateEngine.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/ITemplateEngine.java @@ -14,6 +14,7 @@ public interface ITemplateEngine { * must be called if the same instance * of template engine must be used for merge * serveral RTF template model. + * @return the result. */ public IContext initializeContext(); @@ -22,15 +23,15 @@ public interface ITemplateEngine { /** * Set the template to use * - * @param template + * @param template the template. */ public void setTemplate(Reader template); /** * Put a value for the given key. * - * @param key - * @param value + * @param key the key. + * @param value the value. */ public void put(String key, Object value); @@ -38,6 +39,7 @@ public interface ITemplateEngine { * Merge. * * @param file name of file to merge into + * @throws Exception the exception. */ public void merge(String file) throws Exception; @@ -45,6 +47,7 @@ public interface ITemplateEngine { * Merge. * * @param file file to merge into + * @throws Exception the exception. */ public void merge(File file) throws Exception; @@ -52,12 +55,13 @@ public interface ITemplateEngine { * Merge. * * @param writer writer to merge into + * @throws Exception the exception. */ public void merge(Writer writer) throws Exception; /** * - * @return + * @return the result. */ public IContext newContext(); @@ -66,7 +70,7 @@ public interface ITemplateEngine { * This method treats any previously populated keys in the context kindly, * so it won't act unpredictably if this is called late * - * @param innerContext a pre-populated Context object + * @param globalContext the globalContext. */ public void setGlobalContext( IContext globalContext); diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/RTFTemplate.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/RTFTemplate.java index 0ac7f5af..39df2155 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/RTFTemplate.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/RTFTemplate.java @@ -57,7 +57,7 @@ public class RTFTemplate { * This method treats any previously populated keys in the context kindly, * so it won't act unpredictably if this is called late * - * @param innerContext a pre-populated Context object + * @param globalContext a pre-populated Context object */ public void setGlobalContext( IContext globalContext) { templateEngine.setGlobalContext(globalContext); @@ -66,7 +66,8 @@ public class RTFTemplate { /** * Set the template to use * - * @param template + * @param rtfSourceFile the rtf Source File. + * @throws FileNotFoundException the exception. */ public void setTemplate(File rtfSourceFile) throws FileNotFoundException { this.rtfSourceInputStream = null; @@ -77,7 +78,7 @@ public class RTFTemplate { /** * Set the template to use * - * @param template + * @param template the template. */ public void setTemplate(InputStream template) { this.rtfSourceInputStream = template; @@ -88,7 +89,7 @@ public class RTFTemplate { /** * Set the template to use * - * @param template + * @param template the template. */ public void setTemplate(Reader template) { this.rtfSourceReader = template; @@ -99,8 +100,8 @@ public class RTFTemplate { /** * Put a value for the given key. * - * @param key - * @param value + * @param key the key. + * @param value the value. */ public void put(String key, Object value) { templateEngine.put(key, value); @@ -109,7 +110,9 @@ public class RTFTemplate { /** * Merge. * - * @param file name of file to merge into + * @param file the file. + * @return the result. + * @throws Exception the exception. */ public RTFDocument merge(String file) throws Exception { transformAndSetTemplate(); @@ -120,7 +123,9 @@ public class RTFTemplate { /** * Merge. * - * @param file file to merge into + * @param file file to merge into + * @return the result. + * @throws Exception the exception. */ public RTFDocument merge(File file) throws Exception { transformAndSetTemplate(); @@ -131,7 +136,9 @@ public class RTFTemplate { /** * Merge. * - * @param writer writer to merge into + * @param writer writer to merge into + * @return the result. + * @throws Exception the exception. */ public RTFDocument merge(Writer writer) throws Exception { transformAndSetTemplate(); diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/AbstractRTFContextReader.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/AbstractRTFContextReader.java index 8b90e6cf..092b43c3 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/AbstractRTFContextReader.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/AbstractRTFContextReader.java @@ -50,7 +50,7 @@ public abstract class AbstractRTFContextReader { /** * Constructor to customize you package name to exclude. * - * @param excludedPackages + * @param excludedPackages the excludedPackages. */ public AbstractRTFContextReader(List excludedPackages) { this.excludedPackages = excludedPackages; @@ -89,7 +89,8 @@ public abstract class AbstractRTFContextReader { * Read velocity context, launch event startReading at first and when read * is finished launch event endReading. * - * @param context + * @param context the context. + * @param circularReferences the circularReferences. */ public void readContext(IContext context, boolean circularReferences) { readContext(context, null, circularReferences); diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/DigesterRTFContextFields.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/DigesterRTFContextFields.java index ae9b4d85..d101471c 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/DigesterRTFContextFields.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/DigesterRTFContextFields.java @@ -22,10 +22,10 @@ public class DigesterRTFContextFields { /** * Load XML configFileName file name and return RTFContextFields. - * @param configFileName - * @return RTFContextFields - * @throws SAXException - * @throws IOException + * @param configFileName the configFileName. + * @return RTFContextFields. + * @throws SAXException the exception. + * @throws IOException the exception. */ public static RTFContextFields getRTFContextFields(String configFileName) throws SAXException, IOException { return getRTFContextFields(new File(configFileName)); @@ -33,10 +33,10 @@ public class DigesterRTFContextFields { /** * Load XML configFileName file and return RTFContextFields. - * @param configFile - * @return RTFContextFields - * @throws SAXException - * @throws IOException + * @param configFile the configFile. + * @return RTFContextFields. + * @throws SAXException the exception. + * @throws IOException the exception. */ public static RTFContextFields getRTFContextFields(File configFile) throws SAXException, IOException { return getRTFContextFields(new FileInputStream(configFile)); @@ -45,10 +45,10 @@ public class DigesterRTFContextFields { /** * Load XML configFileName file and return RTFContextFields. - * @param inputStream - * @return RTFContextFields - * @throws SAXException - * @throws IOException + * @param inputStream the inputStream. + * @return RTFContextFields. + * @throws SAXException the exception. + * @throws IOException the exception. */ public static RTFContextFields getRTFContextFields(InputStream inputStream) throws SAXException, IOException { Digester digester = new Digester(); diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/RTFContextUtil.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/RTFContextUtil.java index 24889e4d..a8fd20b7 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/RTFContextUtil.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/RTFContextUtil.java @@ -23,8 +23,8 @@ public class RTFContextUtil { /** * return true if objectType is list and false otherwise * - * @param objectType - * @return + * @param o the 'o'. + * @return the result. */ public static boolean isList(Object o) { return o instanceof Collection; diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/FormatBase.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/FormatBase.java index 7d1fef9a..9ad4a3e1 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/FormatBase.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/FormatBase.java @@ -18,8 +18,9 @@ public class FormatBase { /** * Convert image data if necessary - for example when format is not supported by rtf. * - * @param data Image - * @param type Format type + * @param format the format type. + * @param data image. + * @return the result. */ public FormatBase convert(FormatBase format, byte[] data) { return format; diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/ImageConstants.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/ImageConstants.java index 13249fe0..dc29c207 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/ImageConstants.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/ImageConstants.java @@ -28,7 +28,7 @@ package net.sourceforge.rtf.context.image; /** Here will be defined all supported image formats. - * This class belongs to the tag processing. + * This class belongs to the <fo:external-graphic> tag processing. * @author a.putz@skynamics.com (Andreas Putz) */ diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/ImageUtil.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/ImageUtil.java index 276c32b7..88ac70cd 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/ImageUtil.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/context/image/ImageUtil.java @@ -27,7 +27,7 @@ package net.sourceforge.rtf.context.image; /** Misc.utilities for images handling - * This class belongs to the tag processing. + * This class belongs to the <fo:external-graphic> tag processing. * @author Andreas Putz */ public class ImageUtil { diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/RTFBookmark.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/RTFBookmark.java index 3ff86703..8523d4a2 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/RTFBookmark.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/RTFBookmark.java @@ -35,7 +35,7 @@ public abstract class RTFBookmark extends RTFElement { * Return name of Bookmark. * eg : for RTF code bookmark {\*\bkmkstart MY_BOOKMARK }{\*\bkmkend MY_BOOKMARK } * this getter return MY_BOOKMARK. - * @return + * @return the result. */ public String getName() { if (name == null) { @@ -58,7 +58,7 @@ public abstract class RTFBookmark extends RTFElement { /** * Set velocity name list (eg : $item_myList) - * @param velocityNameList + * @param velocityNameList the velocity name list. */ public void setItemNameList(String velocityNameList) { this.itemNameList = velocityNameList; diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/RTFElement.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/RTFElement.java index 788e3324..b2995a30 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/RTFElement.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/RTFElement.java @@ -99,8 +99,8 @@ public class RTFElement { } /** - * Replace element of RTFElement by String - * @param content + * Replace element of RTFElement by String <content> + * @param content the content. */ public void replaceElement(String content) { this.elementList = new Vector(); @@ -112,7 +112,7 @@ public class RTFElement { * Retourne le code RTF d'un element RTF simple, * autrement dit qui ne contient pas d'autres element RTF * (ex : Champs..) - * @return + * @return the result. */ public String getRTFContentOfSimpleElement() { Vector elementList = getElementList(); @@ -145,10 +145,10 @@ public class RTFElement { /** * Retourne la chaine comprise entre startToken et endToken * du contenu RTF rtfContent. - * @param rtfContent - * @param startToken - * @param endToken - * @return + * @param rtfContent the rtfContent. + * @param startToken the startToken. + * @param endToken the endToken. + * @return the result. */ protected String getElementTextBetween(String rtfContent, String startToken, String endToken) { if (rtfContent != null) { diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/transformer/config/DigesterTransformerConfig.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/transformer/config/DigesterTransformerConfig.java index 6ac3d797..96cb1f3a 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/transformer/config/DigesterTransformerConfig.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/transformer/config/DigesterTransformerConfig.java @@ -23,9 +23,9 @@ public class DigesterTransformerConfig { /** * Load XML transformer-config.xml and return TransformerConfig. - * @return TransformerConfig - * @throws SAXException - * @throws IOException + * @return TransformerConfig. + * @throws SAXException the exception. + * @throws IOException the exception. */ public static TransformerConfig getTransformerConfig() throws SAXException, IOException { InputStream inputStream = DigesterTransformerConfig.class.getResourceAsStream(DEFAULT_XML_TRANSFORMER_CONFIG); @@ -34,10 +34,10 @@ public class DigesterTransformerConfig { /** * Load XML configFileName file name and return TransformerConfig. - * @param configFileName - * @return TransformerConfig - * @throws SAXException - * @throws IOException + * @param configFileName the configFileName. + * @return TransformerConfig. + * @throws SAXException the exception. + * @throws IOException the exception. */ public static TransformerConfig getTransformerConfig(String configFileName) throws SAXException, IOException { return getTransformerConfig(new File(configFileName)); @@ -45,10 +45,10 @@ public class DigesterTransformerConfig { /** * Load XML configFileName file and return TransformerConfig. - * @param configFile - * @return TransformerConfig - * @throws SAXException - * @throws IOException + * @param configFile the configFile + * @return TransformerConfig. + * @throws SAXException the exception. + * @throws IOException the exception. */ public static TransformerConfig getTransformerConfig(File configFile) throws SAXException, IOException { return getTransformerConfig(new FileInputStream(configFile)); @@ -57,10 +57,10 @@ public class DigesterTransformerConfig { /** * Load XML configFileName file and return TransformerConfig. - * @param inputStream - * @return TransformerConfig - * @throws SAXException - * @throws IOException + * @param inputStream the inputStream. + * @return TransformerConfig. + * @throws SAXException the exception. + * @throws IOException the exception. */ public static TransformerConfig getTransformerConfig(InputStream inputStream) throws SAXException, IOException { Digester digester = new Digester(); @@ -76,7 +76,7 @@ public class DigesterTransformerConfig { /** * Test for loading TransformerConfig with digester. - * @param args + * @param args the args. */ public static void main(String[] args) { try { diff --git a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/transformer/config/TransformerConfig.java b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/transformer/config/TransformerConfig.java index 752c5452..de515815 100644 --- a/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/transformer/config/TransformerConfig.java +++ b/voila-runtime-rtftemplate/src/main/java/net/sourceforge/rtf/document/transformer/config/TransformerConfig.java @@ -2,14 +2,12 @@ package net.sourceforge.rtf.document.transformer.config; /** * This class manage Pattern used for : - *