net.sf.ant4eclipse.model.projectset
Class TeamProjectDescription

java.lang.Object
  extended by net.sf.ant4eclipse.model.projectset.TeamProjectDescription

public class TeamProjectDescription
extends java.lang.Object

Implements a description of a project to be shared in a team. The description contains the name, the repository-location and the branch/version tag of the project. The TeamProjectDescription is read form an eclipse .psf-file.


Constructor Summary
TeamProjectDescription(java.lang.String projectname, CvsRoot cvsroot, java.lang.String nameInRepository, java.lang.String tag)
          Creates a new instance of type TeamProjectDescription
TeamProjectDescription(java.lang.String projectname, java.lang.String cvsroot, java.lang.String nameInRepository, java.lang.String tag)
          Creates a new instance of type TeamProjectDescription
 
Method Summary
 boolean equals(java.lang.Object o)
          
 java.lang.String getBranchOrVersionTag()
          Returns the tag of the branch or version.
 CvsRoot getCvsRoot()
          Returns the cvsRoot.
 java.lang.String getNameInRepository()
          Returns the name of the project in the repository.
 java.lang.String getProjectName()
          Returns the name of the project.
 CvsRoot getResolvedCvsRoot()
          Returns the resolved CvsRoot (e.g.
 boolean hasBranchOrVersionTag()
          Returns whether the project has a branch or version tag.
 int hashCode()
          
 boolean isCvsUserSet()
          Returns whether the cvs user and the cvs password is set.
 boolean isHead()
          Returns whether the project is from the cvs head.
 void setCvsUserAndPassword(java.lang.String cvsUser, java.lang.String cvsPwd)
          Sets the cvs user und password.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TeamProjectDescription

public TeamProjectDescription(java.lang.String projectname,
                              CvsRoot cvsroot,
                              java.lang.String nameInRepository,
                              java.lang.String tag)
Creates a new instance of type TeamProjectDescription

Parameters:
projectname - the name of the project
cvsroot - the cvsroot of the project
nameInRepository - the name of the project in the repository
tag - the tag

TeamProjectDescription

public TeamProjectDescription(java.lang.String projectname,
                              java.lang.String cvsroot,
                              java.lang.String nameInRepository,
                              java.lang.String tag)
Creates a new instance of type TeamProjectDescription

Parameters:
projectname - the name of the project
cvsroot - the cvsroot of the project
nameInRepository - the name of the project in the repository
tag - the tag
Method Detail

getBranchOrVersionTag

public java.lang.String getBranchOrVersionTag()
Returns the tag of the branch or version.

Returns:
Returns the tag of the branch or version.

getCvsRoot

public CvsRoot getCvsRoot()
Returns the cvsRoot.

Returns:
Returns the cvsRoot.

getResolvedCvsRoot

public CvsRoot getResolvedCvsRoot()
Returns the resolved CvsRoot (e.g. :pserver:user:pwd@localhost:C:/cvsRepository). Requires that isCvsUserAndPasswordSet() returns true. If isCvsUserAndPasswordSet() returns false, a PreconditionViolatedException will be thrown.

Returns:
Returns the resolved CvsRoot.

getProjectName

public java.lang.String getProjectName()
Returns the name of the project.

Returns:
Returns the name of the project.

getNameInRepository

public java.lang.String getNameInRepository()
Returns the name of the project in the repository.

Returns:
Returns the name of the project in the repository.

isHead

public boolean isHead()
Returns whether the project is from the cvs head.

Returns:
Returns whether the project is from the cvs head.

hasBranchOrVersionTag

public boolean hasBranchOrVersionTag()
Returns whether the project has a branch or version tag.

Returns:
Returns whether the project has a branch or version tag.

isCvsUserSet

public boolean isCvsUserSet()
Returns whether the cvs user and the cvs password is set.

Returns:
Returns whether the cvs user and the cvs password is set.

setCvsUserAndPassword

public void setCvsUserAndPassword(java.lang.String cvsUser,
                                  java.lang.String cvsPwd)
Sets the cvs user und password.

Parameters:
cvsUser - the cvs user.
cvsPwd - the cvs password might be null

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object