docs: protected Map<String, String> validateAliases(CmsUUID uuid, Map<String, String> aliasPaths) throws CmsException {
  
          Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
          Set<String> seenPaths = new HashSet<String>();
          Set<String> duplicatePaths = new HashSet<String>();
          for (String path : aliasPaths.values()) {
              if (seenPaths.contains(path)) {
                  duplicatePaths.add(path);
              }
              seenPaths.add(path);
          }
          Map<String, String> errorMessagesByPath = new HashMap<String, String>();
          for (String path : duplicatePaths) {
              errorMessagesByPath.put(path, Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_DUPLICATE_PATH_0));
          }
          seenPaths.removeAll(duplicatePaths);
  
          for (String path : seenPaths) {
              String pathError = checkValidAliasPath(path, locale);
              if (pathError != null) {
                  errorMessagesByPath.put(path, pathError);
              } else {
                  errorMessagesByPath.put(path, null);
                  if (m_cms.existsResource(path, CmsResourceFilter.ALL)) {
                      errorMessagesByPath.put(path, Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_IS_VFS_0));
                  } else {
                      List<CmsAlias> aliases = OpenCms.getAliasManager().getAliasesForPath(
                          m_cms,
                          m_cms.getRequestContext().getSiteRoot(),
                          path);
                      for (CmsAlias alias : aliases) {
                          CmsUUID otherStructureId = alias.getStructureId();
                          if (!otherStructureId.equals(uuid)) {
                              try {
                                  CmsResource resource = m_cms.readResource(otherStructureId, CmsResourceFilter.ALL);
                                  errorMessagesByPath.put(
                                      path,
                                      Messages.get().getBundle(locale).key(
                                          Messages.ERR_ALIAS_ALREADY_USED_1,
                                          resource.getRootPath()));
                                  break;
                              } catch (CmsVfsResourceNotFoundException e) {
                                  // this may happen if there are outdated entries in the database table
                                  errorMessagesByPath.put(
                                      path,
                                      Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_ALREADY_USED_UNKNOWN_0));
                                  break;
                              }
                          }
                      }
                  }
  
              }
          }
          Map<String, String> errorMessagesById = new HashMap<String, String>();
          for (String key : aliasPaths.keySet()) {
              String path = aliasPaths.get(key);
              if (errorMessagesByPath.containsKey(path)) {
                  String errorMessage = errorMessagesByPath.get(path);
                  errorMessagesById.put(key, errorMessage);
              }
          }
          return errorMessagesById;
      }