docs: protected void checkPermissions(
          CmsRequestContext context,
          CmsResource resource,
          CmsPermissionSet requiredPermissions,
          I_CmsPermissionHandler.CmsPermissionCheckResult permissions)
      throws CmsSecurityException, CmsLockException, CmsVfsResourceNotFoundException {
  
          if (permissions == I_CmsPermissionHandler.PERM_FILTERED) {
              throw new CmsVfsResourceNotFoundException(
                  Messages.get().container(Messages.ERR_PERM_FILTERED_1, context.getSitePath(resource)));
          }
          if (permissions == I_CmsPermissionHandler.PERM_DENIED) {
              throw new CmsPermissionViolationException(
                  Messages.get().container(
                      Messages.ERR_PERM_DENIED_2,
                      context.getSitePath(resource),
                      requiredPermissions.getPermissionString()));
          }
          if (permissions == I_CmsPermissionHandler.PERM_NOTLOCKED) {
              throw new CmsLockException(
                  Messages.get().container(
                      Messages.ERR_PERM_NOTLOCKED_2,
                      context.getSitePath(resource),
                      context.getCurrentUser().getName()));
          }
      }