docs: public void copyResourceToProject(CmsRequestContext context, CmsResource resource)
      throws CmsException, CmsRoleViolationException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              checkOfflineProject(dbc);
              checkManagerOfProjectRole(dbc, context.getCurrentProject());
  
              m_driverManager.copyResourceToProject(dbc, resource);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(
                      Messages.ERR_COPY_RESOURCE_TO_PROJECT_2,
                      context.getSitePath(resource),
                      context.getCurrentProject().getName()),
                  e);
          } finally {
              dbc.clear();
          }
      }