org.apache.maven.artifact.repository.metadata
Class AbstractRepositoryMetadata
java.lang.Object
org.apache.maven.artifact.repository.metadata.AbstractRepositoryMetadata
- All Implemented Interfaces:
- RepositoryMetadata, ArtifactMetadata
- Direct Known Subclasses:
- ArtifactRepositoryMetadata
public abstract class AbstractRepositoryMetadata
- extends Object
- implements RepositoryMetadata
Shared methods of the repository metadata handling.
- Author:
- Brett Porter
AbstractRepositoryMetadata
protected AbstractRepositoryMetadata(Metadata metadata)
getRemoteFilename
public String getRemoteFilename()
- Specified by:
getRemoteFilename
in interface ArtifactMetadata
getLocalFilename
public String getLocalFilename(ArtifactRepository repository)
- Specified by:
getLocalFilename
in interface ArtifactMetadata
storeInLocalRepository
public void storeInLocalRepository(ArtifactRepository localRepository,
ArtifactRepository remoteRepository)
throws RepositoryMetadataStoreException
- Specified by:
storeInLocalRepository
in interface ArtifactMetadata
- Throws:
RepositoryMetadataStoreException
updateRepositoryMetadata
protected void updateRepositoryMetadata(ArtifactRepository localRepository,
ArtifactRepository remoteRepository)
throws IOException,
XmlPullParserException
- Throws:
IOException
XmlPullParserException
toString
public String toString()
- Overrides:
toString
in class Object
createMetadata
protected static Metadata createMetadata(Artifact artifact,
Versioning versioning)
createVersioning
protected static Versioning createVersioning(Snapshot snapshot)
setMetadata
public void setMetadata(Metadata metadata)
- Description copied from interface:
RepositoryMetadata
- Set the metadata contents.
- Specified by:
setMetadata
in interface RepositoryMetadata
- Parameters:
metadata
- the metadata
getMetadata
public Metadata getMetadata()
- Description copied from interface:
RepositoryMetadata
- Get the repository metadata associated with this marker.
- Specified by:
getMetadata
in interface RepositoryMetadata
- Returns:
- the metadata, or
null
if none loaded
merge
public void merge(ArtifactMetadata metadata)
- Specified by:
merge
in interface ArtifactMetadata
merge
public void merge(ArtifactMetadata metadata)
extendedToString
public String extendedToString()
- Specified by:
extendedToString
in interface ArtifactMetadata
getNature
public int getNature()
- Description copied from interface:
RepositoryMetadata
- Gets the artifact quality this metadata refers to. One of
RepositoryMetadata.RELEASE
, RepositoryMetadata.SNAPSHOT
or
RepositoryMetadata.RELEASE_OR_SNAPSHOT
.
- Specified by:
getNature
in interface RepositoryMetadata
- Returns:
- The artifact quality this metadata refers to.
getPolicy
public ArtifactRepositoryPolicy getPolicy(ArtifactRepository repository)
- Description copied from interface:
RepositoryMetadata
- Gets the policy that applies to this metadata regarding the specified repository.
- Specified by:
getPolicy
in interface RepositoryMetadata
- Parameters:
repository
- The repository for which to determine the policy, must not be null
.
- Returns:
- The policy, never
null
.
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.