[
https://issues.apache.org/jira/browse/OAK-7510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16498145#comment-16498145
]
Alex Deparvu commented on OAK-7510:
-----------------------------------
bq. So, either it's built-in hardwired and mandatory or it's at least in theory
pluggable and then it must not be mandatory.
I agree with the idea that it doesn't need to be mandatory. if this is a simple
change then by all means, let's go for it.
Last update, final round of tests revealed some more issues
* the namespace validator doesn't use the transient namespaces as defined
within the current transaction. this is not possible to reproduce on jcr layer,
but on oak you can use a repository initializer to add content referencing a
namespace installed in the same transaction (on the same builder basically). I
don't see an easy way around this yet, I added a patch that partially solves
this (a fallback in case the namespace is not found), but it might not cover
all cases. remaining work is to identify the usecase for the rep:namespaces
'rep:prefixes' property.
Now that testing is complete and it finally works, I think I will try to break
the patch apart into smaller independent chunks for validation and feedback.
> Run repository initializers with hooks
> --------------------------------------
>
> Key: OAK-7510
> URL: https://issues.apache.org/jira/browse/OAK-7510
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Alex Deparvu
> Assignee: Alex Deparvu
> Priority: Major
> Labels: modularization
>
> Currently the repository initializers (RepositoryInitializer and
> WorkspaceInitializer) run when the repo boots without any hooks [0] which
> means that current RepositoryInitializers need to setup custom Roots (roots
> with hardcoded editor providers like NamespaceEditorProvider and
> TypeEditorProvider) on top of the provided builders to be able to setup
> properly. I'm looking at the InitialContent [1] and the CugConfiguration [2]
> in the context of installing node types.
> I would like to look into removing the hardcoded providers and trying to run
> all existing editors over the content produced by the initializers.
> As an added benefit this will allow decoupling of hard dependencies between
> components (see for example OAK-7499)
> [0]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java#L687
>
> [1]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/InitialContent.java#L134
> [2]
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-authorization-cug/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/cug/impl/CugConfiguration.java#L162
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)