cern.jjar.repository
Class RepositoryXMLStore

java.lang.Object
  extended by cern.jjar.repository.RepositoryXMLStore
All Implemented Interfaces:
RepositoryStore

public class RepositoryXMLStore
extends Object
implements RepositoryStore

Author:
gkruk

Field Summary
static String FILE
           
 JJarParser parser
           
 
Constructor Summary
RepositoryXMLStore(String repositoryDir)
           
 
Method Summary
 String buildProductFileRelativePath(Product p)
           
 Document getDocument()
          Returns the parsed document
 MultiVersionsProduct getProduct(String productName)
          Returns all versions for a given project
 Product getProduct(String productName, Version v)
          Returns product with given name and version (version can be both numerical or linked).
 String getProductFilePath(Product product)
          Returns path of jar for given product.
 URL getProductFileUrl(Product product)
          Returns URL of jar for given product and version.
 MultiVersionsProduct[] getProducts()
          Returns all products in this store
 URL getStoreRootDirURL()
          Returns the directory to the production repository
 boolean isProduction()
          Returns true if the store is production
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE

public static final String FILE
See Also:
Constant Field Values

parser

public JJarParser parser
Constructor Detail

RepositoryXMLStore

public RepositoryXMLStore(String repositoryDir)
                   throws IOException
Throws:
IOException
Method Detail

getProducts

public MultiVersionsProduct[] getProducts()
Description copied from interface: RepositoryStore
Returns all products in this store

Specified by:
getProducts in interface RepositoryStore
Returns:
all products in this store

getProduct

public Product getProduct(String productName,
                          Version v)
Description copied from interface: RepositoryStore
Returns product with given name and version (version can be both numerical or linked).

Specified by:
getProduct in interface RepositoryStore
Parameters:
productName - the name of the product to get
v - the version of the product to get
Returns:
the product matching both the name and the version or null

getProduct

public MultiVersionsProduct getProduct(String productName)
Description copied from interface: RepositoryStore
Returns all versions for a given project

Specified by:
getProduct in interface RepositoryStore
Parameters:
productName - the productname for which to return all versions
Returns:
MultiVersionsProduct all versions of a given project

getProductFileUrl

public URL getProductFileUrl(Product product)
Description copied from interface: RepositoryStore
Returns URL of jar for given product and version.

Specified by:
getProductFileUrl in interface RepositoryStore
Parameters:
product - the product the url is to be got for
Returns:
the URL of jar for given product

getProductFilePath

public String getProductFilePath(Product product)
Description copied from interface: RepositoryStore
Returns path of jar for given product.

Specified by:
getProductFilePath in interface RepositoryStore
Parameters:
product - the product the path is to be got for
Returns:
path of jar for given product.

buildProductFileRelativePath

public String buildProductFileRelativePath(Product p)

isProduction

public boolean isProduction()
Description copied from interface: RepositoryStore
Returns true if the store is production

Specified by:
isProduction in interface RepositoryStore
Returns:
boolean

getDocument

public Document getDocument()
Description copied from interface: RepositoryStore
Returns the parsed document

Specified by:
getDocument in interface RepositoryStore
Returns:
Document the parsed document

getStoreRootDirURL

public URL getStoreRootDirURL()
Description copied from interface: RepositoryStore
Returns the directory to the production repository

Specified by:
getStoreRootDirURL in interface RepositoryStore
Returns:
URL


Copyright © 2007 CERN. All Rights Reserved.