cern.jjar.repository
Interface Repository

All Known Implementing Classes:
RepositoryXML

public interface Repository

first cut at a repository interface

Version:
$Id: Repository.java,v 1.12 2006/11/30 10:42:48 enes Exp $
Author:
Geir Magnusson Jr., Lionel Mestre

Field Summary
static String REPOSITORY_FILE_NAME
           
 
Method Summary
 Product[] computeObsoleteProducts(Product product)
          Computes the obsolete versions of a certain product
 Product[] computeObsoleteVersionsForProduct(Product product)
          Computes a list of all obsolete versions for a given product
 Dependency[] getDependencies(Dependency[] dependenciesToResolve, boolean excludeTargets, Version defaultVersion)
          Returns array with all dependencies of given dependencies.
 Dependency[] getDependencies(Dependency dependencyToResolve, boolean excludeTarget, Version defaultVersion)
          Returns array with all dependencies of given dependency.
 Document getDocument()
          Returns the parsed document of the repository descriptor
 Product getProduct(String productName, Version version)
          Returns product with given name and version (version can be both numeral or linked).
 String getProductFilePath(String productName, Version version)
          Returns the complete path of the jar from the root of the repository.
 URL getProductFileUrl(String productName, Version version)
          Returns URL of jar for given product and version.
 URL getProductionDescriptorRootDirURL()
          Returns the directory of production repository
 RepositoryStore getProductionStore()
          Returns the production repository store as defined by method @link RepositoryStore#isProduction()
 

Field Detail

REPOSITORY_FILE_NAME

static final String REPOSITORY_FILE_NAME
See Also:
Constant Field Values
Method Detail

getDocument

Document getDocument()
Returns the parsed document of the repository descriptor

Returns:
Document

getProductionDescriptorRootDirURL

URL getProductionDescriptorRootDirURL()
Returns the directory of production repository

Returns:
URL

getProductionStore

RepositoryStore getProductionStore()
Returns the production repository store as defined by method @link RepositoryStore#isProduction()

Returns:
production repository store

computeObsoleteVersionsForProduct

Product[] computeObsoleteVersionsForProduct(Product product)
Computes a list of all obsolete versions for a given product

Parameters:
product - the product for which to search for obsolete products
Returns:
Product[] A list of obsolete products

computeObsoleteProducts

Product[] computeObsoleteProducts(Product product)
Computes the obsolete versions of a certain product

Parameters:
product - the product to be cleaned
Returns:

getProduct

Product getProduct(String productName,
                   Version version)
Returns product with given name and version (version can be both numeral or linked).

Parameters:
productName - the name of the product to get
version - the version of the product to get
Returns:
the product matching both the name and the version or null

getDependencies

Dependency[] getDependencies(Dependency[] dependenciesToResolve,
                             boolean excludeTargets,
                             Version defaultVersion)
Returns array with all dependencies of given dependencies.

Parameters:
dependenciesToResolve - the array of dependencies to resolve
excludeTargets - whether or not to include the targets passed in parameter
defaultVersion - the default version to get is no version is specified
Returns:
the resolved dependencies after the tree of dependencies has been traversed

getDependencies

Dependency[] getDependencies(Dependency dependencyToResolve,
                             boolean excludeTarget,
                             Version defaultVersion)
Returns array with all dependencies of given dependency.

Parameters:
dependencyToResolve - the dependency to resolve
excludeTarget - whether or not to include the target passed in parameter
defaultVersion - the default version to get is no version is specified
Returns:
the resolved dependencies after the tree of dependencies has been traversed

getProductFileUrl

URL getProductFileUrl(String productName,
                      Version version)
Returns URL of jar for given product and version.

Parameters:
productName - the name of the product to get
version - the version of the product to get
Returns:
the URL of jar for given product and version.

getProductFilePath

String getProductFilePath(String productName,
                          Version version)
Returns the complete path of the jar from the root of the repository.

Parameters:
productName - the name of the product to get
version - the version of the product to get
Returns:
the complete path of the jar from the root of the repository.


Copyright © 2007 CERN. All Rights Reserved.