org.ops4j.pax.url.maven.commons
Class MavenRepositoryURL

java.lang.Object
  extended by org.ops4j.pax.url.maven.commons.MavenRepositoryURL

public class MavenRepositoryURL
extends Object

An URL of Maven repository that knows if it contains SNAPSHOT versions and/or releases.

Since:
0.2.1, February 07, 2008
Author:
Alin Dreghiciu

Constructor Summary
MavenRepositoryURL(String repositorySpec)
          Creates a maven repository URL bases on a string spec.
 
Method Summary
 File getFile()
          Getter.
 String getId()
          Getter.
 URL getURL()
          Getter.
 boolean isFileRepository()
          Getter.
 boolean isReleasesEnabled()
          Getter.
 boolean isSnapshotsEnabled()
          Getter.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MavenRepositoryURL

public MavenRepositoryURL(String repositorySpec)
                   throws MalformedURLException
Creates a maven repository URL bases on a string spec. The path can be marked with @snapshots and/or @noreleases (not case sensitive).

Parameters:
repositorySpec - url spec of repository
Throws:
MalformedURLException - if spec contains a malformed maven repository url
org.ops4j.lang.NullArgumentException - if repository spec is null or empty
Method Detail

getId

public String getId()
Getter.

Returns:
repository id

getURL

public URL getURL()
Getter.

Returns:
repository URL

getFile

public File getFile()
Getter.

Returns:
repository file

isReleasesEnabled

public boolean isReleasesEnabled()
Getter.

Returns:
true if the repository contains releases

isSnapshotsEnabled

public boolean isSnapshotsEnabled()
Getter.

Returns:
true if the repository contains snapshots

isFileRepository

public boolean isFileRepository()
Getter.

Returns:
if the repository is a file based repository.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.