org.schmant.project
Class AbstractProject<T extends ProjectRepository>

java.lang.Object
  extended by org.schmant.project.AbstractProject<T>
All Implemented Interfaces:
Project
Direct Known Subclasses:
AbstractJavaProject

public abstract class AbstractProject<T extends ProjectRepository>
extends Object
implements Project

This is an abstract base class for Project implementations.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
protected AbstractProject(String name, T rep, DirectoryView dir, ProjectType[] types)
           
 
Method Summary
 DirectoryView getDirectory()
          Get the project's home directory.
 String getName()
          Get the name of this project.
 T getRepository()
           
 Set<ProjectType> getTypes()
          Get the project types for the project.
 boolean isOfType(ProjectType pt)
          Is this project of the specified type?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProject

protected AbstractProject(String name,
                          T rep,
                          DirectoryView dir,
                          ProjectType[] types)
Method Detail

getName

public String getName()
Description copied from interface: Project
Get the name of this project. It is up to the ProjectRepository implementation to decide how projects should be named.

Specified by:
getName in interface Project
Returns:
The project's name.

getRepository

public T getRepository()

getDirectory

public DirectoryView getDirectory()
Description copied from interface: Project
Get the project's home directory.

Specified by:
getDirectory in interface Project
Returns:
The project's home directory.

getTypes

public Set<ProjectType> getTypes()
Description copied from interface: Project
Get the project types for the project.

Specified by:
getTypes in interface Project
Returns:
The project types.

isOfType

public boolean isOfType(ProjectType pt)
Description copied from interface: Project
Is this project of the specified type?

Specified by:
isOfType in interface Project
Parameters:
pt - The project type.
Returns:
true if the project is of the specified type.