tapestry-5 git commit: Fixing JavaDoc

2014-12-06 Thread thiagohp
Repository: tapestry-5
Updated Branches:
  refs/heads/beanmodel-split 31493159a -> b21ec4af5


Fixing JavaDoc


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b21ec4af
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b21ec4af
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b21ec4af

Branch: refs/heads/beanmodel-split
Commit: b21ec4af530b99b2402bc4706d123bd2c170a83c
Parents: 3149315
Author: Thiago H. de Paula Figueiredo 
Authored: Sun Dec 7 00:59:55 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sun Dec 7 00:59:55 2014 -0200

--
 .../apache/tapestry5/beaneditor/BeanModelSourceBuilder.java   | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b21ec4af/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
index 1b08733..68df475 100644
--- 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
+++ 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
@@ -40,17 +40,12 @@ import org.apache.tapestry5.services.PropertyConduitSource;
 import org.slf4j.LoggerFactory;
 
 /**
-<<< HEAD
  * Utility class for creating {@link BeanModelSource} instances without
  * Tapestry-IoC. Usage of Tapestry-IoC is still recommended.
  * 
  * The setter methods can be used to customize the BeanModelSource to be 
created and can be 
- * (and usually are skipped), so BeanModelSource beanModelSource = new 
BeanModelSourceBuilder().build()
+ * (and usually are skipped), so BeanModelSource beanModelSource = new 
BeanModelSourceBuilder().build();
  * is all you need to do. 
-===
- * Utility class for creating {@link BeanModelSource} instances without
- * Tapestry-IoC. Usage of Tapestry-IoC is still recommended.
->>> 696bc7ae848f4b4f2421ff77ceb4858a2f10465c
  */
 public class BeanModelSourceBuilder {
 



[08/45] tapestry-5 git commit: TAP5-2411: Make sure the PerthreadManager's ThreadLocal is removed at the end of the servlet filter's initialization

2014-12-06 Thread thiagohp
TAP5-2411: Make sure the PerthreadManager's ThreadLocal is removed at the end 
of the servlet filter's initialization


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/f3aaec55
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/f3aaec55
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/f3aaec55

Branch: refs/heads/beanmodel-split
Commit: f3aaec55e1e288464b84882c67a59a84171b6fa1
Parents: b7f60e2
Author: Jochen Kemnade 
Authored: Thu Nov 6 10:32:07 2014 +0100
Committer: Jochen Kemnade 
Committed: Thu Nov 6 10:32:07 2014 +0100

--
 .../src/main/java/org/apache/tapestry5/TapestryFilter.java | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f3aaec55/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java 
b/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java
index 178571f..61c2cdb 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java
@@ -116,6 +116,8 @@ public class TapestryFilter implements Filter
 init(registry);
 
 appInitializer.announceStartup();
+
+registry.cleanupThread();
 }
 
 protected final FilterConfig getFilterConfig()



[28/45] tapestry-5 git commit: TAP5-2422: Include the MappedConfiguration key in the error message for duplicate contributions

2014-12-06 Thread thiagohp
TAP5-2422: Include the MappedConfiguration key in the error message for 
duplicate contributions


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9b5e1903
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9b5e1903
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9b5e1903

Branch: refs/heads/beanmodel-split
Commit: 9b5e19035f0e779f40231b0275e473c7def1b2cc
Parents: b06c013
Author: Jochen Kemnade 
Authored: Thu Dec 4 20:45:12 2014 +0100
Committer: Jochen Kemnade 
Committed: Thu Dec 4 20:45:12 2014 +0100

--
 .../main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java | 4 ++--
 .../ioc/internal/ValidatingMappedConfigurationWrapper.java   | 2 +-
 .../org/apache/tapestry5/ioc/internal/IOCStrings.properties  | 2 +-
 .../ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy| 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
index ac39d15..f3b8388 100644
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
+++ 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
@@ -137,9 +137,9 @@ final class IOCMessages
 return MESSAGES.format("generic-type-not-supported", type);
 }
 
-static String contributionDuplicateKey(String serviceId, ContributionDef 
existingDef)
+static String contributionDuplicateKey(String serviceId, Object key, 
ContributionDef existingDef)
 {
-return MESSAGES.format("contribution-duplicate-key", serviceId, 
existingDef);
+return MESSAGES.format("contribution-duplicate-key", serviceId, key, 
existingDef);
 }
 
 static String errorBuildingService(String serviceId, ServiceDef 
serviceDef, Throwable cause)

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
index f88c47c..096dcda 100644
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
+++ 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
@@ -85,7 +85,7 @@ public class ValidatingMappedConfigurationWrapper 
extends AbstractConfigur
 ContributionDef existing = keyToContributor.get(key);
 
 if (existing != null)
-throw new 
IllegalArgumentException(IOCMessages.contributionDuplicateKey(serviceId, 
existing));
+throw new 
IllegalArgumentException(IOCMessages.contributionDuplicateKey(serviceId, key, 
existing));
 
 map.put(key, coerced);
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
--
diff --git 
a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
 
b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
index 6710b91..c30c149 100644
--- 
a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
+++ 
b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
@@ -43,7 +43,7 @@ contribution-was-null=Service contribution (to service '%s') 
was null.
 contribution-key-was-null=Key for service contribution (to service '%s') was 
null.
 contribution-wrong-key-type=Key for service contribution (to service '%s') was 
an instance of %s, \
   but the expected key type was %s.
-contribution-duplicate-key=Service contribution (to service '%s') conflicts 
with existing contribution (by %s).
+contribution-duplicate-key=Service contribution (to service '%s') for key '%s' 
conflicts with existing contribution (by %s).
 generic-type-not-supported=Generic type '%s' is not supported. Only simple 
parameterized lists are \
   supported.
 error-building-service=Error building service proxy for service '%s' (at %s): 
%s

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSp

[35/45] tapestry-5 git commit: Third pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
Third pass creating the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9f9e5699
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9f9e5699
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9f9e5699

Branch: refs/heads/beanmodel-split
Commit: 9f9e5699961a880ef8d460fbd8efe9f53cd71b52
Parents: d54315f
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 17:33:54 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 20:32:39 2014 -0200

--
 .../tapestry5/internal/BeanModelUtils.java  | 145 
 .../internal/InternalBeanModelUtils.java| 145 
 .../internal/beaneditor/BeanModelUtils.java | 120 ++
 .../internal/beaneditor/PropertyModelImpl.java  |   6 +-
 .../internal/services/BeanModelSourceImpl.java  | 222 +++
 .../services/PropertyConduitSourceImpl.java |   4 +-
 .../tapestry5/services/DataTypeAnalyzer.java|  48 
 .../internal/TapestryInternalUtils.java |   8 +-
 .../internal/beaneditor/BeanModelUtils.java | 119 --
 .../internal/services/BeanModelSourceImpl.java  | 222 ---
 .../tapestry5/services/DataTypeAnalyzer.java|  48 
 .../annotations/UsesMappedConfiguration.java|  41 
 .../annotations/UsesOrderedConfiguration.java   |  33 ---
 .../ioc/internal/util/InternalUtils.java|   6 +-
 .../annotations/UsesMappedConfiguration.java|  41 
 .../annotations/UsesOrderedConfiguration.java   |  33 +++
 16 files changed, 621 insertions(+), 620 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9f9e5699/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java 
