org.schmant.project
Interface ProjectRepository

All Known Implementing Classes:
AbstractProjectRepository, EclipseWorkspace, IntelliJWorkspace

public interface ProjectRepository

The project repository is a repository for Project:s, such as an Eclipse Workspace.

Project:s should be entity objects. I.e., a ProjectRepository should never use several Project objects for representing the same project.

Since:
0.5
Author:
Karl Gustafsson

Method Summary
 Project getProject(String name)
          Get the named project from this repository, if it exists.
 Collection<Project> getProjects()
          Get all projects stored in this repository.
 Collection<Project> getProjects(Filter<? super Project> filter)
          Get all projects stored in this repository that passes the supplied filter.
 boolean hasProject(String name)
          Does there exist a project with the specified name in this repository?
 

Method Detail

getProjects

Collection<Project> getProjects()
Get all projects stored in this repository.

The returned Project objects are entities. Subsequent calls to this method should return the same Project instances.

Returns:
All projects stored in this repository. Possibly empty, but never null.
See Also:
getProjects(Filter)

getProjects

Collection<Project> getProjects(Filter<? super Project> filter)
Get all projects stored in this repository that passes the supplied filter.

Parameters:
filter - The filter that a project must pass to be included in the returned set. This filter is often of the type ProjectFilter.
Returns:
The projects stored in this repository that pass the filter. Possibly empty, but never null.
See Also:
getProjects(), ProjectFilterUtil

hasProject

boolean hasProject(String name)
Does there exist a project with the specified name in this repository?

Parameters:
name - The project name.
Returns:
true if there exists a project with the specified name in this repository.

getProject

Project getProject(String name)
Get the named project from this repository, if it exists.

The returned Project object is an entity object. Subsequent requests for the same project should return the same Project instance.

Parameters:
name - The project name.
Returns:
The Project, or null if it does not exist.