[ 
http://jira.magnolia-cms.com/browse/MAGNOLIA-999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grégory Joseph updated MAGNOLIA-999:
------------------------------------

    Fix Version/s: 3.1 M1

> custom namespaces
> -----------------
>
>                 Key: MAGNOLIA-999
>                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-999
>             Project: Magnolia
>          Issue Type: Bug
>    Affects Versions: 3.0 RC2
>         Environment: linux
>            Reporter: Chris Miner
>            Assignee: Philipp Bärfuss
>             Fix For: 3.1 M1
>
>
> I set up a module with custom node types and found that my node types 
> couldn't be registered because the name space prefix I used (also custom) was 
> not known to the underlying repository.  The exception is thrown from code 
> called in AbstractModule.registerRepositories(ModuleDefinition).  The problem 
> is that at the time registerRepositories is called from 
> AbstractModule.register(ModuleDefinition, Content, int), the module hasn't 
> had a chance to register the namespaces potentially used in the custom node 
> definitions.
> I wanted to fix this by overriding the register method, but it is final.  I 
> looked for another built in hook, and found I could only add code to my 
> Module Constructor.  I added:
> try {
>       HierarchyManager hierarchyManager = 
> ContentRepository.getHierarchyManager("luxoom", "luxoom");
>               if (hierarchyManager != null) {
>                       Workspace workspace = hierarchyManager.getWorkspace();
>                       
> ContentRepository.getRepositoryProvider("magnolia").registerNamespace("lxm", 
> "http://www.luxoom.com/jcr/lxm/1.0";, workspace);
>               }
>       } catch (RepositoryException e) {
>               // TODO Auto-generated catch block
>               e.printStackTrace();
> }
> registerRepositories itself would be another place to override the 
> functionality but that is protected.  While looking at the register code, I 
> also thought it strange that bootstrapping (a step which may involve the 
> newly defined data types) is done after the repositories are registered.

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



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to