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

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


        LOG.log(Level.INFO, "Loaded Catalogs: '" + this.catalogs + "'");
        this.catalogRepository = catalogRepository;
      }catch (Exception e) {
        this.catalogs = backupCatalogs;
        this.catalogRepository = backupRepository;
        throw new CatalogServiceException("Failed to set CatalogRepository '" + catalogRepository + "', reverting back to original settings : " + e.getMessage(), e);
      }finally {
        this.catalogsLock.writeLock().unlock();
      }
    }else {
      throw new CatalogServiceException("Cannot add NULL CatalogRepository to CatalogService, reverting back to original settings");
    }
  }
View Full Code Here


            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();
      }
    } else {
      LOG.log(Level.WARNING, "Attempt to change an existing catalog '" + catalogId + "' already used in CatalogService, remedy and retry add -- no changes took place!");
View Full Code Here

            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

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.