org.apache.maven.artifact.repository.metadata

## Class AbstractRepositoryMetadata

- java.lang.Object
- - org.apache.maven.artifact.repository.metadata.AbstractRepositoryMetadata

- All Implemented Interfaces:
    ArtifactMetadata, RepositoryMetadata
  Direct Known Subclasses:
    ArtifactRepositoryMetadata, GroupRepositoryMetadata, SnapshotArtifactRepositoryMetadata

      public abstract class AbstractRepositoryMetadata
      extends java.lang.Object
      implements RepositoryMetadata

  Shared methods of the repository metadata handling.
  Version:
    $Id: AbstractRepositoryMetadata.java 640549 2008-03-24 20:05:11Z bentmann $
  Author:
    Brett Porter

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractRepositoryMetadata(Metadata metadata)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static Metadata` | `createMetadata(Artifact artifact, Versioning versioning)`
    `protected static Versioning` | `createVersioning(Snapshot snapshot)`
    `java.lang.String` | `extendedToString()`
    `java.lang.String` | `getLocalFilename(ArtifactRepository repository)` Get the filename of this metadata on the local repository.
    `Metadata` | `getMetadata()` Get the repository metadata associated with this marker.
    `java.lang.String` | `getRemoteFilename()` Get the filename of this metadata on the remote repository.
    `void` | `merge(ArtifactMetadata metadata)` Merge a new metadata set into this piece of metadata.
    `void` | `setMetadata(Metadata metadata)` Set the metadata contents.
    `void` | `storeInLocalRepository(ArtifactRepository localRepository, ArtifactRepository remoteRepository)` Store the metadata in the local repository.
    `java.lang.String` | `toString()`
    `protected void` | `updateRepositoryMetadata(ArtifactRepository localRepository, ArtifactRepository remoteRepository)`

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

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

    - ### Methods inherited from interface org.apache.maven.artifact.repository.metadata.RepositoryMetadata

      `isSnapshot, setRepository`

    - ### Methods inherited from interface org.apache.maven.artifact.metadata.ArtifactMetadata

      `getArtifactId, getBaseVersion, getGroupId, getKey, storedInArtifactVersionDirectory, storedInGroupDirectory`

- - ### Constructor Detail

    - #### AbstractRepositoryMetadata

          protected AbstractRepositoryMetadata(Metadata metadata)

  - ### Method Detail

    - #### getRemoteFilename

          public java.lang.String getRemoteFilename()

      Description copied from interface: `ArtifactMetadata`
      Get the filename of this metadata on the remote repository.
      Specified by:
        `getRemoteFilename` in interface `ArtifactMetadata`
      Returns:
        the filename

    - #### getLocalFilename

          public java.lang.String getLocalFilename(ArtifactRepository repository)

      Description copied from interface: `ArtifactMetadata`
      Get the filename of this metadata on the local repository.
      Specified by:
        `getLocalFilename` in interface `ArtifactMetadata`
      Parameters:
        `repository` - the remote repository it came from
      Returns:
        the filename

    - #### storeInLocalRepository

          public void storeInLocalRepository(ArtifactRepository localRepository,
                                    ArtifactRepository remoteRepository)
                                      throws RepositoryMetadataStoreException

      Description copied from interface: `ArtifactMetadata`
      Store the metadata in the local repository.
      Specified by:
        `storeInLocalRepository` in interface `ArtifactMetadata`
      Parameters:
        `localRepository` - the local repository
        `remoteRepository` - the remote repository it came from
      Throws:
        `RepositoryMetadataStoreException`

    - #### updateRepositoryMetadata

          protected void updateRepositoryMetadata(ArtifactRepository localRepository,
                                      ArtifactRepository remoteRepository)
                                           throws java.io.IOException,
                                                  XmlPullParserException

      Throws:
        `java.io.IOException`
        `XmlPullParserException`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.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)

      Description copied from interface: `ArtifactMetadata`
      Merge a new metadata set into this piece of metadata.
      Specified by:
        `merge` in interface `ArtifactMetadata`
      Parameters:
        `metadata` - the new metadata

    - #### extendedToString

          public java.lang.String extendedToString()

      Specified by:
        `extendedToString` in interface `ArtifactMetadata`