On Fri, Jan 27, 2012 at 11:30 AM, Jukka Zitting <jukka.zitt...@gmail.com> wrote:
> Hi,
>
> On Fri, Jan 27, 2012 at 10:35 AM, Berry van Halderen
> <b.vanhalde...@1hippo.com> wrote:
>> I've fixed this in our own code, but still I'm a bit worried about this 
>> change
>> of behavior It used to be impossible to unregister a node type when it
>> was still in use (or at least never to unregister a node type).  Not being
>> able to unregister a node type when still in use seems to be the most
>> correct semantics.
>
> That should still be the case. The
> NodeTypeRegistry.unregisterNodeTypes() method calls the protected
> checkForReferencesInContent() method before actually removing the
> type. The default implementation of checkForReferencesInContent()
> simply throws a RepositoryException with a "not yet implemented"
> message, which in practice prevents any node types from being
> unregisted.
>
> Until a the checkForReferencesInContent() is properly implemented (see
> the javadoc for ideas on how to do that), it's possible for downstream
> projects or deployments to override the method in case they already
> have some other mechanism for guaranteeing that a node type can safely
> be removed. I suppose the repository you're using does override the
> method, but doesn't give such a strong guarantee of consistency.
>

doh! jukka beat me by a few seconds ;)

cheers
stefan

> BR,
>
> Jukka Zitting

Reply via email to