org.apache.maven.dotnet.artifact
Interface NetDependenciesRepository

All Superinterfaces:
Repository
All Known Implementing Classes:
NetDependenciesRepositoryImpl

public interface NetDependenciesRepository
extends Repository

Provides methods for loading and reading the net dependency config file.

Author:
Shane Isbell

Method Summary
 java.util.List<org.apache.maven.model.Dependency> getDependencies()
          Returns a list of .NET dependencies as given within the net dependencies config file.
 java.util.List<org.apache.maven.model.Dependency> getDependenciesFor(java.util.List<NetDependencyMatchPolicy> matchPolicies)
          Returns a list of .NET dependencies as given within the net dependencies config file that matches ALL of the specified match policies.
 void load(java.io.InputStream inputStream, java.util.Hashtable properties)
          Loads the configuration file and configuration properties.
 void setRepositoryRegistry(RepositoryRegistry repositoryRegistry)
           
 

Method Detail

load

void load(java.io.InputStream inputStream,
          java.util.Hashtable properties)
          throws java.io.IOException
Description copied from interface: Repository
Loads the configuration file and configuration properties. In the case below, the inputStream contains the adapters.txt file and the properties holds the init-params. The init params should be used to specialize the repository configuration. The example below shows that you can add new properties to MyRepository but not delete them.
 <registry-config>
 <repositories>
 <repository>
 <repository-name>adapter</repository-name>
 <repository-class>org.jvending.sample.MyRepository</repository-class>
 <repository-config>${basedir}/adapters.txt</repository-config>
 <init-param>
 <param-name>add</param-name>
 <param-value>true</param-value>
 </init-param>
 <init-param>
 <param-name>delete</param-name>
 <param-value>false</param-value>
 </init-param>
 </repository>
 </repositories>
 </registry-config>
 

Since this method uses an InputStream parameter, the configuration file can be loaded off of the local file system or from a specific URL located at an HTTP address.

Specified by:
load in interface Repository
Parameters:
inputStream - the configuration file
properties - the properties used to configure the repository
Throws:
java.io.IOException - thrown on interrupted I/O. Implementing class may also use this exception to throw other exceptions like invalid properties.
See Also:
Repository.load(java.io.InputStream, java.util.Hashtable)

setRepositoryRegistry

void setRepositoryRegistry(RepositoryRegistry repositoryRegistry)
Specified by:
setRepositoryRegistry in interface Repository
See Also:
Repository.setRepositoryRegistry(org.apache.maven.dotnet.registry.RepositoryRegistry)

getDependencies

java.util.List<org.apache.maven.model.Dependency> getDependencies()
Returns a list of .NET dependencies as given within the net dependencies config file. This dependency list is external to the pom file dependencies. This separation is necessary since some Java Maven plugins - which themselves are necessary for building .NET applications - may have .NET executable dependencies that have not been built yet and can't be resolved.

Returns:
a list of .NET dependencies as given within the net dependencies config file

getDependenciesFor

java.util.List<org.apache.maven.model.Dependency> getDependenciesFor(java.util.List<NetDependencyMatchPolicy> matchPolicies)
Returns a list of .NET dependencies as given within the net dependencies config file that matches ALL of the specified match policies.

Parameters:
matchPolicies - the policies to match against the dependencies
Returns:
a list of .NET dependencies as given within the net dependencies config file that matches ALL of the specified match policies


Copyright © 2007 NMaven. All Rights Reserved.