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

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


  public SerializedCatalogRepository createRepository()
      throws CatalogRepositoryException {
    try {
      return new SerializedCatalogRepository(PathUtils.doDynamicReplacement(this.storageDir));
    }catch (Exception e) {
      throw new CatalogRepositoryException("Failed to create Serialized Catalog Repository : " + e.getMessage(), e);
    }
  }
View Full Code Here


          FileSystemXmlApplicationContext appContext = new FileSystemXmlApplicationContext(new String[] { this.beanRepo }, false);
          appContext.setClassLoader(new Serializer().getClassLoader());
          appContext.refresh();
          return new HashSet<Catalog>(appContext.getBeansOfType(Catalog.class).values());
    } catch (Exception e) {
      throw new CatalogRepositoryException(e.getMessage(), e);
    }
  }
View Full Code Here

    }
  }

  public void deleteSerializedCatalog(String catalogUrn)
      throws CatalogRepositoryException {
    throw new CatalogRepositoryException("Modification not allowed during runtime");
  }
View Full Code Here

    return false;
  }

  public void serializeCatalog(Catalog catalog)
      throws CatalogRepositoryException {
    throw new CatalogRepositoryException("Modification not allowed during runtime");   
  }
View Full Code Here

    return Collections.emptyList();
  }

  public void serializePluginURLs(List<PluginURL> urls)
      throws CatalogRepositoryException {
    throw new CatalogRepositoryException("Modification not allowed during runtime");   
  }
View Full Code Here

  public void deleteSerializedCatalog(String catalogUrn)
      throws CatalogRepositoryException {
    LOG.log(Level.INFO, "Deleting Catalog: '" + catalogUrn + "' . . . ");
    boolean catalogFileDelete = this.getCatalogFile(catalogUrn).delete();
    if (!catalogFileDelete)
      throw new CatalogRepositoryException("Failed to deserialize catalog '" + catalogUrn + "', delete files returned false");
    else
      LOG.log(Level.INFO, "Successfully deleting Catalog: '" + catalogUrn + "'");
  }
View Full Code Here

    LOG.log(Level.INFO, "Deserializing Catalog: " + catalogUrn);
    FileInputStream catalogIn = null;
    try {
      return new Serializer().deserializeObject(Catalog.class, catalogIn = new FileInputStream(this.getCatalogFile(catalogUrn)));
    }catch (Exception e) {
      throw new CatalogRepositoryException("Failed to Deserialized Catalogs from '" + this.storageDir + "' : " + e.getMessage(), e);
    }finally {
      try {
        catalogIn.close();
      }catch (Exception e) {}
    }
View Full Code Here

        FileUtils.copyFile(this.getCatalogFile(catalog.getId()), this.getCatalogFileBkup(catalog.getId()), true);
      FileUtils.copyFile(this.getCatalogFileWorker(catalog.getId()), this.getCatalogFile(catalog.getId()), true);
      this.getCatalogFileWorker(catalog.getId()).delete();
      this.getCatalogFileBkup(catalog.getId()).delete();
    }catch (Exception e) {
      throw new CatalogRepositoryException("Failed to Serialized Catalogs to '" + this.storageDir + "' : " + e.getMessage(), e);
    }finally {
      try {
        catalogOut.close();
      }catch (Exception e) {}
    } 
View Full Code Here

        FileUtils.copyFile(this.getClassLoaderUrlsFile(), this.getClassLoaderUrlsFileBkup(), true);
      FileUtils.copyFile(this.getClassLoaderUrlsFileWorker(), this.getClassLoaderUrlsFile(), true);
      this.getClassLoaderUrlsFileWorker().delete();
      this.getClassLoaderUrlsFileBkup().delete();
    }catch (Exception e) {
      throw new CatalogRepositoryException("Failed to Serialized ClassLoader URLs to '" + this.storageDir + "' : " + e.getMessage(), e);
    }finally {
      try {
        urlsOut.close();
      }catch (Exception e) {}
    } 
View Full Code Here

      if (this.getClassLoaderUrlsFile().exists())
        return new Serializer().deserializeObject(List.class, (urlsIn = new FileInputStream(this.getClassLoaderUrlsFile())));
      else
        return Collections.emptyList();
    }catch (Exception e) {
      throw new CatalogRepositoryException("Failed to Deserialized All ClassLoader URLs from '" + this.storageDir + "' : " + e.getMessage(), e);
    }finally {
      try {
        urlsIn.close();
      }catch (Exception e) {}
    }
View Full Code Here

TOP

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

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.