[ http://jira.magnolia.info/browse/MAGNOLIA-999?page=all ]
Philipp Bracher resolved MAGNOLIA-999.
--------------------------------------
Resolution: Duplicate
patches deliverd to the jira tasks mentioned before
> custom namespaces
> -----------------
>
> Key: MAGNOLIA-999
> URL: http://jira.magnolia.info/browse/MAGNOLIA-999
> Project: Magnolia
> Issue Type: Bug
> Affects Versions: 3.0 RC2
> Environment: linux
> Reporter: Chris Miner
> Assigned To: Philipp Bracher
> Fix For: 3.1
>
>
> 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.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------