docs: @SuppressWarnings("javadoc")
      public void chtype(CmsRequestContext context, CmsResource resource, int type)
      throws CmsException, CmsSecurityException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              checkOfflineProject(dbc);
              checkPermissions(dbc, resource, CmsPermissionSet.ACCESS_WRITE, true, CmsResourceFilter.ALL);
              if (CmsResourceTypeJsp.isJspTypeId(type)) {
                  // security check preventing the creation of a jsp file without permissions
                  checkRoleForResource(dbc, CmsRole.VFS_MANAGER, resource);
              }
              m_driverManager.chtype(dbc, resource, type);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(Messages.ERR_CHANGE_RESOURCE_TYPE_1, context.getSitePath(resource)),
                  e);
          } finally {
              dbc.clear();
          }
      }