Package org.apache.oodt.cas.catalog.exception

Examples of org.apache.oodt.cas.catalog.exception.CatalogServiceException


            break;
          }
        }
      }catch (Exception e) {
        this.catalogs = backupCatalogs;
        throw new CatalogServiceException("Failed to serialize Catalog '" + catalogId + "' -- if CatalogService goes down, Catalog will have to be readded : " + e.getMessage(), e);
      }finally {
        this.catalogsLock.writeLock().unlock();
      }
    }
  }
View Full Code Here


  protected boolean containsCatalog(String catalogId) throws CatalogServiceException {
    this.catalogsLock.readLock().lock();
    try {
      return this.catalogs.contains(catalogId);
    }catch (Exception e) {
      throw new CatalogServiceException("Failed to check if catalog '" + catalogId + "' has already been added to this CatalogService : " + e.getMessage(), e);
    }finally {
      this.catalogsLock.readLock().unlock();
    }
  }
View Full Code Here

      this.catalogs.remove(catalog);
      this.catalogs.add(catalog);
      this.catalogRepository.serializeCatalog(catalog);
    }catch (Exception e) {
      this.catalogs = backupCatalogs;
      throw new CatalogServiceException("Failed to serialize Catalog '" + catalog + "' -- if CatalogService goes down, Catalog will have to be readded : " + e.getMessage(), e);
    }finally {
      this.catalogsLock.writeLock().unlock();
    }
  }
View Full Code Here

            rmCatalog = catalog;
            break;
          }
        }
      }catch (Exception e) {
        throw new CatalogServiceException("Failed to find catalog object for catalog URN '" + catalogId + "' : " + e.getMessage(), e);
      }finally {
        this.catalogsLock.readLock().unlock();
      }
     
      if (rmCatalog != null) {
        this.catalogsLock.writeLock().lock();
        try {
          LOG.log(Level.INFO, "Removing catalog '" + rmCatalog + "'");
          this.catalogs.remove(rmCatalog);
          this.catalogRepository.deleteSerializedCatalog(catalogId);
          if (!preserveMapping) {
            this.ingestMapperLock.writeLock().lock();
            try {
              LOG.log(Level.INFO, "Deleting all index mappings for catalog '" + rmCatalog + "'");
              this.ingestMapper.deleteAllMappingsForCatalog(catalogId);
            }catch (Exception e) {
              throw e;
            }finally {
              this.ingestMapperLock.writeLock().unlock();
            }
          }
        }catch (Exception e) {
          throw new CatalogServiceException("Failed to remove Catalog '" + catalogId + "' from this CatalogService");
        }finally {
          this.catalogsLock.writeLock().unlock();
        }
      }else {
        LOG.log(Level.WARNING, "Catalog '" + catalogId + "' is not currently managed by this CatalogService");
View Full Code Here

 
  public URL getPluginStorageDir() throws CatalogServiceException {
    try {
      return new URL("file://" + this.pluginStorageDir.getAbsolutePath());
    }catch (Exception e) {
      throw new CatalogServiceException("Failed to get plugin storage dir directory : " + e.getMessage(), e);
    }
  }
View Full Code Here

 
  public List<PluginURL> getPluginUrls() throws CatalogServiceException {
    try {
      return this.catalogRepository.deserializePluginURLs();
    }catch (Exception e) {
      throw new CatalogServiceException(e.getMessage(), e);
    }
  }
View Full Code Here

    try {
      List<PluginURL> currentUrls = new Vector<PluginURL>(this.catalogRepository.deserializePluginURLs());
      currentUrls.addAll(urls);
      this.catalogRepository.serializePluginURLs(currentUrls);
    }catch (Exception e) {
      throw new CatalogServiceException(e.getMessage(), e);
    }
  }
View Full Code Here

  public Set<Catalog> getCurrentCatalogList() throws CatalogServiceException {
    this.catalogsLock.readLock().lock();
    try {
      return new HashSet<Catalog>(this.catalogs);
    }catch (Exception e) {
      throw new CatalogServiceException("Failed to get current catalog list : " + e.getMessage(), e);
    }finally {
      this.catalogsLock.readLock().unlock();
    }
  }
View Full Code Here

      for (Catalog catalog : this.catalogs)
        if (catalog.getId().equals(catalogUrn))
          return catalog;
      return null;
    }catch (Exception e) {
      throw new CatalogServiceException("Failed to get catalog catalog '" +  catalogUrn + "' : " + e.getMessage(), e);
    }finally {
      this.catalogsLock.readLock().unlock();
    }
  }
View Full Code Here

      Set<String> catalogIds = new HashSet<String>();
      for (Catalog catalog : this.catalogs)
        catalogIds.add(catalog.getId());
      return catalogIds;
    }catch (Exception e) {
      throw new CatalogServiceException("Failed to get current catalog ids list : " + e.getMessage(), e);
    }finally {
      this.catalogsLock.readLock().unlock();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.catalog.exception.CatalogServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.