code: private void adjustModuleConfig() {
  
          Locale l = CmsLocaleManager.getLocale("en");
          try {
              CmsResource config = m_cms.readResource(m_config.getValue());
              CmsFile configFile = m_cms.readFile(config);
              CmsXmlContent xmlContent = CmsXmlContentFactory.unmarshal(m_cms, configFile);
              int number = xmlContent.getIndexCount(XMLPath.CONFIG_RESOURCETYPE, l) + 1;
              createParentXmlElements(
                  xmlContent,
                  XMLPath.CONFIG_RESOURCETYPE + XMLPath.num(number) + XMLPath.CONFIG_RESOURCETYPE_TYPENAME,
                  l);
              I_CmsXmlContentValue v = xmlContent.getValue(
                  XMLPath.CONFIG_RESOURCETYPE + XMLPath.num(number) + XMLPath.CONFIG_RESOURCETYPE_TYPENAME,
                  l);
              v.setStringValue(m_cms, m_typeShortName.getValue());
              v = xmlContent.addValue(
                  m_cms,
                  XMLPath.CONFIG_RESOURCETYPE + XMLPath.num(number) + XMLPath.CONFIG_RESOURCETYPE_NAMEPATTERN,
                  l,
                  CmsXmlUtils.getXpathIndexInt(
                      XMLPath.CONFIG_RESOURCETYPE + XMLPath.num(number) + XMLPath.CONFIG_RESOURCETYPE_NAMEPATTERN) - 1);
              v.setStringValue(m_cms, getNamePattern());
              configFile.setContents(xmlContent.marshal());
  
              CmsLockUtil.ensureLock(m_cms, configFile);
              m_cms.writeFile(configFile);
              CmsLockUtil.tryUnlock(m_cms, configFile);
          } catch (CmsException e) {
              LOG.error("Can't read module config resource", e);
          }
      }
docs: Adjustes module config.<p>