cern.jjar.repository
Class Product

java.lang.Object
  extended by cern.jjar.repository.Product

public class Product
extends Object

Author:
gkruk, enes

Field Summary
static Comparator PRODUCT_COMPARATOR
          A comparator that can be used to compare versions
 
Constructor Summary
Product()
          Creates a new instance of Product
 
Method Summary
 void addAlias(Version alias)
           
 void addDependency(Dependency d)
           
 Version getAlias(String version)
          Getter for property link.
 Collection getAliases()
          Getter for property link.
 String getAliasesAsString()
          Getter for property link.
 Collection getDependencies()
          Getter for property dependencies.
 Dependency[] getDependenciesAsArray()
           
 String getDescription()
          Getter for property description.
 String getDirectory()
          Getter for property projectName.
 String getHref()
          Getter for property href.
 String getJarName()
          Getter for property jarName.
 String getName()
          Getter for property name.
 String getShortDescription()
           
 Version getVersion()
          Getter for property version.
 boolean hasAlias()
          Check if the product has an alias
 boolean hasAlias(Version version)
          Check if there is an alias equal to a given version.
 void setAliases(ArrayList aliases)
          Setter for property alias.
 void setDescription(String description)
          Setter for property description.
 void setDirectory(String directory)
           
 void setHref(String href)
          Setter for property href.
 void setJarName(String jarName)
          Setter for property jarName.
 void setName(String name)
          Setter for property name.
 void setShortDescription(String shortDescription)
           
 void setVersion(Version version)
          Setter for property version.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRODUCT_COMPARATOR

public static final Comparator PRODUCT_COMPARATOR
A comparator that can be used to compare versions

Constructor Detail

Product

public Product()
Creates a new instance of Product

Method Detail

getName

public String getName()
Getter for property name.

Returns:
Value of property name.

setName

public void setName(String name)
Setter for property name.

Parameters:
name - New value of property name.

getHref

public String getHref()
Getter for property href.

Returns:
Value of property href.

setHref

public void setHref(String href)
Setter for property href.

Parameters:
href - New value of property href.

getDescription

public String getDescription()
Getter for property description.

Returns:
Value of property description.

setDescription

public void setDescription(String description)
Setter for property description.

Parameters:
description - New value of property description.

getDirectory

public String getDirectory()
Getter for property projectName.

Returns:
Value of property projectName.

setDirectory

public void setDirectory(String directory)

toString

public String toString()
Overrides:
toString in class Object

getVersion

public Version getVersion()
Getter for property version.

Returns:
Value of property version.

setVersion

public void setVersion(Version version)
Setter for property version.

Parameters:
version - New value of property version.

getDependencies

public Collection getDependencies()
Getter for property dependencies.

Returns:
Value of property dependencies.

getDependenciesAsArray

public Dependency[] getDependenciesAsArray()

addDependency

public void addDependency(Dependency d)

getAliasesAsString

public String getAliasesAsString()
Getter for property link.

Returns:
String the alias(es)

getAlias

public Version getAlias(String version)
Getter for property link.

Returns:
Version The version equal to the defaultdependencyversion if it exists. Otherwise it returns another alias

getAliases

public Collection getAliases()
Getter for property link.

Returns:
collection A collection of the aliases.

hasAlias

public boolean hasAlias(Version version)
Check if there is an alias equal to a given version.

Parameters:
version - Version to compare with
Returns:
boolean

hasAlias

public boolean hasAlias()
Check if the product has an alias

Returns:
boolean

setAliases

public void setAliases(ArrayList aliases)
Setter for property alias.

Parameters:
aliases - New value of property link.

addAlias

public void addAlias(Version alias)

getJarName

public String getJarName()
Getter for property jarName.

Returns:
Value of property jarName.

setJarName

public void setJarName(String jarName)
Setter for property jarName.

Parameters:
jarName - New value of property jarName.

setShortDescription

public void setShortDescription(String shortDescription)

getShortDescription

public String getShortDescription()


Copyright © 2007 CERN. All Rights Reserved.