Details
-
Bug
-
Resolution: Duplicate
-
Major
-
3.0 RC2
-
None
-
None
-
linux
Description
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)
} 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.
Checklists
Attachments
Issue Links
- is related to
-
MAGNOLIA-1348 add CND and namespace support to Provider/Modules
-
- Closed
-