<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Am 04.05.2015 um 10:22 schrieb
Christoph Kukulies:<br>
</div>
<blockquote cite="mid:55472C5E.2040601@physik.rwth-aachen.de"
type="cite">In the Intranet-site I have some modules that are
different from the outside (Internet) site ,
<br>
mainly in the way that the Email sender/recipient of the contact
form are different.
<br>
<br>
To prevent the danger of overwriting the outside site
inadvertently I would like to exclude
<br>
these modules from being exported.
<br>
<br>
Or would there be a way of "wiring" these adresses in
opencms-system.xml
<br>
and use them as properties symbolically in the JSP-code? I would
opt for that if it's possible.
<br>
Can I put extra properties in opencms-system.xml? Or what would be
the best strategy?
<br>
<br>
</blockquote>
1) You could update the module with the new Parameters. <br>
2) Export the module<br>
3) Setting back the old parameters and update the module again.<br>
<br>
An ugly workaround but I think it would work.<br>
<br>
<span class="pl-smi">CmsModule</span> module <span class="pl-k">=</span>
<span class="pl-smi">OpenCms</span><span class="pl-k">.</span>getModuleManager()<span
class="pl-k">.</span>getModule(moduleName);<br>
<code>java.util.SortedMap<java.lang.String,java.lang.String></code>
old_parameters <code><strong><a
href="http://documentation.opencms.org/javadoc/core/org/opencms/module/CmsModule.html#getParameters%28%29">=
module.getParameters</a></strong>()</code><br>
<br>
//update the module with the new parameters<br>
module.<code><strong><a
href="http://documentation.opencms.org/javadoc/core/org/opencms/module/CmsModule.html#setParameters%28java.util.SortedMap%29">setParameters</a></strong>(newParameters)<br>
OpenCms.getModuleManager().updateModule(m_cms, module);</code><code><br>
//export module<br>
CmsModuleImportExportHandler moduleExportHandler = new
CmsModuleImportExportHandler();<br>
moduleExportHandler.setFileName(filename);<br>
moduleExportHandler.setAdditionalResources(resources);<br>
moduleExportHandler.setModuleName(module.getName());<br>
moduleExportHandler.setDescription("description");<br>
<br>
OpenCms.getImportExportManager().exportData(<br>
m_cms,<br>
moduleExportHandler,<br>
new
CmsShellReport(m_cms.getRequestContext().getLocale()));<br>
<br>
//set back the parameters and update the module<br>
module.<code><strong><a
href="http://documentation.opencms.org/javadoc/core/org/opencms/module/CmsModule.html#setParameters%28java.util.SortedMap%29">setParameters</a></strong>(oldParameters)</code></code><br>
<code><code><code>OpenCms.getModuleManager().updateModule(m_cms,
module);</code><code><br>
</code></code></code>
</body>
</html>