code: public void setType(String typeName) {
  
          try {
              try {
                  m_resourceBuilder.setType(OpenCms.getResourceManager().getResourceType(typeName));
              } catch (@SuppressWarnings("unused") CmsLoaderException e) {
                  // TODO: what happens if the resource type is a specialized folder and is not configured??
                  try {
                      m_resourceBuilder.setType(
                          OpenCms.getResourceManager().getResourceType(CmsResourceTypePlain.getStaticTypeName()));
                  } catch (@SuppressWarnings("unused") CmsLoaderException e1) {
                      // this should really never happen
                      m_resourceBuilder.setType(
                          OpenCms.getResourceManager().getResourceType(CmsResourceTypePlain.getStaticTypeName()));
                  }
              }
              if (m_resourceBuilder.getType().isFolder()) {
                  // ensure folders end with a "/"
                  if (!CmsResource.isFolder(m_destination)) {
                      m_destination += "/";
                  }
              }
          } catch (Throwable e) {
              setThrowable(e);
          }
      }
docs: Sets the type.<p>
  
  @param typeName the type to set
  
  @see #N_TYPE
  @see #addResourceAttributesRules(Digester, String)