The full name: info.magnolia.module.data.setup.RegisterNodeTypeTask.RegisterNodeTypeTask(String) I just realize, it comes with the data module, but its not bound to use it only for the nodeTypes of the data Module.
Christian On Apr 21, 2011, at 4:11 PM, JAKABFI Attila wrote: > > Witch module / (version) does NodeTypeRegistrationTask belong to? > I didn't find it. > > I'll try creating a task with the logic mentioned below, and get back with > the result. > > Attila > > -----Original Message----- > From: user-list-ow...@magnolia-cms.com > [mailto:user-list-ow...@magnolia-cms.com] On Behalf Of Jan Haderka > Sent: 2011. április 21. 8:01 > To: Magnolia User-List > Subject: Re: [magnolia-user] Custom node types > > > Have a look at NodeTypeRegistrationTask you can use this task directly or do > something similar to what it does. To use the task you have override > getBasicInstallTasks() in your version handler and put this task at the > beginning of the list returned by the super call. This way your type will be > registered before bootstrapping. > > HTH, > Jan > > On Apr 20, 2011, at 9:49 AM, JAKABFI Attila wrote: > >> >> Hi >> I would like to use custom node types. I register them as follows: >> >> //module cunstructor >> public MyModule() { >> init(); >> } >> >> public static void init() { >> log.info("Starting module init"); >> Provider provider = >> ContentRepository.getRepositoryProvider(WORKSPACE); >> try { >> provider.registerNamespace(PREFIX, NAMESPACE, >> MgnlContext.getHierarchyManager(WORKSPACE).getWorkspace()); >> provider.registerNodeTypes(NODES_PATH); //xml >> containing the node types >> } catch (RepositoryException e) { >> log.error("Could not load node types: " + e.getClass() >> + " "+ e.getMessage()); >> } >> log.info("Finished module init"); >> } >> >> The problem is that I can't bootstrap content that uses these node types. I >> suppose that the bootstrapping happens before the node types are imported. >> >> Where do I have to put this code so I could bootstrap content? >> >> Thanks >> Attila >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com> >> ---------------------------------------------------------------- > > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com> > ---------------------------------------------------------------- > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com> > ---------------------------------------------------------------- Best regards, Christian Ringele Magnolia International Ltd. Register now for Magnolia Conference 2011: http://www.magnolia-cms.com/conference Magnolia® - Simple Open Source Content Management ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <user-list-unsubscr...@magnolia-cms.com> ----------------------------------------------------------------