You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(4) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(2) |
Feb
(19) |
Mar
(20) |
Apr
(20) |
May
|
Jun
(3) |
Jul
|
Aug
(23) |
Sep
(2) |
Oct
(5) |
Nov
(58) |
Dec
(49) |
2012 |
Jan
(11) |
Feb
(20) |
Mar
(9) |
Apr
(19) |
May
(14) |
Jun
(42) |
Jul
(13) |
Aug
|
Sep
(6) |
Oct
(6) |
Nov
(22) |
Dec
(66) |
2013 |
Jan
(12) |
Feb
(28) |
Mar
(54) |
Apr
(21) |
May
(7) |
Jun
(69) |
Jul
(80) |
Aug
(7) |
Sep
(12) |
Oct
(145) |
Nov
(44) |
Dec
(25) |
2014 |
Jan
(33) |
Feb
(21) |
Mar
(19) |
Apr
(2) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <wa...@us...> - 2014-06-23 14:06:14
|
Revision: 1599 http://sourceforge.net/p/webassembletool/code/1599 Author: waddle Date: 2014-06-23 14:06:11 +0000 (Mon, 23 Jun 2014) Log Message: ----------- jahia is commiter, not integrator Modified Paths: -------------- tools/trunk/esigate-website/src/main/resources/modules/content/support_en.html Modified: tools/trunk/esigate-website/src/main/resources/modules/content/support_en.html =================================================================== --- tools/trunk/esigate-website/src/main/resources/modules/content/support_en.html 2014-06-23 14:04:11 UTC (rev 1598) +++ tools/trunk/esigate-website/src/main/resources/modules/content/support_en.html 2014-06-23 14:06:11 UTC (rev 1599) @@ -73,8 +73,8 @@ <p>Jahia is an ESIGate contributor and has made one of the most advanced integration with its Portal Factory solution, allowing you to seamlessly integrate your business applications with Jahia software.</p> <p> <span class="badge badge-notice" - title="Intégrateur"><i - class="icon-ok-sign icon-white"></i> Integrator</span> + title="ESIGate committer"><i + class="icon-ok-sign icon-white"></i> Committer</span> <a href="http://www.jahia.com">Contact...</a> </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2014-06-23 14:04:18
|
Revision: 1598 http://sourceforge.net/p/webassembletool/code/1598 Author: waddle Date: 2014-06-23 14:04:11 +0000 (Mon, 23 Jun 2014) Log Message: ----------- Jahia is commiter, not integrator Modified Paths: -------------- tools/trunk/esigate-website/src/main/resources/modules/content/support_fr.html Modified: tools/trunk/esigate-website/src/main/resources/modules/content/support_fr.html =================================================================== --- tools/trunk/esigate-website/src/main/resources/modules/content/support_fr.html 2014-06-12 08:22:46 UTC (rev 1597) +++ tools/trunk/esigate-website/src/main/resources/modules/content/support_fr.html 2014-06-23 14:04:11 UTC (rev 1598) @@ -83,8 +83,8 @@ <p>Jahia est contributeur du projet Esigate et en a fait une des intégrations les plus poussées à ce jour dans son offre Portal Factory pour permettre l’agrégation non-intrusive d’applications métier.</p> <p> <span class="badge badge-notice" - title="Intégrateur"><i - class="icon-ok-sign icon-white"></i> Intégrateur</span> + title="Commiter"><i + class="icon-ok-sign icon-white"></i> Commiter</span> <a href="http://www.jahia.com">Contact...</a> </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2014-06-12 08:22:56
|
Revision: 1597 http://sourceforge.net/p/webassembletool/code/1597 Author: waddle Date: 2014-06-12 08:22:46 +0000 (Thu, 12 Jun 2014) Log Message: ----------- adding jahia as a contributor Modified Paths: -------------- tools/trunk/esigate-website/src/main/resources/modules/content/logo.html tools/trunk/esigate-website/src/main/resources/modules/content/support_en.html tools/trunk/esigate-website/src/main/resources/modules/content/support_fr.html tools/trunk/esigate-website/src/main/resources/pages/website/js/users.js Added Paths: ----------- tools/trunk/esigate-website/src/main/resources/pages/website/img/users/jahia.png tools/trunk/esigate-website/src/main/resources/pages/website/support/jahia.png Modified: tools/trunk/esigate-website/src/main/resources/modules/content/logo.html =================================================================== --- tools/trunk/esigate-website/src/main/resources/modules/content/logo.html 2014-04-17 08:05:40 UTC (rev 1596) +++ tools/trunk/esigate-website/src/main/resources/modules/content/logo.html 2014-06-12 08:22:46 UTC (rev 1597) @@ -3,7 +3,7 @@ <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> </div> <div class="span9"> - <div class="pull-right"><p><!--$beginparam$i18n.version$-->Version<!--$endparam$i18n.version$--> 4.2</p> + <div class="pull-right"><p><!--$beginparam$i18n.version$-->Version<!--$endparam$i18n.version$--> 4.3</p> <!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> <!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> <!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> @@ -44,4 +44,4 @@ </div> </div> </div> - </div> \ No newline at end of file + </div> Modified: tools/trunk/esigate-website/src/main/resources/modules/content/support_en.html =================================================================== --- tools/trunk/esigate-website/src/main/resources/modules/content/support_en.html 2014-04-17 08:05:40 UTC (rev 1596) +++ tools/trunk/esigate-website/src/main/resources/modules/content/support_en.html 2014-06-12 08:22:46 UTC (rev 1597) @@ -63,4 +63,21 @@ </p> </div> </div> +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/jahia.png" /> + </div> + <div class="span8"> + <p>Founded in 2002 and located in Geneva (Switzerland), Jahia Solutions Group is a open source software company. Jahia is deployed in France, Austria, Germany, Canada and USA. Hundred of governmental organizations and companies are using Jahia in more than 20 countries all over the world.</p> + <p>Jahia is an ESIGate contributor and has made one of the most advanced integration with its Portal Factory solution, allowing you to seamlessly integrate your business applications with Jahia software.</p> + <p> + <span class="badge badge-notice" + title="Intégrateur"><i + class="icon-ok-sign icon-white"></i> Integrator</span> + + <a href="http://www.jahia.com">Contact...</a> + </p> + </div> +</div> + Modified: tools/trunk/esigate-website/src/main/resources/modules/content/support_fr.html =================================================================== --- tools/trunk/esigate-website/src/main/resources/modules/content/support_fr.html 2014-04-17 08:05:40 UTC (rev 1596) +++ tools/trunk/esigate-website/src/main/resources/modules/content/support_fr.html 2014-06-12 08:22:46 UTC (rev 1597) @@ -73,4 +73,20 @@ </p> </div> </div> +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/jahia.png" /> + </div> + <div class="span8"> + <p>Créé en 2002 et basé à Genève (Suisse), Jahia Solutions Group est un éditeur de solutions open source pour entreprises. L’entreprise est présente en France, Autriche, Allemagne, au Canada et aux USA. Des centaines de marques globales et d’organisations gouvernementales utilisent ses solutions dans plus de 20 pays dans le monde.</p> + <p>Jahia est contributeur du projet Esigate et en a fait une des intégrations les plus poussées à ce jour dans son offre Portal Factory pour permettre l’agrégation non-intrusive d’applications métier.</p> + <p> + <span class="badge badge-notice" + title="Intégrateur"><i + class="icon-ok-sign icon-white"></i> Intégrateur</span> + + <a href="http://www.jahia.com">Contact...</a> + </p> + </div> +</div> Added: tools/trunk/esigate-website/src/main/resources/pages/website/img/users/jahia.png =================================================================== (Binary files differ) Index: tools/trunk/esigate-website/src/main/resources/pages/website/img/users/jahia.png =================================================================== --- tools/trunk/esigate-website/src/main/resources/pages/website/img/users/jahia.png 2014-04-17 08:05:40 UTC (rev 1596) +++ tools/trunk/esigate-website/src/main/resources/pages/website/img/users/jahia.png 2014-06-12 08:22:46 UTC (rev 1597) Property changes on: tools/trunk/esigate-website/src/main/resources/pages/website/img/users/jahia.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: tools/trunk/esigate-website/src/main/resources/pages/website/js/users.js =================================================================== --- tools/trunk/esigate-website/src/main/resources/pages/website/js/users.js 2014-04-17 08:05:40 UTC (rev 1596) +++ tools/trunk/esigate-website/src/main/resources/pages/website/js/users.js 2014-06-12 08:22:46 UTC (rev 1597) @@ -66,7 +66,12 @@ "title": "Reunica", "url": "http://www.reunica.com", "weight": Math.random() - }]; + }, { + "img": "jahia.png", + "title": "Jahia", + "url": "http://www.jahia.com", + "weight": Math.random() + }]; users.sort(function(a,b) { return parseFloat(a.weight) - parseFloat(b.weight) } ); Added: tools/trunk/esigate-website/src/main/resources/pages/website/support/jahia.png =================================================================== (Binary files differ) Index: tools/trunk/esigate-website/src/main/resources/pages/website/support/jahia.png =================================================================== --- tools/trunk/esigate-website/src/main/resources/pages/website/support/jahia.png 2014-04-17 08:05:40 UTC (rev 1596) +++ tools/trunk/esigate-website/src/main/resources/pages/website/support/jahia.png 2014-06-12 08:22:46 UTC (rev 1597) Property changes on: tools/trunk/esigate-website/src/main/resources/pages/website/support/jahia.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-04-17 08:05:43
|
Revision: 1596 http://sourceforge.net/p/webassembletool/code/1596 Author: athaveau Date: 2014-04-17 08:05:40 +0000 (Thu, 17 Apr 2014) Log Message: ----------- #305 : hot reload variables Modified Paths: -------------- trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java trunk/esigate-core/src/main/java/org/esigate/vars/VariablesResolver.java Modified: trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java 2014-04-14 11:42:15 UTC (rev 1595) +++ trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java 2014-04-17 08:05:40 UTC (rev 1596) @@ -17,6 +17,7 @@ import org.esigate.Driver; import org.esigate.DriverFactory; import org.esigate.util.Parameter; +import org.esigate.vars.VariablesResolver; import org.esigate.util.ParameterLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,7 +57,9 @@ protected static final Logger LOG = LoggerFactory.getLogger(ConfigReloadOnChange.class); private static File configuration = null; - private static long lastModified = -1; + private static File variables = null; + private static long configLastModified = -1; + private static long varsLastModified = -1; private static long delay = DEFAULT_RELOAD_DELAY; // this variable will be used in the future, when extension supports @@ -67,9 +70,10 @@ @Override public void run() { while (!stop) { + // configuration if (configuration != null && configuration.exists()) { - if (configuration.lastModified() != lastModified) { - lastModified = configuration.lastModified(); + if (configuration.lastModified() != configLastModified) { + configLastModified = configuration.lastModified(); // Reload LOG.warn("Configuration file changed : reloading."); @@ -77,6 +81,17 @@ } } + // variables + if (variables != null && variables.exists()){ + if (variables.lastModified() != varsLastModified) { + varsLastModified = variables.lastModified(); + + // Reload + LOG.warn("Variables file changed : reloading."); + VariablesResolver.configure(); + } + } + // Wait before checking again try { Thread.sleep(delay); @@ -133,9 +148,23 @@ } if (configuration != null && configuration.exists()) { - lastModified = configuration.lastModified(); + configLastModified = configuration.lastModified(); } + // variables + URL variablesUrl = VariablesResolver.getVariablessUrl(); + if (variablesUrl != null && "file".equalsIgnoreCase(variablesUrl.getProtocol())) { + try { + variables = new File(variablesUrl.toURI()); + } catch (URISyntaxException e) { + LOG.error("Unable to access variables file", e); + } + } + + if (variables != null && variables.exists()) { + varsLastModified = variables.lastModified(); + } + // Start watcher fileWatcher.start(); } Modified: trunk/esigate-core/src/main/java/org/esigate/vars/VariablesResolver.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/vars/VariablesResolver.java 2014-04-14 11:42:15 UTC (rev 1595) +++ trunk/esigate-core/src/main/java/org/esigate/vars/VariablesResolver.java 2014-04-17 08:05:40 UTC (rev 1596) @@ -15,12 +15,6 @@ package org.esigate.vars; -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - import org.apache.commons.lang3.StringUtils; import org.apache.http.cookie.Cookie; import org.esigate.ConfigurationException; @@ -32,6 +26,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * Manage variables replacement. * @@ -56,9 +57,16 @@ } /** + * Loads variables from properties + */ + public static void configure(Properties props) { + properties = props; + } + + /** * Loads variables according to default configuration file org/esigate/vars.properties. */ - private static void configure() { + public static void configure() { InputStream inputStream = null; try { LOG.debug("Loading esigate-vars.properties file"); @@ -84,6 +92,17 @@ } /** + * @return The URL of the variables file. + */ + public static URL getVariablessUrl() { + URL varsUrl = Driver.class.getResource("/esigate-vars.properties"); + if (varsUrl == null){ + varsUrl = Driver.class.getResource("vars.properties"); + } + return varsUrl; + } + + /** * Regexp to find variables */ private static final Pattern VAR_PATTERN = Pattern.compile("\\$\\((.*?)\\)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-04-14 11:42:19
|
Revision: 1595 http://sourceforge.net/p/webassembletool/code/1595 Author: athaveau Date: 2014-04-14 11:42:15 +0000 (Mon, 14 Apr 2014) Log Message: ----------- Add method to retrieve driver instances Modified Paths: -------------- trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java Modified: trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java 2014-03-28 14:50:29 UTC (rev 1594) +++ trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java 2014-04-14 11:42:15 UTC (rev 1595) @@ -15,13 +15,21 @@ package org.esigate; -import static org.apache.commons.lang3.StringUtils.defaultIfBlank; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; +import org.apache.http.HttpStatus; +import org.esigate.Driver.DriverBuilder; +import org.esigate.impl.IndexedInstances; +import org.esigate.impl.UriMapping; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; +import java.util.Collection; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; @@ -29,14 +37,7 @@ import java.util.Properties; import java.util.Set; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.apache.commons.lang3.tuple.Pair; -import org.apache.http.HttpStatus; -import org.esigate.Driver.DriverBuilder; -import org.esigate.impl.IndexedInstances; -import org.esigate.impl.UriMapping; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import static org.apache.commons.lang3.StringUtils.defaultIfBlank; /** * Factory class used to configure and retrieve {@linkplain Driver} INSTANCIES. @@ -66,7 +67,17 @@ // Do not instantiate } + /** + * + * @return All configured driver + */ + public static Collection<Driver> getInstances(){ + DriverFactory.ensureConfigured(); + return instances.getInstances().values(); + + } + /** * Loads all instances according to default configuration file. */ public static void configure() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-28 14:50:32
|
Revision: 1594 http://sourceforge.net/p/webassembletool/code/1594 Author: athaveau Date: 2014-03-28 14:50:29 +0000 (Fri, 28 Mar 2014) Log Message: ----------- Checkstyle Modified Paths: -------------- trunk/esigate-core/src/main/java/org/esigate/parser/ParserContext.java trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElement.java trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElementType.java trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParser.java trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContext.java trunk/esigate-core/src/main/java/org/esigate/parser/future/UnknownElement.java Modified: trunk/esigate-core/src/main/java/org/esigate/parser/ParserContext.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/ParserContext.java 2014-03-28 10:40:32 UTC (rev 1593) +++ trunk/esigate-core/src/main/java/org/esigate/parser/ParserContext.java 2014-03-28 14:50:29 UTC (rev 1594) @@ -34,7 +34,7 @@ HttpResponse getHttpResponse(); /** - * @param e + * @param e exception * @return <code>true</code> if error has been handled by this element and it should not be propagated further. */ boolean reportError(Exception e); @@ -43,7 +43,11 @@ <T> T findAncestor(Class<T> type); - /** Writes characters into current writer. */ + /** + * Writes characters into current writer. + * @param cs sequence + * @throws IOException exception + */ void characters(CharSequence cs) throws IOException; } Modified: trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElement.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElement.java 2014-03-28 10:40:32 UTC (rev 1593) +++ trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElement.java 2014-03-28 14:50:29 UTC (rev 1594) @@ -20,7 +20,7 @@ import java.io.IOException; /** - * NullObject pattern to handle unknown tag + * Handle unknown tag. * @author Alexis Thaveau */ public class UnknownElement implements Element { Modified: trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElementType.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElementType.java 2014-03-28 10:40:32 UTC (rev 1593) +++ trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElementType.java 2014-03-28 14:50:29 UTC (rev 1594) @@ -16,7 +16,7 @@ package org.esigate.parser; /** - * NullObject pattern to handle unknown tag type + * Handle unknown tag type. * * @author Alexis thaveau */ Modified: trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParser.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParser.java 2014-03-28 10:40:32 UTC (rev 1593) +++ trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParser.java 2014-03-28 14:50:29 UTC (rev 1594) @@ -26,7 +26,6 @@ import org.apache.http.HttpResponse; import org.esigate.HttpErrorPage; import org.esigate.impl.DriverRequest; -import org.esigate.parser.UnknownElementType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Modified: trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContext.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContext.java 2014-03-28 10:40:32 UTC (rev 1593) +++ trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContext.java 2014-03-28 14:50:29 UTC (rev 1594) @@ -52,14 +52,18 @@ /** * Allow to get custom context data. * - * @param key + * @param key key * @return custom context data */ Object getData(String key); - /** Writes characters into current writer. */ + /** + * Writes characters into current writer. + * @param csq sequence + * @throws IOException exception + */ void characters(Future<CharSequence> csq) throws IOException; } Modified: trunk/esigate-core/src/main/java/org/esigate/parser/future/UnknownElement.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/future/UnknownElement.java 2014-03-28 10:40:32 UTC (rev 1593) +++ trunk/esigate-core/src/main/java/org/esigate/parser/future/UnknownElement.java 2014-03-28 14:50:29 UTC (rev 1594) @@ -15,21 +15,19 @@ package org.esigate.parser.future; import org.esigate.HttpErrorPage; -import org.esigate.parser.future.CharSequenceFuture; -import org.esigate.parser.future.FutureElement; -import org.esigate.parser.future.FutureElementType; -import org.esigate.parser.future.FutureParserContext; import java.io.IOException; import java.util.concurrent.Future; /** - * NullObject pattern to handle unknown tag + * Handle unknown tag. * * @author Alexis thaveau */ public class UnknownElement implements FutureElement { - + /*** + * UnknownElement type. + */ public static final FutureElementType TYPE = new FutureElementType() { private final UnknownElement instance = new UnknownElement(); @@ -52,6 +50,7 @@ @Override public void onTagStart(String tag, FutureParserContext ctx) throws IOException, HttpErrorPage { + ctx.characters(new CharSequenceFuture(tag)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-28 10:40:37
|
Revision: 1593 http://sourceforge.net/p/webassembletool/code/1593 Author: athaveau Date: 2014-03-28 10:40:32 +0000 (Fri, 28 Mar 2014) Log Message: ----------- Handle unknown tag with NullObject pattern. Modified Paths: -------------- trunk/esigate-app-aggregated1/src/main/webapp/template.html trunk/esigate-app-aggregated1/src/main/webapp/templatewithvariables.html trunk/esigate-app-aggregator/src/test/resources/template.html trunk/esigate-core/src/main/java/org/esigate/parser/Parser.java trunk/esigate-core/src/main/java/org/esigate/parser/ParserContext.java trunk/esigate-core/src/main/java/org/esigate/parser/ParserContextImpl.java trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParser.java trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContext.java trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContextImpl.java trunk/esigate-core/src/test/java/org/esigate/esi/BaseElementTest.java trunk/esigate-core/src/test/java/org/esigate/extension/parallelesi/BaseElementTest.java Added Paths: ----------- trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElement.java trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElementType.java trunk/esigate-core/src/main/java/org/esigate/parser/future/UnknownElement.java Modified: trunk/esigate-app-aggregated1/src/main/webapp/template.html =================================================================== --- trunk/esigate-app-aggregated1/src/main/webapp/template.html 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-app-aggregated1/src/main/webapp/template.html 2014-03-28 10:40:32 UTC (rev 1593) @@ -3,6 +3,7 @@ <!--$beginput$content$--> <div style="background-color: yellow"> Some text from aggregated1 +<!--$unknowntag$aggregated2$block.html$myblock$--><!--$unknowntag$--> </div> <!--$endput$--> <!--$endincludetemplate$--> Modified: trunk/esigate-app-aggregated1/src/main/webapp/templatewithvariables.html =================================================================== --- trunk/esigate-app-aggregated1/src/main/webapp/templatewithvariables.html 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-app-aggregated1/src/main/webapp/templatewithvariables.html 2014-03-28 10:40:32 UTC (rev 1593) @@ -3,6 +3,7 @@ <!--$beginput$content$--> <div style="background-color: yellow"> Some text from aggregated1 +<!--$unknowntag$aggregated2$block.html$myblock$--><!--$unknowntag$--> </div> <!--$endput$--> <!--$endincludetemplate$--> Modified: trunk/esigate-app-aggregator/src/test/resources/template.html =================================================================== --- trunk/esigate-app-aggregator/src/test/resources/template.html 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-app-aggregator/src/test/resources/template.html 2014-03-28 10:40:32 UTC (rev 1593) @@ -9,6 +9,7 @@ <div style="background-color: yellow"> Some text from aggregated1 +<!--$unknowntag$aggregated2$block.html$myblock$--><!--$unknowntag$--> </div> </body> Modified: trunk/esigate-core/src/main/java/org/esigate/parser/Parser.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/Parser.java 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-core/src/main/java/org/esigate/parser/Parser.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -16,6 +16,8 @@ package org.esigate.parser; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -28,7 +30,7 @@ public class Parser { private static final Logger LOG = LoggerFactory.getLogger(Parser.class); private final Pattern pattern; - private final ElementType[] elementTypes; + private final List<ElementType> elementTypes; private DriverRequest httpRequest; private HttpResponse httpResponse; @@ -42,7 +44,12 @@ */ public Parser(Pattern pattern, ElementType... elementTypes) { this.pattern = pattern; - this.elementTypes = elementTypes; + this.elementTypes = new ArrayList<ElementType>(elementTypes.length + 1); + for (ElementType elementType : elementTypes) { + this.elementTypes.add(elementType); + } + this.elementTypes.add(new UnknownElementType()); + } /** @@ -77,17 +84,12 @@ break; } } - if (type != null) { - Element element = type.newInstance(); - ctx.startElement(type, element, tag); - if (element.isClosed()) { - ctx.endElement(tag); - } - } else { - // if no element matches, we just ignore it and write it to - // the output - ctx.characters(tag); + Element element = type.newInstance(); + ctx.startElement(type, element, tag); + if (element.isClosed()) { + ctx.endElement(tag); } + } } // we reached the end of input Modified: trunk/esigate-core/src/main/java/org/esigate/parser/ParserContext.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/ParserContext.java 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-core/src/main/java/org/esigate/parser/ParserContext.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -18,6 +18,8 @@ import org.apache.http.HttpResponse; import org.esigate.impl.DriverRequest; +import java.io.IOException; + /** * The current context used during parsing. * @@ -40,4 +42,8 @@ Element getCurrent(); <T> T findAncestor(Class<T> type); + + /** Writes characters into current writer. */ + void characters(CharSequence cs) throws IOException; + } Modified: trunk/esigate-core/src/main/java/org/esigate/parser/ParserContextImpl.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/ParserContextImpl.java 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-core/src/main/java/org/esigate/parser/ParserContextImpl.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -89,7 +89,7 @@ } /** Writes characters into current writer. */ - void characters(CharSequence cs) throws IOException { + public void characters(CharSequence cs) throws IOException { characters(cs, 0, cs.length()); } Added: trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElement.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElement.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElement.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -0,0 +1,52 @@ +/* + * 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 org.esigate.parser; + +import org.esigate.HttpErrorPage; + +import java.io.IOException; + +/** + * NullObject pattern to handle unknown tag + * @author Alexis Thaveau + */ +public class UnknownElement implements Element { + @Override + public void onTagStart(String tag, ParserContext ctx) throws IOException, HttpErrorPage { + //Write content in parent element + ctx.characters(tag); + } + + @Override + public void onTagEnd(String tag, ParserContext ctx) throws IOException, HttpErrorPage { + + } + + @Override + public boolean onError(Exception e, ParserContext ctx) { + return false; + } + + @Override + public void characters(CharSequence csq, int start, int end) throws IOException { + throw new UnsupportedOperationException("characters are appended in onTagStart method"); + } + + @Override + public boolean isClosed() { + return true; + } +} Added: trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElementType.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElementType.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/parser/UnknownElementType.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -0,0 +1,43 @@ +/* + * 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 org.esigate.parser; + +/** + * NullObject pattern to handle unknown tag type + * + * @author Alexis thaveau + */ +public class UnknownElementType implements ElementType { + /** + * singleton + */ + private static final UnknownElement INSTANCE = new UnknownElement(); + + @Override + public boolean isStartTag(String tag) { + return true; + } + + @Override + public boolean isEndTag(String tag) { + return false; + } + + @Override + public Element newInstance() { + return UnknownElementType.INSTANCE; + } +} Modified: trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParser.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParser.java 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParser.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -16,7 +16,9 @@ package org.esigate.parser.future; import java.io.IOException; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -24,6 +26,7 @@ import org.apache.http.HttpResponse; import org.esigate.HttpErrorPage; import org.esigate.impl.DriverRequest; +import org.esigate.parser.UnknownElementType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -37,7 +40,7 @@ public class FutureParser { private static final Logger LOG = LoggerFactory.getLogger(FutureParser.class); private final Pattern pattern; - private final FutureElementType[] elementTypes; + private final List<FutureElementType> elementTypes; private DriverRequest httpRequest; private HttpResponse httpResponse; private Map<String, Object> data = null; @@ -52,7 +55,11 @@ */ public FutureParser(Pattern pattern, FutureElementType... elementTypes) { this.pattern = pattern; - this.elementTypes = elementTypes; + this.elementTypes = new ArrayList<FutureElementType>(elementTypes.length + 1); + for (FutureElementType elementType : elementTypes) { + this.elementTypes.add(elementType); + } + this.elementTypes.add(UnknownElement.TYPE); } /** @@ -87,16 +94,10 @@ break; } } - if (type != null) { - FutureElement element = type.newInstance(); - ctx.startElement(type, element, tag); - if (element.isClosed()) { - ctx.endElement(tag); - } - } else { - // if no element matches, we just ignore it and write it to - // the output - ctx.characters(new CharSequenceFuture(tag)); + FutureElement element = type.newInstance(); + ctx.startElement(type, element, tag); + if (element.isClosed()) { + ctx.endElement(tag); } } } Modified: trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContext.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContext.java 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContext.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -18,6 +18,9 @@ import org.apache.http.HttpResponse; import org.esigate.impl.DriverRequest; +import java.io.IOException; +import java.util.concurrent.Future; + /** * The current context used during parsing. * <p> @@ -54,4 +57,9 @@ */ Object getData(String key); + + + /** Writes characters into current writer. */ + void characters(Future<CharSequence> csq) throws IOException; + } Modified: trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContextImpl.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContextImpl.java 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-core/src/main/java/org/esigate/parser/future/FutureParserContextImpl.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -101,7 +101,7 @@ } /** Writes characters into current writer. */ - void characters(Future<CharSequence> csq) throws IOException { + public void characters(Future<CharSequence> csq) throws IOException { getCurrent().characters(csq); } Added: trunk/esigate-core/src/main/java/org/esigate/parser/future/UnknownElement.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/parser/future/UnknownElement.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/parser/future/UnknownElement.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -0,0 +1,82 @@ +/* + * 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 org.esigate.parser.future; + +import org.esigate.HttpErrorPage; +import org.esigate.parser.future.CharSequenceFuture; +import org.esigate.parser.future.FutureElement; +import org.esigate.parser.future.FutureElementType; +import org.esigate.parser.future.FutureParserContext; + +import java.io.IOException; +import java.util.concurrent.Future; + +/** + * NullObject pattern to handle unknown tag + * + * @author Alexis thaveau + */ +public class UnknownElement implements FutureElement { + + public static final FutureElementType TYPE = new FutureElementType() { + + private final UnknownElement instance = new UnknownElement(); + + @Override + public boolean isStartTag(String tag) { + return true; + } + + @Override + public boolean isEndTag(String tag) { + return false; + } + + @Override + public FutureElement newInstance() { + return instance; + } + }; + + @Override + public void onTagStart(String tag, FutureParserContext ctx) throws IOException, HttpErrorPage { + ctx.characters(new CharSequenceFuture(tag)); + } + + @Override + public void onTagEnd(String tag, FutureParserContext ctx) throws IOException, HttpErrorPage { + + } + + @Override + public boolean onError(Exception e, FutureParserContext ctx) { + return false; + } + + @Override + public void characters(Future<CharSequence> csq) throws IOException { + throw new UnsupportedOperationException("characters are appended in onTagStart method"); + } + + @Override + public boolean isClosed() { + return true; + } + + @Override + public FutureElement getParent() { + return null; + } +} Modified: trunk/esigate-core/src/test/java/org/esigate/esi/BaseElementTest.java =================================================================== --- trunk/esigate-core/src/test/java/org/esigate/esi/BaseElementTest.java 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-core/src/test/java/org/esigate/esi/BaseElementTest.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -22,6 +22,8 @@ import org.esigate.parser.Element; import org.esigate.parser.ParserContext; +import java.io.IOException; + public class BaseElementTest extends TestCase { public void testOnTagStart() throws Exception { @@ -97,5 +99,10 @@ return null; } + @Override + public void characters(CharSequence cs) throws IOException { + + } + } } Modified: trunk/esigate-core/src/test/java/org/esigate/extension/parallelesi/BaseElementTest.java =================================================================== --- trunk/esigate-core/src/test/java/org/esigate/extension/parallelesi/BaseElementTest.java 2014-03-28 09:05:40 UTC (rev 1592) +++ trunk/esigate-core/src/test/java/org/esigate/extension/parallelesi/BaseElementTest.java 2014-03-28 10:40:32 UTC (rev 1593) @@ -22,6 +22,9 @@ import org.esigate.parser.future.FutureElement; import org.esigate.parser.future.FutureParserContext; +import java.io.IOException; +import java.util.concurrent.Future; + public class BaseElementTest extends TestCase { public void testOnTagStart() throws Exception { @@ -101,5 +104,10 @@ public Object getData(String key) { return null; } + + @Override + public void characters(Future<CharSequence> csq) throws IOException { + + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-28 09:05:43
|
Revision: 1592 http://sourceforge.net/p/webassembletool/code/1592 Author: athaveau Date: 2014-03-28 09:05:40 +0000 (Fri, 28 Mar 2014) Log Message: ----------- Metric extension Modified Paths: -------------- trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java Modified: trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-27 16:02:11 UTC (rev 1591) +++ trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-28 09:05:40 UTC (rev 1592) @@ -57,12 +57,11 @@ @Override public void init(Driver d, Properties properties) { + this.driver = d; LOG.debug("Initialize Metric"); driver.getEventManager().register(EventManager.EVENT_PROXY_POST, this); driver.getEventManager().register(EventManager.EVENT_FETCH_POST, this); - this.driver = d; - reporter = Slf4jReporter .forRegistry(this.metric) .outputTo(LOG) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-27 16:02:13
|
Revision: 1591 http://sourceforge.net/p/webassembletool/code/1591 Author: athaveau Date: 2014-03-27 16:02:11 +0000 (Thu, 27 Mar 2014) Log Message: ----------- #299 : always enable temporary cache and fix the cache key to avoid driver conflicts Modified Paths: -------------- trunk/esigate-app-aggregator/src/test/java/org/esigate/test/cases/AggregatorTest.java trunk/esigate-core/src/main/java/org/esigate/Driver.java trunk/esigate-core/src/main/java/org/esigate/http/ResourceUtils.java Added Paths: ----------- trunk/esigate-app-aggregated1/src/main/webapp/block1.html trunk/esigate-app-aggregated1/src/main/webapp/blocks.html trunk/esigate-app-aggregated2/src/main/webapp/block1.html trunk/esigate-app-aggregator/src/test/resources/blocks.html Added: trunk/esigate-app-aggregated1/src/main/webapp/block1.html =================================================================== --- trunk/esigate-app-aggregated1/src/main/webapp/block1.html (rev 0) +++ trunk/esigate-app-aggregated1/src/main/webapp/block1.html 2014-03-27 16:02:11 UTC (rev 1591) @@ -0,0 +1 @@ +aggregated1 \ No newline at end of file Added: trunk/esigate-app-aggregated1/src/main/webapp/blocks.html =================================================================== --- trunk/esigate-app-aggregated1/src/main/webapp/blocks.html (rev 0) +++ trunk/esigate-app-aggregated1/src/main/webapp/blocks.html 2014-03-27 16:02:11 UTC (rev 1591) @@ -0,0 +1,3 @@ +<!--$includeblock$default$block1.html$--><!--$endincludeblock$--> +<!--$includeblock$aggregated2$block1.html$--><!--$endincludeblock$--> +<!--$includeblock$aggregated2$block1.html$--><!--$endincludeblock$--> Added: trunk/esigate-app-aggregated2/src/main/webapp/block1.html =================================================================== --- trunk/esigate-app-aggregated2/src/main/webapp/block1.html (rev 0) +++ trunk/esigate-app-aggregated2/src/main/webapp/block1.html 2014-03-27 16:02:11 UTC (rev 1591) @@ -0,0 +1 @@ +aggregated2 \ No newline at end of file Modified: trunk/esigate-app-aggregator/src/test/java/org/esigate/test/cases/AggregatorTest.java =================================================================== --- trunk/esigate-app-aggregator/src/test/java/org/esigate/test/cases/AggregatorTest.java 2014-03-27 13:40:30 UTC (rev 1590) +++ trunk/esigate-app-aggregator/src/test/java/org/esigate/test/cases/AggregatorTest.java 2014-03-27 16:02:11 UTC (rev 1591) @@ -79,6 +79,9 @@ public void testBlock() throws Exception { doSimpleTest("block.html"); } + public void testBlocks2Drivers() throws Exception { + doSimpleTest("blocks.html","blocks.html"); + } public void testBlockGzip() throws Exception { doSimpleTest("block-gzip.html", "block.html"); Added: trunk/esigate-app-aggregator/src/test/resources/blocks.html =================================================================== --- trunk/esigate-app-aggregator/src/test/resources/blocks.html (rev 0) +++ trunk/esigate-app-aggregator/src/test/resources/blocks.html 2014-03-27 16:02:11 UTC (rev 1591) @@ -0,0 +1,3 @@ +aggregated1 +aggregated2 +aggregated2 \ No newline at end of file Modified: trunk/esigate-core/src/main/java/org/esigate/Driver.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/Driver.java 2014-03-27 13:40:30 UTC (rev 1590) +++ trunk/esigate-core/src/main/java/org/esigate/Driver.java 2014-03-27 16:02:11 UTC (rev 1591) @@ -22,6 +22,8 @@ import java.util.Properties; import org.apache.commons.io.output.StringBuilderWriter; +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.entity.ContentType; @@ -49,7 +51,7 @@ * Main class used to retrieve data from a provider application using HTTP requests. Data can be retrieved as binary * streams or as String for text data. To improve performance, the Driver uses a cache that can be configured depending * on the needs. - * + * * @author Francois-Xavier Bonnet * @author Nicolas Richeton * @author Sylvain Sicard @@ -90,18 +92,18 @@ return driver; } - public DriverBuilder setName(String name) { - this.name = name; + public DriverBuilder setName(String n) { + this.name = n; return this; } - public DriverBuilder setProperties(Properties properties) { - this.properties = properties; + public DriverBuilder setProperties(Properties p) { + this.properties = p; return this; } - public DriverBuilder setRequestExecutorBuilder(RequestExecutorBuilder requestExecutorBuilder) { - this.requestExecutorBuilder = requestExecutorBuilder; + public DriverBuilder setRequestExecutorBuilder(RequestExecutorBuilder builder) { + this.requestExecutorBuilder = builder; return this; } @@ -116,7 +118,7 @@ /** * Get current event manager for this driver instance. - * + * * @return event manager. */ public EventManager getEventManager() { @@ -125,7 +127,7 @@ /** * Perform rendering on a single url content, and append result to "writer". - * + * * @param pageUrl * Address of the page containing the template * @param incomingRequest @@ -147,29 +149,28 @@ // TODO: should be performed in the ESI extension String resultingPageUrl = VariablesResolver.replaceAllVariables(pageUrl, driverRequest); + String targetUrl = ResourceUtils.getHttpUrlWithQueryString(resultingPageUrl, driverRequest, false); + + String currentValue; + CloseableHttpResponse response; + // Retrieve URL - CloseableHttpResponse response = null; - String currentValue = null; - // Get from cache to prevent multiple request to the same url if // multiple fragments are used. - boolean cacheable = "GET".equalsIgnoreCase(incomingRequest.getRequestLine().getMethod()); - if (cacheable) { - currentValue = incomingRequest.getAttribute(resultingPageUrl); - response = incomingRequest.getAttribute(CACHE_RESPONSE_PREFIX + resultingPageUrl); - } + String cacheKey = CACHE_RESPONSE_PREFIX + targetUrl; + Pair<String, CloseableHttpResponse> cachedValue = incomingRequest.getAttribute(cacheKey); // content and response were not in cache - if (currentValue == null) { - String targetUrl = ResourceUtils.getHttpUrlWithQueryString(resultingPageUrl, driverRequest, false); + if (cachedValue == null) { response = requestExecutor.createAndExecuteRequest(driverRequest, targetUrl, false); currentValue = HttpResponseUtils.toString(response, this.eventManager); // Cache - if (cacheable) { - incomingRequest.setAttribute(resultingPageUrl, currentValue); - incomingRequest.setAttribute(CACHE_RESPONSE_PREFIX + resultingPageUrl, response); - } + cachedValue = new ImmutablePair<String, CloseableHttpResponse>(currentValue, + response); + incomingRequest.setAttribute(cacheKey, cachedValue); } + currentValue = cachedValue.getKey(); + response = cachedValue.getValue(); logAction("render", pageUrl, renderers); @@ -187,7 +188,7 @@ * This methods log at the INFO level. * <p> * You should only call this method if INFO level is enabled. - * + * * <pre> * if (LOG.isInfoEnabled()) { * logAction(pageUrl, renderers); @@ -200,7 +201,7 @@ * current page url. * @param renderers * array of renderers - * + * */ private void logAction(String action, String onUrl, Renderer[] renderers) { if (LOG.isInfoEnabled()) { @@ -215,7 +216,7 @@ /** * Retrieves a resource from the provider application and transforms it using the Renderer passed as a parameter. - * + * * @param relUrl * the relative URL to the resource * @param request @@ -295,7 +296,7 @@ * Performs rendering on an HttpResponse. * <p> * Rendering is only performed if page can be parsed. - * + * * @param pageUrl * The remove url from which the body was retrieved. * @param originalRequest @@ -336,7 +337,7 @@ /** * Performs rendering (apply a render list) on an http response body (as a String). - * + * * @param pageUrl * The remove url from which the body was retrieved. * @param originalRequest @@ -379,7 +380,7 @@ * <p> * This may be supported in future versions (testing is needed). For the time being, changing configuration settings * after getting access through this method is <b>UNSUPPORTED</b> and <b>SHOULD NOT</b> be used. - * + * * @return current configuration */ public DriverConfiguration getConfiguration() { Modified: trunk/esigate-core/src/main/java/org/esigate/http/ResourceUtils.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/http/ResourceUtils.java 2014-03-27 13:40:30 UTC (rev 1590) +++ trunk/esigate-core/src/main/java/org/esigate/http/ResourceUtils.java 2014-03-27 16:02:11 UTC (rev 1591) @@ -35,10 +35,7 @@ private static String buildQueryString(DriverRequest originalRequest, boolean proxy) { StringBuilder queryString = new StringBuilder(Parameters.SMALL_BUFFER_SIZE); - String charset = originalRequest.getCharacterEncoding(); - if (charset == null) { - charset = "ISO-8859-1"; - } + String originalQuerystring = UriUtils.getRawQuery(originalRequest.getRequestLine().getUri()); if (proxy && originalQuerystring != null) { // Remove jsessionid from request if it is present This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-27 13:40:33
|
Revision: 1590 http://sourceforge.net/p/webassembletool/code/1590 Author: athaveau Date: 2014-03-27 13:40:30 +0000 (Thu, 27 Mar 2014) Log Message: ----------- Checkstyle issues Modified Paths: -------------- trunk/src/site/resources/index.html trunk/src/site/resources/index_es.html trunk/src/site/resources/index_fr.html Modified: trunk/src/site/resources/index.html =================================================================== --- trunk/src/site/resources/index.html 2014-03-27 13:39:53 UTC (rev 1589) +++ trunk/src/site/resources/index.html 2014-03-27 13:40:30 UTC (rev 1590) @@ -83,105 +83,105 @@ <section id="home"> -<div class="row "> - <div class="span2 offset1"> - <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> - </div> - <div class="span9"> - <div class="pull-right"><p>Version 4.3</p> -<!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> -<!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> -<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> - -<!-- </p> --> -<!-- <p> --> -<!-- <a --> -<!-- href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" --> -<!-- class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> --> -<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> - -<!-- </p> --> - </div> - -<!-- <h1>esigate</h1> --> - <div class="esi-title top-space1">Webapp integration,</div> - <div class="esi-title space1">Remote templating,</div> - <div class="esi-title space2">Web accelerator</div> - - <div class="row logo-btn-row"> - <div class="span2 logo-btn-small "> - <a href="https://twitter.com/share" class="twitter-share-button" - data-url="http://www.esigate.org" data-lang="en">Tweet</a> - <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - </div> - <div class="span2 logo-btn-small"> - <a - href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" - class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> - <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - </div> - <div class="span2 logo-btn"> - <a href="quickstart.html" class="btn">Quickstart</a> - </div> - <div class="span3"> - <a class="btn btn-primary btn-large" href="http://sourceforge.net/projects/webassembletool/files/latest/download?source=files"><i - class="icon-download-alt icon-white"></i> Download</a> - </div> - </div> - </div> +<div class="row "> + <div class="span2 offset1"> + <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> + </div> + <div class="span9"> + <div class="pull-right"><p>Version 4.3</p> +<!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> +<!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> +<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> + +<!-- </p> --> +<!-- <p> --> +<!-- <a --> +<!-- href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" --> +<!-- class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> --> +<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> + +<!-- </p> --> + </div> + +<!-- <h1>esigate</h1> --> + <div class="esi-title top-space1">Webapp integration,</div> + <div class="esi-title space1">Remote templating,</div> + <div class="esi-title space2">Web accelerator</div> + + <div class="row logo-btn-row"> + <div class="span2 logo-btn-small "> + <a href="https://twitter.com/share" class="twitter-share-button" + data-url="http://www.esigate.org" data-lang="en">Tweet</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="span2 logo-btn-small"> + <a + href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" + class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="span2 logo-btn"> + <a href="quickstart.html" class="btn">Quickstart</a> + </div> + <div class="span3"> + <a class="btn btn-primary btn-large" href="http://sourceforge.net/projects/webassembletool/files/latest/download?source=files"><i + class="icon-download-alt icon-white"></i> Download</a> + </div> + </div> + </div> </div> - <!-- Example row of columns --> -<div class="row row-gradient used-by"> - <div class="span12"> - <div class="row row-gradient-bottom"> - - - <div class="span10 offset1 "> - <span class="esi-users-label" > - <span class="badge"> - <i class=" icon-heart icon-white"></i> esigate is used by - </span> - </span> - - <div id="usersCarousel" class="carousel slide "> - <div class="carousel-inner"></div> - - </div> - </div> - - </div> - </div> -</div> + <!-- Example row of columns --> +<div class="row row-gradient used-by"> + <div class="span12"> + <div class="row row-gradient-bottom"> + + + <div class="span10 offset1 "> + <span class="esi-users-label" > + <span class="badge"> + <i class=" icon-heart icon-white"></i> esigate is used by + </span> + </span> + <div id="usersCarousel" class="carousel slide "> + <div class="carousel-inner"></div> - <div class="row top-space2 bottom-space2"> - <div class="span4"> - <h2>Server-side integration</h2> - <p>Esigate allows a fast and invisible <a href="http://en.wikipedia.org/wiki/Mashup_(web_application_hybrid)">mashup</a> of any web applications.</p> - <p>It can be used to add application modules, written in any programming language (PHP, Java, .Net...) to a <a href="http://en.wikipedia.org/wiki/Content_management_system">CMS</a>, without cache or accessibility issues.</p> - <p> - <a class="btn" href="#features-integration">Details »</a> - </p> - </div> - <div class="span4"> - <h2>Shared remote templates</h2> - <p>Use a single, shared <a href="http://en.wikipedia.org/wiki/Web_template">template</a> for several applications, ensuring exactly the same design and real-time synchronization.</p> - <p>Use a <a href="http://en.wikipedia.org/wiki/Content_management_system">CMS</a> or a portal as a template, to get graphical administration features for all your applications.</p> - <p> - <a class="btn" href="#features-remote">Details »</a> - </p> - </div> - <div class="span4"> - <h2>Web accelerator</h2> - <p>Improved <a href="http://en.wikipedia.org/wiki/Edge_Side_Includes">ESI</a> tags to allow block-level caching of content for dynamic pages.</p> - <p>Deliver dynamic, logged-in content in milli-seconds. Also deliver fully cached content.</p> - <p> - <a class="btn" href="#features-accelerator">Details »</a> - </p> - </div> + </div> + </div> + </div> + </div> +</div> + + + <div class="row top-space2 bottom-space2"> + <div class="span4"> + <h2>Server-side integration</h2> + <p>Esigate allows a fast and invisible <a href="http://en.wikipedia.org/wiki/Mashup_(web_application_hybrid)">mashup</a> of any web applications.</p> + <p>It can be used to add application modules, written in any programming language (PHP, Java, .Net...) to a <a href="http://en.wikipedia.org/wiki/Content_management_system">CMS</a>, without cache or accessibility issues.</p> + <p> + <a class="btn" href="#features-integration">Details »</a> + </p> + </div> + <div class="span4"> + <h2>Shared remote templates</h2> + <p>Use a single, shared <a href="http://en.wikipedia.org/wiki/Web_template">template</a> for several applications, ensuring exactly the same design and real-time synchronization.</p> + <p>Use a <a href="http://en.wikipedia.org/wiki/Content_management_system">CMS</a> or a portal as a template, to get graphical administration features for all your applications.</p> + <p> + <a class="btn" href="#features-remote">Details »</a> + </p> + </div> + <div class="span4"> + <h2>Web accelerator</h2> + <p>Improved <a href="http://en.wikipedia.org/wiki/Edge_Side_Includes">ESI</a> tags to allow block-level caching of content for dynamic pages.</p> + <p>Deliver dynamic, logged-in content in milli-seconds. Also deliver fully cached content.</p> + <p> + <a class="btn" href="#features-accelerator">Details »</a> + </p> + </div> + </div> </section> @@ -315,7 +315,7 @@ </div> - <div class="row feature-row" id="features-compatibility"> + <div class="row feature-row" id="extensions"> <div class="span3 offset1"> <h3> <i class=" icon-star"></i> Extensions and API @@ -430,75 +430,75 @@ <div class="row row-gradient top-space"> <div class="span12"> - -<h2>Support</h2> - -<p>ESIGate is open-source and can be used at no cost.</p> -<h3>Community support</h3> -<p>You can get help from the user mailing list - <i class="icon-envelope"></i> <a - href="mailto:web...@li...">web...@li...</a>. -</p> - - -<h3>Commercial support</h3> - -<p>The following companies provide commercial services on ESIGate:</p> - - -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/smile.png" /> - - </div> - - <div class="span8"> - <p>In business since 1991, Smile is the first European integrator of open source solutions. Smile employs - 7 active ESIGate developers, including the creator of the project.</p> - <p>Smile has delivered several ESIGate-based projects.</p> - <p> - <span class="badge badge-success" - title="ESIGate committer"><i - class="icon-ok-sign icon-white"></i> Committer</span> <a - href="http://www.smile.fr">Contact...</a> - </p> - </div> -</div> -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/nicolas-richeton.png" /> - </div> - - <div class="span8"> - <p>Committer and user of ESIGate since the very first ESIGate versions, provides commercial training and support on ESIGate.</p> - <p>Nicolas also provides expertise on ESIGate projects delivered by Capgemini.</p> - <p> - <span class="badge badge-success" - title="ESIGate committer"><i - class="icon-ok-sign icon-white"></i> Committer</span> <a - href="http://blog.richeton.com/esigate/commercial-support/">Contact...</a> - </p> - </div> -</div> -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/capgemini.png" /> - </div> - - <div class="span8"> - <p>Capgemini is headquartered in Paris, France and operates in 40 countries. We are, above all, a people company: more than 120,000 people in North America, Europe, South America and the Asia Pacific region..</p> - <p>Capgemini has delivered several major projects built with ESIGate.</p> - <p> - <span class="badge badge-notice" - title="Integrator"><i - class="icon-ok-sign icon-white"></i> Integrator</span> <a href="http://www.capgemini.fr">Contact...</a> - </p> - </div> -</div> - + +<h2>Support</h2> +<p>ESIGate is open-source and can be used at no cost.</p> +<h3>Community support</h3> +<p>You can get help from the user mailing list + <i class="icon-envelope"></i> <a + href="mailto:web...@li...">web...@li...</a>. +</p> +<h3>Commercial support</h3> + +<p>The following companies provide commercial services on ESIGate:</p> + + +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/smile.png" /> + + </div> + + <div class="span8"> + <p>In business since 1991, Smile is the first European integrator of open source solutions. Smile employs + 7 active ESIGate developers, including the creator of the project.</p> + <p>Smile has delivered several ESIGate-based projects.</p> + <p> + <span class="badge badge-success" + title="ESIGate committer"><i + class="icon-ok-sign icon-white"></i> Committer</span> <a + href="http://www.smile.fr">Contact...</a> + </p> + </div> +</div> +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/nicolas-richeton.png" /> + </div> + + <div class="span8"> + <p>Committer and user of ESIGate since the very first ESIGate versions, provides commercial training and support on ESIGate.</p> + <p>Nicolas also provides expertise on ESIGate projects delivered by Capgemini.</p> + <p> + <span class="badge badge-success" + title="ESIGate committer"><i + class="icon-ok-sign icon-white"></i> Committer</span> <a + href="http://blog.richeton.com/esigate/commercial-support/">Contact...</a> + </p> + </div> +</div> +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/capgemini.png" /> + </div> + + <div class="span8"> + <p>Capgemini is headquartered in Paris, France and operates in 40 countries. We are, above all, a people company: more than 120,000 people in North America, Europe, South America and the Asia Pacific region..</p> + <p>Capgemini has delivered several major projects built with ESIGate.</p> + <p> + <span class="badge badge-notice" + title="Integrator"><i + class="icon-ok-sign icon-white"></i> Integrator</span> <a href="http://www.capgemini.fr">Contact...</a> + </p> + </div> +</div> + + + + </div> </div> </section> Modified: trunk/src/site/resources/index_es.html =================================================================== --- trunk/src/site/resources/index_es.html 2014-03-27 13:39:53 UTC (rev 1589) +++ trunk/src/site/resources/index_es.html 2014-03-27 13:40:30 UTC (rev 1590) @@ -106,126 +106,126 @@ <section id="home"> - <div class="row "> - <div class="span2 offset1"> - <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> - </div> - <div class="span9"> + <div class="row "> + <div class="span2 offset1"> + <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> + </div> + <div class="span9"> <div class="pull-right"><p> Versión - 4.3</p> -<!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> -<!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> -<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> - -<!-- </p> --> -<!-- <p> --> -<!-- <a --> -<!-- href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" --> -<!-- class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> --> -<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> - -<!-- </p> --> - </div> - -<!-- <h1>esigate</h1> --> + 4.3</p> +<!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> +<!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> +<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> + +<!-- </p> --> +<!-- <p> --> +<!-- <a --> +<!-- href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" --> +<!-- class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> --> +<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> + +<!-- </p> --> + </div> + +<!-- <h1>esigate</h1> --> <div class="esi-title top-space1"> Integración de aplicaciones Web - ,</div> + ,</div> <div class="esi-title space1"> Plantillas remotas - ,</div> + ,</div> <div class="esi-title space2"> Acelerador Web - </div> - - <div class="row logo-btn-row"> - <div class="span2 logo-btn-small "> - <a href="https://twitter.com/share" class="twitter-share-button" - data-url="http://www.esigate.org" data-lang="en">Tweet</a> - <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - </div> - <div class="span2 logo-btn-small"> - <a - href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" - class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> - <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - </div> - <div class="span2 logo-btn"> + </div> + + <div class="row logo-btn-row"> + <div class="span2 logo-btn-small "> + <a href="https://twitter.com/share" class="twitter-share-button" + data-url="http://www.esigate.org" data-lang="en">Tweet</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="span2 logo-btn-small"> + <a + href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" + class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="span2 logo-btn"> <a href=" http://www.esigate.org/quickstart.html " class="btn"> Tutorial - </a> - </div> - <div class="span3"> - <a class="btn btn-primary btn-large" href="http://sourceforge.net/projects/webassembletool/files/latest/download?source=files"><i + </a> + </div> + <div class="span3"> + <a class="btn btn-primary btn-large" href="http://sourceforge.net/projects/webassembletool/files/latest/download?source=files"><i class="icon-download-alt icon-white"></i> Descargar - </a> - </div> - </div> - </div> + </a> + </div> + </div> + </div> </div> - <!-- Example row of columns --> -<div class="row row-gradient used-by"> - <div class="span12"> - <div class="row row-gradient-bottom"> - - - <div class="span10 offset1 "> - <span class="esi-users-label" > - <span class="badge"> + <!-- Example row of columns --> +<div class="row row-gradient used-by"> + <div class="span12"> + <div class="row row-gradient-bottom"> + + + <div class="span10 offset1 "> + <span class="esi-users-label" > + <span class="badge"> <i class=" icon-heart icon-white"></i> esigate es utilizado por - - </span> - </span> - - <div id="usersCarousel" class="carousel slide "> - <div class="carousel-inner"></div> - - </div> - </div> - - </div> - </div> -</div> + + </span> + </span> + <div id="usersCarousel" class="carousel slide "> + <div class="carousel-inner"></div> - <div class="row top-space2 bottom-space2"> - <div class="span4"> - <h2>Integración del lado del servidor</h2> - <p>ESIGate permite una <a href="http://es.wikipedia.org/wiki/Mashup_%28aplicaci%C3%B3n_web_h%C3%ADbrida%29" title="Mashup">integración</a> transparente y eficiente entre todas las aplicaciones Web.</p> - <p>Por ejemplo, ESIGate permite agregar a un <a href="http://es.wikipedia.org/wiki/Sistema_de_gesti%C3%B3n_de_contenidos" title="Sistema de gestion de contenidos">CMS</a> - (Sistema de gestión de contenidos) módulos desarrollados en cualquier lenguaje (PHP, Java, .Net...) sin problemas de caché o de accesibilidad.</p> - <p> - <a class="btn" href="#features-integration" title="Detalles sobre la integracion del lado del servidor con ESIGate">Ver detalles »</a> - </p> - </div> - <div class="span4"> - <h2>Plantillas remotas compartidas</h2> - <p>Usar la misma <a href="http://es.wikipedia.org/wiki/Plantilla" title="plantilla">plantilla</a> en varias aplicaciones para garantizar el mismo diseño y una sincronización en tiempo real.</p> - <p>Utilizar un <a href="http://es.wikipedia.org/wiki/Sistema_de_gesti%C3%B3n_de_contenidos" title="Sistema de Gestion de Contenidos">CMS</a> o un portal como plantilla para disfrutar de funcionalidades de administración gráfica del diseño de todas sus aplicaciones.</p> - <p> - <a class="btn" href="#features-remote" title="Detalles sobre las plantillas remotas y compartidas con ESIGate">Ver detalles »</a> - </p> - </div> - <div class="span4"> - <h2>Acelerador Web</h2> - <p>Etiquetas <a href="http://en.wikipedia.org/wiki/Edge_Side_Includes" lang="en" title="Edge Side Includes">ESI</a> mejoradas para permitir el almacenamiento en caché de fragmentos de páginas dinámicas.</p> - <p>ESIGate entrega contenido connectado y dinámico en milisegundos. También ofrece contenido estático completamente en caché.</p> - <p> - <a class="btn" href="#features-accelerator" title="Detalles sobre la aceleracion web con ESIGate">Ver detalles »</a> - </p> - </div> + </div> + </div> + </div> + </div> +</div> + <div class="row top-space2 bottom-space2"> + <div class="span4"> + <h2>Integración del lado del servidor</h2> + <p>ESIGate permite una <a href="http://es.wikipedia.org/wiki/Mashup_%28aplicaci%C3%B3n_web_h%C3%ADbrida%29" title="Mashup">integración</a> transparente y eficiente entre todas las aplicaciones Web.</p> + <p>Por ejemplo, ESIGate permite agregar a un <a href="http://es.wikipedia.org/wiki/Sistema_de_gesti%C3%B3n_de_contenidos" title="Sistema de gestion de contenidos">CMS</a> + (Sistema de gestión de contenidos) módulos desarrollados en cualquier lenguaje (PHP, Java, .Net...) sin problemas de caché o de accesibilidad.</p> + <p> + <a class="btn" href="#features-integration" title="Detalles sobre la integracion del lado del servidor con ESIGate">Ver detalles »</a> + </p> + </div> + <div class="span4"> + <h2>Plantillas remotas compartidas</h2> + <p>Usar la misma <a href="http://es.wikipedia.org/wiki/Plantilla" title="plantilla">plantilla</a> en varias aplicaciones para garantizar el mismo diseño y una sincronización en tiempo real.</p> + <p>Utilizar un <a href="http://es.wikipedia.org/wiki/Sistema_de_gesti%C3%B3n_de_contenidos" title="Sistema de Gestion de Contenidos">CMS</a> o un portal como plantilla para disfrutar de funcionalidades de administración gráfica del diseño de todas sus aplicaciones.</p> + <p> + <a class="btn" href="#features-remote" title="Detalles sobre las plantillas remotas y compartidas con ESIGate">Ver detalles »</a> + </p> + </div> + <div class="span4"> + <h2>Acelerador Web</h2> + <p>Etiquetas <a href="http://en.wikipedia.org/wiki/Edge_Side_Includes" lang="en" title="Edge Side Includes">ESI</a> mejoradas para permitir el almacenamiento en caché de fragmentos de páginas dinámicas.</p> + <p>ESIGate entrega contenido connectado y dinámico en milisegundos. También ofrece contenido estático completamente en caché.</p> + <p> + <a class="btn" href="#features-accelerator" title="Detalles sobre la aceleracion web con ESIGate">Ver detalles »</a> + </p> + </div> + </div> + + </section> <section id="features"> @@ -415,7 +415,7 @@ </div> - <div class="row feature-row" id="features-compatibility"> + <div class="row feature-row" id="extensions"> <div class="span3 offset1"> <h3> <i class=" icon-star"></i> Extensiones y API @@ -530,71 +530,71 @@ <section id="support"> <div class="row row-gradient top-space"> <div class="span12"> - -<h2>Asistencia</h2> - -<p>ESIGate es un proyecto de código abierto y puede ser utilizado sin costo.</p> -<h3>Apoyo comunitario</h3> -<p>Usted puede obtener ayuda de la comunidad mediente la lista de correo de usuarios - <i class="icon-envelope"></i> <a - href="mailto:web...@li...">web...@li...</a>. -</p> - - -<h3>Soporte comercial</h3> - -<p>Las empresas siguientes ofrecen servicios sobre ESIGate para acompañarle en sus proyectos :</p> - - -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/smile.png" alt="Smile" /> - - </div> - - <div class="span8"> - <p>Smile es una empresa de expertos en arquitecturas web y soluciones Open Source. Smile ha realizado varios proyectos con ESIGate.</p> - <p> - <span class="badge badge-success" - title="desarrollador ESIGate"><i - class="icon-ok-sign icon-white"></i> Desarrollador</span> <a - href="http://www.smile-oss.com/" lang="en" title="Smile">Contacto...</a> - </p> - </div> -</div> -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/nicolas-richeton.png" alt="Nicolas Richeton" /> - </div> - - <div class="span8"> - <p>Desarrollador y usuario de ESIGate desde la primera version, Nicolas provee formaciónes comerciales y asistencia técnica con ESIGate.</p> - <p>Nicolas ofrece también su experiencia en proyectos ESIGate realizados por Capgemini.</p> - <p> - <span class="badge badge-success" - title="desarrollador ESIGate"><i - class="icon-ok-sign icon-white"></i> Desarrollador</span> <a - href="http://blog.richeton.com/esigate/commercial-support/" lang="en" title="Nicolas Richeton">Contacto...</a> - </p> - </div> -</div> -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/capgemini.png" alt="Cap Gemini" /> - </div> - - <div class="span8"> - <p>Capgemini es uno de los principales proveedores mundiales de servicios de Consultoría, Tecnología y Outsourcing. Presente en 40 países con más de 120.000 empleados, - Capgemini ha realisado varios proyectos con ESIGate.</p> - <p> - <span class="badge badge-notice" - title="Integrador"><i - class="icon-ok-sign icon-white"></i> Integrador</span> <a href="http://www.capgemini.com/" lang="en" title="Cap Gemini">Contacto...</a> - </p> - </div> -</div> - + +<h2>Asistencia</h2> +<p>ESIGate es un proyecto de código abierto y puede ser utilizado sin costo.</p> +<h3>Apoyo comunitario</h3> +<p>Usted puede obtener ayuda de la comunidad mediente la lista de correo de usuarios + <i class="icon-envelope"></i> <a + href="mailto:web...@li...">web...@li...</a>. +</p> + + +<h3>Soporte comercial</h3> + +<p>Las empresas siguientes ofrecen servicios sobre ESIGate para acompañarle en sus proyectos :</p> + + +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/smile.png" alt="Smile" /> + + </div> + + <div class="span8"> + <p>Smile es una empresa de expertos en arquitecturas web y soluciones Open Source. Smile ha realizado varios proyectos con ESIGate.</p> + <p> + <span class="badge badge-success" + title="desarrollador ESIGate"><i + class="icon-ok-sign icon-white"></i> Desarrollador</span> <a + href="http://www.smile-oss.com/" lang="en" title="Smile">Contacto...</a> + </p> + </div> +</div> +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/nicolas-richeton.png" alt="Nicolas Richeton" /> + </div> + + <div class="span8"> + <p>Desarrollador y usuario de ESIGate desde la primera version, Nicolas provee formaciónes comerciales y asistencia técnica con ESIGate.</p> + <p>Nicolas ofrece también su experiencia en proyectos ESIGate realizados por Capgemini.</p> + <p> + <span class="badge badge-success" + title="desarrollador ESIGate"><i + class="icon-ok-sign icon-white"></i> Desarrollador</span> <a + href="http://blog.richeton.com/esigate/commercial-support/" lang="en" title="Nicolas Richeton">Contacto...</a> + </p> + </div> +</div> +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/capgemini.png" alt="Cap Gemini" /> + </div> + + <div class="span8"> + <p>Capgemini es uno de los principales proveedores mundiales de servicios de Consultoría, Tecnología y Outsourcing. Presente en 40 países con más de 120.000 empleados, + Capgemini ha realisado varios proyectos con ESIGate.</p> + <p> + <span class="badge badge-notice" + title="Integrador"><i + class="icon-ok-sign icon-white"></i> Integrador</span> <a href="http://www.capgemini.com/" lang="en" title="Cap Gemini">Contacto...</a> + </p> + </div> +</div> + + </div> </div> Modified: trunk/src/site/resources/index_fr.html =================================================================== --- trunk/src/site/resources/index_fr.html 2014-03-27 13:39:53 UTC (rev 1589) +++ trunk/src/site/resources/index_fr.html 2014-03-27 13:40:30 UTC (rev 1590) @@ -57,15 +57,9 @@ <a class="brand" href="/">esigate</a> <div class="nav-collapse collapse"> <ul class="nav"> - <li class="active"><a href="#home"> -Accueil -</a></li> - <li><a href="#features"> -Fonctionnalités -</a></li> - <li><a href="#project"> -Projet -</a></li> + <li class="active"><a href="#home">Accueil</a></li> + <li><a href="#features">Fonctionnalités</a></li> + <li><a href="#project">Projet</a></li> <!-- <li><a href="#changelog">$beginparam$i18n.changelog$Changelog$endparam$i18n.changelog$</a></li> --> <!-- <li><a href="#roadmap">$beginparam$i18n.roadmap$Roadmap$endparam$i18n.roadmap$</a></li> --> <li><a href="#support">Support</a></li> @@ -76,19 +70,10 @@ <ul class="nav pull-right"> <li class="dropdown "> - <a href="#" class="dropdown-toggle" data-toggle="dropdown"> -Langue - <b class="caret"></b></a> - <ul class="dropdown-menu"> - <li><a href="index.html"> -Anglais -</a></li> - <li><a href="index_fr.html"> -Français -</a></li> - <li><a href="index_es.html"> -Espagnol -</a></li> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Langue <b class="caret"></b></a> + <ul class="dropdown-menu"><li><a href="index.html">Anglais</a></li> + <li><a href="index_fr.html">Français</a></li> + <li><a href="index_es.html">Espagnol</a></li> </ul> </li> </ul> @@ -103,120 +88,104 @@ <section id="home"> - <div class="row "> - <div class="span2 offset1"> - <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> - </div> - <div class="span9"> - <div class="pull-right"><p>Version 4.3</p> -<!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> -<!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> -<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> - -<!-- </p> --> -<!-- <p> --> -<!-- <a --> -<!-- href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" --> -<!-- class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> --> -<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> - -<!-- </p> --> - </div> - -<!-- <h1>esigate</h1> --> - <div class="esi-title top-space1"> - Intégration d'applications Web - ,</div> - <div class="esi-title space1"> - Templates distantes - ,</div> - <div class="esi-title space2"> - Accelerateur Web - </div> - - <div class="row logo-btn-row"> - <div class="span2 logo-btn-small "> - <a href="https://twitter.com/share" class="twitter-share-button" - data-url="http://www.esigate.org" data-lang="en">Tweet</a> - <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - </div> - <div class="span2 logo-btn-small"> - <a - href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" - class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> - <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> - </div> - <div class="span2 logo-btn"> - <a href=" - http://www.esigate.org/quickstart.html - " class="btn"> - Tutorial - </a> - </div> - <div class="span3"> - <a class="btn btn-primary btn-large" href="http://sourceforge.net/projects/webassembletool/files/latest/download?source=files"><i - class="icon-download-alt icon-white"></i> - Téléchargement - </a> - </div> - </div> - </div> + <div class="row "> + <div class="span2 offset1"> + <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> + </div> + <div class="span9"> + <div class="pull-right"><p>Version 4.3</p> +<!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> +<!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> +<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> + +<!-- </p> --> +<!-- <p> --> +<!-- <a --> +<!-- href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" --> +<!-- class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> --> +<!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> + +<!-- </p> --> + </div> + +<!-- <h1>esigate</h1> --> + <div class="esi-title top-space1">Intégration d'applications Web,</div> + <div class="esi-title space1">Templates distantes,</div> + <div class="esi-title space2">Accelerateur Web</div> + + <div class="row logo-btn-row"> + <div class="span2 logo-btn-small "> + <a href="https://twitter.com/share" class="twitter-share-button" + data-url="http://www.esigate.org" data-lang="en">Tweet</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="span2 logo-btn-small"> + <a + href="https://twitter.com/intent/tweet?button_hashtag=esigate&text=" + class="twitter-hashtag-button" data-lang="en">Tweet #esigate</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + </div> + <div class="span2 logo-btn"> + <a href="http://www.esigate.org/quickstart.html" class="btn">Tutorial</a> + </div> + <div class="span3"> + <a class="btn btn-primary btn-large" href="http://sourceforge.net/projects/webassembletool/files/latest/download?source=files"><i + class="icon-download-alt icon-white"></i> Téléchargement</a> + </div> + </div> + </div> </div> + <!-- Example row of columns --> +<div class="row row-gradient used-by"> + <div class="span12"> + <div class="row row-gradient-bottom"> + + + <div class="span10 offset1 "> + <span class="esi-users-label" > + <span class="badge"> + <i class=" icon-heart icon-white"></i>ESIGate est utilisé par + </span> + </span> + <div id="usersCarousel" class="carousel slide "> + <div class="carousel-inner"></div> - <!-- Example row of columns --> -<div class="row row-gradient used-by"> - <div class="span12"> - <div class="row row-gradient-bottom"> - - - <div class="span10 offset1 "> - <span class="esi-users-label" > - <span class="badge"> - <i class=" icon-heart icon-white"></i> - ESIGate est utilisé par - - </span> - </span> - - <div id="usersCarousel" class="carousel slide "> - <div class="carousel-inner"></div> - - </div> - </div> - - </div> - </div> -</div> + </div> + </div> + </div> + </div> +</div> - <div class="row top-space2 bottom-space2"> - <div class="span4"> - <h2>Intégration coté serveur</h2> - <p>ESIGate permet une intégration (<a href="http://fr.wikipedia.org/wiki/Application_composite">Mashup</a>) transparente et performante entre n'importe quelles applications Web.</p> - <p>Par exemple, intégrez dans un <a href="http://fr.wikipedia.org/wiki/Système_de_gestion_de_contenu">CMS</a> (Système de gestion de contenus) des modules applicatifs développés avec n'importe quel language (PHP, Java, .Net...) sans problèmes de cache ou d'accessibilité.</p> - <p> - <a class="btn" href="#features-integration">Voir les détails »</a> - </p> - </div> - <div class="span4"> - <h2>Gabarits distants partagés</h2> - <p>Utilisez un même <a href="http://fr.wikipedia.org/wiki/Gabarit_(mise_en_page)">gabarit</a> (modèle de page) dans plusieurs applications afin de garantir un design identique, synchronisé en permanence.</p> - <p>Utilisez un <a href="http://fr.wikipedia.org/wiki/Système_de_gestion_de_contenu">CMS</a> ou un portail en tant que template pour bénéficier de fonctions d'administration graphique du design de l'ensemble de vos applications.</p> - <p> - <a class="btn" href="#features-remote">Voir les détails »</a> - </p> - </div> - <div class="span4"> - <h2>Accélération Web</h2> - <p>Directives <a href="http://fr.wikipedia.org/wiki/Edge_Side_Includes">ESI</a> améliorées pour permettre la mise en cache par blocs du contenu des pages dynamiques.</p> - <p>Délivrez du contenu connecté et dynamique en quelques milli-secondes. Délivre également du contenu statique entièrement mis en cache.</p> - <p> - <a class="btn" href="#features-accelerator">Voir les détails »</a> - </p> - </div> + + <div class="row top-space2 bottom-space2"> + <div class="span4"> + <h2>Intégration coté serveur</h2> + <p>ESIGate permet une intégration (<a href="http://fr.wikipedia.org/wiki/Application_composite">Mashup</a>) transparente et performante entre n'importe quelles applications Web.</p> + <p>Par exemple, intégrez dans un <a href="http://fr.wikipedia.org/wiki/Système_de_gestion_de_contenu">CMS</a> (Système de gestion de contenus) des modules applicatifs développés avec n'importe quel language (PHP, Java, .Net...) sans problèmes de cache ou d'accessibilité.</p> + <p> + <a class="btn" href="#features-integration">Voir les détails »</a> + </p> + </div> + <div class="span4"> + <h2>Gabarits distants partagés</h2> + <p>Utilisez un même <a href="http://fr.wikipedia.org/wiki/Gabarit_(mise_en_page)">gabarit</a> (modèle de page) dans plusieurs applications afin de garantir un design identique, synchronisé en permanence.</p> + <p>Utilisez un <a href="http://fr.wikipedia.org/wiki/Système_de_gestion_de_contenu">CMS</a> ou un portail en tant que template pour bénéficier de fonctions d'administration graphique du design de l'ensemble de vos applications.</p> + <p> + <a class="btn" href="#features-remote">Voir les détails »</a> + </p> + </div> + <div class="span4"> + <h2>Accélération Web</h2> + <p>Directives <a href="http://fr.wikipedia.org/wiki/Edge_Side_Includes">ESI</a> améliorées pour permettre la mise en cache par blocs du contenu des pages dynamiques.</p> + <p>Délivrez du contenu connecté et dynamique en quelques milli-secondes. Délivre également du contenu statique entièrement mis en cache.</p> + <p> + <a class="btn" href="#features-accelerator">Voir les détails »</a> + </p> + </div> </div> @@ -399,7 +368,7 @@ </div> - <div class="row feature-row" id="features-compatibility"> + <div class="row feature-row" id="extensions"> <div class="span3 offset1"> <h3> <i class=" icon-star"></i> Extensions et API @@ -516,83 +485,83 @@ <section id="support"> <div class="row row-gradient top-space"> <div class="span12"> - -<h2>Support</h2> - -<p>ESIGate est un projet open-source qui peut être utilisé et - modifié sans aucun coût de license.</p> -<h3>Support de la communauté</h3> -<p>Vous pouvez obtenir de l'aide de la communauté en utilisant la - liste de diffusion - <i class="icon-envelope"></i> <a - href="mailto:web...@li...">web...@li...</a>. -</p> - - -<h3>Support commercial</h3> - -<p>Les sociétés suivantes proposent des prestations de services sur - ESIGate pour vous accompagner dans vos projets :</p> - - -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/smile.png" /> - - </div> - - <div class="span8"> - <p>Premier intégrateur européen de solutions open source, Smile - comprend 7 développeurs actifs dont le créateur du projet.</p> - <p>Smile a réalisé et accompagné de nombreux projets basés sur - ESIGate.</p> - <p> - <span class="badge badge-success" - title="Développeur ESIGate"><i - class="icon-ok-sign icon-white"></i> Committer</span> <a - href="http://www.smile.fr">Contact...</a> - </p> - </div> -</div> -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/nicolas-richeton.png" /> - </div> - - <div class="span8"> - <p>Développeur et utilisateur d'ESIGate depuis les premières versions, conçoit et accompagne des - projets majeurs depuis la création du projet.</p> - <p>Nicolas propose des prestations d'accompagnement de façon indépendante - : formation et support. Accompagne également des projets d'intégration chez Capgemini.</p> - <p> - <span class="badge badge-success" - title="Développeur ESIGate"><i - class="icon-ok-sign icon-white"></i> Committer</span> <a - href="http://blog.richeton.com/esigate/commercial-support/">Contact...</a> - </p> - </div> -</div> -<div class="row support-row"> - <div class="span3 offset1 "> - <img src="website/support/capgemini.png" /> - </div> - - <div class="span8"> - <p>Fort d’environ 120 000 collaborateurs et présent dans 40 pays, - Capgemini est l’un des leaders mondiaux du conseil, des services - informatiques et de l’infogérance.</p> - <p>Capgemini a réalisé plusieurs projets d'intégration majeurs basés sur ESIGate.</p> - <p> - <span class="badge badge-notice" - title="Intégrateur"><i - class="icon-ok-sign icon-white"></i> Intégrateur</span> - - <a href="http://www.capgemini.fr">Contact...</a> - </p> - </div> -</div> - + +<h2>Support</h2> +<p>ESIGate est un projet open-source qui peut être utilisé et + modifié sans aucun coût de license.</p> +<h3>Support de la communauté</h3> +<p>Vous pouvez obtenir de l'aide de la communauté en utilisant la + liste de diffusion + <i class="icon-envelope"></i> <a + href="mailto:web...@li...">web...@li...</a>. +</p> + + +<h3>Support commercial</h3> + +<p>Les sociétés suivantes proposent des prestations de services sur + ESIGate pour vous accompagner dans vos projets :</p> + + +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/smile.png" /> + + </div> + + <div class="span8"> + <p>Premier intégrateur européen de solutions open source, Smile + comprend 7 développeurs actifs dont le créateur du projet.</p> + <p>Smile a réalisé et accompagné de nombreux projets basés sur + ESIGate.</p> + <p> + <span class="badge badge-success" + title="Développeur ESIGate"><i + class="icon-ok-sign icon-white"></i> Committer</span> <a + href="http://www.smile.fr">Contact...</a> + </p> + </div> +</div> +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/nicolas-richeton.png" /> + </div> + + <div class="span8"> + <p>Développeur et utilisateur d'ESIGate depuis les premières versions, conçoit et accompagne des + projets majeurs depuis la création du projet.</p> + <p>Nicolas propose des prestations d'accompagnement de façon indépendante + : formation et support. Accompagne également des projets d'intégration chez Capgemini.</p> + <p> + <span class="badge badge-success" + title="Développeur ESIGate"><i + class="icon-ok-sign icon-white"></i> Committer</span> <a + href="http://blog.richeton.com/esigate/commercial-support/">Contact...</a> + </p> + </div> +</div> +<div class="row support-row"> + <div class="span3 offset1 "> + <img src="website/support/capgemini.png" /> + </div> + + <div class="span8"> + <p>Fort d’environ 120 000 collaborateurs et présent dans 40 pays, + Capgemini est l’un des leaders mondiaux du conseil, des services + informatiques et de l’infogérance.</p> + <p>Capgemini a réalisé plusieurs projets d'intégration majeurs basés sur ESIGate.</p> + <p> + <span class="badge badge-notice" + title="Intégrateur"><i + class="icon-ok-sign icon-white"></i> Intégrateur</span> + + <a href="http://www.capgemini.fr">Contact...</a> + </p> + </div> +</div> + + </div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-27 13:39:57
|
Revision: 1589 http://sourceforge.net/p/webassembletool/code/1589 Author: athaveau Date: 2014-03-27 13:39:53 +0000 (Thu, 27 Mar 2014) Log Message: ----------- Checkstyle issues Modified Paths: -------------- trunk/esigate-core/src/main/java/org/esigate/Parameters.java trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java trunk/esigate-core/src/main/java/org/esigate/extension/DefaultCharset.java trunk/esigate-core/src/main/java/org/esigate/extension/ExtensionFactory.java trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java Modified: trunk/esigate-core/src/main/java/org/esigate/Parameters.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/Parameters.java 2014-03-27 13:25:10 UTC (rev 1588) +++ trunk/esigate-core/src/main/java/org/esigate/Parameters.java 2014-03-27 13:39:53 UTC (rev 1589) @@ -65,7 +65,8 @@ public static final Parameter<String> COOKIE_MANAGER = new ParameterString("cookieManager", DefaultCookieManager.class.getName()); public static final Parameter<Collection<String>> DISCARD_COOKIES = new ParameterCollection("discardCookies"); - public static final Parameter<Collection<String>> STORE_COOKIES_IN_SESSION = new ParameterCollection("storeCookiesInSession"); + public static final Parameter<Collection<String>> STORE_COOKIES_IN_SESSION + = new ParameterCollection("storeCookiesInSession"); public static final Parameter<String> FIX_MODE = new ParameterString("fixMode", "relative"); public static final Parameter<String> VISIBLE_URL_BASE = new ParameterString("visibleUrlBase"); // Possible values for remoteUrlBaseStrategy @@ -84,18 +85,21 @@ public static final Parameter<Boolean> USE_CACHE = new ParameterBoolean("useCache", true); public static final Parameter<Integer> MAX_CACHE_ENTRIES = new ParameterInteger("maxCacheEntries", 1000); public static final Parameter<Integer> MAX_OBJECT_SIZE = new ParameterInteger("maxObjectSize", 1000000); - public static final Parameter<String> CACHE_STORAGE = new ParameterString("cacheStorage", BasicCacheStorage.class.getName()); + public static final Parameter<String> CACHE_STORAGE + = new ParameterString("cacheStorage", BasicCacheStorage.class.getName()); public static final Parameter<Boolean> X_CACHE_HEADER = new ParameterBoolean("xCacheHeader", false); public static final Parameter<Boolean> VIA_HEADER = new ParameterBoolean("viaHeader", true); // Forced caching public static final Parameter<Integer> TTL = new ParameterInteger("ttl", 0); // Heuristic caching - public static final Parameter<Boolean> HEURISTIC_CACHING_ENABLED = new ParameterBoolean("heuristicCachingEnabled", true); + public static final Parameter<Boolean> HEURISTIC_CACHING_ENABLED + = new ParameterBoolean("heuristicCachingEnabled", true); // default value defined in // http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.4 public static final Parameter<Float> HEURISTIC_COEFFICIENT = new ParameterFloat("heuristicCoefficient", 0.1f); // when no cache directive at all, nothing is cached by default - public static final Parameter<Integer> HEURISTIC_DEFAULT_LIFETIME_SECS = new ParameterInteger("heuristicDefaultLifetimeSecs", 0); + public static final Parameter<Integer> HEURISTIC_DEFAULT_LIFETIME_SECS + = new ParameterInteger("heuristicDefaultLifetimeSecs", 0); // Background revalidation public static final Parameter<Integer> STALE_WHILE_REVALIDATE = new ParameterInteger("staleWhileRevalidate", 0); public static final Parameter<Integer> STALE_IF_ERROR = new ParameterInteger("staleIfError", 0); @@ -106,10 +110,13 @@ public static final Parameter<Integer> MAX_UPDATE_RETRIES = new ParameterInteger("maxUpdateRetries", 1); public static final Parameter<Integer> REVALIDATION_QUEUE_SIZE = new ParameterInteger("revalidationQueueSize", 100); // EhCache - public static final Parameter<String> EHCACHE_CACHE_NAME_PROPERTY = new ParameterString("ehcache.cacheName", "esigate"); - public static final Parameter<String> EHCACHE_CONFIGURATION_FILE_PROPERTY = new ParameterString("ehcache.configurationFile"); + public static final Parameter<String> EHCACHE_CACHE_NAME_PROPERTY + = new ParameterString("ehcache.cacheName", "esigate"); + public static final Parameter<String> EHCACHE_CONFIGURATION_FILE_PROPERTY + = new ParameterString("ehcache.configurationFile"); // MemCached - public static final Parameter<Collection<String>> MEMCACHED_SERVERS_PROPERTY = new ParameterCollection("memcached.servers"); + public static final Parameter<Collection<String>> MEMCACHED_SERVERS_PROPERTY + = new ParameterCollection("memcached.servers"); // Default size for String or byte buffers used to manipulate html page contents public static final int DEFAULT_BUFFER_SIZE = 1024; // Default size for String or byte buffers used to manipulate small things like tags, cookie, log lines Modified: trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java 2014-03-27 13:25:10 UTC (rev 1588) +++ trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java 2014-03-27 13:39:53 UTC (rev 1589) @@ -50,6 +50,10 @@ private boolean xCacheHeader; private boolean viaHeader; + /** + * Inititalize the instance + * @param properties properties + */ public void init(Properties properties) { staleIfError = Parameters.STALE_IF_ERROR.getValue(properties); staleWhileRevalidate = Parameters.STALE_WHILE_REVALIDATE.getValue(properties); Modified: trunk/esigate-core/src/main/java/org/esigate/extension/DefaultCharset.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/DefaultCharset.java 2014-03-27 13:25:10 UTC (rev 1588) +++ trunk/esigate-core/src/main/java/org/esigate/extension/DefaultCharset.java 2014-03-27 13:39:53 UTC (rev 1589) @@ -43,7 +43,7 @@ */ public class DefaultCharset implements Extension, IEventListener { private static final Logger LOG = LoggerFactory.getLogger(DefaultCharset.class); - + /** default charset */ public static final Parameter<String> PARAM_DEFAULT_CHARSET = new ParameterString("defaultCharset", "ISO-8859-1"); private Collection<String> parsableContentTypes; Modified: trunk/esigate-core/src/main/java/org/esigate/extension/ExtensionFactory.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/ExtensionFactory.java 2014-03-27 13:25:10 UTC (rev 1588) +++ trunk/esigate-core/src/main/java/org/esigate/extension/ExtensionFactory.java 2014-03-27 13:39:53 UTC (rev 1589) @@ -43,9 +43,9 @@ /** * Get an extension as configured in properties. * - * @param properties - * @param parameter - * @param d + * @param properties properties + * @param parameter the class name parameter + * @param d driver * * @param <T> * class which extends Extension class which extends Extension @@ -81,7 +81,8 @@ * @param d * @return the extension list */ - public static <T extends Extension> List<T> getExtensions(Properties properties, Parameter<Collection<String>> parameter, Driver d) { + public static <T extends Extension> List<T> getExtensions(Properties properties, + Parameter<Collection<String>> parameter, Driver d) { Collection<String> className = parameter.getValue(properties); List<T> finalResult = new ArrayList<T>(); for (String cName : className) { Modified: trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-27 13:25:10 UTC (rev 1588) +++ trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-27 13:39:53 UTC (rev 1589) @@ -56,12 +56,12 @@ private Driver driver; @Override - public void init(Driver driver, Properties properties) { + public void init(Driver d, Properties properties) { LOG.debug("Initialize Metric"); driver.getEventManager().register(EventManager.EVENT_PROXY_POST, this); driver.getEventManager().register(EventManager.EVENT_FETCH_POST, this); - this.driver = driver; + this.driver = d; reporter = Slf4jReporter .forRegistry(this.metric) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-27 13:25:15
|
Revision: 1588 http://sourceforge.net/p/webassembletool/code/1588 Author: athaveau Date: 2014-03-27 13:25:10 +0000 (Thu, 27 Mar 2014) Log Message: ----------- Checkstyle issues Modified Paths: -------------- trunk/esigate-cas/src/main/java/org/esigate/cas/CasAuthenticationHandler.java trunk/esigate-core/src/main/java/org/esigate/Driver.java trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java trunk/esigate-core/src/main/java/org/esigate/Parameters.java trunk/esigate-core/src/main/java/org/esigate/api/Session.java trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java trunk/esigate-core/src/main/java/org/esigate/events/EventManager.java trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java trunk/esigate-core/src/main/java/org/esigate/extension/FragmentLogging.java trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java trunk/esigate-core/src/main/java/org/esigate/util/Parameter.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterArray.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterBoolean.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterCollection.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterFloat.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterInteger.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterLong.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterString.java trunk/esigate-core/src/main/java/org/esigate/vars/Operations.java trunk/esigate-core/src/test/java/org/esigate/extension/surrogate/SurrogateTest.java trunk/esigate-core/src/test/java/org/esigate/util/ParameterTest.java Modified: trunk/esigate-cas/src/main/java/org/esigate/cas/CasAuthenticationHandler.java =================================================================== --- trunk/esigate-cas/src/main/java/org/esigate/cas/CasAuthenticationHandler.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-cas/src/main/java/org/esigate/cas/CasAuthenticationHandler.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -31,14 +31,14 @@ public class CasAuthenticationHandler extends GenericAuthentificationHandler { public static final String DEFAULT_LOGIN_URL = "/login"; - private final static Logger LOG = LoggerFactory.getLogger(GenericAuthentificationHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(GenericAuthentificationHandler.class); // Configuration properties names - private final static String LOGIN_URL_PROPERTY = "casLoginUrl"; - private final static String SECOND_REQUEST = "SECOND_REQUEST"; - private final static String SPRING_SECURITY_PROPERTY = "isSpringSecurity"; + private static final String LOGIN_URL_PROPERTY = "casLoginUrl"; + private static final String SECOND_REQUEST = "SECOND_REQUEST"; + private static final String SPRING_SECURITY_PROPERTY = "isSpringSecurity"; - private final static String SPRING_SECURITY_URL_PATTERN_PROPERTY = "springSecurityUrl"; + private static final String SPRING_SECURITY_URL_PATTERN_PROPERTY = "springSecurityUrl"; private String loginUrl; private boolean springSecurity; Modified: trunk/esigate-core/src/main/java/org/esigate/Driver.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/Driver.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/Driver.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -190,11 +190,10 @@ * * <pre> * if (LOG.isInfoEnabled()) { - * logRendering(pageUrl, renderers); + * logAction(pageUrl, renderers); * } * </pre> - * - * @see Driver#logRendering(String, Renderer[]) logRendering for renderer <b>list</b>. + * * @param action * Action name (eg. "proxy" or "render") * @param onUrl Modified: trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -53,7 +53,7 @@ this.preserveHost = Parameters.PRESERVE_HOST.getValue(props); this.visibleBaseURL = Parameters.VISIBLE_URL_BASE.getValue(props); this.isVisibleBaseURLEmpty = StringUtils.isEmpty(visibleBaseURL); - this.stripMappingPath= Parameters.STRIP_MAPPING_PATH.getValue(props); + this.stripMappingPath = Parameters.STRIP_MAPPING_PATH.getValue(props); this.uriMappings = parseMappings(props); properties = props; } Modified: trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -167,7 +167,7 @@ newInstances.put(name, createDriver(name, properties)); } if (newInstances.get(DEFAULT_INSTANCE_NAME) == null - && Parameters.REMOTE_URL_BASE.getValue(defaultProperties)!=null) { + && Parameters.REMOTE_URL_BASE.getValue(defaultProperties) != null) { newInstances.put(DEFAULT_INSTANCE_NAME, createDriver(DEFAULT_INSTANCE_NAME, defaultProperties)); } Modified: trunk/esigate-core/src/main/java/org/esigate/Parameters.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/Parameters.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/Parameters.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -33,7 +33,6 @@ import org.esigate.util.ParameterInteger; import org.esigate.util.ParameterString; -import java.util.Arrays; import java.util.Collection; /** @@ -44,53 +43,43 @@ */ public final class Parameters { - private Parameters() { - - } - // Core parameters - public static final Parameter<String[]> REMOTE_URL_BASE = new ParameterArray("remoteUrlBase", null); - public static final Parameter<Collection<String>> MAPPINGS = new ParameterCollection("mappings",null); + public static final Parameter<String[]> REMOTE_URL_BASE = new ParameterArray("remoteUrlBase"); + public static final Parameter<Collection<String>> MAPPINGS = new ParameterCollection("mappings"); public static final Parameter<Boolean> STRIP_MAPPING_PATH = new ParameterBoolean("stripMappingPath", false); public static final Parameter<String> URI_ENCODING = new ParameterString("uriEncoding", "ISO-8859-1"); - public static final Parameter<Collection<String>> PARSABLE_CONTENT_TYPES = new ParameterCollection("parsableContentTypes", Arrays.asList("text/html", "application/xhtml+xml")); - + public static final Parameter<Collection<String>> PARSABLE_CONTENT_TYPES = + new ParameterCollection("parsableContentTypes", "text/html", "application/xhtml+xml"); // Network settings public static final Parameter<Integer> MAX_CONNECTIONS_PER_HOST = new ParameterInteger("maxConnectionsPerHost", 20); public static final Parameter<Integer> CONNECT_TIMEOUT = new ParameterInteger("connectTimeout", 1000); public static final Parameter<Integer> SOCKET_TIMEOUT = new ParameterInteger("socketTimeout", 10000); - // Proxy settings - public static final Parameter<String> PROXY_HOST = new ParameterString("proxyHost", null); - public static final Parameter<Integer> PROXY_PORT = new ParameterInteger("proxyPort", 0 ); - public static final Parameter<String> PROXY_USER = new ParameterString("proxyUser", null); - public static final Parameter<String> PROXY_PASSWORD = new ParameterString("proxyPassword", null); - + public static final Parameter<String> PROXY_HOST = new ParameterString("proxyHost"); + public static final Parameter<Integer> PROXY_PORT = new ParameterInteger("proxyPort", 0); + public static final Parameter<String> PROXY_USER = new ParameterString("proxyUser"); + public static final Parameter<String> PROXY_PASSWORD = new ParameterString("proxyPassword"); // Http headers public static final Parameter<Boolean> PRESERVE_HOST = new ParameterBoolean("preserveHost", true); - // Cookies - public static final Parameter<String> COOKIE_MANAGER = new ParameterString("cookieManager", DefaultCookieManager.class.getName()); - public static final Parameter<Collection<String>> DISCARD_COOKIES = new ParameterCollection("discardCookies",null); - public static final Parameter<Collection<String>> STORE_COOKIES_IN_SESSION = new ParameterCollection("storeCookiesInSession",null); - + public static final Parameter<String> COOKIE_MANAGER = new ParameterString("cookieManager", + DefaultCookieManager.class.getName()); + public static final Parameter<Collection<String>> DISCARD_COOKIES = new ParameterCollection("discardCookies"); + public static final Parameter<Collection<String>> STORE_COOKIES_IN_SESSION = new ParameterCollection("storeCookiesInSession"); public static final Parameter<String> FIX_MODE = new ParameterString("fixMode", "relative"); - public static final Parameter<String> VISIBLE_URL_BASE = new ParameterString("visibleUrlBase", null); - - // Load-balancing - public static final Parameter<String> REMOTE_URL_BASE_STRATEGY = new ParameterString("remoteUrlBaseStrategy", - Parameters.ROUNDROBIN); + public static final Parameter<String> VISIBLE_URL_BASE = new ParameterString("visibleUrlBase"); // Possible values for remoteUrlBaseStrategy public static final String STICKYSESSION = "stickysession"; public static final String IPHASH = "iphash"; public static final String ROUNDROBIN = "roundrobin"; - + // Load-balancing + public static final Parameter<String> REMOTE_URL_BASE_STRATEGY = new ParameterString("remoteUrlBaseStrategy", + Parameters.ROUNDROBIN); // Extensions - public static final Parameter<Collection<String>> EXTENSIONS = new ParameterCollection("extensions", Arrays.asList(FragmentLogging.class.getName(), - FetchLogging.class.getName() , RemoteUserAuthenticationHandler.class.getName() , - Esi.class.getName() , ResourceFixup.class.getName() , XPoweredBy.class.getName() , - Surrogate.class.getName() , ConfigReloadOnChange.class.getName())); - + public static final Parameter<Collection<String>> EXTENSIONS = new ParameterCollection("extensions", + FragmentLogging.class.getName(), FetchLogging.class.getName(), RemoteUserAuthenticationHandler.class + .getName(), Esi.class.getName(), ResourceFixup.class.getName(), XPoweredBy.class.getName(), + Surrogate.class.getName(), ConfigReloadOnChange.class.getName()); // Cache settings public static final Parameter<Boolean> USE_CACHE = new ParameterBoolean("useCache", true); public static final Parameter<Integer> MAX_CACHE_ENTRIES = new ParameterInteger("maxCacheEntries", 1000); @@ -98,10 +87,8 @@ public static final Parameter<String> CACHE_STORAGE = new ParameterString("cacheStorage", BasicCacheStorage.class.getName()); public static final Parameter<Boolean> X_CACHE_HEADER = new ParameterBoolean("xCacheHeader", false); public static final Parameter<Boolean> VIA_HEADER = new ParameterBoolean("viaHeader", true); - // Forced caching public static final Parameter<Integer> TTL = new ParameterInteger("ttl", 0); - // Heuristic caching public static final Parameter<Boolean> HEURISTIC_CACHING_ENABLED = new ParameterBoolean("heuristicCachingEnabled", true); // default value defined in @@ -109,26 +96,26 @@ public static final Parameter<Float> HEURISTIC_COEFFICIENT = new ParameterFloat("heuristicCoefficient", 0.1f); // when no cache directive at all, nothing is cached by default public static final Parameter<Integer> HEURISTIC_DEFAULT_LIFETIME_SECS = new ParameterInteger("heuristicDefaultLifetimeSecs", 0); - // Background revalidation public static final Parameter<Integer> STALE_WHILE_REVALIDATE = new ParameterInteger("staleWhileRevalidate", 0); public static final Parameter<Integer> STALE_IF_ERROR = new ParameterInteger("staleIfError", 0); public static final Parameter<Integer> MIN_ASYNCHRONOUS_WORKERS = new ParameterInteger("minAsynchronousWorkers", 0); public static final Parameter<Integer> MAX_ASYNCHRONOUS_WORKERS = new ParameterInteger("maxAsynchronousWorkers", 0); - public static final Parameter<Integer> ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS = new ParameterInteger("asynchronousWorkerIdleLifetimeSecs", 60); + public static final Parameter<Integer> ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS + = new ParameterInteger("asynchronousWorkerIdleLifetimeSecs", 60); public static final Parameter<Integer> MAX_UPDATE_RETRIES = new ParameterInteger("maxUpdateRetries", 1); public static final Parameter<Integer> REVALIDATION_QUEUE_SIZE = new ParameterInteger("revalidationQueueSize", 100); - // EhCache public static final Parameter<String> EHCACHE_CACHE_NAME_PROPERTY = new ParameterString("ehcache.cacheName", "esigate"); - public static final Parameter<String> EHCACHE_CONFIGURATION_FILE_PROPERTY = new ParameterString("ehcache.configurationFile", null); - + public static final Parameter<String> EHCACHE_CONFIGURATION_FILE_PROPERTY = new ParameterString("ehcache.configurationFile"); // MemCached - public static final Parameter<Collection<String>> MEMCACHED_SERVERS_PROPERTY = new ParameterCollection("memcached.servers", null); - + public static final Parameter<Collection<String>> MEMCACHED_SERVERS_PROPERTY = new ParameterCollection("memcached.servers"); // Default size for String or byte buffers used to manipulate html page contents public static final int DEFAULT_BUFFER_SIZE = 1024; - // Default size for String or byte buffers used to manipulate small things like tags, cookie, log lines public static final int SMALL_BUFFER_SIZE = 256; + + private Parameters() { + + } } Modified: trunk/esigate-core/src/main/java/org/esigate/api/Session.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/api/Session.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/api/Session.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -30,8 +30,8 @@ * decide to store the objects serialized in a cookie on the client side or server side with some session tracking * mechanism. * - * @param key - * @param value + * @param key the key + * @param value obejct to store */ void setAttribute(String key, Serializable value); @@ -39,7 +39,7 @@ * Retrieves an Object previously stored with method @see #setSessionAttribute(String, Serializable) or * <code>null</code>. * - * @param key + * @param key the key * @return the previously stored object or <code>null</code> */ Serializable getAttribute(String key); Modified: trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -15,6 +15,7 @@ package org.esigate.cache; import java.io.IOException; +import java.util.Arrays; import java.util.Date; import java.util.Properties; @@ -60,7 +61,7 @@ ttl = Parameters.TTL.getValue(properties); xCacheHeader = Parameters.X_CACHE_HEADER.getValue(properties); viaHeader = Parameters.VIA_HEADER.getValue(properties); - LOG.info("Initializing cache for provider " + Parameters.REMOTE_URL_BASE.getValue(properties) + LOG.info("Initializing cache for provider " + Arrays.toString(Parameters.REMOTE_URL_BASE.getValue(properties)) + " staleIfError=" + staleIfError + " staleWhileRevalidate=" + staleWhileRevalidate + " ttl=" + ttl + " xCacheHeader=" + xCacheHeader + " viaHeader=" + viaHeader); } Modified: trunk/esigate-core/src/main/java/org/esigate/events/EventManager.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/events/EventManager.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/events/EventManager.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -111,8 +111,7 @@ } if (LOG.isInfoEnabled()) { - LOG.info("Registered {} on event {}/{}", new Object[]{listener.getClass().getName(), driverId, - eventDefinition}); + LOG.info("Registered {} on event {}/{}", listener.getClass().getName(), driverId, eventDefinition); } } } @@ -157,7 +156,7 @@ // Loop on listeners for (IEventListener el : eventListeners) { if (LOG.isDebugEnabled()) { - LOG.debug("Running {} on event {}/{}", new Object[] {el, driverId, eventDefinition}); + LOG.debug("Running {} on event {}/{}", el, driverId, eventDefinition); } if (!el.event(eventDefinition, eventDetails)) { @@ -194,8 +193,7 @@ boolean removed = eventListeners.remove(listener); if (LOG.isInfoEnabled() && removed) { - LOG.info("Unregistered {} on event {}/{}", new Object[] {listener.getClass().getName(), driverId, - eventDefinition}); + LOG.info("Unregistered {} on event {}/{}", listener.getClass().getName(), driverId, eventDefinition); } } } Modified: trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -109,7 +109,7 @@ delay = SPEED_LIMIT; } } catch (NumberFormatException e) { - LOG.warn("Unable to convert {}={} as number", CONFIG_RELOAD_DELAY.getName(),e); + LOG.warn("Unable to convert {}={} as number", CONFIG_RELOAD_DELAY.getName(), e); } LOG.info("Will reload configuration every {}ms if {} is modified", Long.valueOf(delay), Modified: trunk/esigate-core/src/main/java/org/esigate/extension/FragmentLogging.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/FragmentLogging.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/extension/FragmentLogging.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -128,8 +128,8 @@ logMessage.append(" - "); } - logMessage.append(requestLine + " " + reqHeaders + " -> " + statusLine + " (" + time + " ms) " + cache - + " " + respHeaders); + logMessage.append(requestLine).append(" ").append(reqHeaders).append(" -> ").append(statusLine) + .append(" (").append(time).append(" ms) ").append(cache).append(" ").append(respHeaders); // Log level according to status code. if (statusCode >= HttpStatus.SC_BAD_REQUEST) { Modified: trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -15,7 +15,9 @@ package org.esigate.extension.monitoring; -import com.codahale.metrics.*; +import com.codahale.metrics.MetricRegistry; +import com.codahale.metrics.ScheduledReporter; +import com.codahale.metrics.Slf4jReporter; import org.apache.http.HttpStatus; import org.apache.http.client.cache.CacheResponseStatus; import org.apache.http.client.cache.HttpCacheContext; @@ -76,7 +78,8 @@ public boolean event(EventDefinition id, Event event) { - String timerName = MetricRegistry.name(this.getClass().getSimpleName(), driver.getConfiguration().getInstanceName(), id.getId()); + String timerName = MetricRegistry.name(this.getClass().getSimpleName(), + driver.getConfiguration().getInstanceName(), id.getId()); if (EventManager.EVENT_PROXY_POST.equals(id)) { @@ -100,7 +103,7 @@ } } - metric.meter(timerName.toString()).mark(); + metric.meter(timerName).mark(); return true; } Modified: trunk/esigate-core/src/main/java/org/esigate/util/Parameter.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/Parameter.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/util/Parameter.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -17,13 +17,25 @@ import java.util.Properties; -public class Parameter<T> { +/** + * A parameter with a T value. + * @param <T> type + */ +public abstract class Parameter<T> { private final String name; private final T defaultValue; @Override public boolean equals(Object obj) { - return this.name.equals(obj); + boolean equals = false; + if (obj != null) { + if (obj instanceof Parameter) { + equals = this.name.equals(((Parameter) obj).getName()); + } else if (obj != null && obj instanceof String) { + equals = this.name.equals(obj); + } + } + return equals; } @Override @@ -36,6 +48,9 @@ return this.name.hashCode(); } + public Parameter(String name) { + this(name, null); + } Parameter(String name, T defaultValue) { this.name = name; Modified: trunk/esigate-core/src/main/java/org/esigate/util/ParameterArray.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterArray.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterArray.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -14,9 +14,12 @@ */ package org.esigate.util; -import java.util.*; +import java.util.Collection; +import java.util.Collections; +import java.util.Properties; /** + * Array parameter. * @author Alexis Thaveau */ public class ParameterArray extends Parameter<String[]> { @@ -25,7 +28,11 @@ super(name, defaultValue); } + public ParameterArray(String name) { + super(name); + } + @Override public String[] getValue(Properties properties) { String[] value; Modified: trunk/esigate-core/src/main/java/org/esigate/util/ParameterBoolean.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterBoolean.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterBoolean.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -17,7 +17,8 @@ import java.util.Properties; /** - * @author Alexis Thaveau + * Boolean parameter. + * @author Alexis Thaveau */ public class ParameterBoolean extends Parameter<Boolean> { Modified: trunk/esigate-core/src/main/java/org/esigate/util/ParameterCollection.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterCollection.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterCollection.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -14,17 +14,24 @@ */ package org.esigate.util; -import java.util.*; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Properties; /** - * @author Alexis Thaveau + * Collection parameter. + * @author Alexis Thaveau */ public class ParameterCollection extends Parameter<Collection<String>> { - public ParameterCollection(String name, Collection<String> defaultValue) { - super(name, defaultValue); + public ParameterCollection(String name) { + super(name); } + public ParameterCollection(String name, String... defaultValue) { + super(name, Arrays.asList(defaultValue)); + } @Override public Collection<String> getValue(Properties properties) { Modified: trunk/esigate-core/src/main/java/org/esigate/util/ParameterFloat.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterFloat.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterFloat.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -17,6 +17,7 @@ import java.util.Properties; /** + * Float parameter. * @author Alexis Thaveau */ public class ParameterFloat extends Parameter<Float> { Modified: trunk/esigate-core/src/main/java/org/esigate/util/ParameterInteger.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterInteger.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterInteger.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -17,7 +17,8 @@ import java.util.Properties; /** - * @author Alexis Thaveau + * Integer parameter. + * @author Alexis Thaveau */ public class ParameterInteger extends Parameter<Integer> { @@ -28,12 +29,12 @@ @Override public Integer getValue(Properties properties) { Integer defaultValue = 0; - if(getDefaultValue()!=null){ + if (getDefaultValue() != null) { defaultValue = getDefaultValue(); } - Integer value = PropertiesUtil.getPropertyValue(properties,getName(),defaultValue); + Integer value = PropertiesUtil.getPropertyValue(properties, getName(), defaultValue); return value; - - + + } } Modified: trunk/esigate-core/src/main/java/org/esigate/util/ParameterLong.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterLong.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterLong.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -17,6 +17,7 @@ import java.util.Properties; /** + * Long parameter. * @author Alexis Thaveau */ public class ParameterLong extends Parameter<Long> { @@ -25,10 +26,14 @@ super(name, defaultValue); } + public ParameterLong(String name) { + super(name); + } + @Override public Long getValue(Properties properties) { - Long defaultValue = 0l; - if(getDefaultValue()!=null){ + Long defaultValue = 0L; + if (getDefaultValue() != null) { defaultValue = getDefaultValue(); } Long value = PropertiesUtil.getPropertyValue(properties, getName(), defaultValue); Modified: trunk/esigate-core/src/main/java/org/esigate/util/ParameterString.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterString.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterString.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -2,10 +2,24 @@ /** + * String parameter. * @author Alexis Thaveau */ public class ParameterString extends Parameter<String> { + /*** + *Constructor + * @param name name + * @param defaultValue defaultValue + */ public ParameterString(String name, String defaultValue) { super(name, defaultValue); } + + /*** + *Constructor + * @param name name + */ + public ParameterString(String name) { + super(name); + } } Modified: trunk/esigate-core/src/main/java/org/esigate/vars/Operations.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/vars/Operations.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/main/java/org/esigate/vars/Operations.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -124,7 +124,7 @@ } private static boolean executeOperations(ArrayList<String> operands, ArrayList<String> operations) { - boolean res = false; + boolean res; ArrayList<Boolean> results = new ArrayList<Boolean>(); try { Modified: trunk/esigate-core/src/test/java/org/esigate/extension/surrogate/SurrogateTest.java =================================================================== --- trunk/esigate-core/src/test/java/org/esigate/extension/surrogate/SurrogateTest.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/test/java/org/esigate/extension/surrogate/SurrogateTest.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -387,7 +387,7 @@ // Cache expired, this request fails. requestWithSurrogate = createRequest("http://test.mydomain.fr/foobar/").build(); try { - response = driverProxy(driver, requestWithSurrogate); + driverProxy(driver, requestWithSurrogate); fail("Should return 500"); } catch (HttpErrorPage e) { assertEquals("3", EntityUtils.toString(e.getHttpResponse().getEntity())); Modified: trunk/esigate-core/src/test/java/org/esigate/util/ParameterTest.java =================================================================== --- trunk/esigate-core/src/test/java/org/esigate/util/ParameterTest.java 2014-03-26 15:58:02 UTC (rev 1587) +++ trunk/esigate-core/src/test/java/org/esigate/util/ParameterTest.java 2014-03-27 13:25:10 UTC (rev 1588) @@ -71,8 +71,8 @@ } public void testGetValueCollection() throws Exception { - Parameter<Collection<String>> parameter1 = new ParameterCollection("test1", null); - Parameter<Collection<String>> parameter2 = new ParameterCollection("test2", Arrays.asList("v1", "v2")); + Parameter<Collection<String>> parameter1 = new ParameterCollection("test1"); + Parameter<Collection<String>> parameter2 = new ParameterCollection("test2", "v1", "v2"); Properties properties = new Properties(); assertNotNull(parameter1.getValue(properties)); assertTrue(parameter1.getValue(properties).isEmpty()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-26 15:58:06
|
Revision: 1587 http://sourceforge.net/p/webassembletool/code/1587 Author: athaveau Date: 2014-03-26 15:58:02 +0000 (Wed, 26 Mar 2014) Log Message: ----------- Delay configuration Modified Paths: -------------- trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java Modified: trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java 2014-03-26 15:54:59 UTC (rev 1586) +++ trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java 2014-03-26 15:58:02 UTC (rev 1587) @@ -102,10 +102,10 @@ // Load configuration try { // Try to convert as long - long configDelay = CONFIG_RELOAD_DELAY.getValue(properties); + delay = CONFIG_RELOAD_DELAY.getValue(properties); // Do not watch faster than SPEED_LIMIT - if (configDelay < SPEED_LIMIT) { + if (delay < SPEED_LIMIT) { delay = SPEED_LIMIT; } } catch (NumberFormatException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-26 15:55:02
|
Revision: 1586 http://sourceforge.net/p/webassembletool/code/1586 Author: athaveau Date: 2014-03-26 15:54:59 +0000 (Wed, 26 Mar 2014) Log Message: ----------- #289 : new parameter stripMappingPath to perform the mapping path removal Added Paths: ----------- trunk/esigate-servlet/src/test/java/org/esigate/servlet/impl/RequestUrlTest.java Added: trunk/esigate-servlet/src/test/java/org/esigate/servlet/impl/RequestUrlTest.java =================================================================== --- trunk/esigate-servlet/src/test/java/org/esigate/servlet/impl/RequestUrlTest.java (rev 0) +++ trunk/esigate-servlet/src/test/java/org/esigate/servlet/impl/RequestUrlTest.java 2014-03-26 15:54:59 UTC (rev 1586) @@ -0,0 +1,45 @@ +/* + * 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 org.esigate.servlet.impl; + +import junit.framework.TestCase; +import org.esigate.impl.UriMapping; +import org.mockito.Mockito; + +import javax.servlet.http.HttpServletRequest; + +/** + * @author Alexis Thaveau. + */ +public class RequestUrlTest extends TestCase { + public void testGetRelativeUrl() throws Exception { + HttpServletRequest request = Mockito.mock(HttpServletRequest.class); + Mockito.when(request.getContextPath()).thenReturn("/context"); + Mockito.when(request.getServletPath()).thenReturn("/servlet"); + Mockito.when(request.getRequestURI()).thenReturn("/context/servlet/resource"); + assertEquals("/servlet/resource",RequestUrl.getRelativeUrl(request,false)); + assertEquals("/resource",RequestUrl.getRelativeUrl(request,true)); + } + + public void testStripMappingPath() throws Exception { + UriMapping mapping = UriMapping.create("/url/to/resource"); + String relUrl = RequestUrl.stripMappingPath("/mapping/path/test", mapping); + assertEquals("/mapping/path/test", relUrl); + + mapping = UriMapping.create("/mapping/path/test"); + relUrl = RequestUrl.stripMappingPath("/mapping/path/test/url/to/resource",mapping); + assertEquals("/url/to/resource", relUrl); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-26 15:53:50
|
Revision: 1585 http://sourceforge.net/p/webassembletool/code/1585 Author: athaveau Date: 2014-03-26 15:53:43 +0000 (Wed, 26 Mar 2014) Log Message: ----------- Upgrade cargo plugin version and jetty embedded version Modified Paths: -------------- trunk/esigate-app-aggregator/pom.xml trunk/esigate-app-aggregator/src/test/java/org/esigate/test/cases/RequestHeadersTest.java trunk/esigate-app-casified-aggregator/pom.xml trunk/esigate-app-master/pom.xml trunk/pom.xml Modified: trunk/esigate-app-aggregator/pom.xml =================================================================== --- trunk/esigate-app-aggregator/pom.xml 2014-03-26 15:51:21 UTC (rev 1584) +++ trunk/esigate-app-aggregator/pom.xml 2014-03-26 15:53:43 UTC (rev 1585) @@ -31,7 +31,7 @@ <artifactId>slf4j-log4j12</artifactId> </dependency> - <dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> @@ -134,23 +134,28 @@ </execution> </executions> <configuration> + <container> + <containerId>jetty7x</containerId> + <type>embedded</type> + </container> + <deployables> + <deployable> + <groupId>org.esigate</groupId> + <artifactId>esigate-app-aggregated1</artifactId> + <properties> + <context>esigate-app-aggregated1</context> + </properties> + </deployable> + <deployable> + <groupId>org.esigate</groupId> + <artifactId>esigate-app-aggregated2</artifactId> + <properties> + <context>esigate-app-aggregated2</context> + </properties> + </deployable> + </deployables> <configuration> - <deployables> - <deployable> - <groupId>org.esigate</groupId> - <artifactId>esigate-app-aggregated1</artifactId> - <properties> - <context>esigate-app-aggregated1</context> - </properties> - </deployable> - <deployable> - <groupId>org.esigate</groupId> - <artifactId>esigate-app-aggregated2</artifactId> - <properties> - <context>esigate-app-aggregated2</context> - </properties> - </deployable> - </deployables> + <properties> <cargo.jvmargs>-Xmx256M -server</cargo.jvmargs> </properties> Modified: trunk/esigate-app-aggregator/src/test/java/org/esigate/test/cases/RequestHeadersTest.java =================================================================== --- trunk/esigate-app-aggregator/src/test/java/org/esigate/test/cases/RequestHeadersTest.java 2014-03-26 15:51:21 UTC (rev 1584) +++ trunk/esigate-app-aggregator/src/test/java/org/esigate/test/cases/RequestHeadersTest.java 2014-03-26 15:53:43 UTC (rev 1585) @@ -159,7 +159,7 @@ public void testCookie() throws Exception { // In driver.properties, cookie "test0" is supposed to be forwarded but // not test4 - String resp = sendRequestWithHeader("Cookie", "test0=dummy,test4=dummy"); + String resp = sendRequestWithHeader("Cookie", "test0=dummy;test4=dummy"); assertEquals("HTTP header Cookie should not be forwarded as is due to cookies filtering", "cookie: test0=dummy", resp.toLowerCase()); } Modified: trunk/esigate-app-casified-aggregator/pom.xml =================================================================== --- trunk/esigate-app-casified-aggregator/pom.xml 2014-03-26 15:51:21 UTC (rev 1584) +++ trunk/esigate-app-casified-aggregator/pom.xml 2014-03-26 15:53:43 UTC (rev 1585) @@ -130,28 +130,30 @@ </execution> </executions> <configuration> - <configuration> - <deployables> - <deployable> - <artifactId>esigate-app-cas</artifactId> - <properties> - <context>esigate-app-cas</context> - </properties> - </deployable> - <deployable> - <artifactId>esigate-app-casified-aggregated1</artifactId> - <properties> - <context>esigate-app-casified-aggregated1</context> - </properties> - </deployable> - <deployable> - <artifactId>esigate-app-casified-aggregated2</artifactId> - <properties> - <context>esigate-app-casified-aggregated2</context> - </properties> - </deployable> - </deployables> - </configuration> + <container> + <containerId>jetty7x</containerId> + <type>embedded</type> + </container> + <deployables> + <deployable> + <artifactId>esigate-app-cas</artifactId> + <properties> + <context>esigate-app-cas</context> + </properties> + </deployable> + <deployable> + <artifactId>esigate-app-casified-aggregated1</artifactId> + <properties> + <context>esigate-app-casified-aggregated1</context> + </properties> + </deployable> + <deployable> + <artifactId>esigate-app-casified-aggregated2</artifactId> + <properties> + <context>esigate-app-casified-aggregated2</context> + </properties> + </deployable> + </deployables> </configuration> </plugin> </plugins> Modified: trunk/esigate-app-master/pom.xml =================================================================== --- trunk/esigate-app-master/pom.xml 2014-03-26 15:51:21 UTC (rev 1584) +++ trunk/esigate-app-master/pom.xml 2014-03-26 15:53:43 UTC (rev 1585) @@ -105,16 +105,18 @@ </execution> </executions> <configuration> - <configuration> - <deployables> - <deployable> - <artifactId>esigate-app-provider</artifactId> - <properties> - <context>esigate-app-provider</context> - </properties> - </deployable> - </deployables> - </configuration> + <container> + <containerId>jetty7x</containerId> + <type>embedded</type> + </container> + <deployables> + <deployable> + <artifactId>esigate-app-provider</artifactId> + <properties> + <context>esigate-app-provider</context> + </properties> + </deployable> + </deployables> </configuration> </plugin> </plugins> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2014-03-26 15:51:21 UTC (rev 1584) +++ trunk/pom.xml 2014-03-26 15:53:43 UTC (rev 1585) @@ -200,7 +200,7 @@ <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> - <version>1.1.2</version> + <version>1.4.7</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-26 15:51:27
|
Revision: 1584 http://sourceforge.net/p/webassembletool/code/1584 Author: athaveau Date: 2014-03-26 15:51:21 +0000 (Wed, 26 Mar 2014) Log Message: ----------- #297 : refactoring parameter (Parameter<T>) Modified Paths: -------------- trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java trunk/esigate-core/src/main/java/org/esigate/Parameters.java trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java trunk/esigate-core/src/main/java/org/esigate/cache/CacheConfigHelper.java trunk/esigate-core/src/main/java/org/esigate/cache/EhcacheCacheStorage.java trunk/esigate-core/src/main/java/org/esigate/cache/MemcachedCacheStorage.java trunk/esigate-core/src/main/java/org/esigate/cookie/DefaultCookieManager.java trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java trunk/esigate-core/src/main/java/org/esigate/extension/DefaultCharset.java trunk/esigate-core/src/main/java/org/esigate/extension/ExtensionFactory.java trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java trunk/esigate-core/src/main/java/org/esigate/extension/parallelesi/Esi.java trunk/esigate-core/src/main/java/org/esigate/http/ContentTypeHelper.java trunk/esigate-core/src/main/java/org/esigate/http/HttpClientRequestExecutor.java trunk/esigate-core/src/main/java/org/esigate/impl/UrlRewriter.java trunk/esigate-core/src/main/java/org/esigate/util/Parameter.java trunk/esigate-core/src/main/java/org/esigate/util/PropertiesUtil.java trunk/esigate-servlet/src/main/java/org/esigate/servlet/ServletExtension.java Added Paths: ----------- trunk/esigate-core/src/main/java/org/esigate/util/ParameterArray.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterBoolean.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterCollection.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterFloat.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterInteger.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterLong.java trunk/esigate-core/src/main/java/org/esigate/util/ParameterString.java trunk/esigate-core/src/test/java/org/esigate/util/ParameterTest.java Modified: trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -49,11 +49,11 @@ public DriverConfiguration(String instanceName, Properties props) { this.instanceName = instanceName; this.baseUrlRetrieveStrategy = getBaseUrlRetrieveSession(props); - this.uriEncoding = Parameters.URI_ENCODING.getValueString(props); - this.preserveHost = Parameters.PRESERVE_HOST.getValueBoolean(props); - this.visibleBaseURL = Parameters.VISIBLE_URL_BASE.getValueString(props); + this.uriEncoding = Parameters.URI_ENCODING.getValue(props); + this.preserveHost = Parameters.PRESERVE_HOST.getValue(props); + this.visibleBaseURL = Parameters.VISIBLE_URL_BASE.getValue(props); this.isVisibleBaseURLEmpty = StringUtils.isEmpty(visibleBaseURL); - this.stripMappingPath= Parameters.STRIP_MAPPING_PATH.getValueBoolean(props); + this.stripMappingPath= Parameters.STRIP_MAPPING_PATH.getValue(props); this.uriMappings = parseMappings(props); properties = props; } @@ -67,7 +67,7 @@ private static List<UriMapping> parseMappings(Properties props) { List<UriMapping> mappings = new ArrayList<UriMapping>(); - Collection<String> mappingsParam = Parameters.MAPPINGS.getValueList(props); + Collection<String> mappingsParam = Parameters.MAPPINGS.getValue(props); for (String mappingParam : mappingsParam) { mappings.add(UriMapping.create(mappingParam)); } @@ -77,14 +77,14 @@ private BaseUrlRetrieveStrategy getBaseUrlRetrieveSession(Properties props) { BaseUrlRetrieveStrategy urlStrategy; - String[] baseURLs = Parameters.REMOTE_URL_BASE.getValueArray(props); + String[] baseURLs = Parameters.REMOTE_URL_BASE.getValue(props); if (baseURLs.length == 0) { throw new ConfigurationException(Parameters.REMOTE_URL_BASE.getName() + " property cannot be empty for instance '" + instanceName + "'"); } else if (baseURLs.length == 1) { urlStrategy = new SingleBaseUrlRetrieveStrategy(baseURLs[0]); } else { - String strategy = Parameters.REMOTE_URL_BASE_STRATEGY.getValueString(props); + String strategy = Parameters.REMOTE_URL_BASE_STRATEGY.getValue(props); if (Parameters.ROUNDROBIN.equalsIgnoreCase(strategy)) { urlStrategy = new RoundRobinBaseUrlRetrieveStrategy(baseURLs); } else if (Parameters.IPHASH.equalsIgnoreCase(strategy)) { Modified: trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/DriverFactory.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -167,7 +167,7 @@ newInstances.put(name, createDriver(name, properties)); } if (newInstances.get(DEFAULT_INSTANCE_NAME) == null - && Parameters.REMOTE_URL_BASE.getValueString(defaultProperties) != null) { + && Parameters.REMOTE_URL_BASE.getValue(defaultProperties)!=null) { newInstances.put(DEFAULT_INSTANCE_NAME, createDriver(DEFAULT_INSTANCE_NAME, defaultProperties)); } Modified: trunk/esigate-core/src/main/java/org/esigate/Parameters.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/Parameters.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/Parameters.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -26,12 +26,21 @@ import org.esigate.extension.XPoweredBy; import org.esigate.extension.surrogate.Surrogate; import org.esigate.util.Parameter; +import org.esigate.util.ParameterArray; +import org.esigate.util.ParameterBoolean; +import org.esigate.util.ParameterCollection; +import org.esigate.util.ParameterFloat; +import org.esigate.util.ParameterInteger; +import org.esigate.util.ParameterString; +import java.util.Arrays; +import java.util.Collection; + /** * Configuration properties names and default values. - * + * * @author Francois-Xavier Bonnet - * + * */ public final class Parameters { @@ -40,37 +49,36 @@ } // Core parameters - public static final Parameter REMOTE_URL_BASE = new Parameter("remoteUrlBase", null); - public static final Parameter MAPPINGS = new Parameter("mappings", null); - public static final Parameter STRIP_MAPPING_PATH = new Parameter("stripMappingPath", null); - public static final Parameter URI_ENCODING = new Parameter("uriEncoding", "ISO-8859-1"); - public static final Parameter PARSABLE_CONTENT_TYPES = new Parameter("parsableContentTypes", - "text/html, application/xhtml+xml"); + public static final Parameter<String[]> REMOTE_URL_BASE = new ParameterArray("remoteUrlBase", null); + public static final Parameter<Collection<String>> MAPPINGS = new ParameterCollection("mappings",null); + public static final Parameter<Boolean> STRIP_MAPPING_PATH = new ParameterBoolean("stripMappingPath", false); + public static final Parameter<String> URI_ENCODING = new ParameterString("uriEncoding", "ISO-8859-1"); + public static final Parameter<Collection<String>> PARSABLE_CONTENT_TYPES = new ParameterCollection("parsableContentTypes", Arrays.asList("text/html", "application/xhtml+xml")); // Network settings - public static final Parameter MAX_CONNECTIONS_PER_HOST = new Parameter("maxConnectionsPerHost", "20"); - public static final Parameter CONNECT_TIMEOUT = new Parameter("connectTimeout", "1000"); - public static final Parameter SOCKET_TIMEOUT = new Parameter("socketTimeout", "10000"); + public static final Parameter<Integer> MAX_CONNECTIONS_PER_HOST = new ParameterInteger("maxConnectionsPerHost", 20); + public static final Parameter<Integer> CONNECT_TIMEOUT = new ParameterInteger("connectTimeout", 1000); + public static final Parameter<Integer> SOCKET_TIMEOUT = new ParameterInteger("socketTimeout", 10000); // Proxy settings - public static final Parameter PROXY_HOST = new Parameter("proxyHost", null); - public static final Parameter PROXY_PORT = new Parameter("proxyPort", null); - public static final Parameter PROXY_USER = new Parameter("proxyUser", null); - public static final Parameter PROXY_PASSWORD = new Parameter("proxyPassword", null); + public static final Parameter<String> PROXY_HOST = new ParameterString("proxyHost", null); + public static final Parameter<Integer> PROXY_PORT = new ParameterInteger("proxyPort", 0 ); + public static final Parameter<String> PROXY_USER = new ParameterString("proxyUser", null); + public static final Parameter<String> PROXY_PASSWORD = new ParameterString("proxyPassword", null); // Http headers - public static final Parameter PRESERVE_HOST = new Parameter("preserveHost", "true"); + public static final Parameter<Boolean> PRESERVE_HOST = new ParameterBoolean("preserveHost", true); // Cookies - public static final Parameter COOKIE_MANAGER = new Parameter("cookieManager", DefaultCookieManager.class.getName()); - public static final Parameter DISCARD_COOKIES = new Parameter("discardCookies", null); - public static final Parameter STORE_COOKIES_IN_SESSION = new Parameter("storeCookiesInSession", null); + public static final Parameter<String> COOKIE_MANAGER = new ParameterString("cookieManager", DefaultCookieManager.class.getName()); + public static final Parameter<Collection<String>> DISCARD_COOKIES = new ParameterCollection("discardCookies",null); + public static final Parameter<Collection<String>> STORE_COOKIES_IN_SESSION = new ParameterCollection("storeCookiesInSession",null); - public static final Parameter FIX_MODE = new Parameter("fixMode", "relative"); - public static final Parameter VISIBLE_URL_BASE = new Parameter("visibleUrlBase", null); + public static final Parameter<String> FIX_MODE = new ParameterString("fixMode", "relative"); + public static final Parameter<String> VISIBLE_URL_BASE = new ParameterString("visibleUrlBase", null); // Load-balancing - public static final Parameter REMOTE_URL_BASE_STRATEGY = new Parameter("remoteUrlBaseStrategy", + public static final Parameter<String> REMOTE_URL_BASE_STRATEGY = new ParameterString("remoteUrlBaseStrategy", Parameters.ROUNDROBIN); // Possible values for remoteUrlBaseStrategy public static final String STICKYSESSION = "stickysession"; @@ -78,46 +86,45 @@ public static final String ROUNDROBIN = "roundrobin"; // Extensions - public static final Parameter EXTENSIONS = new Parameter("extensions", FragmentLogging.class.getName() + "," - + FetchLogging.class.getName() + "," + RemoteUserAuthenticationHandler.class.getName() + "," - + Esi.class.getName() + "," + ResourceFixup.class.getName() + "," + XPoweredBy.class.getName() + "," - + Surrogate.class.getName() + "," + ConfigReloadOnChange.class.getName()); + public static final Parameter<Collection<String>> EXTENSIONS = new ParameterCollection("extensions", Arrays.asList(FragmentLogging.class.getName(), + FetchLogging.class.getName() , RemoteUserAuthenticationHandler.class.getName() , + Esi.class.getName() , ResourceFixup.class.getName() , XPoweredBy.class.getName() , + Surrogate.class.getName() , ConfigReloadOnChange.class.getName())); // Cache settings - public static final Parameter USE_CACHE = new Parameter("useCache", "true"); - public static final Parameter MAX_CACHE_ENTRIES = new Parameter("maxCacheEntries", "1000"); - public static final Parameter MAX_OBJECT_SIZE = new Parameter("maxObjectSize", "1000000"); - public static final Parameter CACHE_STORAGE = new Parameter("cacheStorage", BasicCacheStorage.class.getName()); - public static final Parameter X_CACHE_HEADER = new Parameter("xCacheHeader", "false"); - public static final Parameter VIA_HEADER = new Parameter("viaHeader", "true"); + public static final Parameter<Boolean> USE_CACHE = new ParameterBoolean("useCache", true); + public static final Parameter<Integer> MAX_CACHE_ENTRIES = new ParameterInteger("maxCacheEntries", 1000); + public static final Parameter<Integer> MAX_OBJECT_SIZE = new ParameterInteger("maxObjectSize", 1000000); + public static final Parameter<String> CACHE_STORAGE = new ParameterString("cacheStorage", BasicCacheStorage.class.getName()); + public static final Parameter<Boolean> X_CACHE_HEADER = new ParameterBoolean("xCacheHeader", false); + public static final Parameter<Boolean> VIA_HEADER = new ParameterBoolean("viaHeader", true); // Forced caching - public static final Parameter TTL = new Parameter("ttl", "0"); + public static final Parameter<Integer> TTL = new ParameterInteger("ttl", 0); // Heuristic caching - public static final Parameter HEURISTIC_CACHING_ENABLED = new Parameter("heuristicCachingEnabled", "true"); + public static final Parameter<Boolean> HEURISTIC_CACHING_ENABLED = new ParameterBoolean("heuristicCachingEnabled", true); // default value defined in // http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.4 - public static final Parameter HEURISTIC_COEFFICIENT = new Parameter("heuristicCoefficient", "0.1"); + public static final Parameter<Float> HEURISTIC_COEFFICIENT = new ParameterFloat("heuristicCoefficient", 0.1f); // when no cache directive at all, nothing is cached by default - public static final Parameter HEURISTIC_DEFAULT_LIFETIME_SECS = new Parameter("heuristicDefaultLifetimeSecs", "0"); + public static final Parameter<Integer> HEURISTIC_DEFAULT_LIFETIME_SECS = new ParameterInteger("heuristicDefaultLifetimeSecs", 0); // Background revalidation - public static final Parameter STALE_WHILE_REVALIDATE = new Parameter("staleWhileRevalidate", "0"); - public static final Parameter STALE_IF_ERROR = new Parameter("staleIfError", "0"); - public static final Parameter MIN_ASYNCHRONOUS_WORKERS = new Parameter("minAsynchronousWorkers", "0"); - public static final Parameter MAX_ASYNCHRONOUS_WORKERS = new Parameter("maxAsynchronousWorkers", "0"); - public static final Parameter ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS = new Parameter( - "asynchronousWorkerIdleLifetimeSecs", "60"); - public static final Parameter MAX_UPDATE_RETRIES = new Parameter("maxUpdateRetries", "1"); - public static final Parameter REVALIDATION_QUEUE_SIZE = new Parameter("revalidationQueueSize", "100"); + public static final Parameter<Integer> STALE_WHILE_REVALIDATE = new ParameterInteger("staleWhileRevalidate", 0); + public static final Parameter<Integer> STALE_IF_ERROR = new ParameterInteger("staleIfError", 0); + public static final Parameter<Integer> MIN_ASYNCHRONOUS_WORKERS = new ParameterInteger("minAsynchronousWorkers", 0); + public static final Parameter<Integer> MAX_ASYNCHRONOUS_WORKERS = new ParameterInteger("maxAsynchronousWorkers", 0); + public static final Parameter<Integer> ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS = new ParameterInteger("asynchronousWorkerIdleLifetimeSecs", 60); + public static final Parameter<Integer> MAX_UPDATE_RETRIES = new ParameterInteger("maxUpdateRetries", 1); + public static final Parameter<Integer> REVALIDATION_QUEUE_SIZE = new ParameterInteger("revalidationQueueSize", 100); // EhCache - public static final Parameter EHCACHE_CACHE_NAME_PROPERTY = new Parameter("ehcache.cacheName", "esigate"); - public static final Parameter EHCACHE_CONFIGURATION_FILE_PROPERTY = new Parameter("ehcache.configurationFile", null); + public static final Parameter<String> EHCACHE_CACHE_NAME_PROPERTY = new ParameterString("ehcache.cacheName", "esigate"); + public static final Parameter<String> EHCACHE_CONFIGURATION_FILE_PROPERTY = new ParameterString("ehcache.configurationFile", null); // MemCached - public static final Parameter MEMCACHED_SERVERS_PROPERTY = new Parameter("memcached.servers", null); + public static final Parameter<Collection<String>> MEMCACHED_SERVERS_PROPERTY = new ParameterCollection("memcached.servers", null); // Default size for String or byte buffers used to manipulate html page contents public static final int DEFAULT_BUFFER_SIZE = 1024; Modified: trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/cache/CacheAdapter.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -50,17 +50,17 @@ private boolean viaHeader; public void init(Properties properties) { - staleIfError = Parameters.STALE_IF_ERROR.getValueInt(properties); - staleWhileRevalidate = Parameters.STALE_WHILE_REVALIDATE.getValueInt(properties); - int maxAsynchronousWorkers = Parameters.MAX_ASYNCHRONOUS_WORKERS.getValueInt(properties); + staleIfError = Parameters.STALE_IF_ERROR.getValue(properties); + staleWhileRevalidate = Parameters.STALE_WHILE_REVALIDATE.getValue(properties); + int maxAsynchronousWorkers = Parameters.MAX_ASYNCHRONOUS_WORKERS.getValue(properties); if (staleWhileRevalidate > 0 && maxAsynchronousWorkers == 0) { throw new ConfigurationException("You must set a positive value for maxAsynchronousWorkers " + "in order to enable background revalidation (staleWhileRevalidate)"); } - ttl = Parameters.TTL.getValueInt(properties); - xCacheHeader = Parameters.X_CACHE_HEADER.getValueBoolean(properties); - viaHeader = Parameters.VIA_HEADER.getValueBoolean(properties); - LOG.info("Initializing cache for provider " + Parameters.REMOTE_URL_BASE.getValueString(properties) + ttl = Parameters.TTL.getValue(properties); + xCacheHeader = Parameters.X_CACHE_HEADER.getValue(properties); + viaHeader = Parameters.VIA_HEADER.getValue(properties); + LOG.info("Initializing cache for provider " + Parameters.REMOTE_URL_BASE.getValue(properties) + " staleIfError=" + staleIfError + " staleWhileRevalidate=" + staleWhileRevalidate + " ttl=" + ttl + " xCacheHeader=" + xCacheHeader + " viaHeader=" + viaHeader); } Modified: trunk/esigate-core/src/main/java/org/esigate/cache/CacheConfigHelper.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/cache/CacheConfigHelper.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/cache/CacheConfigHelper.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -29,19 +29,19 @@ public static CacheConfig createCacheConfig(Properties properties) { // Heuristic caching - boolean heuristicCachingEnabled = Parameters.HEURISTIC_CACHING_ENABLED.getValueBoolean(properties); - float heuristicCoefficient = Parameters.HEURISTIC_COEFFICIENT.getValueFloat(properties); - long heuristicDefaultLifetimeSecs = Parameters.HEURISTIC_DEFAULT_LIFETIME_SECS.getValueLong(properties); - int maxCacheEntries = Parameters.MAX_CACHE_ENTRIES.getValueInt(properties); - long maxObjectSize = Parameters.MAX_OBJECT_SIZE.getValueLong(properties); + boolean heuristicCachingEnabled = Parameters.HEURISTIC_CACHING_ENABLED.getValue(properties); + float heuristicCoefficient = Parameters.HEURISTIC_COEFFICIENT.getValue(properties); + long heuristicDefaultLifetimeSecs = Parameters.HEURISTIC_DEFAULT_LIFETIME_SECS.getValue(properties); + int maxCacheEntries = Parameters.MAX_CACHE_ENTRIES.getValue(properties); + long maxObjectSize = Parameters.MAX_OBJECT_SIZE.getValue(properties); // Asynchronous revalidation - int minAsynchronousWorkers = Parameters.MIN_ASYNCHRONOUS_WORKERS.getValueInt(properties); - int maxAsynchronousWorkers = Parameters.MAX_ASYNCHRONOUS_WORKERS.getValueInt(properties); + int minAsynchronousWorkers = Parameters.MIN_ASYNCHRONOUS_WORKERS.getValue(properties); + int maxAsynchronousWorkers = Parameters.MAX_ASYNCHRONOUS_WORKERS.getValue(properties); int asynchronousWorkerIdleLifetimeSecs = Parameters.ASYNCHRONOUS_WORKER_IDLE_LIFETIME_SECS - .getValueInt(properties); - int maxUpdateRetries = Parameters.MAX_UPDATE_RETRIES.getValueInt(properties); - int revalidationQueueSize = Parameters.REVALIDATION_QUEUE_SIZE.getValueInt(properties); + .getValue(properties); + int maxUpdateRetries = Parameters.MAX_UPDATE_RETRIES.getValue(properties); + int revalidationQueueSize = Parameters.REVALIDATION_QUEUE_SIZE.getValue(properties); CacheConfig.Builder builder = CacheConfig.custom(); builder.setHeuristicCachingEnabled(heuristicCachingEnabled); @@ -58,7 +58,7 @@ } public static CacheStorage createCacheStorage(Properties properties) { - String cacheStorageClass = Parameters.CACHE_STORAGE.getValueString(properties); + String cacheStorageClass = Parameters.CACHE_STORAGE.getValue(properties); Object cacheStorageObject; try { cacheStorageObject = Class.forName(cacheStorageClass).newInstance(); Modified: trunk/esigate-core/src/main/java/org/esigate/cache/EhcacheCacheStorage.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/cache/EhcacheCacheStorage.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/cache/EhcacheCacheStorage.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -28,8 +28,8 @@ @Override public void init(Properties properties) { - String cacheName = Parameters.EHCACHE_CACHE_NAME_PROPERTY.getValueString(properties); - String configurationFileName = Parameters.EHCACHE_CONFIGURATION_FILE_PROPERTY.getValueString(properties); + String cacheName = Parameters.EHCACHE_CACHE_NAME_PROPERTY.getValue(properties); + String configurationFileName = Parameters.EHCACHE_CONFIGURATION_FILE_PROPERTY.getValue(properties); // Loaded from the Classpath, default will use /ehcache.xml or if not found /ehcache-failsafe.xml CacheManager cacheManager = CacheManager.create(configurationFileName); Ehcache ehcache = cacheManager.getEhcache(cacheName); Modified: trunk/esigate-core/src/main/java/org/esigate/cache/MemcachedCacheStorage.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/cache/MemcachedCacheStorage.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/cache/MemcachedCacheStorage.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -34,7 +34,7 @@ public class MemcachedCacheStorage extends CacheStorage { @Override public void init(Properties properties) { - Collection<String> serverStringList = Parameters.MEMCACHED_SERVERS_PROPERTY.getValueList(properties); + Collection<String> serverStringList = Parameters.MEMCACHED_SERVERS_PROPERTY.getValue(properties); if (serverStringList.isEmpty()) { throw new ConfigurationException("No memcached server defined. Property '" + Parameters.MEMCACHED_SERVERS_PROPERTY + "' must be defined."); Modified: trunk/esigate-core/src/main/java/org/esigate/cookie/DefaultCookieManager.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/cookie/DefaultCookieManager.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/cookie/DefaultCookieManager.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -62,9 +62,9 @@ @Override public void init(Driver d, Properties properties) { // Cookies to store to session - this.storeCookiesInSession = Parameters.STORE_COOKIES_IN_SESSION.getValueList(properties); + this.storeCookiesInSession = Parameters.STORE_COOKIES_IN_SESSION.getValue(properties); // Cookies to discard - this.discardCookies = Parameters.DISCARD_COOKIES.getValueList(properties); + this.discardCookies = Parameters.DISCARD_COOKIES.getValue(properties); // Verify configuration if (this.storeCookiesInSession.contains("*") && this.storeCookiesInSession.size() > 1) { Modified: trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/extension/ConfigReloadOnChange.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -14,17 +14,18 @@ */ package org.esigate.extension; -import java.io.File; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.Properties; - import org.esigate.Driver; import org.esigate.DriverFactory; import org.esigate.util.Parameter; +import org.esigate.util.ParameterLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.File; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.Properties; + /** * This extension reloads configuration when esigate.properties is updated. * <p> @@ -47,8 +48,8 @@ * The wait time (ms) between to check for configuration change. * */ - public static final Parameter CONFIG_RELOAD_DELAY = new Parameter("configReloadDelay", - String.valueOf(DEFAULT_RELOAD_DELAY)); + public static final Parameter<Long> CONFIG_RELOAD_DELAY = new ParameterLong("configReloadDelay", + DEFAULT_RELOAD_DELAY); // Do not poll too fast. (ms). private static final int SPEED_LIMIT = 100; @@ -101,15 +102,14 @@ // Load configuration try { // Try to convert as long - long configDelay = CONFIG_RELOAD_DELAY.getValueLong(properties); + long configDelay = CONFIG_RELOAD_DELAY.getValue(properties); // Do not watch faster than SPEED_LIMIT if (configDelay < SPEED_LIMIT) { delay = SPEED_LIMIT; } } catch (NumberFormatException e) { - LOG.warn("Unable to convert {}={} as number", CONFIG_RELOAD_DELAY.getName(), - CONFIG_RELOAD_DELAY.getValueString(properties)); + LOG.warn("Unable to convert {}={} as number", CONFIG_RELOAD_DELAY.getName(),e); } LOG.info("Will reload configuration every {}ms if {} is modified", Long.valueOf(delay), Modified: trunk/esigate-core/src/main/java/org/esigate/extension/DefaultCharset.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/DefaultCharset.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/extension/DefaultCharset.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -1,8 +1,5 @@ package org.esigate.extension; -import java.util.Collection; -import java.util.Properties; - import org.apache.commons.lang3.StringUtils; import org.apache.http.Header; import org.esigate.Driver; @@ -13,9 +10,13 @@ import org.esigate.events.IEventListener; import org.esigate.events.impl.FetchEvent; import org.esigate.util.Parameter; +import org.esigate.util.ParameterString; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Collection; +import java.util.Properties; + /** * This extension adds a default charset to responses which lack the charset attribute in Content-Type header. Only * parsable MIME types are modified : @@ -43,7 +44,7 @@ public class DefaultCharset implements Extension, IEventListener { private static final Logger LOG = LoggerFactory.getLogger(DefaultCharset.class); - public static final Parameter PARAM_DEFAULT_CHARSET = new Parameter("defaultCharset", "ISO-8859-1"); + public static final Parameter<String> PARAM_DEFAULT_CHARSET = new ParameterString("defaultCharset", "ISO-8859-1"); private Collection<String> parsableContentTypes; private String defaultCharset; @@ -52,8 +53,8 @@ public void init(Driver driver, Properties properties) { driver.getEventManager().register(EventManager.EVENT_FETCH_POST, this); - parsableContentTypes = Parameters.PARSABLE_CONTENT_TYPES.getValueList(properties); - defaultCharset = PARAM_DEFAULT_CHARSET.getValueString(properties); + parsableContentTypes = Parameters.PARSABLE_CONTENT_TYPES.getValue(properties); + defaultCharset = PARAM_DEFAULT_CHARSET.getValue(properties); LOG.info("Will use " + defaultCharset + " as default charset for " + parsableContentTypes.toString()); Modified: trunk/esigate-core/src/main/java/org/esigate/extension/ExtensionFactory.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/ExtensionFactory.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/extension/ExtensionFactory.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -51,9 +51,9 @@ * class which extends Extension class which extends Extension * @return instance of {@link Extension} or null. */ - public static <T extends Extension> T getExtension(Properties properties, Parameter parameter, Driver d) { + public static <T extends Extension> T getExtension(Properties properties, Parameter<String> parameter, Driver d) { T result = null; - String className = parameter.getValueString(properties); + String className = parameter.getValue(properties); if (className == null) { return null; } @@ -81,8 +81,8 @@ * @param d * @return the extension list */ - public static <T extends Extension> List<T> getExtensions(Properties properties, Parameter parameter, Driver d) { - Collection<String> className = parameter.getValueList(properties); + public static <T extends Extension> List<T> getExtensions(Properties properties, Parameter<Collection<String>> parameter, Driver d) { + Collection<String> className = parameter.getValue(properties); List<T> finalResult = new ArrayList<T>(); for (String cName : className) { try { Modified: trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -28,6 +28,7 @@ import org.esigate.events.impl.ProxyEvent; import org.esigate.extension.Extension; import org.esigate.util.Parameter; +import org.esigate.util.ParameterInteger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,7 +47,7 @@ */ public class Metric implements Extension, IEventListener { private static final Logger LOG = LoggerFactory.getLogger(Metric.class); - private static final Parameter PARAM_METRIC_PERIOD = new Parameter("metricPeriod", "60"); + private static final Parameter<Integer> PARAM_METRIC_PERIOD = new ParameterInteger("metricPeriod", 60); private MetricRegistry metric = new MetricRegistry(); private ScheduledReporter reporter; @@ -54,7 +55,7 @@ @Override public void init(Driver driver, Properties properties) { - + LOG.debug("Initialize Metric"); driver.getEventManager().register(EventManager.EVENT_PROXY_POST, this); driver.getEventManager().register(EventManager.EVENT_FETCH_POST, this); @@ -67,7 +68,7 @@ .convertDurationsTo(TimeUnit.MILLISECONDS) .build(); - reporter.start(PARAM_METRIC_PERIOD.getValueInt(properties), TimeUnit.MINUTES); + reporter.start(PARAM_METRIC_PERIOD.getValue(properties), TimeUnit.SECONDS); } Modified: trunk/esigate-core/src/main/java/org/esigate/extension/parallelesi/Esi.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/parallelesi/Esi.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/extension/parallelesi/Esi.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -14,14 +14,6 @@ */ package org.esigate.extension.parallelesi; -import static org.apache.commons.lang3.StringUtils.containsIgnoreCase; - -import java.util.Properties; -import java.util.concurrent.Executor; -import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - import org.esigate.Driver; import org.esigate.events.Event; import org.esigate.events.EventDefinition; @@ -32,9 +24,18 @@ import org.esigate.extension.surrogate.CapabilitiesEvent; import org.esigate.extension.surrogate.Surrogate; import org.esigate.util.Parameter; +import org.esigate.util.ParameterInteger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Properties; +import java.util.concurrent.Executor; +import java.util.concurrent.SynchronousQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +import static org.apache.commons.lang3.StringUtils.containsIgnoreCase; + /** * This extension processes ESI directives, like : * <p> @@ -47,8 +48,8 @@ public class Esi implements Extension, IEventListener { private static final Logger LOG = LoggerFactory.getLogger(Esi.class); // esi_max_threads = 0 -> linear execution - private static final Parameter THREADS = new Parameter("esi_max_threads", "0"); - private static final Parameter IDLE = new Parameter("esi_max_idle", "60"); + private static final Parameter<Integer> THREADS = new ParameterInteger("esi_max_threads", 0); + private static final Parameter<Integer> IDLE = new ParameterInteger("esi_max_idle", 60); private int maxThreads; private int idle; private Executor executor; @@ -102,8 +103,8 @@ }); // Load configuration - this.maxThreads = THREADS.getValueInt(properties); - this.idle = IDLE.getValueInt(properties); + this.maxThreads = THREADS.getValue(properties); + this.idle = IDLE.getValue(properties); if (this.maxThreads == 0) { this.executor = null; Modified: trunk/esigate-core/src/main/java/org/esigate/http/ContentTypeHelper.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/http/ContentTypeHelper.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/http/ContentTypeHelper.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -26,7 +26,7 @@ private Collection<String> parsableContentTypes; public ContentTypeHelper(Properties properties) { - parsableContentTypes = Parameters.PARSABLE_CONTENT_TYPES.getValueList(properties); + parsableContentTypes = Parameters.PARSABLE_CONTENT_TYPES.getValue(properties); } /** Modified: trunk/esigate-core/src/main/java/org/esigate/http/HttpClientRequestExecutor.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/http/HttpClientRequestExecutor.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/http/HttpClientRequestExecutor.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -109,16 +109,16 @@ } HttpClientRequestExecutor httpClientHelper = new HttpClientRequestExecutor(); httpClientHelper.eventManager = eventManager; - httpClientHelper.preserveHost = Parameters.PRESERVE_HOST.getValueBoolean(properties); + httpClientHelper.preserveHost = Parameters.PRESERVE_HOST.getValue(properties); httpClientHelper.headerManager = new HeaderManager(); if (cookieManager == null) { cookieManager = ExtensionFactory.getExtension(properties, Parameters.COOKIE_MANAGER, driver); } httpClientHelper.cookieManager = cookieManager; - httpClientHelper.connectTimeout = Parameters.CONNECT_TIMEOUT.getValueInt(properties); - httpClientHelper.socketTimeout = Parameters.SOCKET_TIMEOUT.getValueInt(properties); + httpClientHelper.connectTimeout = Parameters.CONNECT_TIMEOUT.getValue(properties); + httpClientHelper.socketTimeout = Parameters.SOCKET_TIMEOUT.getValue(properties); httpClientHelper.httpClient = buildHttpClient(properties, eventManager, connectionManager); - String firstBaseURL = Parameters.REMOTE_URL_BASE.getValueArray(properties)[0]; + String firstBaseURL = Parameters.REMOTE_URL_BASE.getValue(properties)[0]; httpClientHelper.firstBaseUrlHost = UriUtils.extractHost(firstBaseURL); return httpClientHelper; } @@ -150,13 +150,13 @@ HttpHost proxyHost = null; Credentials proxyCredentials = null; // Proxy settings - String proxyHostParameter = Parameters.PROXY_HOST.getValueString(properties); + String proxyHostParameter = Parameters.PROXY_HOST.getValue(properties); if (proxyHostParameter != null) { - int proxyPort = Parameters.PROXY_PORT.getValueInt(properties); + int proxyPort = Parameters.PROXY_PORT.getValue(properties); proxyHost = new HttpHost(proxyHostParameter, proxyPort); - String proxyUser = Parameters.PROXY_USER.getValueString(properties); + String proxyUser = Parameters.PROXY_USER.getValue(properties); if (proxyUser != null) { - String proxyPassword = Parameters.PROXY_PASSWORD.getValueString(properties); + String proxyPassword = Parameters.PROXY_PASSWORD.getValue(properties); proxyCredentials = new UsernamePasswordCredentials(proxyUser, proxyPassword); } } @@ -165,8 +165,8 @@ httpClientBuilder.setProperties(properties); - httpClientBuilder.setMaxConnPerRoute(Parameters.MAX_CONNECTIONS_PER_HOST.getValueInt(properties)); - httpClientBuilder.setMaxConnTotal(Parameters.MAX_CONNECTIONS_PER_HOST.getValueInt(properties)); + httpClientBuilder.setMaxConnPerRoute(Parameters.MAX_CONNECTIONS_PER_HOST.getValue(properties)); + httpClientBuilder.setMaxConnTotal(Parameters.MAX_CONNECTIONS_PER_HOST.getValue(properties)); httpClientBuilder.setRedirectStrategy(new RedirectStrategy()); // Proxy settings if (proxyHost != null) { @@ -179,8 +179,8 @@ } // Cache settings - boolean useCache = Parameters.USE_CACHE.getValueBoolean(properties); - httpClientBuilder.setUseCache(Parameters.USE_CACHE.getValueBoolean(properties)); + boolean useCache = Parameters.USE_CACHE.getValue(properties); + httpClientBuilder.setUseCache(Parameters.USE_CACHE.getValue(properties)); if (useCache) { httpClientBuilder.setHttpCacheStorage(CacheConfigHelper.createCacheStorage(properties)); httpClientBuilder.setCacheConfig(CacheConfigHelper.createCacheConfig(properties)); Modified: trunk/esigate-core/src/main/java/org/esigate/impl/UrlRewriter.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/impl/UrlRewriter.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/impl/UrlRewriter.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -76,12 +76,12 @@ * */ public UrlRewriter(Properties properties) { - if ("absolute".equalsIgnoreCase(Parameters.FIX_MODE.getValueString(properties))) { + if ("absolute".equalsIgnoreCase(Parameters.FIX_MODE.getValue(properties))) { mode = ABSOLUTE; } else { mode = RELATIVE; } - visibleBaseUrlParameter = stripEnd(Parameters.VISIBLE_URL_BASE.getValueString(properties), "/"); + visibleBaseUrlParameter = stripEnd(Parameters.VISIBLE_URL_BASE.getValue(properties), "/"); } private String concatUrl(String begin, String end) { Modified: trunk/esigate-core/src/main/java/org/esigate/util/Parameter.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/Parameter.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/util/Parameter.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -15,12 +15,11 @@ package org.esigate.util; -import java.util.Collection; import java.util.Properties; -public final class Parameter { +public class Parameter<T> { private final String name; - private final String defaultValue; + private final T defaultValue; @Override public boolean equals(Object obj) { @@ -37,62 +36,28 @@ return this.name.hashCode(); } - public Parameter(String name, String defaultValue) { + + Parameter(String name, T defaultValue) { this.name = name; this.defaultValue = defaultValue; - } - public int getValueInt(Properties properties) { - int defaultValueInt = 0; - if (defaultValue != null) { - defaultValueInt = Integer.parseInt(defaultValue); - } - return PropertiesUtil.getPropertyValue(properties, name, defaultValueInt); } - public boolean getValueBoolean(Properties properties) { - boolean defaultValueBoolean = false; - if (defaultValue != null) { - defaultValueBoolean = Boolean.parseBoolean(defaultValue); - } - return PropertiesUtil.getPropertyValue(properties, name, defaultValueBoolean); + public String getName() { + return name; } - public float getValueFloat(Properties properties) { - float defaultValueFloat = 0; - if (defaultValue != null) { - defaultValueFloat = Float.parseFloat(defaultValue); - } - return PropertiesUtil.getPropertyValue(properties, name, defaultValueFloat); + public T getDefaultValue() { + return defaultValue; } - public long getValueLong(Properties properties) { - long defaultValueLong = 0; - if (defaultValue != null) { - defaultValueLong = Long.parseLong(defaultValue); + public T getValue(Properties properties) { + T value = (T) properties.getProperty(this.name); + + if (value == null) { + value = defaultValue; } - return PropertiesUtil.getPropertyValue(properties, name, defaultValueLong); + return value; } - public String getValueString(Properties properties) { - return PropertiesUtil.getPropertyValue(properties, name, defaultValue); - } - - public Collection<String> getValueList(Properties properties) { - return PropertiesUtil.getPropertyValueAsList(properties, name, defaultValue); - } - - public String[] getValueArray(Properties properties) { - Collection<String> resultAsCollection = getValueList(properties); - return resultAsCollection.toArray(new String[resultAsCollection.size()]); - } - - public String getName() { - return name; - } - - public String getDefaultValue() { - return defaultValue; - } - } Added: trunk/esigate-core/src/main/java/org/esigate/util/ParameterArray.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterArray.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterArray.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -0,0 +1,40 @@ +/* + * 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 org.esigate.util; + +import java.util.*; + +/** + * @author Alexis Thaveau + */ +public class ParameterArray extends Parameter<String[]> { + + public ParameterArray(String name, String[] defaultValue) { + super(name, defaultValue); + + } + + @Override + public String[] getValue(Properties properties) { + String[] value; + Collection<String> list = PropertiesUtil.getPropertyValue(properties, getName(), Collections.EMPTY_LIST); + if (list == null || list.isEmpty()) { + value = getDefaultValue(); + } else { + value = list.toArray(new String[list.size()]); + } + return value; + } +} Added: trunk/esigate-core/src/main/java/org/esigate/util/ParameterBoolean.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterBoolean.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterBoolean.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -0,0 +1,32 @@ +/* + * 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 org.esigate.util; + +import java.util.Properties; + +/** + * @author Alexis Thaveau + */ +public class ParameterBoolean extends Parameter<Boolean> { + + public ParameterBoolean(String name, Boolean defaultValue) { + super(name, defaultValue); + } + + @Override + public Boolean getValue(Properties properties) { + return PropertiesUtil.getPropertyValue(properties, getName(), getDefaultValue()); + } +} Added: trunk/esigate-core/src/main/java/org/esigate/util/ParameterCollection.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterCollection.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterCollection.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -0,0 +1,40 @@ +/* + * 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 org.esigate.util; + +import java.util.*; + +/** + * @author Alexis Thaveau + */ +public class ParameterCollection extends Parameter<Collection<String>> { + + public ParameterCollection(String name, Collection<String> defaultValue) { + super(name, defaultValue); + } + + + @Override + public Collection<String> getValue(Properties properties) { + + Collection<String> defaultValue = getDefaultValue(); + if (defaultValue == null) { + defaultValue = Collections.EMPTY_LIST; + } + Collection<String> value = PropertiesUtil.getPropertyValue(properties, getName(), defaultValue); + return value; + + } +} Added: trunk/esigate-core/src/main/java/org/esigate/util/ParameterFloat.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterFloat.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterFloat.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -0,0 +1,38 @@ +/* + * 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 org.esigate.util; + +import java.util.Properties; + +/** + * @author Alexis Thaveau + */ +public class ParameterFloat extends Parameter<Float> { + + public ParameterFloat(String name, Float defaultValue) { + super(name, defaultValue); + } + + @Override + public Float getValue(Properties properties) { + Float defaultValue = 0f; + if (getDefaultValue() != null) { + defaultValue = getDefaultValue(); + } + Float value = PropertiesUtil.getPropertyValue(properties, getName(), defaultValue); + return value; + + } +} Added: trunk/esigate-core/src/main/java/org/esigate/util/ParameterInteger.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterInteger.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterInteger.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -0,0 +1,39 @@ +/* + * 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 org.esigate.util; + +import java.util.Properties; + +/** + * @author Alexis Thaveau + */ +public class ParameterInteger extends Parameter<Integer> { + + public ParameterInteger(String name, Integer defaultValue) { + super(name, defaultValue); + } + + @Override + public Integer getValue(Properties properties) { + Integer defaultValue = 0; + if(getDefaultValue()!=null){ + defaultValue = getDefaultValue(); + } + Integer value = PropertiesUtil.getPropertyValue(properties,getName(),defaultValue); + return value; + + + } +} Added: trunk/esigate-core/src/main/java/org/esigate/util/ParameterLong.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterLong.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterLong.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -0,0 +1,38 @@ +/* + * 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 org.esigate.util; + +import java.util.Properties; + +/** + * @author Alexis Thaveau + */ +public class ParameterLong extends Parameter<Long> { + + public ParameterLong(String name, Long defaultValue) { + super(name, defaultValue); + } + + @Override + public Long getValue(Properties properties) { + Long defaultValue = 0l; + if(getDefaultValue()!=null){ + defaultValue = getDefaultValue(); + } + Long value = PropertiesUtil.getPropertyValue(properties, getName(), defaultValue); + return value; + + } +} Added: trunk/esigate-core/src/main/java/org/esigate/util/ParameterString.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/ParameterString.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/util/ParameterString.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -0,0 +1,11 @@ +package org.esigate.util; + + +/** + * @author Alexis Thaveau + */ +public class ParameterString extends Parameter<String> { + public ParameterString(String name, String defaultValue) { + super(name, defaultValue); + } +} Modified: trunk/esigate-core/src/main/java/org/esigate/util/PropertiesUtil.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/util/PropertiesUtil.java 2014-03-26 13:59:20 UTC (rev 1583) +++ trunk/esigate-core/src/main/java/org/esigate/util/PropertiesUtil.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -22,10 +22,10 @@ /** * Utility methods for loading configuration parameters. - * + * * @author Francois-Xavier Bonnet * @author Nicolas Richeton - * + * */ public final class PropertiesUtil { @@ -36,28 +36,28 @@ /** * Retrieves a property containing a comma separated list of values, trim them and return them as a Collection of * String. - * + * * @param properties * @param propertyName * @param defaultValue * @return the values */ - public static Collection<String> getPropertyValueAsList(Properties properties, String propertyName, - String defaultValue) { + public static Collection<String> getPropertyValue(Properties properties, String propertyName, + Collection<String> defaultValue) { + Collection<String> result = defaultValue; String propertyValue = properties.getProperty(propertyName); - if (propertyValue == null) { - propertyValue = defaultValue; + if (propertyValue != null) { + result = toCollection(propertyValue); + if (result.contains("*") && result.size() > 1) { + throw new ConfigurationException(propertyName + " must be a comma-separated list or *"); + } } - Collection<String> result = toCollection(propertyValue); - if (result.contains("*") && result.size() > 1) { - throw new ConfigurationException(propertyName + " must be a comma-separated list or *"); - } return result; } /** * Return the provided comma-separated String as a collection. Order is maintained. - * + * * @param list * @return Ordered collection */ Added: trunk/esigate-core/src/test/java/org/esigate/util/ParameterTest.java =================================================================== --- trunk/esigate-core/src/test/java/org/esigate/util/ParameterTest.java (rev 0) +++ trunk/esigate-core/src/test/java/org/esigate/util/ParameterTest.java 2014-03-26 15:51:21 UTC (rev 1584) @@ -0,0 +1,118 @@ +package org.esigate.util; + +import junit.framework.TestCase; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Properties; + +/** + * @author Alexis Thaveau + */ +public class ParameterTest extends TestCase { + + public void testGetValueString() throws Exception { + Parameter<String> parameter1 = new ParameterString("test1", null); + Parameter<String> parameter2 = new ParameterString("test2", "2"); + Properties properties = new Properties(); + assertNull(parameter1.getValue(properties)); + assertEquals("2", parameter2.getValue(properties)); + + properties.put("test1", "0"); + properties.put("test2", "2"); + assertEquals("0", parameter1.getValue(properties)); + assertEquals("2", parameter2.getValue(properties)); + + } + + public void testGetValueInteger() throws Exception { + Parameter<Integer> parameter1 = new ParameterInteger("test1", null); + Parameter<Integer> parameter2 = new ParameterInteger("test2", 2); + Properties properties = new Properties(); + assertEquals((Integer) 0, parameter1.getValue(properties)); + assertEquals((Integer) 2, parameter2.getValue(properties)); + + properties.put("test1", "0"); + properties.put("test2", "2"); + assertEquals((Integer) 0, parameter1.getValue(properties)); + assertEquals((Integer) 2, parameter2.getValue(properties)); + + } + + public void testGetValueFloat() throws Exception { + Parameter<Float> parameter1 = new ParameterFloat("test1", null); + Parameter<Float> parameter2 = new ParameterFloat("test2", 2f); + Properties properties = new Properties(); + assertEquals(0f, parameter1.getValue(properties)); + assertEquals(2f, parameter2.getValue(properties)); + + properties.put("test1", "0"); + properties.put("test2", "2"); + assertEquals(0f, parameter1.getValue(properties)); + assertEquals(2f, parameter2.getValue(properties)); + + } + + public void testGetValueBoolean() throws Exception { + Parameter<Boolean> parameter1 = new ParameterBoolean("test1", Boolean.FALSE); + Parameter<Boolean> parameter2 = new ParameterBoolean("test2", Boolean.TRUE); + Properties properties = new Properties(); + assertFalse(parameter1.getValue(properties)); + assertTrue(parameter2.getValue(properties)); + properties.put("test1", "false"); + properties.put("test2", "false"); + assertFalse(parameter1.getValue(properties)); + assertFalse(parameter2.getValue(properties)); + properties.put("test1", "true"); + properties.put("test2", "true"); + assertTrue(parameter1.getValue(properties)); + assertTrue(parameter2.getValue(properties)); + + } + + public void testGetValueCollection() throws Exception { + Parameter<Collection<String>> parameter1 = new ParameterCollection("test1", null); + Parameter<Collection<String>> parameter2 = new ParameterCollection("test2", Arrays.asList("v1", "v2")); + Properties properties = new Properties(); + assertNotNull(parameter1.getValue(properties)); + assertTrue(parameter1.getValue(properties).isEmpty()); + assertEquals(2, parameter2.getValue(properties).size()); + assertTrue(parameter2.getValue(properties).contains("v1")); + assertTrue(parameter2.getValue(properties).contains("v2")); + + properties.put("test1", "v1"); + properties.put("test2", "v1,v3"); + + assertEquals(1, parameter1.getValue(properties).size()); + assertTrue(parameter1.getValue(properties).contains("v1")); + + assertEquals(2, parameter2.getValue(properties).size()); + as... [truncated message content] |
From: <ath...@us...> - 2014-03-26 13:59:25
|
Revision: 1583 http://sourceforge.net/p/webassembletool/code/1583 Author: athaveau Date: 2014-03-26 13:59:20 +0000 (Wed, 26 Mar 2014) Log Message: ----------- #289 : new parameter stripMappingPath to perform the mapping path removal Modified Paths: -------------- trunk/src/site/xdoc/reference.xml Modified: trunk/src/site/xdoc/reference.xml =================================================================== --- trunk/src/site/xdoc/reference.xml 2014-03-23 18:30:33 UTC (rev 1582) +++ trunk/src/site/xdoc/reference.xml 2014-03-26 13:59:20 UTC (rev 1583) @@ -202,6 +202,7 @@ </td> <td>No</td> <td>false</td> + <td>5.0</td> </tr> <tr> <td>uriEncoding</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-23 18:30:38
|
Revision: 1582 http://sourceforge.net/p/webassembletool/code/1582 Author: athaveau Date: 2014-03-23 18:30:33 +0000 (Sun, 23 Mar 2014) Log Message: ----------- 158 : extension to perform backend request statistic Modified Paths: -------------- trunk/esigate-core/pom.xml Modified: trunk/esigate-core/pom.xml =================================================================== --- trunk/esigate-core/pom.xml 2014-03-23 17:48:24 UTC (rev 1581) +++ trunk/esigate-core/pom.xml 2014-03-23 18:30:33 UTC (rev 1582) @@ -71,7 +71,11 @@ <version>1.9.5</version> <scope>test</scope> </dependency> - + <dependency> + <groupId>com.codahale.metrics</groupId> + <artifactId>metrics-core</artifactId> + <version>3.0.2</version> + </dependency> </dependencies> <build> <plugins> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-23 17:48:28
|
Revision: 1581 http://sourceforge.net/p/webassembletool/code/1581 Author: athaveau Date: 2014-03-23 17:48:24 +0000 (Sun, 23 Mar 2014) Log Message: ----------- 158 : extension to perform backend request statistic Added Paths: ----------- trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/ trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java Added: trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java (rev 0) +++ trunk/esigate-core/src/main/java/org/esigate/extension/monitoring/Metric.java 2014-03-23 17:48:24 UTC (rev 1581) @@ -0,0 +1,106 @@ +/* + * 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 org.esigate.extension.monitoring; + +import com.codahale.metrics.*; +import org.apache.http.HttpStatus; +import org.apache.http.client.cache.CacheResponseStatus; +import org.apache.http.client.cache.HttpCacheContext; +import org.esigate.Driver; +import org.esigate.events.Event; +import org.esigate.events.EventDefinition; +import org.esigate.events.EventManager; +import org.esigate.events.IEventListener; +import org.esigate.events.impl.FetchEvent; +import org.esigate.events.impl.ProxyEvent; +import org.esigate.extension.Extension; +import org.esigate.util.Parameter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Properties; +import java.util.concurrent.TimeUnit; + +/** + * This extension will record proxy request, and backend request to generate statistics. + * <p/> + * Result will be logged using SLF4J in INFO level every 60 minutes. Period can be configured in driver properties : + * <p/> + * <code>metriPeriod=60</code> + * <p/> + * <p/> + * Created by alexis on 20/03/14. + */ +public class Metric implements Extension, IEventListener { + private static final Logger LOG = LoggerFactory.getLogger(Metric.class); + private static final Parameter PARAM_METRIC_PERIOD = new Parameter("metricPeriod", "60"); + + private MetricRegistry metric = new MetricRegistry(); + private ScheduledReporter reporter; + private Driver driver; + + @Override + public void init(Driver driver, Properties properties) { + + driver.getEventManager().register(EventManager.EVENT_PROXY_POST, this); + driver.getEventManager().register(EventManager.EVENT_FETCH_POST, this); + + this.driver = driver; + + reporter = Slf4jReporter + .forRegistry(this.metric) + .outputTo(LOG) + .convertRatesTo(TimeUnit.SECONDS) + .convertDurationsTo(TimeUnit.MILLISECONDS) + .build(); + + reporter.start(PARAM_METRIC_PERIOD.getValueInt(properties), TimeUnit.MINUTES); + } + + + @Override + public boolean event(EventDefinition id, Event event) { + + + String timerName = MetricRegistry.name(this.getClass().getSimpleName(), driver.getConfiguration().getInstanceName(), id.getId()); + + + if (EventManager.EVENT_PROXY_POST.equals(id)) { + if (((ProxyEvent) event).getErrorPage() != null) { + timerName = MetricRegistry.name(timerName, "error"); + } + } else if (EventManager.EVENT_FETCH_POST.equals(id)) { + //Retrieve HTTP response status code and cache status + FetchEvent e = (FetchEvent) event; + int statusCode = e.getHttpResponse().getStatusLine().getStatusCode(); + CacheResponseStatus cacheResponseStatus = (CacheResponseStatus) e.getHttpContext().getAttribute( + HttpCacheContext.CACHE_RESPONSE_STATUS); + + //Adding status code when error + if (statusCode >= HttpStatus.SC_BAD_REQUEST) { + timerName = MetricRegistry.name(timerName, "error", String.valueOf(statusCode)); + } + //Adding cache if not MISS + if (cacheResponseStatus != null && !cacheResponseStatus.equals(CacheResponseStatus.CACHE_MISS)) { + timerName = MetricRegistry.name(timerName, cacheResponseStatus.name().toLowerCase()); + } + } + + metric.meter(timerName.toString()).mark(); + + return true; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-22 10:37:37
|
Revision: 1580 http://sourceforge.net/p/webassembletool/code/1580 Author: athaveau Date: 2014-03-22 10:37:32 +0000 (Sat, 22 Mar 2014) Log Message: ----------- Don't register a listener already registered Modified Paths: -------------- trunk/esigate-core/src/main/java/org/esigate/events/EventManager.java Modified: trunk/esigate-core/src/main/java/org/esigate/events/EventManager.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/events/EventManager.java 2014-03-19 08:41:49 UTC (rev 1579) +++ trunk/esigate-core/src/main/java/org/esigate/events/EventManager.java 2014-03-22 10:37:32 UTC (rev 1580) @@ -52,7 +52,7 @@ */ public class EventManager { - public static final EventDefinition EVENT_FRAGMENT_PRE = new EventDefinition("org.esigate.fragement-pre", + public static final EventDefinition EVENT_FRAGMENT_PRE = new EventDefinition("org.esigate.fragment-pre", EventDefinition.TYPE_DEFAULT); public static final EventDefinition EVENT_FRAGMENT_POST = new EventDefinition("org.esigate.fragment-post", EventDefinition.TYPE_POST); @@ -102,18 +102,19 @@ eventListeners = new ArrayList<IEventListener>(); listenerMappings.put(eventDefinition, eventListeners); } + if (!eventListeners.contains(listener)) { + // Add listener + if (reverseOrder) { + eventListeners.add(eventListeners.size(), listener); + } else { + eventListeners.add(listener); + } - // Add listener - if (reverseOrder) { - eventListeners.add(eventListeners.size(), listener); - } else { - eventListeners.add(listener); + if (LOG.isInfoEnabled()) { + LOG.info("Registered {} on event {}/{}", new Object[]{listener.getClass().getName(), driverId, + eventDefinition}); + } } - - if (LOG.isInfoEnabled()) { - LOG.info("Registered {} on event {}/{}", new Object[] {listener.getClass().getName(), driverId, - eventDefinition}); - } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-19 08:41:53
|
Revision: 1579 http://sourceforge.net/p/webassembletool/code/1579 Author: athaveau Date: 2014-03-19 08:41:49 +0000 (Wed, 19 Mar 2014) Log Message: ----------- Cleanup Modified Paths: -------------- trunk/src/main/resources/README.txt Modified: trunk/src/main/resources/README.txt =================================================================== --- trunk/src/main/resources/README.txt 2014-03-18 19:42:18 UTC (rev 1578) +++ trunk/src/main/resources/README.txt 2014-03-19 08:41:49 UTC (rev 1579) @@ -1,7 +1,2 @@ -Contents of this archive : -- lib: the binaries with their dependencies -- apps: the sample applications -- src: the source files for the project - See the documentation for further information: -http://www.esigate.org \ No newline at end of file +http://www.esigate.org This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-18 19:42:22
|
Revision: 1578 http://sourceforge.net/p/webassembletool/code/1578 Author: athaveau Date: 2014-03-18 19:42:18 +0000 (Tue, 18 Mar 2014) Log Message: ----------- #289 : new parameter stripMappingPath to perform the mapping path removal Added Paths: ----------- trunk/esigate-app-provider/src/main/webapp/css/ trunk/esigate-app-provider/src/main/webapp/css/sample.css Removed Paths: ------------- trunk/esigate-app-master/src/main/webapp/css/ Added: trunk/esigate-app-provider/src/main/webapp/css/sample.css =================================================================== --- trunk/esigate-app-provider/src/main/webapp/css/sample.css (rev 0) +++ trunk/esigate-app-provider/src/main/webapp/css/sample.css 2014-03-18 19:42:18 UTC (rev 1578) @@ -0,0 +1 @@ +/**/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-18 19:34:31
|
Revision: 1577 http://sourceforge.net/p/webassembletool/code/1577 Author: athaveau Date: 2014-03-18 19:34:28 +0000 (Tue, 18 Mar 2014) Log Message: ----------- #289 : new parameter stripMappingPath to perform the mapping path removal Added Paths: ----------- trunk/esigate-app-master/src/main/webapp/css/ trunk/esigate-app-master/src/main/webapp/css/sample.css Added: trunk/esigate-app-master/src/main/webapp/css/sample.css =================================================================== --- trunk/esigate-app-master/src/main/webapp/css/sample.css (rev 0) +++ trunk/esigate-app-master/src/main/webapp/css/sample.css 2014-03-18 19:34:28 UTC (rev 1577) @@ -0,0 +1 @@ +/**/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ath...@us...> - 2014-03-18 13:51:14
|
Revision: 1576 http://sourceforge.net/p/webassembletool/code/1576 Author: athaveau Date: 2014-03-18 13:51:06 +0000 (Tue, 18 Mar 2014) Log Message: ----------- #289 : new parameter stripMappingPath to perform the mapping path removal Modified Paths: -------------- trunk/esigate-app-aggregator/src/main/resources/esigate.properties trunk/esigate-app-casified-aggregator/src/main/resources/esigate.properties trunk/esigate-app-master/src/main/resources/esigate.properties trunk/esigate-app-master/src/test/java/org/esigate/test/cases/MasterTest.java trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java trunk/esigate-core/src/main/java/org/esigate/Parameters.java trunk/esigate-core/src/test/java/org/esigate/DriverConfigurationTest.java trunk/esigate-servlet/src/main/java/org/esigate/servlet/ProxyFilter.java trunk/esigate-servlet/src/main/java/org/esigate/servlet/impl/DriverSelector.java trunk/esigate-servlet/src/main/java/org/esigate/servlet/impl/RequestUrl.java trunk/esigate-servlet/src/test/java/org/esigate/servlet/ProxyFilterTest.java trunk/src/site/xdoc/reference.xml Modified: trunk/esigate-app-aggregator/src/main/resources/esigate.properties =================================================================== --- trunk/esigate-app-aggregator/src/main/resources/esigate.properties 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-app-aggregator/src/main/resources/esigate.properties 2014-03-18 13:51:06 UTC (rev 1576) @@ -18,6 +18,7 @@ aggregated2.storeCookiesInSession=test0 aggregated2.maxConnectionsPerHost=60 aggregated2.mappings=/ag2/* +aggregated2.stripMappingPath=true nocacheaggregated1.remoteUrlBase=http://localhost:8080/esigate-app-aggregated1/ nocacheaggregated1.extensions=org.esigate.extension.Esi,org.esigate.extension.Aggregate @@ -30,10 +31,12 @@ nocacheaggregated1.maxConnectionsPerHost=50 nocacheaggregated1.mappings=/nocache/ag1/* nocacheaggregated1.preserveHost=false +nocacheaggregated1.stripMappingPath=true preservehostaggregated1.remoteUrlBase=http://localhost:8080/esigate-app-aggregated1/ preservehostaggregated1.preserveHost=true preservehostaggregated1.mappings=/preservehost/* +preservehostaggregated1.stripMappingPath=true local.extensions=org.esigate.servlet.ServletExtension,org.esigate.extension.Esi local.mappings=/local/* @@ -43,3 +46,4 @@ crosscontextaggregated2.extensions=org.esigate.servlet.ServletExtension,org.esigate.extension.Esi crosscontextaggregated2.context=/esigate-app-aggregated2 crosscontextaggregated2.mappings=/crosscontext/* +crosscontextaggregated2.stripMappingPath=true \ No newline at end of file Modified: trunk/esigate-app-casified-aggregator/src/main/resources/esigate.properties =================================================================== --- trunk/esigate-app-casified-aggregator/src/main/resources/esigate.properties 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-app-casified-aggregator/src/main/resources/esigate.properties 2014-03-18 13:51:06 UTC (rev 1576) @@ -1,6 +1,8 @@ default.remoteUrlBase=http://localhost:8080/esigate-app-casified-aggregated1/ default.extensions=org.esigate.cas.CasAuthenticationHandler,org.esigate.extension.Aggregate default.mappings=/aggregated1/* +default.stripMappingPath=true aggregated2.remoteUrlBase=http://localhost:8080/esigate-app-casified-aggregated2/ aggregated2.extensions=org.esigate.cas.CasAuthenticationHandler,org.esigate.extension.Aggregate +aggregated2.stripMappingPath=true \ No newline at end of file Modified: trunk/esigate-app-master/src/main/resources/esigate.properties =================================================================== --- trunk/esigate-app-master/src/main/resources/esigate.properties 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-app-master/src/main/resources/esigate.properties 2014-03-18 13:51:06 UTC (rev 1576) @@ -18,3 +18,12 @@ proxy2.preserveHost=true proxy2.ttl=5 proxy2.mappings=/images/* +proxy2.stripMappingPath=true + + +proxy3.remoteUrlBase=http://localhost:8080/esigate-app-provider/ +proxy3.extensions= +proxy3.preserveHost=true +proxy3.ttl=5 +proxy3.mappings=/css/* +proxy3.stripMappingPath=false \ No newline at end of file Modified: trunk/esigate-app-master/src/test/java/org/esigate/test/cases/MasterTest.java =================================================================== --- trunk/esigate-app-master/src/test/java/org/esigate/test/cases/MasterTest.java 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-app-master/src/test/java/org/esigate/test/cases/MasterTest.java 2014-03-18 13:51:06 UTC (rev 1576) @@ -89,13 +89,21 @@ "You should see here the same hostname and port as in the browser=>127.0.0.1:8080", resp.getText()); } - public void testProxy() throws Exception { + public void testProxyWithStripMappingPath() throws Exception { WebRequest req = new GetMethodWebRequest(APPLICATION_PATH + "images/smile.jpg"); WebResponse resp = webConversation.getResponse(req); assertEquals("Status should be 200", HttpServletResponse.SC_OK, resp.getResponseCode()); assertEquals("image/jpeg", resp.getContentType().toLowerCase()); } + public void testProxyWithoutStripMappingPath() throws Exception { + WebRequest req = new GetMethodWebRequest(APPLICATION_PATH + "css/sample.css"); + WebResponse resp = webConversation.getResponse(req); + assertEquals("Status should be 200", HttpServletResponse.SC_OK, resp.getResponseCode()); + assertEquals("text/css", resp.getContentType().toLowerCase()); + } + + public void testProxyIfmodifiedsince() throws Exception { WebRequest req = new GetMethodWebRequest(APPLICATION_PATH + "images/smile.jpg"); WebResponse resp = webConversation.getResponse(req); Modified: trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-core/src/main/java/org/esigate/DriverConfiguration.java 2014-03-18 13:51:06 UTC (rev 1576) @@ -44,14 +44,16 @@ private final BaseUrlRetrieveStrategy baseUrlRetrieveStrategy; private final boolean isVisibleBaseURLEmpty; private final List<UriMapping> uriMappings; + private boolean stripMappingPath; public DriverConfiguration(String instanceName, Properties props) { this.instanceName = instanceName; - baseUrlRetrieveStrategy = getBaseUrlRetrieveSession(props); - uriEncoding = Parameters.URI_ENCODING.getValueString(props); - preserveHost = Parameters.PRESERVE_HOST.getValueBoolean(props); - visibleBaseURL = Parameters.VISIBLE_URL_BASE.getValueString(props); - isVisibleBaseURLEmpty = StringUtils.isEmpty(visibleBaseURL); + this.baseUrlRetrieveStrategy = getBaseUrlRetrieveSession(props); + this.uriEncoding = Parameters.URI_ENCODING.getValueString(props); + this.preserveHost = Parameters.PRESERVE_HOST.getValueBoolean(props); + this.visibleBaseURL = Parameters.VISIBLE_URL_BASE.getValueString(props); + this.isVisibleBaseURLEmpty = StringUtils.isEmpty(visibleBaseURL); + this.stripMappingPath= Parameters.STRIP_MAPPING_PATH.getValueBoolean(props); this.uriMappings = parseMappings(props); properties = props; } @@ -129,4 +131,11 @@ return this.uriMappings; } + /** + * + * @return stripMappingPath + */ + public boolean isStripMappingPath() { + return stripMappingPath; + } } Modified: trunk/esigate-core/src/main/java/org/esigate/Parameters.java =================================================================== --- trunk/esigate-core/src/main/java/org/esigate/Parameters.java 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-core/src/main/java/org/esigate/Parameters.java 2014-03-18 13:51:06 UTC (rev 1576) @@ -42,6 +42,7 @@ // Core parameters public static final Parameter REMOTE_URL_BASE = new Parameter("remoteUrlBase", null); public static final Parameter MAPPINGS = new Parameter("mappings", null); + public static final Parameter STRIP_MAPPING_PATH = new Parameter("stripMappingPath", null); public static final Parameter URI_ENCODING = new Parameter("uriEncoding", "ISO-8859-1"); public static final Parameter PARSABLE_CONTENT_TYPES = new Parameter("parsableContentTypes", "text/html, application/xhtml+xml"); Modified: trunk/esigate-core/src/test/java/org/esigate/DriverConfigurationTest.java =================================================================== --- trunk/esigate-core/src/test/java/org/esigate/DriverConfigurationTest.java 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-core/src/test/java/org/esigate/DriverConfigurationTest.java 2014-03-18 13:51:06 UTC (rev 1576) @@ -79,4 +79,21 @@ } } + public void testStripMappingPath() { + Properties properties = new Properties(); + properties.setProperty(Parameters.REMOTE_URL_BASE.getName(), "http://example.com"); + + DriverConfiguration config = new DriverConfiguration("testStripMappingPath", properties); + assertFalse(config.isStripMappingPath()); + properties.setProperty(Parameters.STRIP_MAPPING_PATH.getName(), "false"); + config = new DriverConfiguration("testStripMappingPath", properties); + assertFalse(config.isStripMappingPath()); + + properties.setProperty(Parameters.STRIP_MAPPING_PATH.getName(), "true"); + config = new DriverConfiguration("testStripMappingPath", properties); + assertTrue(config.isStripMappingPath()); + + + + } } Modified: trunk/esigate-servlet/src/main/java/org/esigate/servlet/ProxyFilter.java =================================================================== --- trunk/esigate-servlet/src/main/java/org/esigate/servlet/ProxyFilter.java 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-servlet/src/main/java/org/esigate/servlet/ProxyFilter.java 2014-03-18 13:51:06 UTC (rev 1576) @@ -25,16 +25,14 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang3.tuple.Pair; + import org.apache.http.client.methods.CloseableHttpResponse; -import org.esigate.Driver; + import org.esigate.DriverFactory; import org.esigate.HttpErrorPage; import org.esigate.http.IncomingRequest; -import org.esigate.impl.UriMapping; import org.esigate.servlet.impl.DriverSelector; import org.esigate.servlet.impl.RequestFactory; -import org.esigate.servlet.impl.RequestUrl; import org.esigate.servlet.impl.ResponseSender; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,12 +56,10 @@ HttpServletRequest httpServletRequest = (HttpServletRequest) request; HttpServletResponse httpServletResponse = (HttpServletResponse) response; IncomingRequest incomingRequest = requestFactory.create(httpServletRequest, httpServletResponse, chain); - Pair<Driver, UriMapping> dm = null; + try { - dm = driverSelector.selectProvider(httpServletRequest, false); - String relUrl = RequestUrl.getRelativeUrl(httpServletRequest, dm.getRight(), false); - LOG.debug("Proxying {}", relUrl); - CloseableHttpResponse driverResponse = dm.getLeft().proxy(relUrl, incomingRequest); + DriverSelector.ProviderContext dm = driverSelector.selectProvider(httpServletRequest, false); + CloseableHttpResponse driverResponse = dm.getDriver().proxy(dm.getRelUrl(), incomingRequest); responseSender.sendResponse(driverResponse, incomingRequest, httpServletResponse); } catch (HttpErrorPage e) { if (!httpServletResponse.isCommitted()) { Modified: trunk/esigate-servlet/src/main/java/org/esigate/servlet/impl/DriverSelector.java =================================================================== --- trunk/esigate-servlet/src/main/java/org/esigate/servlet/impl/DriverSelector.java 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-servlet/src/main/java/org/esigate/servlet/impl/DriverSelector.java 2014-03-18 13:51:06 UTC (rev 1576) @@ -26,14 +26,14 @@ /** * This class handles support of legacy options for Driver selection. - * <p> + * <p/> * Configuration is evaluated in the following order : * <ol> * <li>providers mapping (host-based) in web.xml</li> * <li>provider mapping (servlet based) in web.xml</li> * <li>provider mapping in configuration file (eg. instance.mappings=/* in esigate.properties)</li> * </ol> - * + * * @author Nicolas Richeton */ public final class DriverSelector { @@ -44,27 +44,65 @@ /** * Select the provider for this request. - * <p> + * <p/> * Perform selection based on the Host header. - * - * @param request + * + * @param request incoming request + * @return Pair Driver/UriMapping + * @throws HttpErrorPage + */ + public ProviderContext selectProvider(HttpServletRequest request) throws HttpErrorPage { + return selectProvider(request, false); + } + + /** + * Select the provider for this request. + * <p/> + * Perform selection based on the incoming request url. + * + * @param request incoming request * @param servlet * @return provider name or null. * @throws HttpErrorPage */ - public Pair<Driver, UriMapping> selectProvider(HttpServletRequest request, boolean servlet) throws HttpErrorPage { + public ProviderContext selectProvider(HttpServletRequest request, boolean servlet) throws HttpErrorPage { String host = request.getHeader("Host"); String scheme = request.getScheme(); - String relUrl = RequestUrl.getRelativeUrl(request, null, servlet); + String relUrl = RequestUrl.getRelativeUrl(request, servlet); - Pair<Driver, UriMapping> result; + Pair<Driver, UriMapping> result = DriverFactory.getInstanceFor(scheme, host, relUrl); - result = DriverFactory.getInstanceFor(scheme, host, relUrl); + ProviderContext context = new ProviderContext(); + Driver driver = result.getLeft(); + UriMapping uriMapping = result.getRight(); + + if(driver.getConfiguration().isStripMappingPath()){ + relUrl = RequestUrl.stripMappingPath(relUrl, uriMapping); + } + context.driver = driver; + context.relUrl = relUrl; LOG.debug("Selected {} for scheme:{} host:{} relUrl:{}", result, scheme, host, relUrl); - return result; + return context; } + + /** + * The provider context, composed of driver and remote relative url + */ + public class ProviderContext { + private Driver driver; + private String relUrl; + + public String getRelUrl() { + return relUrl; + } + + public Driver getDriver() { + return driver; + } + + } } Modified: trunk/esigate-servlet/src/main/java/org/esigate/servlet/impl/RequestUrl.java =================================================================== --- trunk/esigate-servlet/src/main/java/org/esigate/servlet/impl/RequestUrl.java 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-servlet/src/main/java/org/esigate/servlet/impl/RequestUrl.java 2014-03-18 13:51:06 UTC (rev 1576) @@ -22,9 +22,9 @@ /** * Utility class to work with Servlet request urls. - * + * * @author Nicolas Richeton - * + * */ public final class RequestUrl { private static final Logger LOG = LoggerFactory.getLogger(RequestUrl.class); @@ -35,31 +35,26 @@ /** * Get the relative url to the current servlet. - * <p> - * Uses the request URI and removes : the context path, the servlet path and the mapping path if used. - * + * <p/> + * Uses the request URI and removes : the context path, the servlet path if used. + * * @param request * The current HTTP request - * @param mapping - * matched mapping or null - * @param servlet + * @param servlet + * true to remove the servlet path * @return the url, relative to the servlet mapping. */ - public static String getRelativeUrl(HttpServletRequest request, UriMapping mapping, boolean servlet) { + public static String getRelativeUrl(HttpServletRequest request, boolean servlet) { // Raw request url - String relativeUrl = request.getRequestURI(); + String requestURI = request.getRequestURI(); // Application (war) context path String contextPath = request.getContextPath(); // Servlet mapping String servletPath = request.getServletPath(); - // Uri mapping - String mappingPath = (mapping == null ? null : mapping.getPath()); - if (LOG.isDebugEnabled()) { - LOG.debug("relativeUrl: {}, contextPath: {}, servletPath: {}, mappingPath: {}", new Object[] {relativeUrl, - contextPath, servletPath, mappingPath}); - } + String relativeUrl = requestURI; + // Remove application context path if (contextPath != null && relativeUrl.startsWith(contextPath)) { relativeUrl = relativeUrl.substring(contextPath.length()); @@ -70,11 +65,37 @@ relativeUrl = relativeUrl.substring(servletPath.length()); } + + if (LOG.isDebugEnabled()) { + LOG.debug("requestURI: {}, contextPath: {}, servletPath: {}, relativeUrl: {}, ", new Object[]{requestURI, + contextPath, servletPath, relativeUrl}); + } + + return relativeUrl; + } + + /** + * Get the relative url without the mapping url. + * <p/> + * Uses the url and remove the mapping path. + * + * @param url + * incoming relative url + * @return the url, relative to the driver remote url. + */ + public static String stripMappingPath(String url, UriMapping mapping) { + String relativeUrl = url; + // Uri mapping + String mappingPath = (mapping == null ? null : mapping.getPath()); + + // Remove mapping path - if (mappingPath != null && relativeUrl.startsWith(mappingPath)) { + if (mappingPath != null && url.startsWith(mappingPath)) { relativeUrl = relativeUrl.substring(mappingPath.length()); } - + if (LOG.isDebugEnabled()) { + LOG.debug("url: {}, mappingPath: {}, relativeUrl: {}", new Object[]{url, mappingPath, relativeUrl}); + } return relativeUrl; } } Modified: trunk/esigate-servlet/src/test/java/org/esigate/servlet/ProxyFilterTest.java =================================================================== --- trunk/esigate-servlet/src/test/java/org/esigate/servlet/ProxyFilterTest.java 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/esigate-servlet/src/test/java/org/esigate/servlet/ProxyFilterTest.java 2014-03-18 13:51:06 UTC (rev 1576) @@ -104,7 +104,7 @@ Mockito.when(request.getServletPath()).thenReturn("servlet"); Mockito.when(request.getHeader("Host")).thenReturn("sub2.domain.com"); Mockito.when(request.getScheme()).thenReturn("http"); - Assert.assertEquals("provider2", driverSelector.selectProvider(request, true).getLeft().getConfiguration() + Assert.assertEquals("provider2", driverSelector.selectProvider(request, true).getDriver().getConfiguration() .getInstanceName()); request = Mockito.mock(HttpServletRequest.class); @@ -115,7 +115,7 @@ Mockito.when(request.getServletPath()).thenReturn("servlet"); Mockito.when(request.getHeader("Host")).thenReturn("sub.domain.com"); Mockito.when(request.getScheme()).thenReturn("http"); - Assert.assertEquals("provider1", driverSelector.selectProvider(request, true).getLeft().getConfiguration() + Assert.assertEquals("provider1", driverSelector.selectProvider(request, true).getDriver().getConfiguration() .getInstanceName()); request = Mockito.mock(HttpServletRequest.class); @@ -125,7 +125,7 @@ Mockito.when(request.getMethod()).thenReturn("GET"); Mockito.when(request.getServletPath()).thenReturn("servlet"); Mockito.when(request.getScheme()).thenReturn("http"); - Assert.assertEquals("single", driverSelector.selectProvider(request, true).getLeft().getConfiguration() + Assert.assertEquals("single", driverSelector.selectProvider(request, true).getDriver().getConfiguration() .getInstanceName()); } Modified: trunk/src/site/xdoc/reference.xml =================================================================== --- trunk/src/site/xdoc/reference.xml 2014-02-15 23:26:55 UTC (rev 1575) +++ trunk/src/site/xdoc/reference.xml 2014-03-18 13:51:06 UTC (rev 1576) @@ -125,6 +125,13 @@ # Sample 4 : Process all files in css and images directories theme.remoteUrlBase=http://host4/ theme.mappings=/css/*, /images/* + +# Sample 5 : Process all files in css and images directories and strip mapping path +theme.remoteUrlBase=http://host4/css-and-images/ +theme.mappings=/css/*, /images/* +theme.stripMappingPath=true + + ]]></source> <p> @@ -166,6 +173,36 @@ <td>Yes</td> <td>-</td> </tr> + <tr> + <td>mappings</td> + <td> + Paths mappings specifies the Urls pattern for wich the remote application should be called. Eg: + <code>mappings=/cms/*</code> + Use a comma-separated list to define several mappings for same provider. + + <p/> + Mapping is split in 3 parts : + <ul> + <li>Host, including the scheme and port : http://www.example:8080</li> + <li>path, left part before the wildcard caracter *</li> + <li>extension, right part after the wildcard caracter *</li> + </ul> + </td> + <td>No</td> + <td>-</td> + </tr> + <tr> + <td>stripMappingPath</td> + <td> + If enabled, the mapping path will be striped from incoming url before calling the remote application. Eg: + <code>mappings=/cms/*</code>. + With <code>stripMappingPath=true</code>A request to http://esigate/cms/myresource will be proxied to http://remote/myresource + With <code>stripMappingPath=false</code>A request to http://esigate/cms/myresource will proxied to http://remote/cms/myresource + + </td> + <td>No</td> + <td>false</td> + </tr> <tr> <td>uriEncoding</td> <td>Charset used for encoding parameters in URI</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nri...@us...> - 2014-02-15 23:26:58
|
Revision: 1575 http://sourceforge.net/p/webassembletool/code/1575 Author: nricheton Date: 2014-02-15 23:26:55 +0000 (Sat, 15 Feb 2014) Log Message: ----------- Latest site Modified Paths: -------------- trunk/src/site/resources/index.html trunk/src/site/resources/index_es.html trunk/src/site/resources/index_fr.html Modified: trunk/src/site/resources/index.html =================================================================== --- trunk/src/site/resources/index.html 2014-02-15 23:22:20 UTC (rev 1574) +++ trunk/src/site/resources/index.html 2014-02-15 23:26:55 UTC (rev 1575) @@ -88,7 +88,7 @@ <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> </div> <div class="span9"> - <div class="pull-right"><p>Version 4.1</p> + <div class="pull-right"><p>Version 4.3</p> <!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> <!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> <!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> Modified: trunk/src/site/resources/index_es.html =================================================================== --- trunk/src/site/resources/index_es.html 2014-02-15 23:22:20 UTC (rev 1574) +++ trunk/src/site/resources/index_es.html 2014-02-15 23:26:55 UTC (rev 1575) @@ -113,7 +113,7 @@ <div class="span9"> <div class="pull-right"><p> Versión - 4.1</p> + 4.3</p> <!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> <!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> <!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> Modified: trunk/src/site/resources/index_fr.html =================================================================== --- trunk/src/site/resources/index_fr.html 2014-02-15 23:22:20 UTC (rev 1574) +++ trunk/src/site/resources/index_fr.html 2014-02-15 23:26:55 UTC (rev 1575) @@ -108,7 +108,7 @@ <h1><a href="http://www.esigate.org"><img src="website/img/logo.png" alt="esigate logo" title="esigate"/></a></h1> </div> <div class="span9"> - <div class="pull-right"><p>Version 4.1</p> + <div class="pull-right"><p>Version 4.3</p> <!-- <p><a href="https://twitter.com/share" class="twitter-share-button" --> <!-- data-url="http://www.esigate.org" data-lang="en">Tweet</a> --> <!-- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |