[
http://jira.magnolia-cms.com/browse/MAGNOLIA-3538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Grégory Joseph updated MAGNOLIA-3538:
-------------------------------------
Fix Version/s: 5.0
Description:
With MAGNOLIA-2569, I (temporarily) dropped support for the above properties.
This was essentially implement using the snippet below, and calls to
{{info.magnolia.module.ModuleManagerImpl#populateModuleInstance}} 1) before
starting the module up, and 2) in the EventListener attached to this module by
{{ModuleManagerImpl}}
If we need to revive support for this, we should consider using a specific
interface (or several), and/or annotations.
{code}
// Prepare properties for module instances; if the bean has
"moduleDefinition",
// "name", "moduleNode" or "configNode" properties, they will
be populated accordingly.
final Map<String, Object> moduleProperties = new
HashMap<String, Object>();
moduleProperties.put("moduleDefinition", moduleDefinition);
moduleProperties.put("name", moduleName);
if (modulesParentNode.hasContent(moduleName)) {
final Content moduleNode = new
SystemContentWrapper(modulesParentNode.getChildByName(moduleName));
moduleNodes.add(moduleNode);
moduleProperties.put("moduleNode", moduleNode);
if (moduleNode.hasContent("config")) {
final Content configNode = new
SystemContentWrapper(moduleNode.getContent("config"));
moduleProperties.put("configNode", configNode);
}
}
{code}
Component/s: core
modulemechanism
> Restore or drop support for module properties (name, moduleDefinition,
> moduleNode, configNode)
> ----------------------------------------------------------------------------------------------
>
> Key: MAGNOLIA-3538
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3538
> Project: Magnolia
> Issue Type: Sub-task
> Components: core, modulemechanism
> Reporter: Grégory Joseph
> Assignee: Grégory Joseph
> Fix For: 5.0
>
>
> With MAGNOLIA-2569, I (temporarily) dropped support for the above properties.
> This was essentially implement using the snippet below, and calls to
> {{info.magnolia.module.ModuleManagerImpl#populateModuleInstance}} 1) before
> starting the module up, and 2) in the EventListener attached to this module
> by {{ModuleManagerImpl}}
> If we need to revive support for this, we should consider using a specific
> interface (or several), and/or annotations.
> {code}
> // Prepare properties for module instances; if the bean has
> "moduleDefinition",
> // "name", "moduleNode" or "configNode" properties, they will
> be populated accordingly.
> final Map<String, Object> moduleProperties = new
> HashMap<String, Object>();
> moduleProperties.put("moduleDefinition", moduleDefinition);
> moduleProperties.put("name", moduleName);
> if (modulesParentNode.hasContent(moduleName)) {
> final Content moduleNode = new
> SystemContentWrapper(modulesParentNode.getChildByName(moduleName));
> moduleNodes.add(moduleNode);
> moduleProperties.put("moduleNode", moduleNode);
> if (moduleNode.hasContent("config")) {
> final Content configNode = new
> SystemContentWrapper(moduleNode.getContent("config"));
> moduleProperties.put("configNode", configNode);
> }
> }
> {code}
--
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]>
----------------------------------------------------------------