code: public CmsResource createResource() throws CmsException {
  
          String path = OpenCms.getResourceManager().getNameGenerator().getNewFileName(
              m_cms,
              m_pathWithPattern,
              5,
              m_explorerNameGeneration);
          Locale contentLocale = OpenCms.getLocaleManager().getDefaultLocale(m_cms, CmsResource.getFolderPath(path));
          CmsRequestContext context = m_cms.getRequestContext();
          if (m_modelResource != null) {
              context.setAttribute(CmsRequestContext.ATTRIBUTE_MODEL, m_modelResource.getRootPath());
          }
          context.setAttribute(CmsRequestContext.ATTRIBUTE_NEW_RESOURCE_LOCALE, contentLocale);
          CmsResource res = m_cms.createResource(
              path,
              OpenCms.getResourceManager().getResourceType(m_type),
              null,
              new ArrayList<CmsProperty>());
          if (m_propChanges != null) {
              CmsPropertyEditorHelper helper = new CmsPropertyEditorHelper(m_cms);
              helper.overrideStructureId(res.getStructureId());
              helper.saveProperties(m_propChanges);
          }
          // Path or other metadata may have changed
          m_createdResource = m_cms.readResource(res.getStructureId(), CmsResourceFilter.IGNORE_EXPIRATION);
          try {
              m_cms.unlockResource(m_createdResource);
          } catch (CmsException e) {
              LOG.info(e.getLocalizedMessage(), e);
          }
          for (I_Callback callback : m_callbacks) {
              callback.onResourceCreated(this);
          }
          return m_createdResource;
      }
docs: Triggers the resource creation.<p>
  
  @return the created resource
  
  @throws CmsException if something goes wrong