it.haefelinger.flaka.dep
Class Dependency

java.lang.Object
  extended by it.haefelinger.flaka.dep.Dependency

public class Dependency
extends Object


Field Summary
protected  String alias
           
protected  String alt
           
protected  File file
           
protected  String group
           
protected  String jar
           
protected  File location
           
protected  String name
           
 Project proj
           
protected  Map props
           
protected  String rev
           
protected  String[] scope
           
protected  String type
           
 
Constructor Summary
Dependency(Project proj)
           
 
Method Summary
 String basename()
           
 Object clone()
           
 boolean equals(Object other)
          Checks this Dep against another dependency for equality
 String getAlias()
           
 String getAlt()
           
 String getArtifactId()
           
 String getBasename()
           
 File getFile()
           
 String getGroup()
           
 String getGroupId()
           
 String getJar()
           
 File getLocation()
           
 String getM1path()
           
 String getM2path()
           
 String getName()
           
 String getProperty(String key)
          Returns a property value
 String getRev()
           
 String[] getScope()
           
 String getType()
           
 String getVersion()
           
 String m1path()
          Returns the path expected on the remote repository
 String m2path()
          Returns the path expected on the remote repository
 String putProperty(String key, String value)
          Sets a property value
 int resolve(Properties P)
          Resolve properties within this dependency ..
 void setAlias(String S)
           
 void setArtifactId(String string)
           
 void setFile(File file)
           
 void setGroupId(String string)
           
 void setJar(String string)
           
 Dependency setLocation(File location)
           
 void setScope(String s)
           
 void setType(String string)
          Sets the type (or extension) of the dependency
 void setUrl(String string)
           
 void setVersion(String string)
           
 String toAliased()
           
 String toString()
           
protected  String tostring(boolean aliased)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alias

protected String alias

rev

protected String rev

type

protected String type

group

protected String group

name

protected String name

jar

protected String jar

scope

protected String[] scope

props

protected Map props

file

protected File file

location

protected File location

alt

protected String alt

proj

public Project proj
Constructor Detail

Dependency

public Dependency(Project proj)
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

getAlias

public String getAlias()

setAlias

public void setAlias(String S)

getAlt

public String getAlt()
Returns:
alt

getVersion

public String getVersion()
Returns:
version

getRev

public String getRev()

getGroup

public String getGroup()

getName

public String getName()

setUrl

public void setUrl(String string)
Parameters:
string -

setVersion

public void setVersion(String string)
Parameters:
string -

getType

public String getType()
Returns:
the type (or extension) of the dependency

setType

public void setType(String string)
Sets the type (or extension) of the dependency

Parameters:
string -

getArtifactId

public String getArtifactId()
Returns:
artifact name

getGroupId

public String getGroupId()
Returns:
group name

getJar

public String getJar()
Returns:
jar

setArtifactId

public void setArtifactId(String string)
Parameters:
string -

setGroupId

public void setGroupId(String string)
Parameters:
string -

setJar

public void setJar(String string)
Parameters:
string -

getScope

public String[] getScope()

setScope

public void setScope(String s)

getLocation

public File getLocation()
Returns:
loc where this dependency has been declared

setLocation

public Dependency setLocation(File location)
Parameters:
x - this dependency has been declared in loc x.

setFile

public void setFile(File file)

getFile

public File getFile()

getBasename

public String getBasename()

getM1path

public String getM1path()

getM2path

public String getM2path()

basename

public String basename()

m1path

public String m1path()
Returns the path expected on the remote repository

Returns:
the path which will be used on a remote repository

m2path

public String m2path()
Returns the path expected on the remote repository

Returns:
the path which will be used on a remote repository

toString

public String toString()
Overrides:
toString in class Object

toAliased

public String toAliased()

tostring

protected String tostring(boolean aliased)

putProperty

public String putProperty(String key,
                          String value)
Sets a property value

Parameters:
key - the property key to set
value - the property value to set
Returns:
the property value just set (can be null)

getProperty

public String getProperty(String key)
Returns a property value

Parameters:
key - the property key to retrieve
Returns:
a property value, or null if not found

equals

public boolean equals(Object other)
Checks this Dep against another dependency for equality

Overrides:
equals in class Object

resolve

public int resolve(Properties P)
Resolve properties within this dependency ..

Parameters:
P - project's properties are used to resolve this dependency.
Returns:
number of properties resolved (>=0).