code: public void setName(String name) throws CmsIllegalArgumentException {
  
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(name)) {
              throw new CmsIllegalArgumentException(
                  Messages.get().container(Messages.ERR_INDEXSOURCE_CREATE_MISSING_NAME_0));
          }
          // already used? Don't test this at xml-configuration time (no manager)
          if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_2_INITIALIZING) {
              CmsSearchManager mngr = OpenCms.getSearchManager();
              // don't test this if the indexsource is not new (widget invokes setName even if it was not changed)
              if (mngr.getIndexSource(name) != this) {
                  if (mngr.getSearchIndexSources().keySet().contains(name)) {
                      throw new CmsIllegalArgumentException(
                          Messages.get().container(Messages.ERR_INDEXSOURCE_CREATE_INVALID_NAME_1, name));
                  }
              }
          }
          m_name = name;
      }
docs: Sets the logical key/name of this search index source.<p>
  
  @param name the logical key/name of this search index source
  
  @throws CmsIllegalArgumentException if argument name is null, an empty or whitespace-only Strings
  or already used for another indexsource's name.