Extending behaviours
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2011 06:48 AM
I need to extend the SectionType behaviour of WCMQS and would like to know what the best approach would be. Instead of changing and re-packaging the WQS module itself I would like to extend it through my own module. This would allow me to have all the necessary changes combined with all my other additions in one package. Updating the core WQS module would also be much easier this way.
So I would have my own implementation of SectionType.java that extends the original class. But how do I register this new behaviour in a way that tells Alfresco not to use the original one? If I just overwrite the wcmquickstartmodule_sectionType bean, how can I tell Alfresco that this bean from my own module overwrites the bean from the WQS module and not the other way round? Can I somehow affect in which order the modules are loaded and therefore make sure that the bean definition from my module is picked up after the one from the WQS module?
So I would have my own implementation of SectionType.java that extends the original class. But how do I register this new behaviour in a way that tells Alfresco not to use the original one? If I just overwrite the wcmquickstartmodule_sectionType bean, how can I tell Alfresco that this bean from my own module overwrites the bean from the WQS module and not the other way round? Can I somehow affect in which order the modules are loaded and therefore make sure that the bean definition from my module is picked up after the one from the WQS module?
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2011 07:01 AM
If you take a look at the "module-context.xml" file that's embedded in the WQS module you should see at the very end of it this line:
If you place any bean definitions into the file referenced by that line then they will definitely take precedence over the ones shipped in the module itself (Spring uses the last definition it comes across).
Out of interest, what are you adding/changing in the SectionType behaviours?
<import resource="classpath*:alfresco/extension/webquickstart-custom-context.xml" />
If you place any bean definitions into the file referenced by that line then they will definitely take precedence over the ones shipped in the module itself (Spring uses the last definition it comes across).
Out of interest, what are you adding/changing in the SectionType behaviours?
