public class SerializedCatalogRepository extends Object implements CatalogRepository
Catalog Repository that serializes Catalogs via XStream utility
Modifier and Type | Field and Description |
---|---|
protected String |
storageDir |
Constructor and Description |
---|
SerializedCatalogRepository(String storageDir) |
Modifier and Type | Method and Description |
---|---|
void |
deleteSerializedCatalog(String catalogUrn)
Removes a Catalog from the Repository
|
Set<Catalog> |
deserializeAllCatalogs()
Loads all Catalogs serialized in this Repository
|
Catalog |
deserializeCatalog(String catalogUrn) |
List<PluginURL> |
deserializePluginURLs() |
protected File |
getCatalogFile(String catalogUrn) |
protected File |
getCatalogFileBkup(String catalogUrn) |
protected File |
getCatalogFileWorker(String catalogUrn) |
protected File |
getClassLoaderUrlsFile() |
protected File |
getClassLoaderUrlsFileBkup() |
protected File |
getClassLoaderUrlsFileWorker() |
boolean |
isCatalogSerialized(String catalogUrn) |
boolean |
isModifiable() |
void |
serializeCatalog(Catalog catalog)
Serializes a given Catalog to the Repository
|
void |
serializePluginURLs(List<PluginURL> urls) |
protected String storageDir
public SerializedCatalogRepository(String storageDir) throws InstantiationException
InstantiationException
public void deleteSerializedCatalog(String catalogUrn) throws CatalogRepositoryException
CatalogRepository
deleteSerializedCatalog
in interface CatalogRepository
catalogUrn
- The URN that unique represents the Catalog to be removedCatalogRepositoryException
- Any Errorpublic Catalog deserializeCatalog(String catalogUrn) throws CatalogRepositoryException
CatalogRepositoryException
public Set<Catalog> deserializeAllCatalogs() throws CatalogRepositoryException
CatalogRepository
deserializeAllCatalogs
in interface CatalogRepository
CatalogRepositoryException
- Any Errorpublic boolean isCatalogSerialized(String catalogUrn) throws CatalogRepositoryException
CatalogRepositoryException
public void serializeCatalog(Catalog catalog) throws CatalogRepositoryException
CatalogRepository
serializeCatalog
in interface CatalogRepository
catalog
- The Catalog to be serializedCatalogRepositoryException
- Any Errorpublic void serializePluginURLs(List<PluginURL> urls) throws CatalogRepositoryException
serializePluginURLs
in interface CatalogRepository
CatalogRepositoryException
public List<PluginURL> deserializePluginURLs() throws CatalogRepositoryException
deserializePluginURLs
in interface CatalogRepository
CatalogRepositoryException
public boolean isModifiable() throws CatalogRepositoryException
isModifiable
in interface CatalogRepository
CatalogRepositoryException
protected File getClassLoaderUrlsFile()
protected File getClassLoaderUrlsFileBkup()
protected File getClassLoaderUrlsFileWorker()
Copyright © 1999-2014 Apache OODT. All Rights Reserved.