branch develop updated (a8217ee -> ff98713)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository eugene. See http://git.nuiton.org/eugene.git from a8217ee Add an generic information on an attribute (SimpleJavaBeanWithNoInterfaceTransformer only\!) (fixes #3760) new 16d34b5 Be able to detect complex tag value (See #3762) new ff98713 Be able to use complex tag value Merge branch 'feature/3762' into develop The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit ff98713e4c197d2fa2fd76a2fc40be02892d823e Merge: a8217ee 16d34b5 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Aug 21 16:14:59 2015 +0200 Be able to use complex tag value Merge branch 'feature/3762' into develop commit 16d34b50332d9758423002ef032866488fb7c122 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Aug 21 15:10:38 2015 +0200 Be able to detect complex tag value (See #3762) Summary of changes: .../nuiton/eugene/models/tagvalue/TagValues.java | 8 ++++---- .../eugene/models/tagvalue/TagValuesTest.java | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository eugene. See http://git.nuiton.org/eugene.git commit 16d34b50332d9758423002ef032866488fb7c122 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Aug 21 15:10:38 2015 +0200 Be able to detect complex tag value (See #3762) --- .../nuiton/eugene/models/tagvalue/TagValues.java | 8 ++++---- .../eugene/models/tagvalue/TagValuesTest.java | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/eugene/src/main/java/org/nuiton/eugene/models/tagvalue/TagValues.java b/eugene/src/main/java/org/nuiton/eugene/models/tagvalue/TagValues.java index dde2457..c64af9c 100644 --- a/eugene/src/main/java/org/nuiton/eugene/models/tagvalue/TagValues.java +++ b/eugene/src/main/java/org/nuiton/eugene/models/tagvalue/TagValues.java @@ -53,22 +53,22 @@ public class TagValues { * fr.isisfish.entities.Population.operation.getRegion.stereotype=... * fr.isisfish.entities.Population.operation.getRegion.tagvalue.pk=... */ - protected static final Pattern TAG_VALUE_PATTERN = Pattern - .compile("^((?:[_a-zA-Z0-9]+\\.)+(?:_?[A-Z][_a-zA-Z0-9]*\\.)+)(?:(class|attribute|operation))\\.(?:([_a-zA-Z0-9]+)\\.)?(?:(tagvalue|tagValue)?)\\.([_a-z0-9][_a-zA-Z0-9]*)?$"); + protected static final Pattern TAG_VALUE_PATTERN = + Pattern.compile("^((?:[_a-zA-Z0-9]+\\.)+(?:_?[A-Z][_a-zA-Z0-9]*\\.)+)(?:(class|attribute|operation))\\.(?:([_a-zA-Z0-9]+)\\.)?(?:(tagvalue|tagValue)?)\\.((?:[_a-zA-Z0-9]+)+(?:\\.?[_a-zA-Z0-9]+)*)?$"); /** * Pattern to define tag values authorized at model level in the model * properties file. */ protected static final Pattern MODEL_TAG_VALUE_PATTERN = Pattern.compile( - "^model\\.(?:(tagvalue|tagValue)?)\\.((?:.+))$"); + "^model\\.(?:(tagvalue|tagValue)?)\\.((?:[_a-zA-Z0-9]+)+(?:\\.?[_a-zA-Z0-9]+)*)$"); /** * Pattern to define tag values authorized at model level in the model * properties file. */ protected static final Pattern PACKAGE_TAG_VALUE_PATTERN = Pattern.compile( - "^package\\.((?:[_a-zA-Z0-9]+\\.)+)(?:(tagvalue|tagValue)?)\\.((?:.+))$"); + "^package\\.((?:[_a-zA-Z0-9]+\\.)+)(?:(tagvalue|tagValue)?)\\.((?:[_a-zA-Z0-9]+)+(?:\\.?[_a-zA-Z0-9]+)*)$"); public static Matcher getModelMatcher(String key) throws InvalidTagValueSyntaxException { Matcher matcher = MODEL_TAG_VALUE_PATTERN.matcher(key); diff --git a/eugene/src/test/java/org/nuiton/eugene/models/tagvalue/TagValuesTest.java b/eugene/src/test/java/org/nuiton/eugene/models/tagvalue/TagValuesTest.java index 300b958..c0a4b84 100644 --- a/eugene/src/test/java/org/nuiton/eugene/models/tagvalue/TagValuesTest.java +++ b/eugene/src/test/java/org/nuiton/eugene/models/tagvalue/TagValuesTest.java @@ -34,4 +34,28 @@ public class TagValuesTest { Assert.assertEquals(defaultValue, value); } + @Test + public void testGetModelMatcher() throws Exception { + TagValues.getModelMatcher("model.tagvalue.hibernateAttributeType"); + TagValues.getModelMatcher("model.tagValue.hibernateAttributeType"); + TagValues.getModelMatcher("model.tagValue.hibernateAttributeType.String"); + TagValues.getModelMatcher("model.tagValue.hibernateAttributeType.java.lang.String"); + } + + @Test + public void testPackageModelMatcher() throws Exception { + TagValues.getPackageMatcher("package.fr.ird.observe.tagvalue.hibernateAttributeType"); + TagValues.getPackageMatcher("package.fr.ird.observe.tagValue.hibernateAttributeType"); + TagValues.getPackageMatcher("package.fr.ird.observe.tagValue.hibernateAttributeType.String"); + TagValues.getPackageMatcher("package.fr.ird.observe.tagValue.hibernateAttributeType.java.lang.String"); + } + + @Test + public void testGetMatcher() throws Exception { + TagValues.getMatcher("fr.ird.observe.entities.CommentableEntity.attribute.comment.tagvalue.hibernateAttributeType"); + TagValues.getMatcher("fr.ird.observe.entities.CommentableEntity.attribute.comment.tagValue.hibernateAttributeType"); + TagValues.getMatcher("fr.ird.observe.entities.CommentableEntity.attribute.comment.tagValue.hibernateAttributeType.String"); + TagValues.getMatcher("fr.ird.observe.entities.CommentableEntity.attribute.comment.tagValue.hibernateAttributeType.java.lang.String"); + } + } -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository eugene. See http://git.nuiton.org/eugene.git commit ff98713e4c197d2fa2fd76a2fc40be02892d823e Merge: a8217ee 16d34b5 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Aug 21 16:14:59 2015 +0200 Be able to use complex tag value Merge branch 'feature/3762' into develop .../nuiton/eugene/models/tagvalue/TagValues.java | 8 ++++---- .../eugene/models/tagvalue/TagValuesTest.java | 24 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm