[
https://issues.apache.org/jira/browse/SLING-4138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14214827#comment-14214827
]
ASF GitHub Bot commented on SLING-4138:
---------------------------------------
GitHub user kwin opened a pull request:
https://github.com/apache/sling/pull/39
SLING-4138, refactor Validator interface
refactor Validator interface to support
- acting on arbitrary data types (not only String)
- cross-checks for multiple properties
- array validation
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kwin/sling SLING-4138-generics
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/39.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #39
----
commit 283b3ba8ae8d4de42dfe5ab08334b42b6aeb21a7
Author: Konrad Windszus <[email protected]>
Date: 2014-11-07T10:33:58Z
SLING-4138, refactor Validator interface
commit d0c83bec45a4ed0e14a8f66a66d3fd2feb5de335
Author: Konrad Windszus <[email protected]>
Date: 2014-11-13T17:35:30Z
remove any trails of generics
commit 3fe9c82ba12fce858561d10a6d99013ddcf6e8f2
Author: Konrad Windszus <[email protected]>
Date: 2014-11-14T16:55:22Z
SLING-4138, add ValidatorTypeUtil to determine type parameter from given
implementation
commit 45314d70c4474d5590c1bd85a44e7b7439ecf13e
Author: Konrad Windszus <[email protected]>
Date: 2014-11-14T18:24:41Z
SLING-4138, refactor test cases, make validator test cases run again
after refactoring
commit 77d9c2fcefd9d3ae833e710fcfddbd213fc65a19
Author: Konrad Windszus <[email protected]>
Date: 2014-11-17T14:44:24Z
SLING-4138, remove type check, additional tests
commit c8000f88ceff502930c81cf75cdb07bbd930a121
Author: Konrad Windszus <[email protected]>
Date: 2014-11-17T16:32:54Z
add test for multivalue properties
----
> Allow validator to support arbitrary types
> ------------------------------------------
>
> Key: SLING-4138
> URL: https://issues.apache.org/jira/browse/SLING-4138
> Project: Sling
> Issue Type: Improvement
> Components: Validation
> Reporter: Konrad Windszus
> Fix For: Validation 1.0.0
>
>
> Currently the {{Validator.validate}} method only act on String values.
> Since type conversion is already built into the ValueMap, it would be good to
> leverage that and to allow Validator to act on arbitrary types there!
> Also the type conversion from ValueMap should be leveraged to do the type
> check in {{ValidationServiceImpl.validatePropertyValue}} rather than
> implementing a new thing in {{Type.isValid()}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)