b/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
deleted file mode 100644
index 08cb88a..000
--- a/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright 2007, 2008 The Apache Software Foundation
-//
-// 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.apache.tapestry5.internal;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.regex.Pattern;
-
-import org.apache.tapestry5.ioc.AnnotationProvider;
-import org.apache.tapestry5.ioc.Messages;
-import org.apache.tapestry5.ioc.internal.NullAnnotationProvider;
-import org.apache.tapestry5.ioc.internal.util.InternalStringUtils;
-
-/**
- * Some methods broken off tapestry-core's InternalUtils to avoid bringing the 
whole class
- * plus its multiple dependencies to the BeanModel package.
- */
-public class BeanModelUtils {
-   
-   public static final Pattern NON_WORD_PATTERN = 
Pattern.compile("[^\\w]");
-   
-   /**
-* @since 5.3
-*/
-   private final static AnnotationProvider NULL_ANNOTATION_PROVIDER = new 
NullAnnotationProvider();
-
-   
-/**
- * Used to convert a property expression into a key that can be used to 
locate various resources (Blocks, messages,
- * etc.). Strips out any punctuation characters, leaving just words 
characters (letters, number and the
- * underscore).
- *
- * @param expression a property expression
- * @return the expression with punctuation removed
- */
-public static String extractIdFromPropertyExpression(String expression)
-{
-return replace(expression, NON_WORD_PATTERN, "");
-}
-
-public static String replace(String input, Pattern pattern, String 
replacement)
-{
-return pattern.matcher(input).replaceAll(replacement);
-}
-
-/**
- * Looks for a label within the messages based on the id. If found, it is 
used, otherwise the name is converted to a
- * user presentable form.
- */
-public static String defaultLabel(String id, Messages messages, String 
propertyExpression)
-{
-String key = id + "-label";
-
-if (messages.contains(key))
-return messages.get(key);
-
-return 
toUserPresentable(extractIdFromPropertyExpression(InternalStringUtils.las

[45/45] tapestry-5 git commit: Resolving merge conflicts after git pull

2014-12-06 Thread thiagohp
Resolving merge conflicts after git pull


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/31493159
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/31493159
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/31493159

Branch: refs/heads/beanmodel-split
Commit: 31493159a0b8bf5676c88111865452405c721ea8
Parents: 97bd4d5 696bc7a
Author: Thiago H. de Paula Figueiredo 
Authored: Sun Dec 7 00:28:27 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sun Dec 7 00:28:27 2014 -0200

--
 .../org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java | 5 +
 .../apache/tapestry5/ioc/internal/BasicDataTypeAnalyzers.java   | 2 --
 2 files changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/31493159/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
--
diff --cc 
beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
index 58537b5,4ac3373..1b08733
--- 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
+++ 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
@@@ -40,12 -46,8 +40,17 @@@ import org.apache.tapestry5.services.Pr
  import org.slf4j.LoggerFactory;
  
  /**
++<<< HEAD
 + * Utility class for creating {@link BeanModelSource} instances without
 + * Tapestry-IoC. Usage of Tapestry-IoC is still recommended.
 + * 
 + * The setter methods can be used to customize the BeanModelSource to be 
created and can be 
 + * (and usually are skipped), so BeanModelSource beanModelSource = new 
BeanModelSourceBuilder().build()
 + * is all you need to do. 
++===
+  * Utility class for creating {@link BeanModelSource} instances without
+  * Tapestry-IoC. Usage of Tapestry-IoC is still recommended.
++>>> 696bc7ae848f4b4f2421ff77ceb4858a2f10465c
   */
  public class BeanModelSourceBuilder {
  

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/31493159/commons/src/main/java/org/apache/tapestry5/ioc/internal/BasicDataTypeAnalyzers.java
--
diff --cc 
commons/src/main/java/org/apache/tapestry5/ioc/internal/BasicDataTypeAnalyzers.java
index 4d603f5,df7564f..79594a8
--- 
a/commons/src/main/java/org/apache/tapestry5/ioc/internal/BasicDataTypeAnalyzers.java
+++ 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/BasicDataTypeAnalyzers.java
@@@ -48,8 -46,7 +47,7 @@@ public class BasicDataTypeAnalyzer
  {
  DefaultDataTypeAnalyzerMappedConfiguration mappedConfiguration = new 
DefaultDataTypeAnalyzerMappedConfiguration();
  provideDefaultDataTypeAnalyzers(mappedConfiguration);
- 
 -return new CombinedDataTypeAnalyzer(new AnnotationDataTypeAnalyzer(), 
new MapDataTypeAnalyzer(mappedConfiguration.getMap()));
 +return new CombinedDataTypeAnalyzer(new AnnotationDataTypeAnalyzer(), 
new DefaultDataTypeAnalyzer(mappedConfiguration.getMap()));
  }
  
  /**



[03/45] tapestry-5 git commit: TAP5-2362: Client-side regular expression field validation should ensure that the entire value matches the pattern

2014-12-06 Thread thiagohp
TAP5-2362: Client-side regular expression field validation should ensure that 
the entire value matches the pattern


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/57a8d25d
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/57a8d25d
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/57a8d25d

Branch: refs/heads/beanmodel-split
Commit: 57a8d25ddff8fe5edf102f5bf4e7fe324c409611
Parents: 1f09cb6
Author: Howard M. Lewis Ship 
Authored: Tue Oct 21 16:57:48 2014 -0700
Committer: Howard M. Lewis Ship 
Committed: Tue Oct 21 16:57:48 2014 -0700

--
 .../coffeescript/META-INF/modules/t5/core/validation.coffee  | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/57a8d25d/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee
--
diff --git 
a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee
 
b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee
index 9a22686..5cda63c 100644
--- 
a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee
+++ 
b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/validation.coffee
@@ -1,5 +1,3 @@
-# Copyright 2012 The Apache Software Foundation
-#
 # 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
@@ -143,7 +141,11 @@ define ["underscore", "./dom", "./events", "./utils", 
"./messages", "./fields"],
 re = new RegExp(@attr "data-validate-regexp")
 @meta REGEXP_META, re
 
-  unless re.test memo.translated
+  groups = memo.translated.match re
+
+  # Unlike Java, there isn't an easy way to match the entire string. This
+  # gets the job done.
+  if (groups is null) or (groups[0] isnt memo.translated)
 memo.error = (@attr "data-regexp-message") or "INVALID"
 return false
 



[16/45] tapestry-5 git commit: TAP5-2419: Update Macedonian translations

2014-12-06 Thread thiagohp
TAP5-2419: Update Macedonian translations


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/e5a4edf1
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/e5a4edf1
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/e5a4edf1

Branch: refs/heads/beanmodel-split
Commit: e5a4edf139f928a399cdc95edb3e424f096dd4b7
Parents: 4de73e9
Author: Jochen Kemnade 
Authored: Tue Nov 18 17:13:56 2014 +0100
Committer: Jochen Kemnade 
Committed: Tue Nov 18 17:13:56 2014 +0100

--
 .../org/apache/tapestry5/core_mk_MK.properties  | 22 ++--
 1 file changed, 11 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e5a4edf1/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties
--
diff --git 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties
index 9568621..b6afd57 100644
--- 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties
+++ 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_mk_MK.properties
@@ -18,7 +18,7 @@
 # not the best order.
 
 # PropertyEditor "Unable to locate block" error:
-#core-block-error=
+core-block-error=Не може да се пронајде блок за 
уредување на '%s' (од податочен тип '%s') во 
објектот %s: %s
 
 # BeanEditForm "Cancel" button label:
 core-cancel-label=Откажи
@@ -30,19 +30,19 @@ core-date-value-not-parseable=Внесениот датум 
'%s' не е вал
 core-default-error-banner=Потребно е да ги поправите 
следните грешки пред да продолжите.
 
 # Alerts "Dismiss" label:
-#core-dismiss-label=
+core-dismiss-label=Сокриј
 
 # Form nesting error:
-#core-form-nesting-not-allowed=
+core-form-nesting-not-allowed=Form компоненти не може да 
се вгнездуваат во други Form компоненти.
 
 # Grid pager link title:
-core-goto-page=Премини на страница %d
+core-goto-page=Оди на страница %d
 
 # Form error (missing POST or t:formdata)
-#core-invalid-form-request=
+core-invalid-form-request=Методот на повикот во 
формата треба да е POST и параметарот %s треба 
да има вредност.
 
 # Grid "no data" message:
-#core-no-grid-data-to-display=
+core-no-grid-data-to-display=Нема податоци за приказ
 
 # Palette Available list label:
 core-palette-available-label=Достапни
@@ -63,7 +63,7 @@ core-palette-selected-label=Избрани
 core-palette-up-label=Помести нагоре
 
 # ProgressiveDisplay "loading" label:
-#core-progressive-display-loading=
+core-progressive-display-loading=Вчитување
 
 # BeanEditForm "Submit" button:
 core-submit-label=Креирај/Ажурирај
@@ -96,13 +96,13 @@ regexp=Во полето '%2$s' е потребно да 
се внесе вре
 required='%s' е задолжително поле.
 
 # Client-side numeric validation error:
-#core-input-not-numeric=
+core-input-not-numeric=Вредноста не е број.
 
 # Client-side integer validation error:
-#core-input-not-integer=
+core-input-not-integer=Вредноста не е цел број.
 
 # DateField "Today" button:
-#core-datefield-today=
+core-datefield-today=Денес
 
 # DateField "None" button:
-#core-datefield-none=
+core-datefield-none=Избриши



[07/45] tapestry-5 git commit: Add an easier way to perform a partial page render outside of the standard AjaxComponentEventRequestHandler

2014-12-06 Thread thiagohp
Add an easier way to perform a partial page render outside of the standard 
AjaxComponentEventRequestHandler


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b7f60e28
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b7f60e28
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b7f60e28

Branch: refs/heads/beanmodel-split
Commit: b7f60e28e959b0250aac056f7e559515e75901d9
Parents: 6f4c564
Author: Howard M. Lewis Ship 
Authored: Wed Oct 29 16:02:14 2014 -0700
Committer: Howard M. Lewis Ship 
Committed: Wed Oct 29 16:02:14 2014 -0700

--
 .../AjaxPartialResponseRendererImpl.java|  5 +++
 .../internal/services/PageRenderQueueImpl.java  | 13 ++--
 .../services/ajax/AjaxResponseRendererImpl.java | 30 ++
 .../services/ajax/AjaxResponseRenderer.java | 32 ++--
 4 files changed, 63 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b7f60e28/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java
index 22ffce9..4b95f37 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AjaxPartialResponseRendererImpl.java
@@ -81,6 +81,11 @@ public class AjaxPartialResponseRendererImpl implements 
AjaxPartialResponseRende
 
 String pageName = (String) 
request.getAttribute(InternalConstants.PAGE_NAME_ATTRIBUTE_NAME);
 
+if (pageName == null)
+{
+throw new IllegalStateException("The active page name has 
not been specified.");
+}
+
 MarkupWriter writer = factory.newPartialMarkupWriter(pageName);
 
 // ... and here, the pipeline eventually reaches the PRQ to 
let it render the root render command.

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b7f60e28/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
index 34a997d..a61e15c 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderQueueImpl.java
@@ -1,5 +1,3 @@
-// Copyright 2007, 2008, 2010, 2011 The Apache Software Foundation
-//
 // 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
@@ -97,11 +95,20 @@ public class PageRenderQueueImpl implements PageRenderQueue
 {
 assert renderer != null;
 
+checkQueue();
+
 partialRenderInitialized = true;
 
 queue.push(renderer);
 }
 
+private void checkQueue()
+{
+if (queue == null) {
+throw new IllegalStateException("The page used as the basis for 
partial rendering has not been set.");
+}
+}
+
 public Page getRenderingPage()
 {
 return page;
@@ -125,6 +132,8 @@ public class PageRenderQueueImpl implements PageRenderQueue
 
 public void renderPartial(MarkupWriter writer, JSONObject reply)
 {
+checkQueue();
+
 PartialMarkupRenderer terminator = new PartialMarkupRenderer()
 {
 public void renderMarkup(MarkupWriter writer, JSONObject reply)

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b7f60e28/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java
index b263f7c..6fa41cb 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/AjaxResponseRendererImpl.java
@@ -1,5 +1,3 @@
-//  Copyright 2011, 2013, 2014 The Apache Software Foundation
-//
 // Licensed unde

[26/45] tapestry-5 git commit: update Moment.js to 2.8.4

2014-12-06 Thread thiagohp
update Moment.js to 2.8.4


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/23e512b1
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/23e512b1
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/23e512b1

Branch: refs/heads/beanmodel-split
Commit: 23e512b1db758299d7ffc8fa3e654cbf53469318
Parents: 4649e75
Author: Jochen Kemnade 
Authored: Wed Dec 3 16:25:56 2014 +0100
Committer: Jochen Kemnade 
Committed: Wed Dec 3 16:25:56 2014 +0100

--
 .../tapestry5/modules/JavaScriptModule.java |2 +-
 .../META-INF/assets/tapestry5/moment-2.8.3.js   | 9156 -
 .../META-INF/assets/tapestry5/moment-2.8.4.js   | 9394 ++
 3 files changed, 9395 insertions(+), 9157 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/23e512b1/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
index 556610d..4e096fb 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
@@ -346,7 +346,7 @@ public class JavaScriptModule
 
@Path("${tapestry.asset.root}/typeahead-0.9.3.js")
 Resource typeahead,
 
-
@Path("${tapestry.asset.root}/moment-2.8.3.js")
+
@Path("${tapestry.asset.root}/moment-2.8.4.js")
 Resource moment,
 
 @Path("${" + 
SymbolConstants.BOOTSTRAP_ROOT + "}/js/transition.js")



[10/45] tapestry-5 git commit: TAP5-2415: Update Bootstrap to 3.3.1

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3a4991af/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/scrollspy.js
--
diff --git 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/scrollspy.js
 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/scrollspy.js
index db23787..c468262 100644
--- 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/scrollspy.js
+++ 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/scrollspy.js
@@ -1,5 +1,5 @@
 /* 
- * Bootstrap: scrollspy.js v3.2.0
+ * Bootstrap: scrollspy.js v3.3.1
  * http://getbootstrap.com/javascript/#scrollspy
  * 
  * Copyright 2011-2014 Twitter, Inc.
@@ -30,7 +30,7 @@
 this.process()
   }
 
-  ScrollSpy.VERSION  = '3.2.0'
+  ScrollSpy.VERSION  = '3.3.1'
 
   ScrollSpy.DEFAULTS = {
 offset: 10
@@ -91,8 +91,9 @@
   return activeTarget != (i = targets[targets.length - 1]) && 
this.activate(i)
 }
 
-if (activeTarget && scrollTop <= offsets[0]) {
-  return activeTarget != (i = targets[0]) && this.activate(i)
+if (activeTarget && scrollTop < offsets[0]) {
+  this.activeTarget = null
+  return this.clear()
 }
 
 for (i = offsets.length; i--;) {
@@ -106,9 +107,7 @@
   ScrollSpy.prototype.activate = function (target) {
 this.activeTarget = target
 
-$(this.selector)
-  .parentsUntil(this.options.target, '.active')
-  .removeClass('active')
+this.clear()
 
 var selector = this.selector +
 '[data-target="' + target + '"],' +
@@ -127,6 +126,12 @@
 active.trigger('activate.bs.scrollspy')
   }
 
+  ScrollSpy.prototype.clear = function () {
+$(this.selector)
+  .parentsUntil(this.options.target, '.active')
+  .removeClass('active')
+  }
+
 
   // SCROLLSPY PLUGIN DEFINITION
   // ===

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3a4991af/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/tab.js
--
diff --git 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/tab.js
 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/tab.js
index c0e1e46..d59827f 100644
--- 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/tab.js
+++ 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/bootstrap/js/tab.js
@@ -1,5 +1,5 @@
 /* 
- * Bootstrap: tab.js v3.2.0
+ * Bootstrap: tab.js v3.3.1
  * http://getbootstrap.com/javascript/#tabs
  * 
  * Copyright 2011-2014 Twitter, Inc.
@@ -17,7 +17,9 @@
 this.element = $(element)
   }
 
-  Tab.VERSION = '3.2.0'
+  Tab.VERSION = '3.3.1'
+
+  Tab.TRANSITION_DURATION = 150
 
   Tab.prototype.show = function () {
 var $this= this.element
@@ -31,22 +33,30 @@
 
 if ($this.parent('li').hasClass('active')) return
 
-var previous = $ul.find('.active:last a')[0]
-var e= $.Event('show.bs.tab', {
-  relatedTarget: previous
+var $previous = $ul.find('.active:last a')
+var hideEvent = $.Event('hide.bs.tab', {
+  relatedTarget: $this[0]
+})
+var showEvent = $.Event('show.bs.tab', {
+  relatedTarget: $previous[0]
 })
 
-$this.trigger(e)
+$previous.trigger(hideEvent)
+$this.trigger(showEvent)
 
-if (e.isDefaultPrevented()) return
+if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) 
return
 
 var $target = $(selector)
 
 this.activate($this.closest('li'), $ul)
 this.activate($target, $target.parent(), function () {
+  $previous.trigger({
+type: 'hidden.bs.tab',
+relatedTarget: $this[0]
+  })
   $this.trigger({
 type: 'shown.bs.tab',
-relatedTarget: previous
+relatedTarget: $previous[0]
   })
 })
   }
@@ -55,15 +65,21 @@
 var $active= container.find('> .active')
 var transition = callback
   && $.support.transition
-  && $active.hasClass('fade')
+  && (($active.length && $active.hasClass('fade')) || !!container.find('> 
.fade').length)
 
 function next() {
   $active
 .removeClass('active')
 .find('> .dropdown-menu > .active')
-.removeClass('active')
+  .removeClass('active')
+.end()
+.find('[data-toggle="tab"]')
+  .attr('aria-expanded', false)
 
-  element.addClass('active')
+  element
+.addClass('active')
+.find('[data-toggle="tab"]')
+  .attr('aria-expanded', true)
 
   if (transition) {
 element[0].o

[30/45] tapestry-5 git commit: Second pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
Second pass creating the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/d54315f6
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/d54315f6
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/d54315f6

Branch: refs/heads/beanmodel-split
Commit: d54315f6721d846b66a3081f93e47d8392fe661f
Parents: 7ba99e0
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 16:42:10 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 20:32:39 2014 -0200

--
 beanmodel/.gitignore|   4 +
 beanmodel/build.gradle  |  51 -
 .../tapestry5/internal/BeanModelUtils.java  | 145 +
 .../internal/beaneditor/BeanModelImpl.java  |   4 +-
 .../internal/beaneditor/PropertyModelImpl.java  |  14 +-
 .../services/PropertyConduitDelegate.java   |   1 -
 .../services/PropertyConduitSourceImpl.java |  10 +-
 .../org/apache/tapestry5/ioc/ObjectLocator.java |   3 +-
 .../ioc/internal/util/InternalStringUtils.java  | 203 +++
 .../ioc/internal/util/TapestryException.java|  23 ++-
 .../tapestry5/ioc/util/AvailableValues.java |   4 +-
 tapestry-core/build.gradle  |  37 
 .../internal/TapestryInternalUtils.java |  46 +
 .../ioc/internal/util/InternalUtils.java| 142 +++--
 14 files changed, 472 insertions(+), 215 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d54315f6/beanmodel/.gitignore
--
diff --git a/beanmodel/.gitignore b/beanmodel/.gitignore
new file mode 100644
index 000..f739972
--- /dev/null
+++ b/beanmodel/.gitignore
@@ -0,0 +1,4 @@
+docs
+/.externalToolBuilders
+src/main/generated
+src/test/generated

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d54315f6/beanmodel/build.gradle
--
diff --git a/beanmodel/build.gradle b/beanmodel/build.gradle
index ccdeb37..c09ebdd 100644
--- a/beanmodel/build.gradle
+++ b/beanmodel/build.gradle
@@ -6,7 +6,18 @@ description = "Fast class property discovery, reading and 
writing library based
 //apply plugin: JavaPlugin
 
 buildDir = 'target/gradle-build'
-   
+
+project.ext {
+   antlrSource = "src/main/antlr"
+   mainGeneratedDir = "src/main/generated"
+   testGeneratedDir = "src/test/generated"
+   antlrOutput = "$mainGeneratedDir/antlr"
+}
+
+configurations {
+   antlr3
+}
+  
 project.ext.libraryVersions = [
jcache: '1.0.0',
 ]
@@ -15,12 +26,50 @@ dependencies {
compile project(":plastic")
compile project(":tapestry5-annotations")
compile project(":commons")
+   
+   // Antlr3 tool path used with the antlr3 task
+   antlr3 "org.antlr:antlr:3.5.2"
+
// Transitive will bring in the unwanted string template library as well
compile "org.antlr:antlr-runtime:3.5.2", {
exclude group: "org.antlr", module: "stringtemplate"
}
 }
 
+// This may spin out as a plugin once we've got the details down pat
+
+task generateGrammarSource(type: JavaExec) {
+   description "Generates Java sources from Antlr3 grammars."
+   inputs.source fileTree(dir: antlrSource, include: "**/*.g")
+   outputs.dir file(antlrOutput)
+
+   classpath configurations.antlr3
+
+   main "org.antlr.Tool"
+   args "-o", "${antlrOutput}/org/apache/tapestry5/internal/antlr"
+   args inputs.sourceFiles
+
+   doFirst {
+   logger.info "Executing Antlr3 grammar 
generation:\n${commandLine.join(' ')}"
+   }
+}
+
+sourceSets {
+   main {
+   output.dir(antlrOutput, builtBy: generateGrammarSource)
+   java {
+   srcDir antlrOutput
+   }
+   }
+}
+
+clean.delete mainGeneratedDir, testGeneratedDir
+
+compileJava {
+   dependsOn generateGrammarSource
+   options.fork(memoryMaximumSize: '512m')
+}
+
 jar {  
manifest {  
}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/d54315f6/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java 
b/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
new file mode 100644
index 000..08cb88a
--- /dev/null
+++ b/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
@@ -0,0 +1,145 @@
+// Copyright 2007, 2008 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file 

[14/45] tapestry-5 git commit: TAP5-2415: update Bootstrap version number in the release notes

2014-12-06 Thread thiagohp
TAP5-2415: update Bootstrap version number in the release notes


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7a86bfd6
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7a86bfd6
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7a86bfd6

Branch: refs/heads/beanmodel-split
Commit: 7a86bfd6b7806062799f567fbe85e7aae4d7c4cc
Parents: f0b5055
Author: Jochen Kemnade 
Authored: Thu Nov 13 09:16:10 2014 +0100
Committer: Jochen Kemnade 
Committed: Thu Nov 13 09:16:10 2014 +0100

--
 54_RELEASE_NOTES.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7a86bfd6/54_RELEASE_NOTES.md
--
diff --git a/54_RELEASE_NOTES.md b/54_RELEASE_NOTES.md
index f218254..9efdcef 100644
--- a/54_RELEASE_NOTES.md
+++ b/54_RELEASE_NOTES.md
@@ -300,7 +300,7 @@ a new page.
 
 ## Bootstrap 3
 
-Tapestry now includes a default copy of Bootstrap 3.0.1, in addition to its 
own default set of CSS rules.
+Tapestry now includes a default copy of Bootstrap 3.3.1, in addition to its 
own default set of CSS rules.
 The Tapestry CSS from prior releases has been largely eliminated; instead
 components now refer to standard Bootstrap CSS classes.
 



[34/45] tapestry-5 git commit: Fourth pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
Fourth pass creating the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c7bf35ce
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c7bf35ce
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c7bf35ce

Branch: refs/heads/beanmodel-split
Commit: c7bf35ce7840d1131b657da7ec77eb2d9a494eb6
Parents: 9f9e569
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 19:45:14 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 20:32:39 2014 -0200

--
 beanmodel/build.gradle  |   1 +
 .../beaneditor/BeanModelSourceBuilder.java  | 121 +
 .../internal/InternalBeanModelUtils.java| 145 --
 .../internal/beaneditor/BeanModelImpl.java  |   4 +-
 .../internal/beaneditor/BeanModelUtils.java |   4 +-
 .../internal/beaneditor/PropertyModelImpl.java  |  10 +-
 .../services/PropertyConduitSourceImpl.java |  10 +-
 .../services/ClassPropertyAdapterImpl.java  | 249 +
 .../services/PlasticClassListenerLogger.java|  47 ++
 .../services/PlasticProxyFactoryImpl.java   | 285 +++
 .../internal/services/PropertyAccessImpl.java   | 217 
 .../internal/services/PropertyAdapterImpl.java  | 273 ++
 commons/build.gradle|   1 +
 .../internal/services/StringInternerImpl.java   |  54 ++
 .../org/apache/tapestry5/ioc/Configuration.java |  53 ++
 .../tapestry5/ioc/MappedConfiguration.java  |  81 +++
 .../tapestry5/ioc/OrderedConfiguration.java |  84 +++
 .../ioc/internal/BasicTypeCoercions.java| 342 +
 .../AccessableObjectAnnotationProvider.java |  46 ++
 .../services/AnnotationProviderChain.java   |  59 +++
 .../ioc/internal/services/CompoundCoercion.java |  54 ++
 .../ioc/internal/services/ServiceMessages.java  |  68 +++
 .../ioc/internal/services/StringLocation.java   |  65 +++
 .../ioc/internal/services/TypeCoercerImpl.java  | 508 +++
 .../ioc/internal/util/InheritanceSearch.java| 159 ++
 .../ioc/internal/util/InternalCommonsUtils.java | 388 ++
 .../ioc/internal/util/InternalStringUtils.java  | 203 
 .../ioc/internal/util/LockSupport.java  |  89 
 .../ioc/internal/util/MessageFormatterImpl.java |  65 +++
 .../ioc/internal/util/MessagesImpl.java |  74 +++
 .../ioc/internal/util/TapestryException.java|  23 +-
 .../tapestry5/ioc/util/AbstractMessages.java|  94 
 .../tapestry5/ioc/util/AvailableValues.java |   4 +-
 .../apache/tapestry5/ioc/util/TimeInterval.java | 195 +++
 .../tapestry5/util/StringToEnumCoercion.java|  91 
 .../internal/TapestryInternalUtils.java |   8 +-
 .../internal/services/StringInternerImpl.java   |  53 --
 .../org/apache/tapestry5/ioc/Configuration.java |  53 --
 .../tapestry5/ioc/MappedConfiguration.java  |  81 ---
 .../tapestry5/ioc/OrderedConfiguration.java |  84 ---
 .../AccessableObjectAnnotationProvider.java |  46 --
 .../services/AnnotationProviderChain.java   |  59 ---
 .../services/ClassPropertyAdapterImpl.java  | 250 -
 .../ioc/internal/services/CompoundCoercion.java |  54 --
 .../services/PlasticClassListenerLogger.java|  47 --
 .../services/PlasticProxyFactoryImpl.java   | 286 ---
 .../internal/services/PropertyAccessImpl.java   | 217 
 .../internal/services/PropertyAdapterImpl.java  | 273 --
 .../ioc/internal/services/ServiceMessages.java  |  68 ---
 .../ioc/internal/services/StringLocation.java   |  65 ---
 .../ioc/internal/services/TypeCoercerImpl.java  | 508 ---
 .../ioc/internal/util/InheritanceSearch.java| 159 --
 .../ioc/internal/util/InternalUtils.java| 138 +++--
 .../ioc/internal/util/LockSupport.java  |  89 
 .../ioc/internal/util/MessageFormatterImpl.java |  65 ---
 .../ioc/internal/util/MessagesImpl.java |  74 ---
 .../ioc/modules/TapestryIOCModule.java  | 297 +--
 .../tapestry5/ioc/util/AbstractMessages.java|  94 
 .../apache/tapestry5/ioc/util/TimeInterval.java | 195 ---
 .../tapestry5/util/StringToEnumCoercion.java|  91 
 60 files changed, 3855 insertions(+), 3665 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7bf35ce/beanmodel/build.gradle
--
diff --git a/beanmodel/build.gradle b/beanmodel/build.gradle
index c09ebdd..fba43b7 100644
--- a/beanmodel/build.gradle
+++ b/beanmodel/build.gradle
@@ -26,6 +26,7 @@ dependencies {
compile project(":plastic")
compile project(":tapestry5-annotations")
compile project(":commons")
+   compile "org.slf4j:slf4j-api:${versions.slf4j}"

 

[39/45] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
deleted file mode 100644
index 701420f..000
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
+++ /dev/null
@@ -1,1563 +0,0 @@
-// Copyright 2007-2013 The Apache Software Foundation
-//
-// 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.apache.tapestry5.internal.services;
-
-import org.antlr.runtime.ANTLRInputStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.tree.Tree;
-import org.apache.tapestry5.PropertyConduit;
-import org.apache.tapestry5.PropertyConduit2;
-import org.apache.tapestry5.internal.InternalPropertyConduit;
-import org.apache.tapestry5.internal.antlr.PropertyExpressionLexer;
-import org.apache.tapestry5.internal.antlr.PropertyExpressionParser;
-import org.apache.tapestry5.internal.util.IntegerRange;
-import org.apache.tapestry5.internal.util.MultiKey;
-import org.apache.tapestry5.ioc.AnnotationProvider;
-import org.apache.tapestry5.ioc.annotations.PostInjection;
-import org.apache.tapestry5.ioc.internal.NullAnnotationProvider;
-import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.GenericsUtils;
-import org.apache.tapestry5.ioc.internal.util.InternalUtils;
-import org.apache.tapestry5.ioc.services.*;
-import org.apache.tapestry5.ioc.util.AvailableValues;
-import org.apache.tapestry5.ioc.util.ExceptionUtils;
-import org.apache.tapestry5.ioc.util.UnknownValueException;
-import org.apache.tapestry5.plastic.*;
-import org.apache.tapestry5.services.ComponentClasses;
-import org.apache.tapestry5.services.ComponentLayer;
-import org.apache.tapestry5.services.InvalidationEventHub;
-import org.apache.tapestry5.services.PropertyConduitSource;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.apache.tapestry5.internal.antlr.PropertyExpressionParser.*;
-
-public class PropertyConduitSourceImpl implements PropertyConduitSource
-{
-static class ConduitMethods
-{
-private static final MethodDescription GET = 
getMethodDescription(PropertyConduit.class, "get", Object.class);
-
-private static final MethodDescription SET = 
getMethodDescription(PropertyConduit.class, "set", Object.class,
-Object.class);
-
-private static final MethodDescription GET_PROPERTY_TYPE = 
getMethodDescription(PropertyConduit.class,
-"getPropertyType");
-
-private static final MethodDescription GET_PROPERTY_GENERIC_TYPE = 
getMethodDescription(PropertyConduit2.class,
-"getPropertyGenericType");
-
-private static final MethodDescription GET_PROPERTY_NAME = 
getMethodDescription(InternalPropertyConduit.class,
-"getPropertyName");
-
-private static final MethodDescription GET_ANNOTATION = 
getMethodDescription(AnnotationProvider.class,
-"getAnnotation", Class.class);
-
-}
-
-static class DelegateMethods
-{
-static final Method INVERT = getMethod(PropertyConduitDelegate.class, 
"invert", Object.class);
-
-static final Method RANGE = getMethod(PropertyConduitDelegate.class, 
"range", int.class, int.class);
-
-static final Method COERCE = getMethod(PropertyConduitDelegate.class, 
"coerce", Object.class, Class.class);
-}
-
-static class ArrayListMethods
-{
-static final Method ADD = getMethod(ArrayList.class, "add", 
Object.class);
-}
-
-static class HashMapMethods
-{
-static final Method PUT = getMethod(HashMap.class, "put", 
Object.class, Object.class);
-}
-
-private static InstructionBuilderCallback RETURN_NULL = new 
InstructionBuilderCallback()
-{
-public void doBuild(InstructionBuilder builder)
-{
-builder.loadNull().returnResult();
-  

[20/45] tapestry-5 git commit: Fix scp task to use public key authentication, password is not allowed anymore

2014-12-06 Thread thiagohp
Fix scp task to use public key authentication, password is not allowed anymore


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1956c560
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1956c560
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1956c560

Branch: refs/heads/beanmodel-split
Commit: 1956c560e71f90d6a43558103e7f97388e772e7d
Parents: f73e8b2
Author: kaosko 
Authored: Thu Nov 20 19:24:51 2014 +
Committer: kaosko 
Committed: Thu Nov 20 19:24:51 2014 +

--
 ssh.gradle | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1956c560/ssh.gradle
--
diff --git a/ssh.gradle b/ssh.gradle
index 74b620d..e367719 100644
--- a/ssh.gradle
+++ b/ssh.gradle
@@ -60,7 +60,7 @@ class SshTask extends DefaultTask {
   def scpFile(source, destination) {
 initAnt()
 withInfoLogging {
-  ant.scp(localFile: project.files(source).singleFile, remoteToFile: 
"${userName}@${host}:${destination}", password: password, verbose: verbose)
+  ant.scp(localFile: project.files(source).singleFile, remoteToFile: 
"${userName}@${host}:${destination}", keyfile : 
"${System.properties['user.home']}/.ssh/id_dsa", verbose: verbose)
 }
   }
 
@@ -68,7 +68,7 @@ class SshTask extends DefaultTask {
 initAnt()
 withInfoLogging {
   ant.sshexec(host: host, username: userName, password: password, command: 
"mkdir -p ${destination}")
-  ant.scp(remoteTodir: "${userName}@${host}:${destination}", password: 
password, verbose: verbose) {
+  ant.scp(remoteTodir: "${userName}@${host}:${destination}", keyfile : 
"${System.properties['user.home']}/.ssh/id_dsa", verbose: verbose) {
 project.files(source).addToAntBuilder(ant, "fileSet", 
FileCollection.AntType.FileSet)
   }
 }



[15/45] tapestry-5 git commit: TAP5-2332: Replace String.format call by simple String concatenation, the compiler will transform that to StringBuilder-based concatenation which is considerably faster

2014-12-06 Thread thiagohp
TAP5-2332: Replace String.format call by simple String concatenation, the 
compiler will transform that to StringBuilder-based concatenation which is 
considerably faster


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/4de73e96
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/4de73e96
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/4de73e96

Branch: refs/heads/beanmodel-split
Commit: 4de73e9642263d8f5b02000663a196df46059b99
Parents: 7a86bfd
Author: Michael Mikhulya 
Authored: Mon May 19 17:41:01 2014 +0400
Committer: Jochen Kemnade 
Committed: Thu Nov 13 09:17:51 2014 +0100

--
 .../main/java/org/apache/tapestry5/internal/OptionModelImpl.java | 2 +-
 .../internal/beaneditor/MessagesConstraintGenerator.java | 3 +--
 .../apache/tapestry5/internal/services/DocumentLinkerImpl.java   | 2 +-
 .../java/org/apache/tapestry5/internal/services/EventImpl.java   | 2 +-
 .../services/javascript/JavaScriptStackPathConstructorImpl.java  | 4 +---
 .../tapestry5/internal/structure/ComponentPageElementImpl.java   | 2 +-
 .../ioc/internal/services/PerThreadServiceLifecycle.java | 2 +-
 7 files changed, 7 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4de73e96/tapestry-core/src/main/java/org/apache/tapestry5/internal/OptionModelImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/OptionModelImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/OptionModelImpl.java
index 89ce561..101cfef 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/OptionModelImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/OptionModelImpl.java
@@ -49,6 +49,6 @@ public class OptionModelImpl extends AbstractOptionModel
 @Override
 public String toString()
 {
-return String.format("OptionModel[%s %s]", label, value);
+return "OptionModel[" + label + ' ' + value + ']';
 }
 }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4de73e96/tapestry-core/src/main/java/org/apache/tapestry5/internal/beaneditor/MessagesConstraintGenerator.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/beaneditor/MessagesConstraintGenerator.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/beaneditor/MessagesConstraintGenerator.java
index 0156a93..2ae9b81 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/beaneditor/MessagesConstraintGenerator.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/beaneditor/MessagesConstraintGenerator.java
@@ -34,7 +34,6 @@ public class MessagesConstraintGenerator implements 
ValidationConstraintGenerato
 {
 
 private final Environment environment;
-private final String format="%s-validate";
 private final Pattern splitPattern;
 
 public MessagesConstraintGenerator(final Environment environment) {
@@ -49,7 +48,7 @@ public class MessagesConstraintGenerator implements 
ValidationConstraintGenerato
 return null;
 }
 
-String key = String.format(format,environmentMessages.getOverrideId());
+String key = environmentMessages.getOverrideId() + "-validate";
 Messages m = environmentMessages.getMessages();
 if (!m.contains(key))
 {

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4de73e96/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
index a6f5198..56ad354 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
@@ -62,7 +62,7 @@ public class DocumentLinkerImpl implements DocumentLinker
 this.omitGeneratorMetaTag = omitGeneratorMetaTag;
 this.enablePageloadingMask = enablePageloadingMask;
 
-tapestryBanner = String.format("Apache Tapestry Framework (version 
%s)", tapestryVersion);
+tapestryBanner = "Apache Tapestry Framework (version " + 
tapestryVersion + ')';
 }
 
 public void addStylesheetLink(StylesheetLink sheet)

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4de73e96/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/EventImpl.java
--
diff 

[27/45] tapestry-5 git commit: TAP5-2425: throw a meaningful exception when trying to use an abstract class as a service implementation

2014-12-06 Thread thiagohp
TAP5-2425: throw a meaningful exception when trying to use an abstract class as 
a service implementation


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b06c013f
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b06c013f
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b06c013f

Branch: refs/heads/beanmodel-split
Commit: b06c013f1719c455b46ed4b88b74b66fd963197a
Parents: 23e512b
Author: Jochen Kemnade 
Authored: Thu Dec 4 20:38:32 2014 +0100
Committer: Jochen Kemnade 
Committed: Thu Dec 4 20:38:32 2014 +0100

--
 .../tapestry5/ioc/internal/IOCMessages.java |  5 
 .../ioc/internal/ServiceBinderImpl.java |  3 ++
 .../ioc/internal/IOCStrings.properties  |  3 +-
 .../ioc/specs/DefaultModuleDefImplSpec.groovy   | 28 +++
 .../AbstractAutobuildServiceModule.java | 25 +
 .../ioc/internal/AbstractRunnableService.java   | 29 
 6 files changed, 87 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
index 7584702..ac39d15 100644
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
+++ 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
@@ -187,6 +187,11 @@ final class IOCMessages
 return MESSAGES.format("no-constructor", 
implementationClass.getName(), serviceId);
 }
 
+static String abstractServiceImplementation(Class implementationClass, 
String serviceId)
+{
+return MESSAGES.format("abstract-service-implementation", 
implementationClass.getName(), serviceId);
+}
+
 static String bindMethodMustBeStatic(String methodId)
 {
 return MESSAGES.format("bind-method-must-be-static", methodId);

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
index e7ec9e1..d93ed2e 100644
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
+++ 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
@@ -28,6 +28,7 @@ import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.util.Arrays;
 import java.util.Set;
 
@@ -140,6 +141,8 @@ public class ServiceBinderImpl implements ServiceBinder, 
ServiceBindingOptions
 
 private ObjectCreatorSource 
createStandardConstructorBasedObjectCreatorSource()
 {
+if (Modifier.isAbstract(serviceImplementation.getModifiers()))
+throw new 
RuntimeException(IOCMessages.abstractServiceImplementation(serviceImplementation,
 serviceId));
 final Constructor constructor = 
InternalUtils.findAutobuildConstructor(serviceImplementation);
 
 if (constructor == null)

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
--
diff --git 
a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
 
b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
index 73fe7e7..6710b91 100644
--- 
a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
+++ 
b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
@@ -65,4 +65,5 @@ overlapping-service-proxy-providers=Setting a new service 
proxy provider when th
 unexpected-service-proxy-provider=Unexpected service proxy provider when 
clearing the provider. This may indicate that you have multiple IoC Registries.
 no-proxy-provider=Service token for service '%s' can not be converted back 
into a proxy because no proxy provider has been registered. This may indicate 
that an IoC Registry has not been started yet.
 contribution-for-nonexistent-service=Contribution %s is for service '%s', 
which does not exist.
-contribution-for-unqualified-service=Contribution %s is for service '%s'

[41/45] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/commons/src/main/java/org/apache/tapestry5/ioc/Resource.java
--
diff --git a/commons/src/main/java/org/apache/tapestry5/ioc/Resource.java 
b/commons/src/main/java/org/apache/tapestry5/ioc/Resource.java
new file mode 100644
index 000..b81c1c5
--- /dev/null
+++ b/commons/src/main/java/org/apache/tapestry5/ioc/Resource.java
@@ -0,0 +1,108 @@
+// 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.apache.tapestry5.ioc;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Locale;
+
+/**
+ * Represents a resource on the server that may be used for server side 
processing, or may be exposed to the client
+ * side. Generally, this represents an abstraction on top of files on the 
class path and files stored in the web
+ * application context.
+ * 
+ * Resources are often used as map keys; they should be immutable and should 
implement hashCode() and equals().
+ */
+public interface Resource
+{
+
+/**
+ * Returns true if the resource exists; if a stream to the content of the 
file may be opened. A resource exists
+ * if {@link #toURL()} returns a non-null value. Starting in release 
5.3.4, the result of this is cached.
+ * 
+ * Starting in 5.4, some "virtual resources", may return true even though 
{@link #toURL()} returns null.
+ *
+ * @return true if the resource exists, false if it does not
+ */
+boolean exists();
+
+
+/**
+ * Returns true if the resource is virtual, meaning this is no underlying 
file. Many operations are unsupported
+ * on virtual resources, including {@link #toURL()}, {@link 
#forLocale(java.util.Locale)},
+ * {@link #withExtension(String)}, {@link #getFile()}, {@link 
#getFolder()}, {@link #getPath()}}; these
+ * operations will throw an {@link 
java.lang.UnsupportedOperationException}.
+ *
+ * @since 5.4
+ */
+boolean isVirtual();
+
+/**
+ * Opens a stream to the content of the resource, or returns null if the 
resource does not exist. The native
+ * input stream supplied by the resource is wrapped in a {@link 
java.io.BufferedInputStream}.
+ *
+ * @return an open, buffered stream to the content, if available
+ */
+InputStream openStream() throws IOException;
+
+/**
+ * Returns the URL for the resource, or null if it does not exist. This 
value is lazily computed; starting in 5.3.4, subclasses may cache
+ * the result.  Starting in 5.4, some "virtual resources" may return null.
+ */
+URL toURL();
+
+/**
+ * Returns a localized version of the resource. May return null if no such 
resource exists. Starting in release
+ * 5.3.4, the result of this method is cached internally.
+ */
+Resource forLocale(Locale locale);
+
+/**
+ * Returns a Resource based on a relative path, relative to the folder 
containing the resource. Understands the "."
+ * (current folder) and ".." (parent folder) conventions, and treats 
multiple sequential slashes as a single slash.
+ * 
+ * Virtual resources (resources fabricated at runtime) return themselves.
+ */
+Resource forFile(String relativePath);
+
+/**
+ * Returns a new Resource with the extension changed (or, if the resource 
does not have an extension, the extension
+ * is added). The new Resource may not exist (that is, {@link #toURL()} 
may return null.
+ *
+ * @param extension
+ * to apply to the resource, such as "html" or "properties"
+ * @return the new resource
+ */
+Resource withExtension(String extension);
+
+/**
+ * Returns the portion of the path up to the last forward slash; this is 
the directory or folder portion of the
+ * Resource.
+ */
+String getFolder();
+
+/**
+ * Returns the file portion of the Resource path, everything that follows 
the final forward slash.
+ * 
+ * Starting in 5.4, certain kinds of "virtual resources" may return null 
here.
+ */
+String getFile();
+
+/**
+ * Return the path (the combination of folder and file).
+ * 
+ * Starting in 5.4, certain "virtual resources", may return an arbitrary 
value here.
+ */
+String getPath();
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/commons/src/main/java/org/apache/tapestry5/ioc/internal/NullA

[38/45] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java
deleted file mode 100644
index 81d1f77..000
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2006, 2007, 2010, 2011 The Apache Software Foundation
-//
-// 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.apache.tapestry5.ioc;
-
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.apache.tapestry5.ioc.services.MasterObjectProvider;
-
-import java.lang.annotation.Annotation;
-
-/**
- * Defines an object which can provide access to services defined within a 
{@link org.apache.tapestry5.ioc.Registry}, or
- * to objects or object instances available by other means. Services are 
accessed via service id, or
- * (when appropriate)
- * by just service interface. The Registry itself implements this interface, 
as does
- * {@link org.apache.tapestry5.ioc.ServiceResources}.
- */
-public interface ObjectLocator
-{
-/**
- * Obtains a service via its unique service id. Returns the service's 
proxy. The service proxy
- * implements the same
- * interface as the actual service, and is used to instantiate the actual 
service only as needed
- * (this is
- * transparent to the application).
- *
- * @param 
- * @param serviceIdunique Service id used to locate the service 
object (may contain symbols,
- * which
- * will be expanded), case is ignored
- * @param serviceInterface the interface implemented by the service (or an 
interface extended by the service
- * interface)
- * @return the service instance
- * @throws RuntimeException if the service is not defined, or if an error 
occurs instantiating it
- */
- T getService(String serviceId, Class serviceInterface);
-
-/**
- * Locates a service given a service interface and (optionally) some 
marker annotation types. A single service must implement the service
- * interface (which   * 
can be hard to guarantee) and by marked by all the marker types. The search 
takes into account inheritance of the service interface
- * (not the service implementation), which may result in a 
failure due to extra
- * matches.
- *
- * @param serviceInterface the interface the service implements
- * @return the service's proxy
- * @throws RuntimeException if the service does not exist (this is 
considered programmer error), or multiple
- *  services directly implement, or extend from, 
the service interface
- * @see org.apache.tapestry5.ioc.annotations.Marker
- */
- T getService(Class serviceInterface);
-
-/**
- * Locates a service given a service interface and (optionally) some 
marker annotation types. A single service must implement the service
- * interface (which   * 
can be hard to guarantee) and by marked by all the marker types. The search 
takes into account inheritance of the service interface
- * (not the service implementation), which may result in a 
failure due to extra
- * matches.The ability to specify marker annotation types was 
added in 5.3
- *
- * @param serviceInterface the interface the service implements
- * @param markerTypes  Markers used to select a specific service that 
implements the interface
- * @return the service's proxy
- * @throws RuntimeException if the service does not exist (this is 
considered programmer error), or multiple
- *  services directly implement, or extend from, 
the service interface
- * @see org.apache.tapestry5.ioc.annotations.Marker
- * @since 5.3
- */
- T getService(Class serviceInterface, Class... 
markerTypes);
-
-/**
- * Obtains an object indirectly, using the {@link 
org.apache.tapestry5.ioc.services.MasterObjectProvider} service.
- *
- * @param objectType the type of object to be returned
- * @param annotationProvider provides access to annot

[37/45] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/ExceptionUtils.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/ExceptionUtils.java 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/ExceptionUtils.java
deleted file mode 100644
index 2feaeca..000
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/ExceptionUtils.java
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2008-2013 The Apache Software Foundation
-//
-// 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.apache.tapestry5.ioc.util;
-
-import org.apache.tapestry5.ioc.services.ClassPropertyAdapter;
-import org.apache.tapestry5.ioc.services.PropertyAccess;
-
-/**
- * Contains static methods useful for manipulating exceptions.
- */
-public class ExceptionUtils
-{
-/**
- * Locates a particular type of exception, working its way via the cause 
property of each exception in the exception
- * stack.
- *
- * @param tthe outermost exception
- * @param type the type of exception to search for
- * @return the first exception of the given type, if found, or null
- */
-public static  T findCause(Throwable t, Class type)
-{
-Throwable current = t;
-
-while (current != null)
-{
-if (type.isInstance(current))
-{
-return type.cast(current);
-}
-
-// Not a match, work down.
-
-current = current.getCause();
-}
-
-return null;
-}
-
-/**
- * Locates a particular type of exception, working its way down via any 
property that returns some type of Exception.
- * This is more expensive, but more accurate, than {@link 
#findCause(Throwable, Class)} as it works with older exceptions
- * that do not properly implement the (relatively new) {@linkplain 
Throwable#getCause() cause property}.
- *
- * @param t  the outermost exception
- * @param type   the type of exception to search for
- * @param access used to access properties
- * @return the first exception of the given type, if found, or null
- */
-public static  T findCause(Throwable t, Class 
type, PropertyAccess access)
-{
-Throwable current = t;
-
-while (current != null)
-{
-if (type.isInstance(current))
-{
-return type.cast(current);
-}
-
-Throwable next = null;
-
-ClassPropertyAdapter adapter = access.getAdapter(current);
-
-for (String name : adapter.getPropertyNames())
-{
-
-Object value = adapter.getPropertyAdapter(name).get(current);
-
-if (value != null && value != current && value instanceof 
Throwable)
-{
-next = (Throwable) value;
-break;
-}
-}
-
-current = next;
-}
-
-
-return null;
-}
-
-/**
- * Extracts the message from an exception. If the exception's message is 
null, returns the exceptions class name.
- *
- * @param exception
- * to extract message from
- * @return message or class name
- * @since 5.4
- */
-public static String toMessage(Throwable exception)
-{
-assert exception != null;
-
-String message = exception.getMessage();
-
-if (message != null)
-return message;
-
-return exception.getClass().getName();
-}
-}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/UnknownValueException.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/UnknownValueException.java
 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/UnknownValueException.java
deleted file mode 100644
index 470b611..000
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/UnknownValueException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2010 The Apache Software Foundation
-//
-// 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:/

[40/45] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/commons/src/main/java/org/apache/tapestry5/services/InvalidationListener.java
--
diff --git 
a/commons/src/main/java/org/apache/tapestry5/services/InvalidationListener.java 
b/commons/src/main/java/org/apache/tapestry5/services/InvalidationListener.java
new file mode 100644
index 000..b9b4aa3
--- /dev/null
+++ 
b/commons/src/main/java/org/apache/tapestry5/services/InvalidationListener.java
@@ -0,0 +1,33 @@
+// Copyright 2006, 2007, 2012 The Apache Software Foundation
+//
+// 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.apache.tapestry5.services;
+
+/**
+ * Interface for objects that may cache information that can be invalidated. 
Invalidation occurs when external files,
+ * from which in-memory data is cached, is determined to have changed. 
Granularity is very limited; when any external
+ * file is found to have changed, the event is fired (with the expectation 
that the cleared cache will be repopulated as
+ * necessary).
+ *
+ * @see org.apache.tapestry5.services.InvalidationEventHub
+ * @since 5.1.0.0
+ * @deprecated In 5.4; use {@link 
InvalidationEventHub#addInvalidationCallback(Runnable)} instead
+ */
+public interface InvalidationListener
+{
+/**
+ * Invoked to indicate that some object is invalid. The receiver should 
clear its cache.
+ */
+void objectWasInvalidated();
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/settings.gradle
--
diff --git a/settings.gradle b/settings.gradle
index 639..593c3a4 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -4,5 +4,5 @@ include "tapestry-beanvalidator", "tapestry-jpa", 
"tapestry-kaptcha"
 include "tapestry-javadoc", "quickstart", "tapestry-clojure", 
"tapestry-mongodb"
 include "tapestry-test-data", 'tapestry-internal-test', "tapestry-ioc-junit"
 include "tapestry-webresources", "tapestry-runner", "tapestry-test-constants"
-include "tapestry-ioc-jcache"
+include "tapestry-ioc-jcache", "beanmodel", "commons"
 // include "tapestry-cdi"

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/tapestry-core/build.gradle
--
diff --git a/tapestry-core/build.gradle b/tapestry-core/build.gradle
index c16cd48..584200a 100644
--- a/tapestry-core/build.gradle
+++ b/tapestry-core/build.gradle
@@ -18,6 +18,7 @@ configurations {
 dependencies {
 compile project(':tapestry-ioc')
 compile project(':tapestry-json')
+compile project(':beanmodel')
 
 provided project(":tapestry-test")
 provided project(":tapestry-test-constants")
@@ -26,11 +27,6 @@ dependencies {
 
 compile "commons-codec:commons-codec:1.5"
 
-// Transitive will bring in the unwanted string template library as well
-compile "org.antlr:antlr-runtime:3.5.2", {
-exclude group: "org.antlr", module: "stringtemplate"
-}
-
 // Antlr3 tool path used with the antlr3 task
 antlr3 "org.antlr:antlr:3.5.2"
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/tapestry-core/src/main/java/org/apache/tapestry5/PropertyConduit.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/PropertyConduit.java 
b/tapestry-core/src/main/java/org/apache/tapestry5/PropertyConduit.java
deleted file mode 100644
index 3dbb0c0..000
--- a/tapestry-core/src/main/java/org/apache/tapestry5/PropertyConduit.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2007 The Apache Software Foundation
-//
-// 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.apache.tapestry5;
-
-import org.apache.tapestry5.ioc.AnnotationProvider;
-
-/**
- * Used to read or update the value associated with a property. A 
PropertyConduit provides access to the annotat

[43/45] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
First pass creating the BeanModel and Commons packages. Lots of stuff moved 
around, but no actual code changes so far


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/3d4de7e1
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/3d4de7e1
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/3d4de7e1

Branch: refs/heads/beanmodel-split
Commit: 3d4de7e112d5ba040171d380e1c041372556769d
Parents: 9b5e190
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 15:16:02 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 20:32:39 2014 -0200

--
 beanmodel/build.gradle  |   27 +
 .../org/apache/tapestry5/PropertyConduit.java   |   45 +
 .../org/apache/tapestry5/PropertyConduit2.java  |   40 +
 .../apache/tapestry5/beaneditor/BeanModel.java  |  169 ++
 .../tapestry5/beaneditor/PropertyModel.java |   97 ++
 .../internal/InternalPropertyConduit.java   |   37 +
 .../internal/beaneditor/BeanModelImpl.java  |  289 
 .../internal/beaneditor/PropertyModelImpl.java  |  139 ++
 .../CoercingPropertyConduitWrapper.java |   67 +
 .../services/PropertyConduitDelegate.java   |   53 +
 .../services/PropertyConduitSourceImpl.java | 1563 ++
 .../tapestry5/services/BeanModelSource.java |   70 +
 .../services/PropertyConduitSource.java |   41 +
 commons/build.gradle|   18 +
 .../tapestry5/internal/util/IntegerRange.java   |  125 ++
 .../tapestry5/internal/util/MultiKey.java   |   86 +
 .../tapestry5/ioc/AnnotationProvider.java   |   33 +
 .../org/apache/tapestry5/ioc/Locatable.java |   27 +
 .../java/org/apache/tapestry5/ioc/Location.java |   38 +
 .../apache/tapestry5/ioc/MessageFormatter.java  |   32 +
 .../java/org/apache/tapestry5/ioc/Messages.java |   61 +
 .../org/apache/tapestry5/ioc/ObjectLocator.java |  143 ++
 .../java/org/apache/tapestry5/ioc/Resource.java |  108 ++
 .../ioc/internal/NullAnnotationProvider.java|   35 +
 .../ioc/internal/util/CollectionFactory.java|  139 ++
 .../ioc/internal/util/GenericsUtils.java|  615 +++
 .../ioc/internal/util/TapestryException.java|   75 +
 .../ioc/services/ClassPropertyAdapter.java  |   79 +
 .../apache/tapestry5/ioc/services/Coercion.java |   31 +
 .../tapestry5/ioc/services/CoercionTuple.java   |  145 ++
 .../tapestry5/ioc/services/PropertyAccess.java  |   77 +
 .../tapestry5/ioc/services/PropertyAdapter.java |  121 ++
 .../tapestry5/ioc/services/TypeCoercer.java |   88 +
 .../tapestry5/ioc/util/AvailableValues.java |   87 +
 .../tapestry5/ioc/util/CaseInsensitiveMap.java  |  499 ++
 .../tapestry5/ioc/util/ExceptionUtils.java  |  115 ++
 .../ioc/util/UnknownValueException.java |   47 +
 .../services/InvalidationEventHub.java  |   60 +
 .../services/InvalidationListener.java  |   33 +
 settings.gradle |2 +-
 tapestry-core/build.gradle  |6 +-
 .../org/apache/tapestry5/PropertyConduit.java   |   45 -
 .../org/apache/tapestry5/PropertyConduit2.java  |   40 -
 .../apache/tapestry5/beaneditor/BeanModel.java  |  169 --
 .../tapestry5/beaneditor/PropertyModel.java |   97 --
 .../internal/InternalPropertyConduit.java   |   37 -
 .../internal/beaneditor/BeanModelImpl.java  |  289 
 .../internal/beaneditor/PropertyModelImpl.java  |  139 --
 .../CoercingPropertyConduitWrapper.java |   67 -
 .../services/PropertyConduitDelegate.java   |   53 -
 .../services/PropertyConduitSourceImpl.java | 1563 --
 .../tapestry5/internal/util/IntegerRange.java   |  125 --
 .../tapestry5/internal/util/MultiKey.java   |   86 -
 .../tapestry5/services/BeanModelSource.java |   70 -
 .../tapestry5/services/ComponentClasses.java|   35 -
 .../tapestry5/services/ComponentLayer.java  |   37 -
 .../services/InvalidationEventHub.java  |   60 -
 .../services/InvalidationListener.java  |   33 -
 .../services/PropertyConduitSource.java |   41 -
 tapestry-ioc/build.gradle   |1 +
 .../tapestry5/ioc/AnnotationProvider.java   |   33 -
 .../org/apache/tapestry5/ioc/Locatable.java |   27 -
 .../java/org/apache/tapestry5/ioc/Location.java |   38 -
 .../apache/tapestry5/ioc/MessageFormatter.java  |   32 -
 .../java/org/apache/tapestry5/ioc/Messages.java |   61 -
 .../org/apache/tapestry5/ioc/ObjectLocator.java |  143 --
 .../java/org/apache/tapestry5/ioc/Resource.java |  108 --
 .../ioc/annotations/UsesConfiguration.java  |   34 -
 .../ioc/internal/NullAnnotationProvider.java|   35 -
 .../ioc/internal/util/CollectionFactory.java|  139 --
 .../ioc/internal/util/GenericsUtils.java|  615 ---
 .../ioc/internal/util/TapestryException.java|   75 -
 .../ioc/ser

[42/45] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3d4de7e1/beanmodel/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
 
b/beanmodel/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
new file mode 100644
index 000..701420f
--- /dev/null
+++ 
b/beanmodel/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
@@ -0,0 +1,1563 @@
+// Copyright 2007-2013 The Apache Software Foundation
+//
+// 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.apache.tapestry5.internal.services;
+
+import org.antlr.runtime.ANTLRInputStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.tree.Tree;
+import org.apache.tapestry5.PropertyConduit;
+import org.apache.tapestry5.PropertyConduit2;
+import org.apache.tapestry5.internal.InternalPropertyConduit;
+import org.apache.tapestry5.internal.antlr.PropertyExpressionLexer;
+import org.apache.tapestry5.internal.antlr.PropertyExpressionParser;
+import org.apache.tapestry5.internal.util.IntegerRange;
+import org.apache.tapestry5.internal.util.MultiKey;
+import org.apache.tapestry5.ioc.AnnotationProvider;
+import org.apache.tapestry5.ioc.annotations.PostInjection;
+import org.apache.tapestry5.ioc.internal.NullAnnotationProvider;
+import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
+import org.apache.tapestry5.ioc.internal.util.GenericsUtils;
+import org.apache.tapestry5.ioc.internal.util.InternalUtils;
+import org.apache.tapestry5.ioc.services.*;
+import org.apache.tapestry5.ioc.util.AvailableValues;
+import org.apache.tapestry5.ioc.util.ExceptionUtils;
+import org.apache.tapestry5.ioc.util.UnknownValueException;
+import org.apache.tapestry5.plastic.*;
+import org.apache.tapestry5.services.ComponentClasses;
+import org.apache.tapestry5.services.ComponentLayer;
+import org.apache.tapestry5.services.InvalidationEventHub;
+import org.apache.tapestry5.services.PropertyConduitSource;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.tapestry5.internal.antlr.PropertyExpressionParser.*;
+
+public class PropertyConduitSourceImpl implements PropertyConduitSource
+{
+static class ConduitMethods
+{
+private static final MethodDescription GET = 
getMethodDescription(PropertyConduit.class, "get", Object.class);
+
+private static final MethodDescription SET = 
getMethodDescription(PropertyConduit.class, "set", Object.class,
+Object.class);
+
+private static final MethodDescription GET_PROPERTY_TYPE = 
getMethodDescription(PropertyConduit.class,
+"getPropertyType");
+
+private static final MethodDescription GET_PROPERTY_GENERIC_TYPE = 
getMethodDescription(PropertyConduit2.class,
+"getPropertyGenericType");
+
+private static final MethodDescription GET_PROPERTY_NAME = 
getMethodDescription(InternalPropertyConduit.class,
+"getPropertyName");
+
+private static final MethodDescription GET_ANNOTATION = 
getMethodDescription(AnnotationProvider.class,
+"getAnnotation", Class.class);
+
+}
+
+static class DelegateMethods
+{
+static final Method INVERT = getMethod(PropertyConduitDelegate.class, 
"invert", Object.class);
+
+static final Method RANGE = getMethod(PropertyConduitDelegate.class, 
"range", int.class, int.class);
+
+static final Method COERCE = getMethod(PropertyConduitDelegate.class, 
"coerce", Object.class, Class.class);
+}
+
+static class ArrayListMethods
+{
+static final Method ADD = getMethod(ArrayList.class, "add", 
Object.class);
+}
+
+static class HashMapMethods
+{
+static final Method PUT = getMethod(HashMap.class, "put", 
Object.class, Object.class);
+}
+
+private static InstructionBuilderCallback RETURN_NULL = new 
InstructionBuilderCallback()
+{
+public void doBuild(InstructionBuilder builder)
+{
+builder.loadNull().returnResult();
+}
+};
+
+ 

[32/45] tapestry-5 git commit: Fourth pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7bf35ce/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/OrderedConfiguration.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/OrderedConfiguration.java 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/OrderedConfiguration.java
deleted file mode 100644
index 9151381..000
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/OrderedConfiguration.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2006, 2008, 2009, 2010, 2011 The Apache Software Foundation
-//
-// 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.apache.tapestry5.ioc;
-
-/**
- * Object passed into a service contributor method that allows the method 
provide contributed values to the service's
- * configuration.
- * 
- * A service can collect contributions in three different ways:
- * 
- * As an un-ordered collection of values
- * As an ordered list of values (where each value has a unique id, 
pre-requisites and post-requisites)
- * As a map of keys and values
- * 
- * 
- * The service defines the type of contribution, in terms of a base 
class or service interface. Contributions
- * must be compatible with the type, or be {@linkplain 
org.apache.tapestry5.ioc.services.TypeCoercer coercable} to the type.
- *
- * @see org.apache.tapestry5.ioc.annotations.Contribute
- * @see org.apache.tapestry5.ioc.annotations.UsesConfiguration
- */
-public interface OrderedConfiguration
-{
-/**
- * Adds an ordered object to a service's contribution. Each object has an 
id (which must be unique). Optionally,
- * pre-requisites (a list of ids that must precede this object) and 
post-requisites (ids that must follow) can be
- * provided.
- * 
- * If no constraints are supplied, then an implicit constraint is 
supplied: after the previously
- * contributed id within the same contribution method.
- *
- * @param id  a unique id for the object; the id will be fully 
qualified with the contributing module's id
- * @param constraints used to order the object relative to other 
contributed objects
- * @param object  to add to the service's configuration
- */
-void add(String id, T object, String... constraints);
-
-/**
- * Overrides a normally contributed object. Each override must match a 
single normally contributed object.
- *
- * @param id  identifies object to override
- * @param object  overriding object (may be null)
- * @param constraints constraints for the overridden object, replacing 
constraints for the original object (even if
- *omitted, in which case the override object will have 
no ordering constraints)
- * @since 5.1.0.0
- */
-void override(String id, T object, String... constraints);
-
-/**
- * Adds an ordered object by instantiating (with dependencies) the 
indicated class. When the configuration type is
- * an interface and the class to be contributed is a local file,
- * then a reloadable proxy for the class will be created and contributed.
- *
- * @param id  of contribution (used for ordering)
- * @param clazz   class to instantiate
- * @param constraints used to order the object relative to other 
contributed objects
- * @since 5.1.0.0
- */
-void addInstance(String id, Class clazz, String... 
constraints);
-
-/**
- * Instantiates an object and adds it as an override. When the 
configuration type is an interface and the class to
- * be contributed is a local file, then a reloadable proxy for the class 
will be created and contributed.
- *
- * @param id  of object to override
- * @param clazz   to instantiate
- * @param constraints constraints for the overridden object, replacing 
constraints for the original object (even if
- *omitted, in which case the override object will have 
no ordering constraints)
- * @since 5.1.0.0
- */
-void overrideInstance(String id, Class clazz, String... 
constraints);
-}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7bf35ce/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AccessableObjectAnnotationProvider.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/

[24/45] tapestry-5 git commit: update Moment.js to 2.8.4

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/23e512b1/tapestry-core/src/main/resources/META-INF/assets/tapestry5/moment-2.8.4.js
--
diff --git 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/moment-2.8.4.js 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/moment-2.8.4.js
new file mode 100644
index 000..a0272fd
--- /dev/null
+++ b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/moment-2.8.4.js
@@ -0,0 +1,9394 @@
+//! moment.js
+//! version : 2.8.4
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+
+(function (undefined) {
+/
+Constants
+/
+
+var moment,
+VERSION = '2.8.4',
+// the global-scope this is NOT the global object in Node.js
+globalScope = typeof global !== 'undefined' ? global : this,
+oldGlobalMoment,
+round = Math.round,
+hasOwnProperty = Object.prototype.hasOwnProperty,
+i,
+
+YEAR = 0,
+MONTH = 1,
+DATE = 2,
+HOUR = 3,
+MINUTE = 4,
+SECOND = 5,
+MILLISECOND = 6,
+
+// internal storage for locale config files
+locales = {},
+
+// extra moment internal properties (plugins register props here)
+momentProperties = [],
+
+// check for nodeJS
+hasModule = (typeof module !== 'undefined' && module && 
module.exports),
+
+// ASP.NET json date format regex
+aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
+aspNetTimeSpanJsonRegex = 
/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,
+
+// from 
http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
+// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal 
anywhere
+isoDurationRegex = 
/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
+
+// format tokens
+formattingTokens = 
/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YY|Y||YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,
+localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
+
+// parsing token regexes
+parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
+parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999
+parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 
+parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999
+parseTokenDigits = /\d+/, // nonzero number of digits
+parseTokenWord = 
/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,
 // any word (or two) characters or numbers including two/three word month in 
arabic.
+parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 + 
- or Z
+parseTokenT = /T/i, // T (ISO separator)
+parseTokenOffsetMs = /[\+\-]?\d+/, // 1234567890123
+parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 
123456789.123
+
+//strict parsing regexes
+parseTokenOneDigit = /\d/, // 0 - 9
+parseTokenTwoDigits = /\d\d/, // 00 - 99
+parseTokenThreeDigits = /\d{3}/, // 000 - 999
+parseTokenFourDigits = /\d{4}/, //  - 
+parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999
+parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf
+
+// iso 8601 regex
+// -00-00 -W00 or -W00-0 + T + 00 or 00:00 or 00:00:00 or 
00:00:00.000 + +00:00 or + or +00)
+isoRegex = 
/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| 
)(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+
+isoFormat = '-MM-DDTHH:mm:ssZ',
+
+isoDates = [
+['YY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/],
+['-MM-DD', /\d{4}-\d{2}-\d{2}/],
+['-[W]WW-E', /\d{4}-W\d{2}-\d/],
+['-[W]WW', /\d{4}-W\d{2}/],
+['-DDD', /\d{4}-\d{3}/]
+],
+
+// iso time formats and regexes
+isoTimes = [
+['HH:mm:ss.', /(T| )\d\d:\d\d:\d\d\.\d+/],
+['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/],
+['HH:mm', /(T| )\d\d:\d\d/],
+['HH', /(T| )\d\d/]
+],
+
+// timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-15', '30']
+parseTimezoneChunker = /([\+\-]|\d\d)/gi,
+
+// getter and setter names
+proxyGettersAndSetters = 
'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),
+unitMillisecondFactors = {
+'Milliseconds' : 1,
+'Seconds' : 1e3,
+'Minutes' : 6e4,
+'Hours' : 36e5,
+'Days' : 864e5,
+'M

[04/45] tapestry-5 git commit: TAP5-2406: Use a single ReentrantLock for the PeriodicExecutor and its jobs

2014-12-06 Thread thiagohp
TAP5-2406: Use a single ReentrantLock for the PeriodicExecutor and its jobs


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/32571619
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/32571619
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/32571619

Branch: refs/heads/beanmodel-split
Commit: 3257161990f639eabb60ce8729e3c1244823609a
Parents: 57a8d25
Author: Howard M. Lewis Ship 
Authored: Fri Oct 24 13:59:37 2014 -0700
Committer: Howard M. Lewis Ship 
Committed: Fri Oct 24 13:59:37 2014 -0700

--
 .../services/cron/PeriodicExecutorImpl.java | 181 +--
 1 file changed, 121 insertions(+), 60 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32571619/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java
 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java
index abfcde9..cf3c717 100644
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java
+++ 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/cron/PeriodicExecutorImpl.java
@@ -1,5 +1,3 @@
-// Copyright 2011 The Apache Software Foundation
-//
 // 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
@@ -26,6 +24,8 @@ import org.slf4j.Logger;
 
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
 
 public class PeriodicExecutorImpl implements PeriodicExecutor, Runnable
 {
@@ -33,18 +33,19 @@ public class PeriodicExecutorImpl implements 
PeriodicExecutor, Runnable
 
 private final Logger logger;
 
-// Synchronized by this
+// Synchronized by jobLock
 private final List jobs = CollectionFactory.newList();
 
 private final Thread thread = new Thread(this, "Tapestry 
PeriodicExecutor");
 
-// Synchronized by this. Set when the registry is shutdown.
-private boolean shutdown;
+private transient boolean shutdown;
 
 private static final long FIVE_MINUTES = 5 * 60 * 1000;
 
 private final AtomicInteger jobIdAllocator = new AtomicInteger();
 
+private final Lock jobLock = new ReentrantLock();
+
 private class Job implements PeriodicJob, Invokable
 {
 final int jobId = jobIdAllocator.incrementAndGet();
@@ -74,43 +75,71 @@ public class PeriodicExecutorImpl implements 
PeriodicExecutor, Runnable
 return name;
 }
 
-public synchronized long getNextExecution()
+public long getNextExecution()
 {
-return nextExecution;
+try
+{
+jobLock.lock();
+return nextExecution;
+} finally
+{
+jobLock.unlock();
+}
 }
 
 
 @Override
-public synchronized boolean isExecuting()
+public boolean isExecuting()
 {
-return executing;
+try
+{
+jobLock.lock();
+return executing;
+} finally
+{
+jobLock.unlock();
+}
 }
 
 @Override
-public synchronized boolean isCanceled()
+public boolean isCanceled()
 {
-return canceled;
+try
+{
+jobLock.lock();
+return canceled;
+} finally
+{
+jobLock.unlock();
+}
 }
 
 @Override
-public synchronized void cancel()
+public void cancel()
 {
-canceled = true;
+try
+{
+jobLock.lock();
+
+canceled = true;
+
+if (!executing)
+{
+removeJob(this);
+}
 
-if (!executing)
+// Otherwise, it will be caught when the job finishes 
execution.
+} finally
 {
-removeJob(this);
+jobLock.unlock();
 }
-
-// Otherwise, it will be caught when the job finishes execution.
 }
 
 @Override
-public synchronized String toString()
+public String toString()
 {
 StringBuilder builder = new 
StringBuilder("PeriodicJob[#").append(jobId);
 
-
 builder.append(", (

[29/45] tapestry-5 git commit: Second pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
Second pass creating the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7ba99e04
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7ba99e04
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7ba99e04

Branch: refs/heads/beanmodel-split
Commit: 7ba99e043847f5579312b21a103484ee4737cdd6
Parents: 3d4de7e
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 16:40:55 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 20:32:39 2014 -0200

--
 .../internal/antlr/PropertyExpressionLexer.g| 163 +
 .../internal/antlr/PropertyExpressionParser.g   | 105 +++
 .../tapestry5/internal/antlr/BaseLexer.java |  54 ++
 .../tapestry5/internal/antlr/BaseParser.java|  40 +
 .../tapestry5/internal/antlr/package-info.java  |  18 ++
 .../tapestry5/internal/services/Invariant.java  |  28 +++
 .../services/LiteralPropertyConduit.java|  85 +
 .../services/PropertyExpressionException.java   |  38 
 .../internal/services/StringInterner.java   |  43 +
 .../org/apache/tapestry5/ioc/ObjectCreator.java |  27 +++
 .../ioc/services/PlasticProxyFactory.java   | 159 +
 .../org/apache/tapestry5/ioc/util/Stack.java| 173 +++
 .../internal/antlr/PropertyExpressionLexer.g| 163 -
 .../internal/antlr/PropertyExpressionParser.g   | 105 ---
 .../tapestry5/internal/antlr/BaseLexer.java |  54 --
 .../tapestry5/internal/antlr/BaseParser.java|  40 -
 .../tapestry5/internal/antlr/package-info.java  |  18 --
 .../tapestry5/internal/services/Invariant.java  |  28 ---
 .../services/LiteralPropertyConduit.java|  85 -
 .../services/PropertyExpressionException.java   |  38 
 .../internal/services/StringInterner.java   |  43 -
 .../org/apache/tapestry5/ioc/ObjectCreator.java |  27 ---
 .../ioc/annotations/IncompatibleChange.java |  33 
 .../ioc/services/PlasticProxyFactory.java   | 159 -
 .../org/apache/tapestry5/ioc/util/Stack.java| 173 ---
 .../ioc/annotations/IncompatibleChange.java |  33 
 26 files changed, 966 insertions(+), 966 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7ba99e04/beanmodel/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
--
diff --git 
a/beanmodel/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
 
b/beanmodel/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
new file mode 100644
index 000..3b52ba9
--- /dev/null
+++ 
b/beanmodel/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
@@ -0,0 +1,163 @@
+// Copyright 2008, 2010, 2011 The Apache Software Foundation
+//
+// 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.
+
+lexer grammar PropertyExpressionLexer;
+
+
+options
+{
+  superClass='org.apache.tapestry5.internal.antlr.BaseLexer';
+}
+
+@header
+{
+package org.apache.tapestry5.internal.antlr;
+}
+
+   
+// Integer constant
+fragment INTEGER
+   :   {this.getClass(); /* Fix java.lang.VerifyError: Stack size too 
large */};   
+   
+// Read a property or invoke a method.
+fragment DEREF 
+   :   {this.getClass(); /* Fix java.lang.VerifyError: Stack size too 
large */};   
+   
+// Range operator, ".." between two integers.  
+fragment RANGEOP
+   :   {this.getClass(); /* Fix java.lang.VerifyError: Stack size too 
large */};   
+   
+// Decimal number  
+fragment DECIMAL
+   :   {this.getClass(); /* Fix java.lang.VerifyError: Stack size too 
large */};   
+   
+fragment LETTER 
+   :   ('a'..'z'|'A'..'Z');
+fragment DIGIT 
+   :   '0'..'9';   
+fragment SIGN
+   :   ('+'|'-');
+LPAREN :   '(';
+RPAREN :   ')';
+LBRACKET:  '[';
+RBRACKET:  ']';
+COMMA  :   ',';
+BANG   :   '!';
+LBRACE :   '{';
+RBRACE :   '}';
+COLON  :   ':';
+
+fragment QUOTE
+   :   '\'';
+
+// Clumsy but effective approach to case-insensitive identifiers.
+
+frag

[19/45] tapestry-5 git commit: upgrade Unserscore,js to 1.7.0

2014-12-06 Thread thiagohp
upgrade Unserscore,js to 1.7.0


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/f73e8b23
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/f73e8b23
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/f73e8b23

Branch: refs/heads/beanmodel-split
Commit: f73e8b2319ab3f0774ecd332359f316fa010ccdc
Parents: 32fcb30
Author: Jochen Kemnade 
Authored: Thu Nov 20 09:47:07 2014 +0100
Committer: Jochen Kemnade 
Committed: Thu Nov 20 09:47:07 2014 +0100

--
 .../tapestry5/modules/JavaScriptModule.java |2 +-
 .../assets/tapestry5/underscore-1.5.2.js| 1276 
 .../assets/tapestry5/underscore-1.7.0.js| 1416 ++
 3 files changed, 1417 insertions(+), 1277 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f73e8b23/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
index 233f955..556610d 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
@@ -117,7 +117,7 @@ public class JavaScriptModule
 String provider)
 {
 configuration.add("requirejs", StackExtension.library(ROOT + 
"/require.js"));
-configuration.add("underscore-library", StackExtension.library(ROOT + 
"/underscore-1.5.2.js"));
+configuration.add("underscore-library", StackExtension.library(ROOT + 
"/underscore-1.7.0.js"));
 
 if (provider.equals("prototype"))
 {

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f73e8b23/tapestry-core/src/main/resources/META-INF/assets/tapestry5/underscore-1.5.2.js
--
diff --git 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/underscore-1.5.2.js
 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/underscore-1.5.2.js
deleted file mode 100644
index b50115d..000
--- 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/underscore-1.5.2.js
+++ /dev/null
@@ -1,1276 +0,0 @@
-// Underscore.js 1.5.2
-// http://underscorejs.org
-// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative 
Reporters & Editors
-// Underscore may be freely distributed under the MIT license.
-
-(function() {
-
-  // Baseline setup
-  // --
-
-  // Establish the root object, `window` in the browser, or `exports` on the 
server.
-  var root = this;
-
-  // Save the previous value of the `_` variable.
-  var previousUnderscore = root._;
-
-  // Establish the object that gets returned to break out of a loop iteration.
-  var breaker = {};
-
-  // Save bytes in the minified (but not gzipped) version:
-  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = 
Function.prototype;
-
-  // Create quick reference variables for speed access to core prototypes.
-  var
-push = ArrayProto.push,
-slice= ArrayProto.slice,
-concat   = ArrayProto.concat,
-toString = ObjProto.toString,
-hasOwnProperty   = ObjProto.hasOwnProperty;
-
-  // All **ECMAScript 5** native function implementations that we hope to use
-  // are declared here.
-  var
-nativeForEach  = ArrayProto.forEach,
-nativeMap  = ArrayProto.map,
-nativeReduce   = ArrayProto.reduce,
-nativeReduceRight  = ArrayProto.reduceRight,
-nativeFilter   = ArrayProto.filter,
-nativeEvery= ArrayProto.every,
-nativeSome = ArrayProto.some,
-nativeIndexOf  = ArrayProto.indexOf,
-nativeLastIndexOf  = ArrayProto.lastIndexOf,
-nativeIsArray  = Array.isArray,
-nativeKeys = Object.keys,
-nativeBind = FuncProto.bind;
-
-  // Create a safe reference to the Underscore object for use below.
-  var _ = function(obj) {
-if (obj instanceof _) return obj;
-if (!(this instanceof _)) return new _(obj);
-this._wrapped = obj;
-  };
-
-  // Export the Underscore object for **Node.js**, with
-  // backwards-compatibility for the old `require()` API. If we're in
-  // the browser, add `_` as a global object via a string identifier,
-  // for Closure Compiler "advanced" mode.
-  if (typeof exports !== 'undefined') {
-if (typeof module !== 'undefined' && module.exports) {
-  exports = module.exports = _;
-}
-exports._ = _;
-  } else {
-root._ = _;
-  }
-
-  // Current version.
-  _.VERSION = '1.5.2';
-
-  // Co

[33/45] tapestry-5 git commit: Fourth pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7bf35ce/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationProviderChain.java
--
diff --git 
a/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationProviderChain.java
 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationProviderChain.java
new file mode 100644
index 000..49b0b15
--- /dev/null
+++ 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationProviderChain.java
@@ -0,0 +1,59 @@
+// Copyright 2008 The Apache Software Foundation
+//
+// 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.apache.tapestry5.ioc.internal.services;
+
+import org.apache.tapestry5.ioc.AnnotationProvider;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+
+/**
+ * Chain of command for {@link org.apache.tapestry5.ioc.AnnotationProvider}.
+ */
+public class AnnotationProviderChain implements AnnotationProvider
+{
+private final AnnotationProvider[] providers;
+
+public AnnotationProviderChain(AnnotationProvider[] providers)
+{
+this.providers = providers;
+}
+
+/**
+ * Creates an AnnotationProvider from the list of providers.  Returns 
either an {@link AnnotationProviderChain} or
+ * the sole element in the list.
+ */
+public static AnnotationProvider create(List providers)
+{
+int size = providers.size();
+
+if (size == 1) return providers.get(0);
+
+return new AnnotationProviderChain(providers.toArray(new 
AnnotationProvider[providers.size()]));
+}
+
+@Override
+public  T getAnnotation(Class annotationClass)
+{
+for (AnnotationProvider p : providers)
+{
+T result = p.getAnnotation(annotationClass);
+
+if (result != null) return result;
+}
+
+return null;
+}
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7bf35ce/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/CompoundCoercion.java
--
diff --git 
a/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/CompoundCoercion.java
 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/CompoundCoercion.java
new file mode 100644
index 000..4a5dece
--- /dev/null
+++ 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/CompoundCoercion.java
@@ -0,0 +1,54 @@
+// Copyright 2006, 2007 The Apache Software Foundation
+//
+// 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.apache.tapestry5.ioc.internal.services;
+
+import org.apache.tapestry5.ioc.services.Coercion;
+
+/**
+ * Combines two coercions to create a coercion through an intermediate type.
+ *
+ * @param  The source (input) type
+ * @param  The intermediate type
+ * @param  The target (output) type
+ */
+public class CompoundCoercion implements Coercion
+{
+private final Coercion op1;
+
+private final Coercion op2;
+
+public CompoundCoercion(Coercion op1, Coercion op2)
+{
+this.op1 = op1;
+this.op2 = op2;
+}
+
+@Override
+public T coerce(S input)
+{
+// Run the input through the first operation (S --> I), then run the 
result of that through
+// the second operation (I --> T).
+
+I intermediate = op1.coerce(input);
+
+return op2.coerce(intermediate);
+}
+
+@Override
+public String toString()
+{
+return String.format("%s, %s", op1, op2);
+}
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7bf35ce/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java
--
diff --git 
a/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java
 
b/commons/src/ma

[31/45] tapestry-5 git commit: Fourth pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7bf35ce/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
index 8f1f7b6..a5f55b7 100644
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
+++ 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
@@ -17,7 +17,6 @@ package org.apache.tapestry5.ioc.internal.util;
 import org.apache.tapestry5.func.F;
 import org.apache.tapestry5.func.Mapper;
 import org.apache.tapestry5.func.Predicate;
-import org.apache.tapestry5.internal.InternalBeanModelUtils;
 import org.apache.tapestry5.internal.plastic.PlasticInternalUtils;
 import org.apache.tapestry5.ioc.*;
 import org.apache.tapestry5.ioc.annotations.*;
@@ -80,11 +79,10 @@ public class InternalUtils
  *
  * @param method
  * @return short string representation
- * @deprecated use {@link InternalStringUtils#asString(Method)} instead.
  */
 public static String asString(Method method)
 {
-return InternalStringUtils.asString(method);
+return InternalCommonsUtils.asString(method);
 }
 
 /**
@@ -103,11 +101,10 @@ public class InternalUtils
 
 /**
  * Strips leading "_" and "$" and trailing "_" from the name.
- * @deprecated use {@link InternalStringUtils#stripMemberName(String)} 
instead.
  */
 public static String stripMemberName(String memberName)
 {
-return InternalStringUtils.stripMemberName(memberName);
+return InternalCommonsUtils.stripMemberName(memberName);
 }
 
 /**
@@ -392,11 +389,10 @@ public class InternalUtils
 
 /**
  * Joins together some number of elements to form a comma separated list.
- * @deprecated use {@link InternalStringUtils#join(List)} instead.
  */
 public static String join(List elements)
 {
-return InternalStringUtils.join(elements);
+return InternalCommonsUtils.join(elements);
 }
 
 /**
@@ -407,11 +403,10 @@ public class InternalUtils
  * objects to be joined together
  * @param separator
  * used between elements when joining
- * @deprecated use {@link InternalStringUtils#asString(Method, String)} 
instead.
  */
 public static String join(List elements, String separator)
 {
-return InternalStringUtils.join(elements, separator);
+return InternalCommonsUtils.join(elements, separator);
 }
 
 /**
@@ -419,21 +414,19 @@ public class InternalUtils
  *
  * @return the elements converted to strings, sorted, joined with comma 
... or "(none)" if the elements are null or
  * empty
- * @deprecated use {@link InternalStringUtils#joinSorted(Collection)} 
instead.
  */
 public static String joinSorted(Collection elements)
 {
-return InternalStringUtils.joinSorted(elements);
+return InternalCommonsUtils.joinSorted(elements);
 }
 
 /**
  * Returns true if the input is null, or is a zero length string 
(excluding leading/trailing whitespace).
- * @deprecated use {@link InternalStringUtils#isBlank(String)} instead.
  */
 
 public static boolean isBlank(String input)
 {
-return InternalStringUtils.isBlank(input);
+return InternalCommonsUtils.isBlank(input);
 }
 
 /**
@@ -450,63 +443,27 @@ public class InternalUtils
 return false;
 }
 
-/**
- * @deprecated use {@link InternalStringUtils#isNonBlank(String)} instead.
- */
 public static boolean isNonBlank(String input)
 {
-return InternalStringUtils.isNonBlank(input);
+return InternalCommonsUtils.isNonBlank(input);
 }
 
 /**
  * Capitalizes a string, converting the first character to uppercase.
- * @deprecated use {@link InternalStringUtils#capitalize(String)} instead.
  */
 public static String capitalize(String input)
 {
-return InternalStringUtils.capitalize(input);
+return InternalCommonsUtils.capitalize(input);
 }
 
 /**
  * Sniffs the object to see if it is a {@link Location} or {@link 
Locatable}. Returns null if null or not
  * convertable to a location.
  */
-
+
 public static Location locationOf(Object location)
 {
-if (location == null)
-return null;
-
-if (location instanceof Location)
-return (Location) location;
-
-if (location instanceof Locatable)
-return ((Locatable) location).getLocation();
-
-return null;
-}
-
-/**
- * Extracts the string keys from a map and returns them in sorted order. 
The keys are converted to strings.
- *
- * @param map
- *   

[36/45] tapestry-5 git commit: Fifth pass creating the BeanModel and Commons packages. Initial testing looks good.

2014-12-06 Thread thiagohp
Fifth pass creating the BeanModel and Commons packages. Initial testing looks 
good.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/31208705
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/31208705
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/31208705

Branch: refs/heads/beanmodel-split
Commit: 312087057c8ddfb463256ac4eec155f3afde4ac1
Parents: c7bf35c
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 20:29:20 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 20:32:39 2014 -0200

--
 .../org/apache/tapestry5/PropertyConduit2.java  |   2 +-
 .../beaneditor/BeanModelSourceBuilder.java  | 159 ++---
 .../CoercingPropertyConduitWrapper.java |   8 +-
 .../services/LiteralPropertyConduit.java|   2 +-
 .../services/PropertyConduitSourceImpl.java |  46 +-
 .../services/ClassPropertyAdapterImpl.java  |  92 +--
 .../services/AnnotationDataTypeAnalyzer.java|  32 +
 .../ioc/internal/BasicDataTypeAnalyzers.java| 151 +
 .../ioc/internal/util/InternalCommonsUtils.java | 608 +--
 .../internal/TapestryInternalUtils.java |   4 +-
 .../internal/bindings/AbstractBinding.java  |   2 +-
 .../internal/bindings/PropBinding.java  |   8 +-
 .../services/AnnotationDataTypeAnalyzer.java|  32 -
 .../InternalComponentResourcesImpl.java |   4 +-
 .../tapestry5/modules/TapestryModule.java   |  14 +-
 .../app1/components/GenericTypeDisplay.java |  34 +-
 .../integration/app1/pages/GenericTypeDemo.java |  24 +-
 .../pages/GridWithSubmitWithContextDemo.java|   4 +-
 .../integration/app2/base/ChildBasePage.java|   8 +-
 .../integration/app2/base/ParentBasePage.java   |   2 +-
 .../pagelevel/OverrideMethodsTest.java  |  14 +-
 .../services/PropertyConduitSourceImplTest.java |  34 +-
 .../org/apache/tapestry5/json/JSONArray.java|   2 +-
 .../org/apache/tapestry5/json/JSONObject.java   |   2 +-
 24 files changed, 723 insertions(+), 565 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/31208705/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java
--
diff --git a/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java 
b/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java
index 839d70f..1577a3d 100644
--- a/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java
+++ b/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java
@@ -36,5 +36,5 @@ public interface PropertyConduit2 extends PropertyConduit
  * @see java.lang.reflect.Field#getGenericType()
  * 
  */
-   Type getPropertyGenericType();
+Type getPropertyGenericType();
 }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/31208705/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
index 8cef66e..4ac3373 100644
--- 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
+++ 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
@@ -15,15 +15,22 @@ package org.apache.tapestry5.beaneditor;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
 
 import javax.naming.OperationNotSupportedException;
+import javax.swing.JFrame;
 
 import org.apache.tapestry5.internal.services.BeanModelSourceImpl;
 import org.apache.tapestry5.internal.services.PropertyConduitSourceImpl;
 import org.apache.tapestry5.internal.services.StringInterner;
 import org.apache.tapestry5.internal.services.StringInternerImpl;
 import org.apache.tapestry5.ioc.Configuration;
+import org.apache.tapestry5.ioc.MessageFormatter;
+import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.ioc.ObjectLocator;
+import org.apache.tapestry5.ioc.internal.BasicDataTypeAnalyzers;
 import org.apache.tapestry5.ioc.internal.BasicTypeCoercions;
 import org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl;
 import org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl;
@@ -31,6 +38,7 @@ import 
org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl;
 import org.apache.tapestry5.ioc.services.CoercionTuple;
 import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import org.apache.tapestry5.ioc.services.PropertyAccess;
+import org.apache.tapestry5.ioc.services.PropertyAdapter;
 import org.apache.tapestry5.ioc.servic

[44/45] tapestry-5 git commit: First final version of the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
First final version of the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/97bd4d5e
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/97bd4d5e
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/97bd4d5e

Branch: refs/heads/beanmodel-split
Commit: 97bd4d5eff6af1a4f970b81246c8689c3a25687a
Parents: 3120870
Author: Thiago H. de Paula Figueiredo 
Authored: Sun Dec 7 00:22:27 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sun Dec 7 00:22:27 2014 -0200

--
 beanmodel/build.gradle  |   3 +
 .../beaneditor/BeanModelSourceBuilder.java  | 150 +++-
 .../services/DefaultDataTypeAnalyzer.java   |  61 ++
 .../ioc/internal/BasicDataTypeAnalyzers.java|  45 +-
 .../tapestry5/ioc/util/StrategyRegistry.java| 172 +
 .../services/DefaultDataTypeAnalyzer.java   |  61 --
 .../AbstractBeanModelSourceImplTest.java| 757 +++
 .../services/BeanModelSourceBuilderTest.java|  33 +
 .../services/BeanModelSourceImplTest.java   | 736 +-
 .../tapestry5/ioc/util/StrategyRegistry.java| 172 -
 10 files changed, 1182 insertions(+), 1008 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/97bd4d5e/beanmodel/build.gradle
--
diff --git a/beanmodel/build.gradle b/beanmodel/build.gradle
index fba43b7..9ff0fb3 100644
--- a/beanmodel/build.gradle
+++ b/beanmodel/build.gradle
@@ -35,6 +35,9 @@ dependencies {
compile "org.antlr:antlr-runtime:3.5.2", {
exclude group: "org.antlr", module: "stringtemplate"
}
+
+testCompile "org.testng:testng:${versions.testng}", { transitive = false }
+
 }
 
 // This may spin out as a plugin once we've got the details down pat

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/97bd4d5e/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
index 4ac3373..58537b5 100644
--- 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
+++ 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
@@ -13,32 +13,26 @@
 // limitations under the License.
 package org.apache.tapestry5.beaneditor;
 
+import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-import javax.naming.OperationNotSupportedException;
-import javax.swing.JFrame;
 
 import org.apache.tapestry5.internal.services.BeanModelSourceImpl;
 import org.apache.tapestry5.internal.services.PropertyConduitSourceImpl;
 import org.apache.tapestry5.internal.services.StringInterner;
 import org.apache.tapestry5.internal.services.StringInternerImpl;
+import org.apache.tapestry5.ioc.AnnotationProvider;
 import org.apache.tapestry5.ioc.Configuration;
-import org.apache.tapestry5.ioc.MessageFormatter;
-import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.ioc.ObjectLocator;
 import org.apache.tapestry5.ioc.internal.BasicDataTypeAnalyzers;
 import org.apache.tapestry5.ioc.internal.BasicTypeCoercions;
 import org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl;
 import org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl;
 import org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl;
+import org.apache.tapestry5.ioc.internal.util.TapestryException;
 import org.apache.tapestry5.ioc.services.CoercionTuple;
 import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import org.apache.tapestry5.ioc.services.PropertyAccess;
-import org.apache.tapestry5.ioc.services.PropertyAdapter;
 import org.apache.tapestry5.ioc.services.TypeCoercer;
 import org.apache.tapestry5.services.BeanModelSource;
 import org.apache.tapestry5.services.DataTypeAnalyzer;
@@ -46,8 +40,12 @@ import org.apache.tapestry5.services.PropertyConduitSource;
 import org.slf4j.LoggerFactory;
 
 /**
- * Utility class for creating {@link BeanModelSource} instances without
+ * Utility class for creating {@link BeanModelSource} instances without
  * Tapestry-IoC. Usage of Tapestry-IoC is still recommended.
+ * 
+ * The setter methods can be used to customize the BeanModelSource to be 
created and can be 
+ * (and usually are skipped), so BeanModelSource beanModelSource = new 
BeanModelSourceBuilder().build()
+ * is all you need to do. 
  */
 public class BeanModelSourceBuilder {
 
@@ -60,14 +58,8 @@ publi

[18/45] tapestry-5 git commit: upgrade Unserscore,js to 1.7.0

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f73e8b23/tapestry-core/src/main/resources/META-INF/assets/tapestry5/underscore-1.7.0.js
--
diff --git 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/underscore-1.7.0.js
 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/underscore-1.7.0.js
new file mode 100644
index 000..afd92e5
--- /dev/null
+++ 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/underscore-1.7.0.js
@@ -0,0 +1,1416 @@
+// Underscore.js 1.7.0
+// http://underscorejs.org
+// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative 
Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+  // Baseline setup
+  // --
+
+  // Establish the root object, `window` in the browser, or `exports` on the 
server.
+  var root = this;
+
+  // Save the previous value of the `_` variable.
+  var previousUnderscore = root._;
+
+  // Save bytes in the minified (but not gzipped) version:
+  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = 
Function.prototype;
+
+  // Create quick reference variables for speed access to core prototypes.
+  var
+push = ArrayProto.push,
+slice= ArrayProto.slice,
+concat   = ArrayProto.concat,
+toString = ObjProto.toString,
+hasOwnProperty   = ObjProto.hasOwnProperty;
+
+  // All **ECMAScript 5** native function implementations that we hope to use
+  // are declared here.
+  var
+nativeIsArray  = Array.isArray,
+nativeKeys = Object.keys,
+nativeBind = FuncProto.bind;
+
+  // Create a safe reference to the Underscore object for use below.
+  var _ = function(obj) {
+if (obj instanceof _) return obj;
+if (!(this instanceof _)) return new _(obj);
+this._wrapped = obj;
+  };
+
+  // Export the Underscore object for **Node.js**, with
+  // backwards-compatibility for the old `require()` API. If we're in
+  // the browser, add `_` as a global object.
+  if (typeof exports !== 'undefined') {
+if (typeof module !== 'undefined' && module.exports) {
+  exports = module.exports = _;
+}
+exports._ = _;
+  } else {
+root._ = _;
+  }
+
+  // Current version.
+  _.VERSION = '1.7.0';
+
+  // Internal function that returns an efficient (for current engines) version
+  // of the passed-in callback, to be repeatedly applied in other Underscore
+  // functions.
+  var createCallback = function(func, context, argCount) {
+if (context === void 0) return func;
+switch (argCount == null ? 3 : argCount) {
+  case 1: return function(value) {
+return func.call(context, value);
+  };
+  case 2: return function(value, other) {
+return func.call(context, value, other);
+  };
+  case 3: return function(value, index, collection) {
+return func.call(context, value, index, collection);
+  };
+  case 4: return function(accumulator, value, index, collection) {
+return func.call(context, accumulator, value, index, collection);
+  };
+}
+return function() {
+  return func.apply(context, arguments);
+};
+  };
+
+  // A mostly-internal function to generate callbacks that can be applied
+  // to each element in a collection, returning the desired result — either
+  // identity, an arbitrary callback, a property matcher, or a property 
accessor.
+  _.iteratee = function(value, context, argCount) {
+if (value == null) return _.identity;
+if (_.isFunction(value)) return createCallback(value, context, argCount);
+if (_.isObject(value)) return _.matches(value);
+return _.property(value);
+  };
+
+  // Collection Functions
+  // 
+
+  // The cornerstone, an `each` implementation, aka `forEach`.
+  // Handles raw objects in addition to array-likes. Treats all
+  // sparse array-likes as if they were dense.
+  _.each = _.forEach = function(obj, iteratee, context) {
+if (obj == null) return obj;
+iteratee = createCallback(iteratee, context);
+var i, length = obj.length;
+if (length === +length) {
+  for (i = 0; i < length; i++) {
+iteratee(obj[i], i, obj);
+  }
+} else {
+  var keys = _.keys(obj);
+  for (i = 0, length = keys.length; i < length; i++) {
+iteratee(obj[keys[i]], keys[i], obj);
+  }
+}
+return obj;
+  };
+
+  // Return the results of applying the iteratee to each element.
+  _.map = _.collect = function(obj, iteratee, context) {
+if (obj == null) return [];
+iteratee = _.iteratee(iteratee, context);
+var keys = obj.length !== +obj.length && _.keys(obj),
+length = (keys || obj).length,
+results = Array(length),
+currentKey;
+for (var index = 0; index < length; index++) {
+  currentKey = keys ? keys[index] : index;
+  results[index] = iteratee(o

[25/45] tapestry-5 git commit: update Moment.js to 2.8.4

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/23e512b1/tapestry-core/src/main/resources/META-INF/assets/tapestry5/moment-2.8.3.js
--
diff --git 
a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/moment-2.8.3.js 
b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/moment-2.8.3.js
deleted file mode 100644
index 23d06ef..000
--- a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/moment-2.8.3.js
+++ /dev/null
@@ -1,9156 +0,0 @@
-//! moment.js
-//! version : 2.8.3
-//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
-//! license : MIT
-//! momentjs.com
-
-(function (undefined) {
-/
-Constants
-/
-
-var moment,
-VERSION = '2.8.3',
-// the global-scope this is NOT the global object in Node.js
-globalScope = typeof global !== 'undefined' ? global : this,
-oldGlobalMoment,
-round = Math.round,
-hasOwnProperty = Object.prototype.hasOwnProperty,
-i,
-
-YEAR = 0,
-MONTH = 1,
-DATE = 2,
-HOUR = 3,
-MINUTE = 4,
-SECOND = 5,
-MILLISECOND = 6,
-
-// internal storage for locale config files
-locales = {},
-
-// extra moment internal properties (plugins register props here)
-momentProperties = [],
-
-// check for nodeJS
-hasModule = (typeof module !== 'undefined' && module.exports),
-
-// ASP.NET json date format regex
-aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
-aspNetTimeSpanJsonRegex = 
/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,
-
-// from 
http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
-// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal 
anywhere
-isoDurationRegex = 
/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
-
-// format tokens
-formattingTokens = 
/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YY|Y||YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,
-localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,
-
-// parsing token regexes
-parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
-parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999
-parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 
-parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999
-parseTokenDigits = /\d+/, // nonzero number of digits
-parseTokenWord = 
/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,
 // any word (or two) characters or numbers including two/three word month in 
arabic.
-parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 + 
- or Z
-parseTokenT = /T/i, // T (ISO separator)
-parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 
123456789.123
-parseTokenOrdinal = /\d{1,2}/,
-
-//strict parsing regexes
-parseTokenOneDigit = /\d/, // 0 - 9
-parseTokenTwoDigits = /\d\d/, // 00 - 99
-parseTokenThreeDigits = /\d{3}/, // 000 - 999
-parseTokenFourDigits = /\d{4}/, //  - 
-parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999
-parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf
-
-// iso 8601 regex
-// -00-00 -W00 or -W00-0 + T + 00 or 00:00 or 00:00:00 or 
00:00:00.000 + +00:00 or + or +00)
-isoRegex = 
/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| 
)(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
-
-isoFormat = '-MM-DDTHH:mm:ssZ',
-
-isoDates = [
-['YY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/],
-['-MM-DD', /\d{4}-\d{2}-\d{2}/],
-['-[W]WW-E', /\d{4}-W\d{2}-\d/],
-['-[W]WW', /\d{4}-W\d{2}/],
-['-DDD', /\d{4}-\d{3}/]
-],
-
-// iso time formats and regexes
-isoTimes = [
-['HH:mm:ss.', /(T| )\d\d:\d\d:\d\d\.\d+/],
-['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/],
-['HH:mm', /(T| )\d\d:\d\d/],
-['HH', /(T| )\d\d/]
-],
-
-// timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-15', '30']
-parseTimezoneChunker = /([\+\-]|\d\d)/gi,
-
-// getter and setter names
-proxyGettersAndSetters = 
'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),
-unitMillisecondFactors = {
-'Milliseconds' : 1,
-'Seconds' : 1e3,
-'Minutes' : 6e4,
-'Hours' : 36e5,
-'Days' : 864e5,
-'Months' : 2592e6,
-'Yea

[13/45] tapestry-5 git commit: TAP5-2413 add Firefox profiles to use english as default locale on non-english machines to make integration tests work

2014-12-06 Thread thiagohp
TAP5-2413 add Firefox profiles to use english as default locale on non-english 
machines to make integration tests work


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/f0b50559
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/f0b50559
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/f0b50559

Branch: refs/heads/beanmodel-split
Commit: f0b50559dba4cedd28c8fc4ddcddbc16b84b7676
Parents: 85a03b7
Author: Felix Gonschorek 
Authored: Wed Nov 12 15:42:48 2014 +0100
Committer: Jochen Kemnade 
Committed: Thu Nov 13 09:06:24 2014 +0100

--
 tapestry-beanvalidator/src/test/conf/ff_profile_template/prefs.js | 1 +
 tapestry-core/src/test/conf/ff_profile_template/prefs.js  | 1 +
 tapestry-kaptcha/src/test/conf/ff_profile_template/prefs.js   | 1 +
 tapestry-spring/src/test/conf/ff_profile_template/prefs.js| 1 +
 4 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f0b50559/tapestry-beanvalidator/src/test/conf/ff_profile_template/prefs.js
--
diff --git a/tapestry-beanvalidator/src/test/conf/ff_profile_template/prefs.js 
b/tapestry-beanvalidator/src/test/conf/ff_profile_template/prefs.js
new file mode 100644
index 000..c3ee2aa
--- /dev/null
+++ b/tapestry-beanvalidator/src/test/conf/ff_profile_template/prefs.js
@@ -0,0 +1 @@
+user_pref("intl.accept_languages", "en,fr,de");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f0b50559/tapestry-core/src/test/conf/ff_profile_template/prefs.js
--
diff --git a/tapestry-core/src/test/conf/ff_profile_template/prefs.js 
b/tapestry-core/src/test/conf/ff_profile_template/prefs.js
new file mode 100644
index 000..c3ee2aa
--- /dev/null
+++ b/tapestry-core/src/test/conf/ff_profile_template/prefs.js
@@ -0,0 +1 @@
+user_pref("intl.accept_languages", "en,fr,de");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f0b50559/tapestry-kaptcha/src/test/conf/ff_profile_template/prefs.js
--
diff --git a/tapestry-kaptcha/src/test/conf/ff_profile_template/prefs.js 
b/tapestry-kaptcha/src/test/conf/ff_profile_template/prefs.js
new file mode 100644
index 000..c3ee2aa
--- /dev/null
+++ b/tapestry-kaptcha/src/test/conf/ff_profile_template/prefs.js
@@ -0,0 +1 @@
+user_pref("intl.accept_languages", "en,fr,de");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f0b50559/tapestry-spring/src/test/conf/ff_profile_template/prefs.js
--
diff --git a/tapestry-spring/src/test/conf/ff_profile_template/prefs.js 
b/tapestry-spring/src/test/conf/ff_profile_template/prefs.js
new file mode 100644
index 000..c3ee2aa
--- /dev/null
+++ b/tapestry-spring/src/test/conf/ff_profile_template/prefs.js
@@ -0,0 +1 @@
+user_pref("intl.accept_languages", "en,fr,de");
\ No newline at end of file



[01/45] tapestry-5 git commit: TAP5-2399: SeleniumTestCase.waitForAjaxRequestsToComplete() not working when using Prototype

2014-12-06 Thread thiagohp
Repository: tapestry-5
Updated Branches:
  refs/heads/beanmodel-split 696bc7ae8 -> 31493159a


TAP5-2399: SeleniumTestCase.waitForAjaxRequestsToComplete() not working when 
using Prototype


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/750ffdbd
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/750ffdbd
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/750ffdbd

Branch: refs/heads/beanmodel-split
Commit: 750ffdbdedac5b58074794d9a6c21e973fc96365
Parents: 09a011c
Author: Howard M. Lewis Ship 
Authored: Tue Oct 21 16:01:50 2014 -0700
Committer: Howard M. Lewis Ship 
Committed: Tue Oct 21 16:01:50 2014 -0700

--
 .../src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/750ffdbd/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
--
diff --git 
a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java 
b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
index 1add197..890cdb6 100644
--- 
a/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
+++ 
b/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java
@@ -1757,7 +1757,7 @@ public abstract class SeleniumTestCase extends Assert 
implements Selenium
 }
 }
 
-reportAndThrowAssertionError("Body 'data-ajax-active' attribute never 
reverted to 'false'.");
+reportAndThrowAssertionError("Body 'data-ajax-active' attribute never 
reverted to '0'.");
 }
 
 @Override



[05/45] tapestry-5 git commit: TAP-2388: Reset state to allow an Error404 to display after an unknown component id in a component event request

2014-12-06 Thread thiagohp
TAP-2388: Reset state to allow an Error404 to display after an unknown 
component id in a component event request


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/a43e17ff
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/a43e17ff
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/a43e17ff

Branch: refs/heads/beanmodel-split
Commit: a43e17ff940e411e20c4ba7b39cd98f36a3f2f01
Parents: 3257161
Author: Howard M. Lewis Ship 
Authored: Fri Oct 24 14:27:27 2014 -0700
Committer: Howard M. Lewis Ship 
Committed: Fri Oct 24 14:27:27 2014 -0700

--
 .../tapestry5/internal/services/ComponentEventDispatcher.java | 3 +++
 .../apache/tapestry5/internal/services/PageRenderDispatcher.java  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a43e17ff/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
index 1d0bd5d..555ff39 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
@@ -49,6 +49,9 @@ public class ComponentEventDispatcher implements Dispatcher
 
 // ... in which case, this attribute is set.
 if 
(request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != 
null) {
+// This needs to be cleared out because the container may submit a 
request back into the filter
+// for the 404 page and some containers reuse the existing 
HttpServletRequest. See TAP5-2388.
+
request.setAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND, null);
 return false;
 }
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a43e17ff/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
index 1fb7b3e..2e9e255 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
@@ -38,7 +38,7 @@ public class PageRenderDispatcher implements Dispatcher
 {
 // If a component event request arrives (in production)
 // with an invalid component id, then we want it to be a 404
-// See TAP5-1481
+// See TAP5-1481 and TAP5-2388
 
 if 
(request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null)
 {



[09/45] tapestry-5 git commit: TAP5-2415: Update Bootstrap to 3.3.1

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3a4991af/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/labels.less
--
diff --git 
a/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/labels.less 
b/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/labels.less
index 6f9e490..9f7a67e 100644
--- a/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/labels.less
+++ b/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/labels.less
@@ -2,7 +2,7 @@
 
 .label-variant(@color) {
   background-color: @color;
-  
+
   &[href] {
 &:hover,
 &:focus {

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3a4991af/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/vendor-prefixes.less
--
diff --git 
a/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/vendor-prefixes.less
 
b/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/vendor-prefixes.less
index e2008c8..31f8e2f 100644
--- 
a/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/vendor-prefixes.less
+++ 
b/tapestry-webresources/src/test/webapp/bootstrap/less/mixins/vendor-prefixes.less
@@ -99,9 +99,12 @@
 
 // Placeholder text
 .placeholder(@color: @input-color-placeholder) {
-  &::-moz-placeholder   { color: @color;   // Firefox
-  opacity: 1; } // See 
https://github.com/twbs/bootstrap/pull/11526
-  &:-ms-input-placeholder   { color: @color; } // Internet Explorer 10+
+  // Firefox
+  &::-moz-placeholder {
+color: @color;
+opacity: 1; // See https://github.com/twbs/bootstrap/pull/11526
+  }
+  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
   &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome
 }
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3a4991af/tapestry-webresources/src/test/webapp/bootstrap/less/modals.less
--
diff --git a/tapestry-webresources/src/test/webapp/bootstrap/less/modals.less 
b/tapestry-webresources/src/test/webapp/bootstrap/less/modals.less
index 6da50ba..032a497 100644
--- a/tapestry-webresources/src/test/webapp/bootstrap/less/modals.less
+++ b/tapestry-webresources/src/test/webapp/bootstrap/less/modals.less
@@ -30,10 +30,10 @@
 
   // When fading in the modal, animate it to slide down
   &.fade .modal-dialog {
-.translate3d(0, -25%, 0);
+.translate(0, -25%);
 .transition-transform(~"0.3s ease-out");
   }
-  &.in .modal-dialog { .translate3d(0, 0, 0) }
+  &.in .modal-dialog { .translate(0, 0) }
 }
 .modal-open .modal {
   overflow-x: hidden;
@@ -62,12 +62,10 @@
 
 // Modal background
 .modal-backdrop {
-  position: fixed;
+  position: absolute;
   top: 0;
   right: 0;
-  bottom: 0;
   left: 0;
-  z-index: @zindex-modal-background;
   background-color: @modal-backdrop-bg;
   // Fade for backdrop
   &.fade { .opacity(0); }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3a4991af/tapestry-webresources/src/test/webapp/bootstrap/less/navbar.less
--
diff --git a/tapestry-webresources/src/test/webapp/bootstrap/less/navbar.less 
b/tapestry-webresources/src/test/webapp/bootstrap/less/navbar.less
index 55bfd29..67fd352 100644
--- a/tapestry-webresources/src/test/webapp/bootstrap/less/navbar.less
+++ b/tapestry-webresources/src/test/webapp/bootstrap/less/navbar.less
@@ -67,6 +67,7 @@
 
 &.collapse {
   display: block !important;
+  visibility: visible !important;
   height: auto !important;
   padding-bottom: 0; // Override default setting
   overflow: visible !important;
@@ -92,7 +93,7 @@
   .navbar-collapse {
 max-height: @navbar-collapse-max-height;
 
-@media (max-width: @screen-xs-min) and (orientation: landscape) {
+@media (max-device-width: @screen-xs-min) and (orientation: landscape) {
   max-height: 200px;
 }
   }
@@ -141,7 +142,6 @@
   right: 0;
   left: 0;
   z-index: @zindex-navbar-fixed;
-  .translate3d(0, 0, 0);
 
   // Undo the rounded corners
   @media (min-width: @grid-float-breakpoint) {
@@ -173,6 +173,10 @@
 text-decoration: none;
   }
 
+  > img {
+display: block;
+  }
+
   @media (min-width: @grid-float-breakpoint) {
 .navbar > .container &,
 .navbar > .container-fluid & {
@@ -271,26 +275,10 @@
 padding-bottom: @navbar-padding-vertical;
   }
 }
-
-&.navbar-right:last-child {
-  margin-right: -@navbar-padding-horizontal;
-}
   }
 }
 
 
-// Component alignment
-//
-// Repurpose the pull utilities as their own navbar utilities to avoid 
specificity
-// issues with parents and chaining. Only do this when the navbar is 
uncollapsed
-// though so that navbar contents properly stack and align in mobile.
-
-@media (min-width: @grid-float-breakpoint) {
-  .navbar-left  { 

[12/45] tapestry-5 git commit: update Selenium to 2.44.0

2014-12-06 Thread thiagohp
update Selenium to 2.44.0


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/85a03b7d
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/85a03b7d
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/85a03b7d

Branch: refs/heads/beanmodel-split
Commit: 85a03b7d2b6cb7d7577bb26e24b033327dfa481e
Parents: 3a4991a
Author: Jochen Kemnade 
Authored: Thu Nov 13 09:03:11 2014 +0100
Committer: Jochen Kemnade 
Committed: Thu Nov 13 09:03:11 2014 +0100

--
 build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/85a03b7d/build.gradle
--
diff --git a/build.gradle b/build.gradle
index 40c6b89..843f1f6 100755
--- a/build.gradle
+++ b/build.gradle
@@ -20,7 +20,7 @@ project.ext.versions = [
 slf4j: "1.7.7",
 wro4j: "1.7.0",
 geb: "0.9.2",
-selenium: "2.43.1"
+selenium: "2.44.0"
 ]
 
 ext.continuousIntegrationBuild = Boolean.getBoolean("ci")



[11/45] tapestry-5 git commit: TAP5-2415: Update Bootstrap to 3.3.1

2014-12-06 Thread thiagohp
TAP5-2415: Update Bootstrap to 3.3.1


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/3a4991af
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/3a4991af
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/3a4991af

Branch: refs/heads/beanmodel-split
Commit: 3a4991af5b2c01533ca6b295431751a006d47a81
Parents: f3aaec5
Author: Jochen Kemnade 
Authored: Thu Nov 13 08:59:07 2014 +0100
Committer: Jochen Kemnade 
Committed: Thu Nov 13 08:59:07 2014 +0100

--
 build.gradle|   2 +-
 .../tapestry5/bootstrap/css/bootstrap-theme.css | 116 ++--
 .../tapestry5/bootstrap/css/bootstrap.css   | 535 ---
 .../fonts/glyphicons-halflings-regular.svg  |   2 +-
 .../assets/tapestry5/bootstrap/js/affix.js  |  66 ++-
 .../assets/tapestry5/bootstrap/js/alert.js  |  10 +-
 .../assets/tapestry5/bootstrap/js/button.js |  26 +-
 .../assets/tapestry5/bootstrap/js/carousel.js   |  37 +-
 .../assets/tapestry5/bootstrap/js/collapse.js   |  97 +++-
 .../assets/tapestry5/bootstrap/js/dropdown.js   |  30 +-
 .../assets/tapestry5/bootstrap/js/modal.js  |  90 +++-
 .../assets/tapestry5/bootstrap/js/popover.js|  20 +-
 .../assets/tapestry5/bootstrap/js/scrollspy.js  |  19 +-
 .../assets/tapestry5/bootstrap/js/tab.js|  57 +-
 .../assets/tapestry5/bootstrap/js/tooltip.js|  99 ++--
 .../assets/tapestry5/bootstrap/js/transition.js |   2 +-
 .../fonts/glyphicons-halflings-regular.svg  |   2 +-
 .../src/test/webapp/bootstrap/js/affix.js   |  66 ++-
 .../src/test/webapp/bootstrap/js/alert.js   |  10 +-
 .../src/test/webapp/bootstrap/js/button.js  |  26 +-
 .../src/test/webapp/bootstrap/js/carousel.js|  37 +-
 .../src/test/webapp/bootstrap/js/collapse.js|  97 +++-
 .../src/test/webapp/bootstrap/js/dropdown.js|  30 +-
 .../src/test/webapp/bootstrap/js/modal.js   |  90 +++-
 .../src/test/webapp/bootstrap/js/popover.js |  20 +-
 .../src/test/webapp/bootstrap/js/scrollspy.js   |  19 +-
 .../src/test/webapp/bootstrap/js/tab.js |  57 +-
 .../src/test/webapp/bootstrap/js/tooltip.js |  99 ++--
 .../src/test/webapp/bootstrap/js/transition.js  |   2 +-
 .../src/test/webapp/bootstrap/less/badges.less  |   8 +-
 .../webapp/bootstrap/less/button-groups.less|  29 +-
 .../src/test/webapp/bootstrap/less/buttons.less |  11 +-
 .../test/webapp/bootstrap/less/carousel.less|  24 +
 .../src/test/webapp/bootstrap/less/code.less|   1 +
 .../bootstrap/less/component-animations.less|   7 +-
 .../test/webapp/bootstrap/less/dropdowns.less   |   8 +-
 .../src/test/webapp/bootstrap/less/forms.less   |  86 +--
 .../test/webapp/bootstrap/less/glyphicons.less  |   3 +-
 .../test/webapp/bootstrap/less/jumbotron.less   |  11 +-
 .../test/webapp/bootstrap/less/list-group.less  |   9 +-
 .../src/test/webapp/bootstrap/less/media.less   |  63 +--
 .../webapp/bootstrap/less/mixins/buttons.less   |   2 +
 .../webapp/bootstrap/less/mixins/forms.less |   6 +-
 .../bootstrap/less/mixins/grid-framework.less   |   4 +-
 .../webapp/bootstrap/less/mixins/image.less |   1 -
 .../webapp/bootstrap/less/mixins/labels.less|   2 +-
 .../bootstrap/less/mixins/vendor-prefixes.less  |   9 +-
 .../src/test/webapp/bootstrap/less/modals.less  |   8 +-
 .../src/test/webapp/bootstrap/less/navbar.less  |  55 +-
 .../src/test/webapp/bootstrap/less/navs.less|   4 +-
 .../test/webapp/bootstrap/less/normalize.less   |   8 +-
 .../src/test/webapp/bootstrap/less/pager.less   |   3 +-
 .../test/webapp/bootstrap/less/pagination.less  |   2 +-
 .../src/test/webapp/bootstrap/less/panels.less  |  24 +-
 .../test/webapp/bootstrap/less/popovers.less|  10 +-
 .../src/test/webapp/bootstrap/less/print.less   | 198 +++
 .../webapp/bootstrap/less/progress-bars.less|  20 +-
 .../webapp/bootstrap/less/responsive-embed.less |   3 +-
 .../test/webapp/bootstrap/less/scaffolding.less |   2 +-
 .../src/test/webapp/bootstrap/less/tables.less  |  21 +-
 .../src/test/webapp/bootstrap/less/theme.less   |  32 +-
 .../test/webapp/bootstrap/less/thumbnails.less  |   2 +-
 .../src/test/webapp/bootstrap/less/tooltip.less |  16 +-
 .../src/test/webapp/bootstrap/less/type.less|  11 -
 .../test/webapp/bootstrap/less/utilities.less   |   1 -
 .../test/webapp/bootstrap/less/variables.less   |  52 +-
 66 files changed, 1572 insertions(+), 947 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3a4991af/build.gradle
--
diff --git a/build.gradle b/build.gradle
index 52d63ae..40c6b89 100755
--- a/build.gradle
+++ b/build.gradle
@@ -568,7 +568,7 @@ boolean checkJDK() {
 }
 
 task updateBootstrap << {
-  def bootstrapVersion = '3.2.0'
+  def bootstrapVer

[23/45] tapestry-5 git commit: Fix a typo

2014-12-06 Thread thiagohp
Fix a typo


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/4649e758
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/4649e758
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/4649e758

Branch: refs/heads/beanmodel-split
Commit: 4649e75859dd9d652a0e3fb3c440227ff11d1a77
Parents: 47bcb11
Author: Howard M. Lewis Ship 
Authored: Mon Nov 24 14:30:04 2014 -0800
Committer: Howard M. Lewis Ship 
Committed: Mon Nov 24 14:30:04 2014 -0800

--
 .../src/main/java/org/apache/tapestry5/SymbolConstants.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4649e758/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java 
b/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
index f4981e6..00cb3a7 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
@@ -503,7 +503,7 @@ public class SymbolConstants
 /**
  * When an asset (typically, a JavaScript module) is streamed without an 
explicit expiration header, then
  * this value is sent as the {@code Cache-Control} header; the default is 
"max-age=60, must-revalidate". Setting
- * max-age to a value above zero signficantly reduces the number of client 
requests for module content, as client
+ * max-age to a value above zero significantly reduces the number of 
client requests for module content, as client
  * browsers will then cache previously downloaded versions. For normal 
assets, which are immutable, and fingerprinted with
  * a content hash, there is no need to set max age, and instead, a 
far-future expiration date is provided.
  *



[22/45] tapestry-5 git commit: Advance version number to 5.4-beta-24

2014-12-06 Thread thiagohp
Advance version number to 5.4-beta-24


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/47bcb11f
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/47bcb11f
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/47bcb11f

Branch: refs/heads/beanmodel-split
Commit: 47bcb11f1f05649697f3b53de20c5817bab3efe5
Parents: bed56af
Author: Howard M. Lewis Ship 
Authored: Mon Nov 24 12:01:50 2014 -0800
Committer: Howard M. Lewis Ship 
Committed: Mon Nov 24 12:01:50 2014 -0800

--
 build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/47bcb11f/build.gradle
--
diff --git a/build.gradle b/build.gradle
index 843f1f6..1d17c04 100755
--- a/build.gradle
+++ b/build.gradle
@@ -36,7 +36,7 @@ project.version = tapestryVersion()
 def tapestryVersion() {
 
 def major = "5.4"
-def minor = "-beta-23"
+def minor = "-beta-24"
 
 // When building on the CI server, make sure -SNAPSHOT is appended, as it 
is a nightly build.
 // When building normally, or for a release, no suffix is desired.



[17/45] tapestry-5 git commit: TAP5-2418: update some German and one French translation

2014-12-06 Thread thiagohp
TAP5-2418: update some German and one French translation


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/32fcb308
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/32fcb308
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/32fcb308

Branch: refs/heads/beanmodel-split
Commit: 32fcb3085526677b6671ffe63af7c0c7e72b2d3a
Parents: e5a4edf
Author: Jochen Kemnade 
Authored: Tue Nov 18 17:18:04 2014 +0100
Committer: Jochen Kemnade 
Committed: Tue Nov 18 17:18:04 2014 +0100

--
 .../org/apache/tapestry5/core_de.properties | 16 
 .../org/apache/tapestry5/core_fr.properties |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32fcb308/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties
--
diff --git 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties
index 4739af6..0fe09c1 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_de.properties
@@ -30,7 +30,7 @@ core-date-value-not-parseable=Datumswert '%s' kann nicht 
geparst werden.
 core-default-error-banner=Sie müssen folgende Fehler beheben, bevor Sie 
fortfahren können.
 
 # Alerts "Dismiss" label:
-#core-dismiss-label=
+core-dismiss-label=Alle ausblenden
 
 # Form nesting error:
 #core-form-nesting-not-allowed=
@@ -42,7 +42,7 @@ core-goto-page=Gehe zu Seite %d
 #core-invalid-form-request=
 
 # Grid "no data" message:
-#core-no-grid-data-to-display=
+core-no-grid-data-to-display=Keine Daten zum Anzeigen
 
 # Palette Available list label:
 core-palette-available-label=Verfügbar
@@ -63,7 +63,7 @@ core-palette-selected-label=Ausgewählt
 core-palette-up-label=Aufwärts
 
 # ProgressiveDisplay "loading" label:
-#core-progressive-display-loading=
+core-progressive-display-loading=Lade ...
 
 # BeanEditForm "Submit" button:
 core-submit-label=Anlegen/Ändern
@@ -72,7 +72,7 @@ core-submit-label=Anlegen/Ändern
 integer-format-exception=Sie müssen für %s einen ganzzahligen Wert angeben.
 
 # "email" validator error:
-invalid-email='%1$s' ist keine gültige E-Mail Adresse.
+invalid-email=Keine gültige E-Mail-Adresse
 
 # Integer "max" validator error:
 max-integer=Der Wert von %2$s darf höchstens %1$d betragen.
@@ -96,13 +96,13 @@ regexp=%2$s stimmt nicht mit dem Muster '%1$s' überein.
 required=Sie müssen einen Wert für %s angeben.
 
 # Client-side numeric validation error:
-#core-input-not-numeric=
+core-input-not-numeric=Wert ist nicht numerisch.
 
 # Client-side integer validation error:
-#core-input-not-integer=
+core-input-not-integer=Wert ist keine ganze Zahl.
 
 # DateField "Today" button:
-#core-datefield-today=
+core-datefield-today=Heute
 
 # DateField "None" button:
-#core-datefield-none=
+core-datefield-none=Ohne

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/32fcb308/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties
--
diff --git 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties
index 449e227..68414ba 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties
@@ -72,7 +72,7 @@ core-submit-label=Créer/Mettre à jour
 integer-format-exception=Vous devez saisir un nombre entier pour %s.
 
 # "email" validator error:
-invalid-email='%s' n'est pas une adresse courriel valide.
+invalid-email=Adresse de courriel non valide.
 
 # Integer "max" validator error:
 max-integer=%2$s ne doit pas avoir une valeur supérieure à %1$d.



[02/45] tapestry-5 git commit: TAP5-2401: Only emit the pattern and title attributes when client-side validation is enabled

2014-12-06 Thread thiagohp
TAP5-2401: Only emit the pattern and title attributes when client-side 
validation is enabled


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1f09cb65
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1f09cb65
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1f09cb65

Branch: refs/heads/beanmodel-split
Commit: 1f09cb6542474084025097337404627fd2573e53
Parents: 750ffdb
Author: Howard M. Lewis Ship 
Authored: Tue Oct 21 16:17:20 2014 -0700
Committer: Howard M. Lewis Ship 
Committed: Tue Oct 21 16:17:20 2014 -0700

--
 .../src/main/java/org/apache/tapestry5/validator/Regexp.java  | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1f09cb65/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java 
b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java
index bc94429..b30c08e 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Regexp.java
@@ -56,9 +56,6 @@ public class Regexp extends AbstractValidator
 "pattern", constraintValue.pattern(),
 "title", message);
 }
-
-writer.attributes("pattern", constraintValue.pattern(),
-"title", message);
 }
 
 public void validate(Field field, Pattern constraintValue, 
MessageFormatter formatter, String value)



[06/45] tapestry-5 git commit: TAP-2388: Update test and example app

2014-12-06 Thread thiagohp
TAP-2388: Update test and example app


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/6f4c5640
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/6f4c5640
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/6f4c5640

Branch: refs/heads/beanmodel-split
Commit: 6f4c5640ccd7e2122a46a7d0cc62cd771efa69b1
Parents: a43e17f
Author: Howard M. Lewis Ship 
Authored: Fri Oct 24 16:09:12 2014 -0700
Committer: Howard M. Lewis Ship 
Committed: Fri Oct 24 16:09:12 2014 -0700

--
 .../services/ComponentEventDispatcher.java  |  3 --
 .../internal/services/PageRenderDispatcher.java |  3 ++
 tapestry-core/src/test/app5/WEB-INF/web.xml | 40 +++-
 .../integration/app5/ProductionModeTests.groovy |  7 ++--
 .../integration/app5/pages/Error404.groovy  | 20 ++
 .../integration/app5/pages/Error404.tml | 18 +
 6 files changed, 67 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6f4c5640/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
index 555ff39..1d0bd5d 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
@@ -49,9 +49,6 @@ public class ComponentEventDispatcher implements Dispatcher
 
 // ... in which case, this attribute is set.
 if 
(request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != 
null) {
-// This needs to be cleared out because the container may submit a 
request back into the filter
-// for the 404 page and some containers reuse the existing 
HttpServletRequest. See TAP5-2388.
-
request.setAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND, null);
 return false;
 }
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6f4c5640/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
index 2e9e255..38e02e7 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
@@ -42,6 +42,9 @@ public class PageRenderDispatcher implements Dispatcher
 
 if 
(request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null)
 {
+// This needs to be cleared out because the container may submit a 
request back into the filter
+// for the 404 page and some containers reuse the existing 
HttpServletRequest. See TAP5-2388.
+
request.setAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND, null);
 return false;
 }
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6f4c5640/tapestry-core/src/test/app5/WEB-INF/web.xml
--
diff --git a/tapestry-core/src/test/app5/WEB-INF/web.xml 
b/tapestry-core/src/test/app5/WEB-INF/web.xml
index a1bcd9f..c8c61c3 100644
--- a/tapestry-core/src/test/app5/WEB-INF/web.xml
+++ b/tapestry-core/src/test/app5/WEB-INF/web.xml
@@ -1,19 +1,25 @@
 
-http://java.sun.com/dtd/web-app_2_3.dtd";>
-
-  Integration Test App 5 -- Skinning
-  
-tapestry.app-package
-org.apache.tapestry5.integration.app5
-  
-  
-app
-org.apache.tapestry5.TapestryFilter
-  
-  
-app
-/*
-  
+http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
+ version="2.4">
+Integration Test App 5 -- Skinning
+
+tapestry.app-package
+org.apache.tapestry5.integration.app5
+
+
+app
+org.apache.tapestry5.TapestryFilter
+
+
+
+app
+/*
+REQUEST
+ERROR
+
+
+404
+/error404
+
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6f4c5640/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app5/ProductionModeTests.groovy
---

[21/45] tapestry-5 git commit: TAP5-2420: Confirm mixin has issues related to keyboard navigation

2014-12-06 Thread thiagohp
TAP5-2420: Confirm mixin has issues related to keyboard navigation


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/bed56af4
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/bed56af4
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/bed56af4

Branch: refs/heads/beanmodel-split
Commit: bed56af4327a3c11c44ea5ff5f651965d843c59e
Parents: 1956c56
Author: Howard M. Lewis Ship 
Authored: Mon Nov 24 11:03:03 2014 -0800
Committer: Howard M. Lewis Ship 
Committed: Mon Nov 24 11:03:03 2014 -0800

--
 .../modules/t5/core/confirm-click.coffee| 20 +---
 1 file changed, 5 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/bed56af4/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee
--
diff --git 
a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee
 
b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee
index ff13e44..013ecac 100644
--- 
a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee
+++ 
b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee
@@ -1,17 +1,3 @@
-# Copyright 2013 The Apache Software Foundation
-#
-# 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.
-
 # ## t5/core/confirm-click
 #
 # Support for the Tapestry Confirm mixin, and for running confirmation dialogs 
programatically.
@@ -35,7 +21,7 @@ define ["jquery", "./events", "./dom", "bootstrap/modal"],
   confirmed = false
 
   content = """
-
+
   
 
   
@@ -66,6 +52,10 @@ define ["jquery", "./events", "./dom", "bootstrap/modal"],
 
   $dialog.appendTo $ "body"
 
+  # Focus on the first button (the "OK") button.
+  $dialog.on "shown.bs.modal", ->
+$dialog.find(".modal-footer .btn").first().focus()
+
 # Support for the Confirm mixin
 $("body").on "click", "[data-confirm-message]:not(.disabled)", ->
 



[08/15] tapestry-5 git commit: Second pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
Second pass creating the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1f36bb20
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1f36bb20
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1f36bb20

Branch: refs/heads/beanmodel-split
Commit: 1f36bb203cb0646f912125caa3bd03707aa95083
Parents: f963c7a
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 16:40:55 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 16:40:55 2014 -0200

--
 .../internal/antlr/PropertyExpressionLexer.g| 163 +
 .../internal/antlr/PropertyExpressionParser.g   | 105 +++
 .../tapestry5/internal/antlr/BaseLexer.java |  54 ++
 .../tapestry5/internal/antlr/BaseParser.java|  40 +
 .../tapestry5/internal/antlr/package-info.java  |  18 ++
 .../tapestry5/internal/services/Invariant.java  |  28 +++
 .../services/LiteralPropertyConduit.java|  85 +
 .../services/PropertyExpressionException.java   |  38 
 .../internal/services/StringInterner.java   |  43 +
 .../org/apache/tapestry5/ioc/ObjectCreator.java |  27 +++
 .../ioc/services/PlasticProxyFactory.java   | 159 +
 .../org/apache/tapestry5/ioc/util/Stack.java| 173 +++
 .../internal/antlr/PropertyExpressionLexer.g| 163 -
 .../internal/antlr/PropertyExpressionParser.g   | 105 ---
 .../tapestry5/internal/antlr/BaseLexer.java |  54 --
 .../tapestry5/internal/antlr/BaseParser.java|  40 -
 .../tapestry5/internal/antlr/package-info.java  |  18 --
 .../tapestry5/internal/services/Invariant.java  |  28 ---
 .../services/LiteralPropertyConduit.java|  85 -
 .../services/PropertyExpressionException.java   |  38 
 .../internal/services/StringInterner.java   |  43 -
 .../org/apache/tapestry5/ioc/ObjectCreator.java |  27 ---
 .../ioc/annotations/IncompatibleChange.java |  33 
 .../ioc/services/PlasticProxyFactory.java   | 159 -
 .../org/apache/tapestry5/ioc/util/Stack.java| 173 ---
 .../ioc/annotations/IncompatibleChange.java |  33 
 26 files changed, 966 insertions(+), 966 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1f36bb20/beanmodel/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
--
diff --git 
a/beanmodel/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
 
b/beanmodel/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
new file mode 100644
index 000..3b52ba9
--- /dev/null
+++ 
b/beanmodel/src/main/antlr/org/apache/tapestry5/internal/antlr/PropertyExpressionLexer.g
@@ -0,0 +1,163 @@
+// Copyright 2008, 2010, 2011 The Apache Software Foundation
+//
+// 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.
+
+lexer grammar PropertyExpressionLexer;
+
+
+options
+{
+  superClass='org.apache.tapestry5.internal.antlr.BaseLexer';
+}
+
+@header
+{
+package org.apache.tapestry5.internal.antlr;
+}
+
+   
+// Integer constant
+fragment INTEGER
+   :   {this.getClass(); /* Fix java.lang.VerifyError: Stack size too 
large */};   
+   
+// Read a property or invoke a method.
+fragment DEREF 
+   :   {this.getClass(); /* Fix java.lang.VerifyError: Stack size too 
large */};   
+   
+// Range operator, ".." between two integers.  
+fragment RANGEOP
+   :   {this.getClass(); /* Fix java.lang.VerifyError: Stack size too 
large */};   
+   
+// Decimal number  
+fragment DECIMAL
+   :   {this.getClass(); /* Fix java.lang.VerifyError: Stack size too 
large */};   
+   
+fragment LETTER 
+   :   ('a'..'z'|'A'..'Z');
+fragment DIGIT 
+   :   '0'..'9';   
+fragment SIGN
+   :   ('+'|'-');
+LPAREN :   '(';
+RPAREN :   ')';
+LBRACKET:  '[';
+RBRACKET:  ']';
+COMMA  :   ',';
+BANG   :   '!';
+LBRACE :   '{';
+RBRACE :   '}';
+COLON  :   ':';
+
+fragment QUOTE
+   :   '\'';
+
+// Clumsy but effective approach to case-insensitive identifiers.
+
+frag

[02/15] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java
deleted file mode 100644
index 81d1f77..000
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2006, 2007, 2010, 2011 The Apache Software Foundation
-//
-// 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.apache.tapestry5.ioc;
-
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.apache.tapestry5.ioc.services.MasterObjectProvider;
-
-import java.lang.annotation.Annotation;
-
-/**
- * Defines an object which can provide access to services defined within a 
{@link org.apache.tapestry5.ioc.Registry}, or
- * to objects or object instances available by other means. Services are 
accessed via service id, or
- * (when appropriate)
- * by just service interface. The Registry itself implements this interface, 
as does
- * {@link org.apache.tapestry5.ioc.ServiceResources}.
- */
-public interface ObjectLocator
-{
-/**
- * Obtains a service via its unique service id. Returns the service's 
proxy. The service proxy
- * implements the same
- * interface as the actual service, and is used to instantiate the actual 
service only as needed
- * (this is
- * transparent to the application).
- *
- * @param 
- * @param serviceIdunique Service id used to locate the service 
object (may contain symbols,
- * which
- * will be expanded), case is ignored
- * @param serviceInterface the interface implemented by the service (or an 
interface extended by the service
- * interface)
- * @return the service instance
- * @throws RuntimeException if the service is not defined, or if an error 
occurs instantiating it
- */
- T getService(String serviceId, Class serviceInterface);
-
-/**
- * Locates a service given a service interface and (optionally) some 
marker annotation types. A single service must implement the service
- * interface (which   * 
can be hard to guarantee) and by marked by all the marker types. The search 
takes into account inheritance of the service interface
- * (not the service implementation), which may result in a 
failure due to extra
- * matches.
- *
- * @param serviceInterface the interface the service implements
- * @return the service's proxy
- * @throws RuntimeException if the service does not exist (this is 
considered programmer error), or multiple
- *  services directly implement, or extend from, 
the service interface
- * @see org.apache.tapestry5.ioc.annotations.Marker
- */
- T getService(Class serviceInterface);
-
-/**
- * Locates a service given a service interface and (optionally) some 
marker annotation types. A single service must implement the service
- * interface (which   * 
can be hard to guarantee) and by marked by all the marker types. The search 
takes into account inheritance of the service interface
- * (not the service implementation), which may result in a 
failure due to extra
- * matches.The ability to specify marker annotation types was 
added in 5.3
- *
- * @param serviceInterface the interface the service implements
- * @param markerTypes  Markers used to select a specific service that 
implements the interface
- * @return the service's proxy
- * @throws RuntimeException if the service does not exist (this is 
considered programmer error), or multiple
- *  services directly implement, or extend from, 
the service interface
- * @see org.apache.tapestry5.ioc.annotations.Marker
- * @since 5.3
- */
- T getService(Class serviceInterface, Class... 
markerTypes);
-
-/**
- * Obtains an object indirectly, using the {@link 
org.apache.tapestry5.ioc.services.MasterObjectProvider} service.
- *
- * @param objectType the type of object to be returned
- * @param annotationProvider provides access to annot

[14/15] tapestry-5 git commit: Fourth pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
Fourth pass creating the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/eb7ec86e
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/eb7ec86e
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/eb7ec86e

Branch: refs/heads/beanmodel-split
Commit: eb7ec86e3368e4a4e20d88c8f009d88fd1d37740
Parents: dd95846
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 19:45:14 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 19:45:14 2014 -0200

--
 beanmodel/build.gradle  |   1 +
 .../beaneditor/BeanModelSourceBuilder.java  | 121 +
 .../internal/InternalBeanModelUtils.java| 145 --
 .../internal/beaneditor/BeanModelImpl.java  |   4 +-
 .../internal/beaneditor/BeanModelUtils.java |   4 +-
 .../internal/beaneditor/PropertyModelImpl.java  |  10 +-
 .../services/PropertyConduitSourceImpl.java |  10 +-
 .../services/ClassPropertyAdapterImpl.java  | 249 +
 .../services/PlasticClassListenerLogger.java|  47 ++
 .../services/PlasticProxyFactoryImpl.java   | 285 +++
 .../internal/services/PropertyAccessImpl.java   | 217 
 .../internal/services/PropertyAdapterImpl.java  | 273 ++
 commons/build.gradle|   1 +
 .../internal/services/StringInternerImpl.java   |  54 ++
 .../org/apache/tapestry5/ioc/Configuration.java |  53 ++
 .../tapestry5/ioc/MappedConfiguration.java  |  81 +++
 .../tapestry5/ioc/OrderedConfiguration.java |  84 +++
 .../ioc/internal/BasicTypeCoercions.java| 342 +
 .../AccessableObjectAnnotationProvider.java |  46 ++
 .../services/AnnotationProviderChain.java   |  59 +++
 .../ioc/internal/services/CompoundCoercion.java |  54 ++
 .../ioc/internal/services/ServiceMessages.java  |  68 +++
 .../ioc/internal/services/StringLocation.java   |  65 +++
 .../ioc/internal/services/TypeCoercerImpl.java  | 508 +++
 .../ioc/internal/util/InheritanceSearch.java| 159 ++
 .../ioc/internal/util/InternalCommonsUtils.java | 388 ++
 .../ioc/internal/util/InternalStringUtils.java  | 203 
 .../ioc/internal/util/LockSupport.java  |  89 
 .../ioc/internal/util/MessageFormatterImpl.java |  65 +++
 .../ioc/internal/util/MessagesImpl.java |  74 +++
 .../ioc/internal/util/TapestryException.java|  23 +-
 .../tapestry5/ioc/util/AbstractMessages.java|  94 
 .../tapestry5/ioc/util/AvailableValues.java |   4 +-
 .../apache/tapestry5/ioc/util/TimeInterval.java | 195 +++
 .../tapestry5/util/StringToEnumCoercion.java|  91 
 .../internal/TapestryInternalUtils.java |   8 +-
 .../internal/services/StringInternerImpl.java   |  53 --
 .../org/apache/tapestry5/ioc/Configuration.java |  53 --
 .../tapestry5/ioc/MappedConfiguration.java  |  81 ---
 .../tapestry5/ioc/OrderedConfiguration.java |  84 ---
 .../AccessableObjectAnnotationProvider.java |  46 --
 .../services/AnnotationProviderChain.java   |  59 ---
 .../services/ClassPropertyAdapterImpl.java  | 250 -
 .../ioc/internal/services/CompoundCoercion.java |  54 --
 .../services/PlasticClassListenerLogger.java|  47 --
 .../services/PlasticProxyFactoryImpl.java   | 286 ---
 .../internal/services/PropertyAccessImpl.java   | 217 
 .../internal/services/PropertyAdapterImpl.java  | 273 --
 .../ioc/internal/services/ServiceMessages.java  |  68 ---
 .../ioc/internal/services/StringLocation.java   |  65 ---
 .../ioc/internal/services/TypeCoercerImpl.java  | 508 ---
 .../ioc/internal/util/InheritanceSearch.java| 159 --
 .../ioc/internal/util/InternalUtils.java| 138 +++--
 .../ioc/internal/util/LockSupport.java  |  89 
 .../ioc/internal/util/MessageFormatterImpl.java |  65 ---
 .../ioc/internal/util/MessagesImpl.java |  74 ---
 .../ioc/modules/TapestryIOCModule.java  | 297 +--
 .../tapestry5/ioc/util/AbstractMessages.java|  94 
 .../apache/tapestry5/ioc/util/TimeInterval.java | 195 ---
 .../tapestry5/util/StringToEnumCoercion.java|  91 
 60 files changed, 3855 insertions(+), 3665 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eb7ec86e/beanmodel/build.gradle
--
diff --git a/beanmodel/build.gradle b/beanmodel/build.gradle
index c09ebdd..fba43b7 100644
--- a/beanmodel/build.gradle
+++ b/beanmodel/build.gradle
@@ -26,6 +26,7 @@ dependencies {
compile project(":plastic")
compile project(":tapestry5-annotations")
compile project(":commons")
+   compile "org.slf4j:slf4j-api:${versions.slf4j}"

 

[11/15] tapestry-5 git commit: Fourth pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eb7ec86e/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
index 8f1f7b6..a5f55b7 100644
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
+++ 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
@@ -17,7 +17,6 @@ package org.apache.tapestry5.ioc.internal.util;
 import org.apache.tapestry5.func.F;
 import org.apache.tapestry5.func.Mapper;
 import org.apache.tapestry5.func.Predicate;
-import org.apache.tapestry5.internal.InternalBeanModelUtils;
 import org.apache.tapestry5.internal.plastic.PlasticInternalUtils;
 import org.apache.tapestry5.ioc.*;
 import org.apache.tapestry5.ioc.annotations.*;
@@ -80,11 +79,10 @@ public class InternalUtils
  *
  * @param method
  * @return short string representation
- * @deprecated use {@link InternalStringUtils#asString(Method)} instead.
  */
 public static String asString(Method method)
 {
-return InternalStringUtils.asString(method);
+return InternalCommonsUtils.asString(method);
 }
 
 /**
@@ -103,11 +101,10 @@ public class InternalUtils
 
 /**
  * Strips leading "_" and "$" and trailing "_" from the name.
- * @deprecated use {@link InternalStringUtils#stripMemberName(String)} 
instead.
  */
 public static String stripMemberName(String memberName)
 {
-return InternalStringUtils.stripMemberName(memberName);
+return InternalCommonsUtils.stripMemberName(memberName);
 }
 
 /**
@@ -392,11 +389,10 @@ public class InternalUtils
 
 /**
  * Joins together some number of elements to form a comma separated list.
- * @deprecated use {@link InternalStringUtils#join(List)} instead.
  */
 public static String join(List elements)
 {
-return InternalStringUtils.join(elements);
+return InternalCommonsUtils.join(elements);
 }
 
 /**
@@ -407,11 +403,10 @@ public class InternalUtils
  * objects to be joined together
  * @param separator
  * used between elements when joining
- * @deprecated use {@link InternalStringUtils#asString(Method, String)} 
instead.
  */
 public static String join(List elements, String separator)
 {
-return InternalStringUtils.join(elements, separator);
+return InternalCommonsUtils.join(elements, separator);
 }
 
 /**
@@ -419,21 +414,19 @@ public class InternalUtils
  *
  * @return the elements converted to strings, sorted, joined with comma 
... or "(none)" if the elements are null or
  * empty
- * @deprecated use {@link InternalStringUtils#joinSorted(Collection)} 
instead.
  */
 public static String joinSorted(Collection elements)
 {
-return InternalStringUtils.joinSorted(elements);
+return InternalCommonsUtils.joinSorted(elements);
 }
 
 /**
  * Returns true if the input is null, or is a zero length string 
(excluding leading/trailing whitespace).
- * @deprecated use {@link InternalStringUtils#isBlank(String)} instead.
  */
 
 public static boolean isBlank(String input)
 {
-return InternalStringUtils.isBlank(input);
+return InternalCommonsUtils.isBlank(input);
 }
 
 /**
@@ -450,63 +443,27 @@ public class InternalUtils
 return false;
 }
 
-/**
- * @deprecated use {@link InternalStringUtils#isNonBlank(String)} instead.
- */
 public static boolean isNonBlank(String input)
 {
-return InternalStringUtils.isNonBlank(input);
+return InternalCommonsUtils.isNonBlank(input);
 }
 
 /**
  * Capitalizes a string, converting the first character to uppercase.
- * @deprecated use {@link InternalStringUtils#capitalize(String)} instead.
  */
 public static String capitalize(String input)
 {
-return InternalStringUtils.capitalize(input);
+return InternalCommonsUtils.capitalize(input);
 }
 
 /**
  * Sniffs the object to see if it is a {@link Location} or {@link 
Locatable}. Returns null if null or not
  * convertable to a location.
  */
-
+
 public static Location locationOf(Object location)
 {
-if (location == null)
-return null;
-
-if (location instanceof Location)
-return (Location) location;
-
-if (location instanceof Locatable)
-return ((Locatable) location).getLocation();
-
-return null;
-}
-
-/**
- * Extracts the string keys from a map and returns them in sorted order. 
The keys are converted to strings.
- *
- * @param map
- *   

[15/15] tapestry-5 git commit: Fifth pass creating the BeanModel and Commons packages. Initial testing looks good.

2014-12-06 Thread thiagohp
Fifth pass creating the BeanModel and Commons packages. Initial testing looks 
good.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/696bc7ae
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/696bc7ae
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/696bc7ae

Branch: refs/heads/beanmodel-split
Commit: 696bc7ae848f4b4f2421ff77ceb4858a2f10465c
Parents: eb7ec86
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 20:29:20 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 20:29:20 2014 -0200

--
 .../org/apache/tapestry5/PropertyConduit2.java  |   2 +-
 .../beaneditor/BeanModelSourceBuilder.java  | 159 ++---
 .../CoercingPropertyConduitWrapper.java |   8 +-
 .../services/LiteralPropertyConduit.java|   2 +-
 .../services/PropertyConduitSourceImpl.java |  46 +-
 .../services/ClassPropertyAdapterImpl.java  |  92 +--
 .../services/AnnotationDataTypeAnalyzer.java|  32 +
 .../ioc/internal/BasicDataTypeAnalyzers.java| 151 +
 .../ioc/internal/util/InternalCommonsUtils.java | 608 +--
 .../internal/TapestryInternalUtils.java |   4 +-
 .../internal/bindings/AbstractBinding.java  |   2 +-
 .../internal/bindings/PropBinding.java  |   8 +-
 .../services/AnnotationDataTypeAnalyzer.java|  32 -
 .../InternalComponentResourcesImpl.java |   4 +-
 .../tapestry5/modules/TapestryModule.java   |  14 +-
 .../app1/components/GenericTypeDisplay.java |  34 +-
 .../integration/app1/pages/GenericTypeDemo.java |  24 +-
 .../pages/GridWithSubmitWithContextDemo.java|   4 +-
 .../integration/app2/base/ChildBasePage.java|   8 +-
 .../integration/app2/base/ParentBasePage.java   |   2 +-
 .../pagelevel/OverrideMethodsTest.java  |  14 +-
 .../services/PropertyConduitSourceImplTest.java |  34 +-
 .../org/apache/tapestry5/json/JSONArray.java|   2 +-
 .../org/apache/tapestry5/json/JSONObject.java   |   2 +-
 24 files changed, 723 insertions(+), 565 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/696bc7ae/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java
--
diff --git a/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java 
b/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java
index 839d70f..1577a3d 100644
--- a/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java
+++ b/beanmodel/src/main/java/org/apache/tapestry5/PropertyConduit2.java
@@ -36,5 +36,5 @@ public interface PropertyConduit2 extends PropertyConduit
  * @see java.lang.reflect.Field#getGenericType()
  * 
  */
-   Type getPropertyGenericType();
+Type getPropertyGenericType();
 }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/696bc7ae/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
index 8cef66e..4ac3373 100644
--- 
a/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
+++ 
b/beanmodel/src/main/java/org/apache/tapestry5/beaneditor/BeanModelSourceBuilder.java
@@ -15,15 +15,22 @@ package org.apache.tapestry5.beaneditor;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
 
 import javax.naming.OperationNotSupportedException;
+import javax.swing.JFrame;
 
 import org.apache.tapestry5.internal.services.BeanModelSourceImpl;
 import org.apache.tapestry5.internal.services.PropertyConduitSourceImpl;
 import org.apache.tapestry5.internal.services.StringInterner;
 import org.apache.tapestry5.internal.services.StringInternerImpl;
 import org.apache.tapestry5.ioc.Configuration;
+import org.apache.tapestry5.ioc.MessageFormatter;
+import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.ioc.ObjectLocator;
+import org.apache.tapestry5.ioc.internal.BasicDataTypeAnalyzers;
 import org.apache.tapestry5.ioc.internal.BasicTypeCoercions;
 import org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl;
 import org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl;
@@ -31,6 +38,7 @@ import 
org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl;
 import org.apache.tapestry5.ioc.services.CoercionTuple;
 import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import org.apache.tapestry5.ioc.services.PropertyAccess;
+import org.apache.tapestry5.ioc.services.PropertyAdapter;
 import org.apache.tapestry5.ioc.servic

[12/15] tapestry-5 git commit: Fourth pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eb7ec86e/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/OrderedConfiguration.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/OrderedConfiguration.java 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/OrderedConfiguration.java
deleted file mode 100644
index 9151381..000
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/OrderedConfiguration.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2006, 2008, 2009, 2010, 2011 The Apache Software Foundation
-//
-// 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.apache.tapestry5.ioc;
-
-/**
- * Object passed into a service contributor method that allows the method 
provide contributed values to the service's
- * configuration.
- * 
- * A service can collect contributions in three different ways:
- * 
- * As an un-ordered collection of values
- * As an ordered list of values (where each value has a unique id, 
pre-requisites and post-requisites)
- * As a map of keys and values
- * 
- * 
- * The service defines the type of contribution, in terms of a base 
class or service interface. Contributions
- * must be compatible with the type, or be {@linkplain 
org.apache.tapestry5.ioc.services.TypeCoercer coercable} to the type.
- *
- * @see org.apache.tapestry5.ioc.annotations.Contribute
- * @see org.apache.tapestry5.ioc.annotations.UsesConfiguration
- */
-public interface OrderedConfiguration
-{
-/**
- * Adds an ordered object to a service's contribution. Each object has an 
id (which must be unique). Optionally,
- * pre-requisites (a list of ids that must precede this object) and 
post-requisites (ids that must follow) can be
- * provided.
- * 
- * If no constraints are supplied, then an implicit constraint is 
supplied: after the previously
- * contributed id within the same contribution method.
- *
- * @param id  a unique id for the object; the id will be fully 
qualified with the contributing module's id
- * @param constraints used to order the object relative to other 
contributed objects
- * @param object  to add to the service's configuration
- */
-void add(String id, T object, String... constraints);
-
-/**
- * Overrides a normally contributed object. Each override must match a 
single normally contributed object.
- *
- * @param id  identifies object to override
- * @param object  overriding object (may be null)
- * @param constraints constraints for the overridden object, replacing 
constraints for the original object (even if
- *omitted, in which case the override object will have 
no ordering constraints)
- * @since 5.1.0.0
- */
-void override(String id, T object, String... constraints);
-
-/**
- * Adds an ordered object by instantiating (with dependencies) the 
indicated class. When the configuration type is
- * an interface and the class to be contributed is a local file,
- * then a reloadable proxy for the class will be created and contributed.
- *
- * @param id  of contribution (used for ordering)
- * @param clazz   class to instantiate
- * @param constraints used to order the object relative to other 
contributed objects
- * @since 5.1.0.0
- */
-void addInstance(String id, Class clazz, String... 
constraints);
-
-/**
- * Instantiates an object and adds it as an override. When the 
configuration type is an interface and the class to
- * be contributed is a local file, then a reloadable proxy for the class 
will be created and contributed.
- *
- * @param id  of object to override
- * @param clazz   to instantiate
- * @param constraints constraints for the overridden object, replacing 
constraints for the original object (even if
- *omitted, in which case the override object will have 
no ordering constraints)
- * @since 5.1.0.0
- */
-void overrideInstance(String id, Class clazz, String... 
constraints);
-}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eb7ec86e/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AccessableObjectAnnotationProvider.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/

[06/15] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/beanmodel/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
 
b/beanmodel/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
new file mode 100644
index 000..701420f
--- /dev/null
+++ 
b/beanmodel/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
@@ -0,0 +1,1563 @@
+// Copyright 2007-2013 The Apache Software Foundation
+//
+// 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.apache.tapestry5.internal.services;
+
+import org.antlr.runtime.ANTLRInputStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.tree.Tree;
+import org.apache.tapestry5.PropertyConduit;
+import org.apache.tapestry5.PropertyConduit2;
+import org.apache.tapestry5.internal.InternalPropertyConduit;
+import org.apache.tapestry5.internal.antlr.PropertyExpressionLexer;
+import org.apache.tapestry5.internal.antlr.PropertyExpressionParser;
+import org.apache.tapestry5.internal.util.IntegerRange;
+import org.apache.tapestry5.internal.util.MultiKey;
+import org.apache.tapestry5.ioc.AnnotationProvider;
+import org.apache.tapestry5.ioc.annotations.PostInjection;
+import org.apache.tapestry5.ioc.internal.NullAnnotationProvider;
+import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
+import org.apache.tapestry5.ioc.internal.util.GenericsUtils;
+import org.apache.tapestry5.ioc.internal.util.InternalUtils;
+import org.apache.tapestry5.ioc.services.*;
+import org.apache.tapestry5.ioc.util.AvailableValues;
+import org.apache.tapestry5.ioc.util.ExceptionUtils;
+import org.apache.tapestry5.ioc.util.UnknownValueException;
+import org.apache.tapestry5.plastic.*;
+import org.apache.tapestry5.services.ComponentClasses;
+import org.apache.tapestry5.services.ComponentLayer;
+import org.apache.tapestry5.services.InvalidationEventHub;
+import org.apache.tapestry5.services.PropertyConduitSource;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.tapestry5.internal.antlr.PropertyExpressionParser.*;
+
+public class PropertyConduitSourceImpl implements PropertyConduitSource
+{
+static class ConduitMethods
+{
+private static final MethodDescription GET = 
getMethodDescription(PropertyConduit.class, "get", Object.class);
+
+private static final MethodDescription SET = 
getMethodDescription(PropertyConduit.class, "set", Object.class,
+Object.class);
+
+private static final MethodDescription GET_PROPERTY_TYPE = 
getMethodDescription(PropertyConduit.class,
+"getPropertyType");
+
+private static final MethodDescription GET_PROPERTY_GENERIC_TYPE = 
getMethodDescription(PropertyConduit2.class,
+"getPropertyGenericType");
+
+private static final MethodDescription GET_PROPERTY_NAME = 
getMethodDescription(InternalPropertyConduit.class,
+"getPropertyName");
+
+private static final MethodDescription GET_ANNOTATION = 
getMethodDescription(AnnotationProvider.class,
+"getAnnotation", Class.class);
+
+}
+
+static class DelegateMethods
+{
+static final Method INVERT = getMethod(PropertyConduitDelegate.class, 
"invert", Object.class);
+
+static final Method RANGE = getMethod(PropertyConduitDelegate.class, 
"range", int.class, int.class);
+
+static final Method COERCE = getMethod(PropertyConduitDelegate.class, 
"coerce", Object.class, Class.class);
+}
+
+static class ArrayListMethods
+{
+static final Method ADD = getMethod(ArrayList.class, "add", 
Object.class);
+}
+
+static class HashMapMethods
+{
+static final Method PUT = getMethod(HashMap.class, "put", 
Object.class, Object.class);
+}
+
+private static InstructionBuilderCallback RETURN_NULL = new 
InstructionBuilderCallback()
+{
+public void doBuild(InstructionBuilder builder)
+{
+builder.loadNull().returnResult();
+}
+};
+
+ 

[09/15] tapestry-5 git commit: Second pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
Second pass creating the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c9e97d64
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c9e97d64
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c9e97d64

Branch: refs/heads/beanmodel-split
Commit: c9e97d64a51b25c875d5daa94d2f607e4ed299f3
Parents: 1f36bb2
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 16:42:10 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 16:42:10 2014 -0200

--
 beanmodel/.gitignore|   4 +
 beanmodel/build.gradle  |  51 -
 .../tapestry5/internal/BeanModelUtils.java  | 145 +
 .../internal/beaneditor/BeanModelImpl.java  |   4 +-
 .../internal/beaneditor/PropertyModelImpl.java  |  14 +-
 .../services/PropertyConduitDelegate.java   |   1 -
 .../services/PropertyConduitSourceImpl.java |  10 +-
 .../org/apache/tapestry5/ioc/ObjectLocator.java |   3 +-
 .../ioc/internal/util/InternalStringUtils.java  | 203 +++
 .../ioc/internal/util/TapestryException.java|  23 ++-
 .../tapestry5/ioc/util/AvailableValues.java |   4 +-
 tapestry-core/build.gradle  |  37 
 .../internal/TapestryInternalUtils.java |  46 +
 .../ioc/internal/util/InternalUtils.java| 142 +++--
 14 files changed, 472 insertions(+), 215 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c9e97d64/beanmodel/.gitignore
--
diff --git a/beanmodel/.gitignore b/beanmodel/.gitignore
new file mode 100644
index 000..f739972
--- /dev/null
+++ b/beanmodel/.gitignore
@@ -0,0 +1,4 @@
+docs
+/.externalToolBuilders
+src/main/generated
+src/test/generated

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c9e97d64/beanmodel/build.gradle
--
diff --git a/beanmodel/build.gradle b/beanmodel/build.gradle
index ccdeb37..c09ebdd 100644
--- a/beanmodel/build.gradle
+++ b/beanmodel/build.gradle
@@ -6,7 +6,18 @@ description = "Fast class property discovery, reading and 
writing library based
 //apply plugin: JavaPlugin
 
 buildDir = 'target/gradle-build'
-   
+
+project.ext {
+   antlrSource = "src/main/antlr"
+   mainGeneratedDir = "src/main/generated"
+   testGeneratedDir = "src/test/generated"
+   antlrOutput = "$mainGeneratedDir/antlr"
+}
+
+configurations {
+   antlr3
+}
+  
 project.ext.libraryVersions = [
jcache: '1.0.0',
 ]
@@ -15,12 +26,50 @@ dependencies {
compile project(":plastic")
compile project(":tapestry5-annotations")
compile project(":commons")
+   
+   // Antlr3 tool path used with the antlr3 task
+   antlr3 "org.antlr:antlr:3.5.2"
+
// Transitive will bring in the unwanted string template library as well
compile "org.antlr:antlr-runtime:3.5.2", {
exclude group: "org.antlr", module: "stringtemplate"
}
 }
 
+// This may spin out as a plugin once we've got the details down pat
+
+task generateGrammarSource(type: JavaExec) {
+   description "Generates Java sources from Antlr3 grammars."
+   inputs.source fileTree(dir: antlrSource, include: "**/*.g")
+   outputs.dir file(antlrOutput)
+
+   classpath configurations.antlr3
+
+   main "org.antlr.Tool"
+   args "-o", "${antlrOutput}/org/apache/tapestry5/internal/antlr"
+   args inputs.sourceFiles
+
+   doFirst {
+   logger.info "Executing Antlr3 grammar 
generation:\n${commandLine.join(' ')}"
+   }
+}
+
+sourceSets {
+   main {
+   output.dir(antlrOutput, builtBy: generateGrammarSource)
+   java {
+   srcDir antlrOutput
+   }
+   }
+}
+
+clean.delete mainGeneratedDir, testGeneratedDir
+
+compileJava {
+   dependsOn generateGrammarSource
+   options.fork(memoryMaximumSize: '512m')
+}
+
 jar {  
manifest {  
}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c9e97d64/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java 
b/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
new file mode 100644
index 000..08cb88a
--- /dev/null
+++ b/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
@@ -0,0 +1,145 @@
+// Copyright 2007, 2008 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file 

[03/15] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
deleted file mode 100644
index 701420f..000
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
+++ /dev/null
@@ -1,1563 +0,0 @@
-// Copyright 2007-2013 The Apache Software Foundation
-//
-// 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.apache.tapestry5.internal.services;
-
-import org.antlr.runtime.ANTLRInputStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.tree.Tree;
-import org.apache.tapestry5.PropertyConduit;
-import org.apache.tapestry5.PropertyConduit2;
-import org.apache.tapestry5.internal.InternalPropertyConduit;
-import org.apache.tapestry5.internal.antlr.PropertyExpressionLexer;
-import org.apache.tapestry5.internal.antlr.PropertyExpressionParser;
-import org.apache.tapestry5.internal.util.IntegerRange;
-import org.apache.tapestry5.internal.util.MultiKey;
-import org.apache.tapestry5.ioc.AnnotationProvider;
-import org.apache.tapestry5.ioc.annotations.PostInjection;
-import org.apache.tapestry5.ioc.internal.NullAnnotationProvider;
-import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.GenericsUtils;
-import org.apache.tapestry5.ioc.internal.util.InternalUtils;
-import org.apache.tapestry5.ioc.services.*;
-import org.apache.tapestry5.ioc.util.AvailableValues;
-import org.apache.tapestry5.ioc.util.ExceptionUtils;
-import org.apache.tapestry5.ioc.util.UnknownValueException;
-import org.apache.tapestry5.plastic.*;
-import org.apache.tapestry5.services.ComponentClasses;
-import org.apache.tapestry5.services.ComponentLayer;
-import org.apache.tapestry5.services.InvalidationEventHub;
-import org.apache.tapestry5.services.PropertyConduitSource;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.apache.tapestry5.internal.antlr.PropertyExpressionParser.*;
-
-public class PropertyConduitSourceImpl implements PropertyConduitSource
-{
-static class ConduitMethods
-{
-private static final MethodDescription GET = 
getMethodDescription(PropertyConduit.class, "get", Object.class);
-
-private static final MethodDescription SET = 
getMethodDescription(PropertyConduit.class, "set", Object.class,
-Object.class);
-
-private static final MethodDescription GET_PROPERTY_TYPE = 
getMethodDescription(PropertyConduit.class,
-"getPropertyType");
-
-private static final MethodDescription GET_PROPERTY_GENERIC_TYPE = 
getMethodDescription(PropertyConduit2.class,
-"getPropertyGenericType");
-
-private static final MethodDescription GET_PROPERTY_NAME = 
getMethodDescription(InternalPropertyConduit.class,
-"getPropertyName");
-
-private static final MethodDescription GET_ANNOTATION = 
getMethodDescription(AnnotationProvider.class,
-"getAnnotation", Class.class);
-
-}
-
-static class DelegateMethods
-{
-static final Method INVERT = getMethod(PropertyConduitDelegate.class, 
"invert", Object.class);
-
-static final Method RANGE = getMethod(PropertyConduitDelegate.class, 
"range", int.class, int.class);
-
-static final Method COERCE = getMethod(PropertyConduitDelegate.class, 
"coerce", Object.class, Class.class);
-}
-
-static class ArrayListMethods
-{
-static final Method ADD = getMethod(ArrayList.class, "add", 
Object.class);
-}
-
-static class HashMapMethods
-{
-static final Method PUT = getMethod(HashMap.class, "put", 
Object.class, Object.class);
-}
-
-private static InstructionBuilderCallback RETURN_NULL = new 
InstructionBuilderCallback()
-{
-public void doBuild(InstructionBuilder builder)
-{
-builder.loadNull().returnResult();
-  

[13/15] tapestry-5 git commit: Fourth pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eb7ec86e/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationProviderChain.java
--
diff --git 
a/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationProviderChain.java
 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationProviderChain.java
new file mode 100644
index 000..49b0b15
--- /dev/null
+++ 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationProviderChain.java
@@ -0,0 +1,59 @@
+// Copyright 2008 The Apache Software Foundation
+//
+// 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.apache.tapestry5.ioc.internal.services;
+
+import org.apache.tapestry5.ioc.AnnotationProvider;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+
+/**
+ * Chain of command for {@link org.apache.tapestry5.ioc.AnnotationProvider}.
+ */
+public class AnnotationProviderChain implements AnnotationProvider
+{
+private final AnnotationProvider[] providers;
+
+public AnnotationProviderChain(AnnotationProvider[] providers)
+{
+this.providers = providers;
+}
+
+/**
+ * Creates an AnnotationProvider from the list of providers.  Returns 
either an {@link AnnotationProviderChain} or
+ * the sole element in the list.
+ */
+public static AnnotationProvider create(List providers)
+{
+int size = providers.size();
+
+if (size == 1) return providers.get(0);
+
+return new AnnotationProviderChain(providers.toArray(new 
AnnotationProvider[providers.size()]));
+}
+
+@Override
+public  T getAnnotation(Class annotationClass)
+{
+for (AnnotationProvider p : providers)
+{
+T result = p.getAnnotation(annotationClass);
+
+if (result != null) return result;
+}
+
+return null;
+}
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eb7ec86e/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/CompoundCoercion.java
--
diff --git 
a/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/CompoundCoercion.java
 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/CompoundCoercion.java
new file mode 100644
index 000..4a5dece
--- /dev/null
+++ 
b/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/CompoundCoercion.java
@@ -0,0 +1,54 @@
+// Copyright 2006, 2007 The Apache Software Foundation
+//
+// 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.apache.tapestry5.ioc.internal.services;
+
+import org.apache.tapestry5.ioc.services.Coercion;
+
+/**
+ * Combines two coercions to create a coercion through an intermediate type.
+ *
+ * @param  The source (input) type
+ * @param  The intermediate type
+ * @param  The target (output) type
+ */
+public class CompoundCoercion implements Coercion
+{
+private final Coercion op1;
+
+private final Coercion op2;
+
+public CompoundCoercion(Coercion op1, Coercion op2)
+{
+this.op1 = op1;
+this.op2 = op2;
+}
+
+@Override
+public T coerce(S input)
+{
+// Run the input through the first operation (S --> I), then run the 
result of that through
+// the second operation (I --> T).
+
+I intermediate = op1.coerce(input);
+
+return op2.coerce(intermediate);
+}
+
+@Override
+public String toString()
+{
+return String.format("%s, %s", op1, op2);
+}
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/eb7ec86e/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java
--
diff --git 
a/commons/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java
 
b/commons/src/ma

[01/15] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
Repository: tapestry-5
Updated Branches:
  refs/heads/beanmodel-split [created] 696bc7ae8


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/ExceptionUtils.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/ExceptionUtils.java 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/ExceptionUtils.java
deleted file mode 100644
index 2feaeca..000
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/ExceptionUtils.java
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright 2008-2013 The Apache Software Foundation
-//
-// 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.apache.tapestry5.ioc.util;
-
-import org.apache.tapestry5.ioc.services.ClassPropertyAdapter;
-import org.apache.tapestry5.ioc.services.PropertyAccess;
-
-/**
- * Contains static methods useful for manipulating exceptions.
- */
-public class ExceptionUtils
-{
-/**
- * Locates a particular type of exception, working its way via the cause 
property of each exception in the exception
- * stack.
- *
- * @param tthe outermost exception
- * @param type the type of exception to search for
- * @return the first exception of the given type, if found, or null
- */
-public static  T findCause(Throwable t, Class type)
-{
-Throwable current = t;
-
-while (current != null)
-{
-if (type.isInstance(current))
-{
-return type.cast(current);
-}
-
-// Not a match, work down.
-
-current = current.getCause();
-}
-
-return null;
-}
-
-/**
- * Locates a particular type of exception, working its way down via any 
property that returns some type of Exception.
- * This is more expensive, but more accurate, than {@link 
#findCause(Throwable, Class)} as it works with older exceptions
- * that do not properly implement the (relatively new) {@linkplain 
Throwable#getCause() cause property}.
- *
- * @param t  the outermost exception
- * @param type   the type of exception to search for
- * @param access used to access properties
- * @return the first exception of the given type, if found, or null
- */
-public static  T findCause(Throwable t, Class 
type, PropertyAccess access)
-{
-Throwable current = t;
-
-while (current != null)
-{
-if (type.isInstance(current))
-{
-return type.cast(current);
-}
-
-Throwable next = null;
-
-ClassPropertyAdapter adapter = access.getAdapter(current);
-
-for (String name : adapter.getPropertyNames())
-{
-
-Object value = adapter.getPropertyAdapter(name).get(current);
-
-if (value != null && value != current && value instanceof 
Throwable)
-{
-next = (Throwable) value;
-break;
-}
-}
-
-current = next;
-}
-
-
-return null;
-}
-
-/**
- * Extracts the message from an exception. If the exception's message is 
null, returns the exceptions class name.
- *
- * @param exception
- * to extract message from
- * @return message or class name
- * @since 5.4
- */
-public static String toMessage(Throwable exception)
-{
-assert exception != null;
-
-String message = exception.getMessage();
-
-if (message != null)
-return message;
-
-return exception.getClass().getName();
-}
-}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/UnknownValueException.java
--
diff --git 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/UnknownValueException.java
 
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/UnknownValueException.java
deleted file mode 100644
index 470b611..000
--- 
a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/UnknownValueException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2010 The Apache Software Foundation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file excep

[04/15] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/commons/src/main/java/org/apache/tapestry5/services/InvalidationListener.java
--
diff --git 
a/commons/src/main/java/org/apache/tapestry5/services/InvalidationListener.java 
b/commons/src/main/java/org/apache/tapestry5/services/InvalidationListener.java
new file mode 100644
index 000..b9b4aa3
--- /dev/null
+++ 
b/commons/src/main/java/org/apache/tapestry5/services/InvalidationListener.java
@@ -0,0 +1,33 @@
+// Copyright 2006, 2007, 2012 The Apache Software Foundation
+//
+// 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.apache.tapestry5.services;
+
+/**
+ * Interface for objects that may cache information that can be invalidated. 
Invalidation occurs when external files,
+ * from which in-memory data is cached, is determined to have changed. 
Granularity is very limited; when any external
+ * file is found to have changed, the event is fired (with the expectation 
that the cleared cache will be repopulated as
+ * necessary).
+ *
+ * @see org.apache.tapestry5.services.InvalidationEventHub
+ * @since 5.1.0.0
+ * @deprecated In 5.4; use {@link 
InvalidationEventHub#addInvalidationCallback(Runnable)} instead
+ */
+public interface InvalidationListener
+{
+/**
+ * Invoked to indicate that some object is invalid. The receiver should 
clear its cache.
+ */
+void objectWasInvalidated();
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/settings.gradle
--
diff --git a/settings.gradle b/settings.gradle
index 639..593c3a4 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -4,5 +4,5 @@ include "tapestry-beanvalidator", "tapestry-jpa", 
"tapestry-kaptcha"
 include "tapestry-javadoc", "quickstart", "tapestry-clojure", 
"tapestry-mongodb"
 include "tapestry-test-data", 'tapestry-internal-test', "tapestry-ioc-junit"
 include "tapestry-webresources", "tapestry-runner", "tapestry-test-constants"
-include "tapestry-ioc-jcache"
+include "tapestry-ioc-jcache", "beanmodel", "commons"
 // include "tapestry-cdi"

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/tapestry-core/build.gradle
--
diff --git a/tapestry-core/build.gradle b/tapestry-core/build.gradle
index c16cd48..584200a 100644
--- a/tapestry-core/build.gradle
+++ b/tapestry-core/build.gradle
@@ -18,6 +18,7 @@ configurations {
 dependencies {
 compile project(':tapestry-ioc')
 compile project(':tapestry-json')
+compile project(':beanmodel')
 
 provided project(":tapestry-test")
 provided project(":tapestry-test-constants")
@@ -26,11 +27,6 @@ dependencies {
 
 compile "commons-codec:commons-codec:1.5"
 
-// Transitive will bring in the unwanted string template library as well
-compile "org.antlr:antlr-runtime:3.5.2", {
-exclude group: "org.antlr", module: "stringtemplate"
-}
-
 // Antlr3 tool path used with the antlr3 task
 antlr3 "org.antlr:antlr:3.5.2"
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/tapestry-core/src/main/java/org/apache/tapestry5/PropertyConduit.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/PropertyConduit.java 
b/tapestry-core/src/main/java/org/apache/tapestry5/PropertyConduit.java
deleted file mode 100644
index 3dbb0c0..000
--- a/tapestry-core/src/main/java/org/apache/tapestry5/PropertyConduit.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2007 The Apache Software Foundation
-//
-// 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.apache.tapestry5;
-
-import org.apache.tapestry5.ioc.AnnotationProvider;
-
-/**
- * Used to read or update the value associated with a property. A 
PropertyConduit provides access to the annotat

[10/15] tapestry-5 git commit: Third pass creating the BeanModel and Commons packages.

2014-12-06 Thread thiagohp
Third pass creating the BeanModel and Commons packages.


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/dd958465
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/dd958465
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/dd958465

Branch: refs/heads/beanmodel-split
Commit: dd9584659823c87f014a1cf57c7be592eedfa4c6
Parents: c9e97d6
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 17:33:54 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 17:33:54 2014 -0200

--
 .../tapestry5/internal/BeanModelUtils.java  | 145 
 .../internal/InternalBeanModelUtils.java| 145 
 .../internal/beaneditor/BeanModelUtils.java | 120 ++
 .../internal/beaneditor/PropertyModelImpl.java  |   6 +-
 .../internal/services/BeanModelSourceImpl.java  | 222 +++
 .../services/PropertyConduitSourceImpl.java |   4 +-
 .../tapestry5/services/DataTypeAnalyzer.java|  48 
 .../internal/TapestryInternalUtils.java |   8 +-
 .../internal/beaneditor/BeanModelUtils.java | 119 --
 .../internal/services/BeanModelSourceImpl.java  | 222 ---
 .../tapestry5/services/DataTypeAnalyzer.java|  48 
 .../annotations/UsesMappedConfiguration.java|  41 
 .../annotations/UsesOrderedConfiguration.java   |  33 ---
 .../ioc/internal/util/InternalUtils.java|   6 +-
 .../annotations/UsesMappedConfiguration.java|  41 
 .../annotations/UsesOrderedConfiguration.java   |  33 +++
 16 files changed, 621 insertions(+), 620 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/dd958465/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
--
diff --git 
a/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java 
b/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
deleted file mode 100644
index 08cb88a..000
--- a/beanmodel/src/main/java/org/apache/tapestry5/internal/BeanModelUtils.java
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright 2007, 2008 The Apache Software Foundation
-//
-// 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.apache.tapestry5.internal;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.regex.Pattern;
-
-import org.apache.tapestry5.ioc.AnnotationProvider;
-import org.apache.tapestry5.ioc.Messages;
-import org.apache.tapestry5.ioc.internal.NullAnnotationProvider;
-import org.apache.tapestry5.ioc.internal.util.InternalStringUtils;
-
-/**
- * Some methods broken off tapestry-core's InternalUtils to avoid bringing the 
whole class
- * plus its multiple dependencies to the BeanModel package.
- */
-public class BeanModelUtils {
-   
-   public static final Pattern NON_WORD_PATTERN = 
Pattern.compile("[^\\w]");
-   
-   /**
-* @since 5.3
-*/
-   private final static AnnotationProvider NULL_ANNOTATION_PROVIDER = new 
NullAnnotationProvider();
-
-   
-/**
- * Used to convert a property expression into a key that can be used to 
locate various resources (Blocks, messages,
- * etc.). Strips out any punctuation characters, leaving just words 
characters (letters, number and the
- * underscore).
- *
- * @param expression a property expression
- * @return the expression with punctuation removed
- */
-public static String extractIdFromPropertyExpression(String expression)
-{
-return replace(expression, NON_WORD_PATTERN, "");
-}
-
-public static String replace(String input, Pattern pattern, String 
replacement)
-{
-return pattern.matcher(input).replaceAll(replacement);
-}
-
-/**
- * Looks for a label within the messages based on the id. If found, it is 
used, otherwise the name is converted to a
- * user presentable form.
- */
-public static String defaultLabel(String id, Messages messages, String 
propertyExpression)
-{
-String key = id + "-label";
-
-if (messages.contains(key))
-return messages.get(key);
-
-return 
toUserPresentable(extractIdFromPropertyExpression(InternalStringUtils.las

[07/15] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
First pass creating the BeanModel and Commons packages. Lots of stuff moved 
around, but no actual code changes so far


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/f963c7ab
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/f963c7ab
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/f963c7ab

Branch: refs/heads/beanmodel-split
Commit: f963c7ab7ebaf1b4b0349c9875a5490a85d75dd0
Parents: 09a011c
Author: Thiago H. de Paula Figueiredo 
Authored: Sat Dec 6 15:16:02 2014 -0200
Committer: Thiago H. de Paula Figueiredo 
Committed: Sat Dec 6 15:16:02 2014 -0200

--
 beanmodel/build.gradle  |   27 +
 .../org/apache/tapestry5/PropertyConduit.java   |   45 +
 .../org/apache/tapestry5/PropertyConduit2.java  |   40 +
 .../apache/tapestry5/beaneditor/BeanModel.java  |  169 ++
 .../tapestry5/beaneditor/PropertyModel.java |   97 ++
 .../internal/InternalPropertyConduit.java   |   37 +
 .../internal/beaneditor/BeanModelImpl.java  |  289 
 .../internal/beaneditor/PropertyModelImpl.java  |  139 ++
 .../CoercingPropertyConduitWrapper.java |   67 +
 .../services/PropertyConduitDelegate.java   |   53 +
 .../services/PropertyConduitSourceImpl.java | 1563 ++
 .../tapestry5/services/BeanModelSource.java |   70 +
 .../services/PropertyConduitSource.java |   41 +
 commons/build.gradle|   18 +
 .../tapestry5/internal/util/IntegerRange.java   |  125 ++
 .../tapestry5/internal/util/MultiKey.java   |   86 +
 .../tapestry5/ioc/AnnotationProvider.java   |   33 +
 .../org/apache/tapestry5/ioc/Locatable.java |   27 +
 .../java/org/apache/tapestry5/ioc/Location.java |   38 +
 .../apache/tapestry5/ioc/MessageFormatter.java  |   32 +
 .../java/org/apache/tapestry5/ioc/Messages.java |   61 +
 .../org/apache/tapestry5/ioc/ObjectLocator.java |  143 ++
 .../java/org/apache/tapestry5/ioc/Resource.java |  108 ++
 .../ioc/internal/NullAnnotationProvider.java|   35 +
 .../ioc/internal/util/CollectionFactory.java|  139 ++
 .../ioc/internal/util/GenericsUtils.java|  615 +++
 .../ioc/internal/util/TapestryException.java|   75 +
 .../ioc/services/ClassPropertyAdapter.java  |   79 +
 .../apache/tapestry5/ioc/services/Coercion.java |   31 +
 .../tapestry5/ioc/services/CoercionTuple.java   |  145 ++
 .../tapestry5/ioc/services/PropertyAccess.java  |   77 +
 .../tapestry5/ioc/services/PropertyAdapter.java |  121 ++
 .../tapestry5/ioc/services/TypeCoercer.java |   88 +
 .../tapestry5/ioc/util/AvailableValues.java |   87 +
 .../tapestry5/ioc/util/CaseInsensitiveMap.java  |  499 ++
 .../tapestry5/ioc/util/ExceptionUtils.java  |  115 ++
 .../ioc/util/UnknownValueException.java |   47 +
 .../services/InvalidationEventHub.java  |   60 +
 .../services/InvalidationListener.java  |   33 +
 settings.gradle |2 +-
 tapestry-core/build.gradle  |6 +-
 .../org/apache/tapestry5/PropertyConduit.java   |   45 -
 .../org/apache/tapestry5/PropertyConduit2.java  |   40 -
 .../apache/tapestry5/beaneditor/BeanModel.java  |  169 --
 .../tapestry5/beaneditor/PropertyModel.java |   97 --
 .../internal/InternalPropertyConduit.java   |   37 -
 .../internal/beaneditor/BeanModelImpl.java  |  289 
 .../internal/beaneditor/PropertyModelImpl.java  |  139 --
 .../CoercingPropertyConduitWrapper.java |   67 -
 .../services/PropertyConduitDelegate.java   |   53 -
 .../services/PropertyConduitSourceImpl.java | 1563 --
 .../tapestry5/internal/util/IntegerRange.java   |  125 --
 .../tapestry5/internal/util/MultiKey.java   |   86 -
 .../tapestry5/services/BeanModelSource.java |   70 -
 .../tapestry5/services/ComponentClasses.java|   35 -
 .../tapestry5/services/ComponentLayer.java  |   37 -
 .../services/InvalidationEventHub.java  |   60 -
 .../services/InvalidationListener.java  |   33 -
 .../services/PropertyConduitSource.java |   41 -
 tapestry-ioc/build.gradle   |1 +
 .../tapestry5/ioc/AnnotationProvider.java   |   33 -
 .../org/apache/tapestry5/ioc/Locatable.java |   27 -
 .../java/org/apache/tapestry5/ioc/Location.java |   38 -
 .../apache/tapestry5/ioc/MessageFormatter.java  |   32 -
 .../java/org/apache/tapestry5/ioc/Messages.java |   61 -
 .../org/apache/tapestry5/ioc/ObjectLocator.java |  143 --
 .../java/org/apache/tapestry5/ioc/Resource.java |  108 --
 .../ioc/annotations/UsesConfiguration.java  |   34 -
 .../ioc/internal/NullAnnotationProvider.java|   35 -
 .../ioc/internal/util/CollectionFactory.java|  139 --
 .../ioc/internal/util/GenericsUtils.java|  615 ---
 .../ioc/internal/util/TapestryException.java|   75 -
 .../ioc/ser

[05/15] tapestry-5 git commit: First pass creating the BeanModel and Commons packages. Lots of stuff moved around, but no actual code changes so far

2014-12-06 Thread thiagohp
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/commons/src/main/java/org/apache/tapestry5/ioc/Resource.java
--
diff --git a/commons/src/main/java/org/apache/tapestry5/ioc/Resource.java 
b/commons/src/main/java/org/apache/tapestry5/ioc/Resource.java
new file mode 100644
index 000..b81c1c5
--- /dev/null
+++ b/commons/src/main/java/org/apache/tapestry5/ioc/Resource.java
@@ -0,0 +1,108 @@
+// 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.apache.tapestry5.ioc;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Locale;
+
+/**
+ * Represents a resource on the server that may be used for server side 
processing, or may be exposed to the client
+ * side. Generally, this represents an abstraction on top of files on the 
class path and files stored in the web
+ * application context.
+ * 
+ * Resources are often used as map keys; they should be immutable and should 
implement hashCode() and equals().
+ */
+public interface Resource
+{
+
+/**
+ * Returns true if the resource exists; if a stream to the content of the 
file may be opened. A resource exists
+ * if {@link #toURL()} returns a non-null value. Starting in release 
5.3.4, the result of this is cached.
+ * 
+ * Starting in 5.4, some "virtual resources", may return true even though 
{@link #toURL()} returns null.
+ *
+ * @return true if the resource exists, false if it does not
+ */
+boolean exists();
+
+
+/**
+ * Returns true if the resource is virtual, meaning this is no underlying 
file. Many operations are unsupported
+ * on virtual resources, including {@link #toURL()}, {@link 
#forLocale(java.util.Locale)},
+ * {@link #withExtension(String)}, {@link #getFile()}, {@link 
#getFolder()}, {@link #getPath()}}; these
+ * operations will throw an {@link 
java.lang.UnsupportedOperationException}.
+ *
+ * @since 5.4
+ */
+boolean isVirtual();
+
+/**
+ * Opens a stream to the content of the resource, or returns null if the 
resource does not exist. The native
+ * input stream supplied by the resource is wrapped in a {@link 
java.io.BufferedInputStream}.
+ *
+ * @return an open, buffered stream to the content, if available
+ */
+InputStream openStream() throws IOException;
+
+/**
+ * Returns the URL for the resource, or null if it does not exist. This 
value is lazily computed; starting in 5.3.4, subclasses may cache
+ * the result.  Starting in 5.4, some "virtual resources" may return null.
+ */
+URL toURL();
+
+/**
+ * Returns a localized version of the resource. May return null if no such 
resource exists. Starting in release
+ * 5.3.4, the result of this method is cached internally.
+ */
+Resource forLocale(Locale locale);
+
+/**
+ * Returns a Resource based on a relative path, relative to the folder 
containing the resource. Understands the "."
+ * (current folder) and ".." (parent folder) conventions, and treats 
multiple sequential slashes as a single slash.
+ * 
+ * Virtual resources (resources fabricated at runtime) return themselves.
+ */
+Resource forFile(String relativePath);
+
+/**
+ * Returns a new Resource with the extension changed (or, if the resource 
does not have an extension, the extension
+ * is added). The new Resource may not exist (that is, {@link #toURL()} 
may return null.
+ *
+ * @param extension
+ * to apply to the resource, such as "html" or "properties"
+ * @return the new resource
+ */
+Resource withExtension(String extension);
+
+/**
+ * Returns the portion of the path up to the last forward slash; this is 
the directory or folder portion of the
+ * Resource.
+ */
+String getFolder();
+
+/**
+ * Returns the file portion of the Resource path, everything that follows 
the final forward slash.
+ * 
+ * Starting in 5.4, certain kinds of "virtual resources" may return null 
here.
+ */
+String getFile();
+
+/**
+ * Return the path (the combination of folder and file).
+ * 
+ * Starting in 5.4, certain "virtual resources", may return an arbitrary 
value here.
+ */
+String getPath();
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/f963c7ab/commons/src/main/java/org/apache/tapestry5/ioc/internal/NullA