[dna-issues] [JBoss JIRA] Updated: (DNA-302) Make JcrNodeTypeManager not dependent on JcrSession

Brian Carothers (JIRA) jira-events at lists.jboss.org
Fri Mar 20 12:23:22 EDT 2009


     [ https://jira.jboss.org/jira/browse/DNA-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Carothers updated DNA-302:
--------------------------------

    Attachment: DNA-302.patch


Added patch to split JcrNodeTypeManager into repository-scoped functionality (RepositoryNodeTypeManager) and session-scoped functionality (JcrNodeTypeManager) with the key difference being that the session-scoped node type manager is able to translate names based on transient namespace remappings.

The RepositoryNodeTypeManager is the maintainer of node type information for the entire repository at run-time. The
repository manager maintains a list of all node types and the ability to retrieve node types by Name. 

The JCR 1.0 and 2.0 specifications both require that node type information be shared across all sessions within a 
repository and that the javax.jcr.NodeTypeManager perform operations based on the string versions of Names based 
on the permanent (workspace-scoped) and transient (session-scoped) namespace mappings. DNA achieves this by 
maintaining a single master repository of all node type information (the RepositoryNodeTypeManager) and per-session 
wrappers (JcrNodeTypeManager) for this master repository that perform String to Name translation based on the
javax.jcr.Session's transient mappings and then delegating node type lookups to the repository manager.

Also removed JcrSession references from all the type-related objects and replaced them with ExecutionContexts.

> Make JcrNodeTypeManager not dependent on JcrSession
> ---------------------------------------------------
>
>                 Key: DNA-302
>                 URL: https://jira.jboss.org/jira/browse/DNA-302
>             Project: DNA
>          Issue Type: Sub-task
>          Components: API, JCR
>    Affects Versions: 0.3
>            Reporter: Randall Hauch
>             Fix For: 0.5
>
>         Attachments: DNA-302.patch
>
>
> The JcrNodeTypeManager should not be dependent upon a JcrSession instance.  Most of the methods (including those in JcrNodeType, JcrNodeDefinition, and JcrPropertyDefinition) only need an ExecutionContext.  JcrNodeDefinition.getDefaultPrimaryType() seems to depend upon the NodeTypeManager to dynamically look up a type (there may be others).  This main mean that the JcrNodeTypeManager needs a method to allow adding types from a JcrNodeTypeSource (rather than a JcrNodeTypeSource be passed into the constructor).

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

        



More information about the dna-issues mailing list