jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-433) NodeTypeRegistry could auto-subtype from nt:base
Date Mon, 03 Jul 2006 16:23:30 GMT
     [ http://issues.apache.org/jira/browse/JCR-433?page=all ]

Jukka Zitting updated JCR-433:
------------------------------

    Attachment: jackrabbit-ntd.r418787.patch

Attached an updated version (jackrabbit-ntd.r418787.patch) of the original NodeTypeDef patch.

This patch streamlines the internal storage of the specified supertypes and removes a number
of special cases that no longer apply (getSupertypes() never returns null, no need to explicitly
add nt:base if not specified).

Although this approach touches more code than just modifying the NodeTypeRegistry, this is
IMO much cleaner from a design perspective (no need to modify the NodeTypeDef once it's been
parsed, and better encapsulation of the default inheritance rule).

> NodeTypeRegistry could auto-subtype from nt:base
> ------------------------------------------------
>
>          Key: JCR-433
>          URL: http://issues.apache.org/jira/browse/JCR-433
>      Project: Jackrabbit
>         Type: Improvement

>   Components: nodetype
>     Versions: 1.0, 1.0.1, 0.9
>     Reporter: Tobias Bocanegra
>     Assignee: Jukka Zitting
>     Priority: Minor
>      Fix For: 1.1
>  Attachments: jackrabbit-ntd-r41844.patch, jackrabbit-ntd.r418787.patch, jackrabbit-ntr.r41878.patch
>
> when tying to register a (primary) nodetype that does not extend from nt:base the following
error is
> thrown:
> "all primary node types except nt:base itself must be (directly or indirectly) derived
from nt:base"
> since the registry is able to detect this error, it would be easy to auto-subtype all
nodetypes from nt:base. imo it's pointless to explzitely add the nt:base to every supperclass
set. as an analogy, you don't need to 'extend from java.lang.Object' explicitely - the compiler
does that automatically for your.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message