public void setClientName(ClientCatalogItem item) throws SearchLibException, NamingException {
   if (item == null) return;
   Client client = ClientCatalog.getClient(item.getIndexName());
   if (client == null) return;
   setClient(client);
   selectedClientCatalogItem = item;
 }
 public Client getClient() {
   try {
     return ClientCatalog.getClient(indexName);
   } catch (SearchLibException e) {
     Logging.error(e);
     return null;
   }
 }
 public static final void openAll() {
   try {
     synchronized (ClientCatalog.class) {
       for (ClientCatalogItem catalogItem : getClientCatalog(null)) {
         Logging.info("OSS loads index " + catalogItem.getIndexName());
         getClient(catalogItem.getIndexName());
       }
     }
   } catch (SearchLibException e) {
     Logging.error(e);
   }
 }
  @Command
  public void onNewIndex()
      throws SearchLibException, InterruptedException, IOException, NamingException {
    String msg = null;
    if (indexName == null) msg = "Please enter a valid name for the new index";
    else if (indexName.length() == 0) msg = "Please enter a valid name for the new index";
    else if (ClientCatalog.exists(getLoggedUser(), indexName)) msg = "The name already exists";

    if (msg != null) {
      new AlertController(msg);
      return;
    }
    ClientCatalog.createIndex(getLoggedUser(), indexName, indexTemplate.getTemplate(), null);
    setClient(ClientCatalog.getClient(indexName));
  }