code: public void saveAliases(CmsDbContext dbc, CmsProject project, CmsUUID structureId, List<CmsAlias> aliases)
      throws CmsException {
  
          for (CmsAlias alias : aliases) {
              if (!structureId.equals(alias.getStructureId())) {
                  throw new IllegalArgumentException("Aliases to replace must have the same structure id!");
              }
          }
          I_CmsVfsDriver vfsDriver = getVfsDriver(dbc);
          vfsDriver.deleteAliases(dbc, project, new CmsAliasFilter(null, null, structureId));
          for (CmsAlias alias : aliases) {
              String aliasPath = alias.getAliasPath();
              if (CmsAlias.ALIAS_PATTERN.matcher(aliasPath).matches()) {
                  vfsDriver.insertAlias(dbc, project, alias);
              } else {
                  LOG.error("Invalid alias path: " + aliasPath);
              }
          }
      }
docs: Saves a list of aliases for the same structure id, replacing any aliases for the same structure id.<p>
  
  @param dbc the current database context
  @param project the current project
  @param structureId the structure id for which the aliases should be saved
  @param aliases the list of aliases to save
  
  @throws CmsException if something goes wrong