de.smartics.properties.resource.maven.repository
Class SessionedMavenResourceRepository

Package class diagram package SessionedMavenResourceRepository
java.lang.Object
  extended by de.smartics.properties.resource.maven.repository.SessionedMavenResourceRepository
All Implemented Interfaces:
ResourceRepository

public final class SessionedMavenResourceRepository
     
     
extends Object
implements ResourceRepository

Implementation of the ResourceRepository interface based on Maven.


Constructor Summary
SessionedMavenResourceRepository()
          Convenience constructor to consult the environment to create a connection to a Maven repository.
SessionedMavenResourceRepository(MavenRepository repository)
          Default constructor.
 
Method Summary
 String getRemoteRepositoryUrl()
          Returns the URL to the remote repository.
 ClassPathEnvironment resolve(ArtifactId artifactId)
          Resolves the properties resources from the given artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionedMavenResourceRepository

public SessionedMavenResourceRepository()
                                 throws RepositoryException
Convenience constructor to consult the environment to create a connection to a Maven repository.

The connection properties are expected to be on the class path in a properties file named .

Throws:
RepositoryException - if the repository cannot be created from environment information.
See Also:
#init(MavenRepository)

SessionedMavenResourceRepository

public SessionedMavenResourceRepository(MavenRepository repository)
                                 throws NullPointerException
Default constructor.

Parameters:
repository - the repository adapter to connect to the Maven infrastructure.
Throws:
NullPointerException - if repository is null.
Method Detail

resolve

public ClassPathEnvironment resolve(ArtifactId artifactId)
                             throws RepositoryException
Description copied from interface: ResourceRepository
Resolves the properties resources from the given artifact.

Specified by:
resolve in interface ResourceRepository
Parameters:
artifactId - the identifier of the artifact containing properties resources.
Returns:
the properties resources.
Throws:
RepositoryException - on any problem accessing the repository.

getRemoteRepositoryUrl

public String getRemoteRepositoryUrl()
Description copied from interface: ResourceRepository
Returns the URL to the remote repository.

Specified by:
getRemoteRepositoryUrl in interface ResourceRepository
Returns:
the URL to the remote repository.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.