jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-285) Split CommitEditor into CommitEditor and Validator interfaces
Date Tue, 28 Aug 2012 15:51:09 GMT

    [ https://issues.apache.org/jira/browse/OAK-285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443230#comment-13443230
] 

Jukka Zitting commented on OAK-285:
-----------------------------------

bq. But it buries validating somewhat which uses to confuse people.

Fair point. How about renaming {{CommitEditor}} to a more generic {{CommitHook}} instead?
Then editors and validators could all just be different kinds of commit hooks.

bq. Also it does not guarantee that validating happens only when editing is done.

That's easy to control by managing the order of editors in a {{CompositeEditor}} instance.
Note also that we may well want to execute some validators in between specific editors. For
example, auto-created properties need to be added before node type validation is performed,
but other changes like indexing can well be postponed to after validation to reduce the amount
of work than an invalid commit triggers.
                
> Split CommitEditor into CommitEditor and Validator interfaces
> -------------------------------------------------------------
>
>                 Key: OAK-285
>                 URL: https://issues.apache.org/jira/browse/OAK-285
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Michael Dürig
>
> Having {{ValidatingEditor}} extend {{CommitEditor}} is a constant source of confusion
since the former does not edit at all. Since it also makes sense to run validation only after
all editing has taken place, I suggest to introduce a new interface {{CommitValidator}} which
covers the validating aspect of a commit. Alternatively, we could of course also re-use the
{{Observer}} interface here. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message