org.apache.maven.artifact.repository

## Class DefaultArtifactRepository

- java.lang.Object
- - Repository
  - - org.apache.maven.artifact.repository.DefaultArtifactRepository

All Implemented Interfaces:
  ArtifactRepository

    public class DefaultArtifactRepository
    extends Repository
    implements ArtifactRepository

This class is an abstraction of the location from/to resources can be transfered.

Version:
  $Id: DefaultArtifactRepository.java 495147 2007-01-11 07:47:53Z jvanzyl $
Author:
  Michal Maczka

### Constructor Summary

Constructors
Constructor and Description
`DefaultArtifactRepository(java.lang.String id, java.lang.String url, ArtifactRepositoryLayout layout)` Create a local repository or a test repository.
`DefaultArtifactRepository(java.lang.String id, java.lang.String url, ArtifactRepositoryLayout layout, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases)` Create a remote download repository.
`DefaultArtifactRepository(java.lang.String id, java.lang.String url, ArtifactRepositoryLayout layout, boolean uniqueVersion)` Create a remote deployment repository.

### Method Summary

Methods
`java.lang.String` `getKey()`
`ArtifactRepositoryLayout` `getLayout()`
`ArtifactRepositoryPolicy` `getReleases()`
`ArtifactRepositoryPolicy` `getSnapshots()`
`boolean` `isBlacklisted()`
`boolean` `isUniqueVersion()`
`java.lang.String` `pathOf(Artifact artifact)`
`java.lang.String` `pathOfLocalRepositoryMetadata(ArtifactMetadata metadata, ArtifactRepository repository)`
`java.lang.String` `pathOfRemoteRepositoryMetadata(ArtifactMetadata artifactMetadata)`
`void` `setBlacklisted(boolean blacklisted)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.maven.artifact.repository.ArtifactRepository

`getBasedir, getId, getProtocol, getUrl`

### Constructor Detail

#### DefaultArtifactRepository

    public DefaultArtifactRepository(java.lang.String id,
                             java.lang.String url,
                             ArtifactRepositoryLayout layout)

Create a local repository or a test repository.

Parameters:
  `id` - the unique identifier of the repository
  `url` - the URL of the repository
  `layout` - the layout of the repository

#### DefaultArtifactRepository

    public DefaultArtifactRepository(java.lang.String id,
                             java.lang.String url,
                             ArtifactRepositoryLayout layout,
                             boolean uniqueVersion)

Create a remote deployment repository.

Parameters:
  `id` - the unique identifier of the repository
  `url` - the URL of the repository
  `layout` - the layout of the repository
  `uniqueVersion` - whether to assign each snapshot a unique version

#### DefaultArtifactRepository

    public DefaultArtifactRepository(java.lang.String id,
                             java.lang.String url,
                             ArtifactRepositoryLayout layout,
                             ArtifactRepositoryPolicy snapshots,
                             ArtifactRepositoryPolicy releases)

Create a remote download repository.

Parameters:
  `id` - the unique identifier of the repository
  `url` - the URL of the repository
  `layout` - the layout of the repository
  `snapshots` - the policies to use for snapshots
  `releases` - the policies to use for releases

### Method Detail

#### pathOf

    public java.lang.String pathOf(Artifact artifact)

Specified by:
  `pathOf` in interface `ArtifactRepository`

#### pathOfRemoteRepositoryMetadata

    public java.lang.String pathOfRemoteRepositoryMetadata(ArtifactMetadata artifactMetadata)

Specified by:
  `pathOfRemoteRepositoryMetadata` in interface `ArtifactRepository`

#### pathOfLocalRepositoryMetadata

    public java.lang.String pathOfLocalRepositoryMetadata(ArtifactMetadata metadata,
                                                 ArtifactRepository repository)

Specified by:
  `pathOfLocalRepositoryMetadata` in interface `ArtifactRepository`

#### getLayout

    public ArtifactRepositoryLayout getLayout()

Specified by:
  `getLayout` in interface `ArtifactRepository`

#### getSnapshots

    public ArtifactRepositoryPolicy getSnapshots()

Specified by:
  `getSnapshots` in interface `ArtifactRepository`

#### getReleases

    public ArtifactRepositoryPolicy getReleases()

Specified by:
  `getReleases` in interface `ArtifactRepository`

#### getKey

    public java.lang.String getKey()

Specified by:
  `getKey` in interface `ArtifactRepository`

#### isUniqueVersion

    public boolean isUniqueVersion()

Specified by:
  `isUniqueVersion` in interface `ArtifactRepository`

#### isBlacklisted

    public boolean isBlacklisted()

Specified by:
  `isBlacklisted` in interface `ArtifactRepository`

#### setBlacklisted

    public void setBlacklisted(boolean blacklisted)

Specified by:
  `setBlacklisted` in interface `ArtifactRepository`