code: public int countLockedResources(CmsRequestContext context, CmsUUID id)
      throws CmsException, CmsRoleViolationException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          CmsProject project = null;
          int result = 0;
          try {
              project = m_driverManager.readProject(dbc, id);
              checkManagerOfProjectRole(dbc, project);
              result = m_driverManager.countLockedResources(project);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(
                      Messages.ERR_COUNT_LOCKED_RESOURCES_PROJECT_2,
                      (project == null) ? "<failed to read>" : project.getName(),
                      id),
                  e);
          } finally {
              dbc.clear();
          }
          return result;
      }
docs: Counts the locked resources in this project.<p>
  
  @param context the current request context
  @param id the id of the project
  
  @return the amount of locked resources in this project
  
  @throws CmsException if something goes wrong
  @throws CmsRoleViolationException if the current user does not have management access to the project