org.apache.maven.dotnet.dao
Interface ProjectDao

All Superinterfaces:
DataAccessObject
All Known Implementing Classes:
ProjectDaoImpl

public interface ProjectDao
extends DataAccessObject

Provides methods for storing and retreiving project information.


Field Summary
static java.lang.String ROLE
          Role used to register component implementations with the container.
 
Method Summary
 boolean closeConnection()
          Closes the repository connection specified within ProjectDao#setRdfRepository or DataAccessObject#init method
 java.util.Set<Project> getAllProjects()
          Returns all projects.
 Project getProjectFor(org.apache.maven.project.MavenProject mavenProject)
          Returns a project that matches the information contained within the specified maven project.
 Project getProjectFor(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String artifactType, java.lang.String publicKeyTokenId)
          Returns a project that matches the specified parameters.
 void init(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory, org.apache.maven.artifact.manager.WagonManager wagonManager)
          Initializes the data access object
 boolean openConnection()
          Opens the repository connection specified within ProjectDao#setRdfRepository or DataAccessObject#init method
 void removeProjectFor(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String artifactType)
           
 void setRdfRepository(org.openrdf.repository.Repository repository)
          Sets the repository for the data access object.
 java.util.Set<org.apache.maven.artifact.Artifact> storeModelAndResolveDependencies(org.apache.maven.model.Model model, java.io.File pomFileDirectory, java.io.File localArtifactRepository, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories)
          Stores the project object model and resolves and stores the model's dependencies.
 void storeProject(Project project, java.io.File localRepository, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories)
          Method not implemented.
 java.util.Set<org.apache.maven.artifact.Artifact> storeProjectAndResolveDependencies(Project project, java.io.File localRepository, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories)
          Stores the specified project and resolves and stores the project's dependencies.
 
Methods inherited from interface org.apache.maven.dotnet.registry.DataAccessObject
getClassName, getID, init, setRepositoryRegistry
 

Field Detail

ROLE

static final java.lang.String ROLE
Role used to register component implementations with the container.

Method Detail

removeProjectFor

void removeProjectFor(java.lang.String groupId,
                      java.lang.String artifactId,
                      java.lang.String version,
                      java.lang.String artifactType)
                      throws java.io.IOException
Throws:
java.io.IOException

getProjectFor

Project getProjectFor(java.lang.String groupId,
                      java.lang.String artifactId,
                      java.lang.String version,
                      java.lang.String artifactType,
                      java.lang.String publicKeyTokenId)
                      throws java.io.IOException
Returns a project that matches the specified parameters.

Parameters:
groupId - the group id of the project
artifactId - the artifact id of the project
version - the version of the project
artifactType - the type of artifact: library, exe, winexe, netmodule
publicKeyTokenId - the public key token id. This should match the token id within the manifest of a signed .NET assesmbly. This value may be null.
Returns:
a project that matches the specified parameters
Throws:
java.io.IOException - if there was a problem retrieving the project

getProjectFor

Project getProjectFor(org.apache.maven.project.MavenProject mavenProject)
                      throws java.io.IOException
Returns a project that matches the information contained within the specified maven project.

Parameters:
mavenProject - the maven project used in finding the returned project
Returns:
a project that matches the information contained within the specified maven project
Throws:
java.io.IOException - if there was a problem retrieving the project

storeProject

void storeProject(Project project,
                  java.io.File localRepository,
                  java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories)
                  throws java.io.IOException
Method not implemented.

Parameters:
project -
localRepository -
artifactRepositories -
Throws:
java.io.IOException

storeProjectAndResolveDependencies

java.util.Set<org.apache.maven.artifact.Artifact> storeProjectAndResolveDependencies(Project project,
                                                                                     java.io.File localRepository,
                                                                                     java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories)
                                                                                     throws java.io.IOException
Stores the specified project and resolves and stores the project's dependencies.

Parameters:
project - the project to store
localRepository - the local artifact repository
artifactRepositories - the remote artifact repositories used in resolving dependencies
Returns:
a set of artifacts, including the project and its dependencies
Throws:
java.io.IOException - if there was a problem in storing or resolving the artifacts

storeModelAndResolveDependencies

java.util.Set<org.apache.maven.artifact.Artifact> storeModelAndResolveDependencies(org.apache.maven.model.Model model,
                                                                                   java.io.File pomFileDirectory,
                                                                                   java.io.File localArtifactRepository,
                                                                                   java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> artifactRepositories)
                                                                                   throws java.io.IOException
Stores the project object model and resolves and stores the model's dependencies.

Parameters:
model - the project object model
pomFileDirectory - the directory containing the pom file
localArtifactRepository - the local repository
artifactRepositories - the remote artifact repositories used in resolving dependencies
Returns:
a set of artifacts, including the model and its dependencies
Throws:
java.io.IOException - if there was a problem in storing or resolving the artifacts

init

void init(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory,
          org.apache.maven.artifact.manager.WagonManager wagonManager)
Initializes the data access object

Parameters:
artifactFactory - the artifact factory used in creating artifacts
wagonManager - the manager used for downloading artifacts

getAllProjects

java.util.Set<Project> getAllProjects()
                                      throws java.io.IOException
Returns all projects.

Returns:
all projects
Throws:
java.io.IOException - if there is a problem retrieving the projects

setRdfRepository

void setRdfRepository(org.openrdf.repository.Repository repository)
Sets the repository for the data access object. This method overrides the data source object set in the DataAccessObject#init

Parameters:
repository - the rdf repository

openConnection

boolean openConnection()
Opens the repository connection specified within ProjectDao#setRdfRepository or DataAccessObject#init method

Returns:
true if the rdf repository successfully opens, otherwise return false

closeConnection

boolean closeConnection()
Closes the repository connection specified within ProjectDao#setRdfRepository or DataAccessObject#init method

Returns:
true if the rdf repository successfully closes, otherwise return false


Copyright © 2007 NMaven. All Rights Reserved.