org.codehaus.mojo.mrm.impl.maven
Class MemoryArtifactStore

java.lang.Object
  extended by org.codehaus.mojo.mrm.api.maven.BaseArtifactStore
      extended by org.codehaus.mojo.mrm.impl.maven.MemoryArtifactStore
All Implemented Interfaces:
Serializable, org.codehaus.mojo.mrm.api.maven.ArtifactStore

public class MemoryArtifactStore
extends org.codehaus.mojo.mrm.api.maven.BaseArtifactStore
implements Serializable

An artifact store that keeps all its artifacts in memory.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
MemoryArtifactStore()
           
 
Method Summary
 InputStream get(org.codehaus.mojo.mrm.api.maven.Artifact artifact)
          
 Set getArtifactIds(String groupId)
          
 Set getArtifacts(String groupId, String artifactId, String version)
          
 Set getGroupIds(String parentGroupId)
          
 long getLastModified(org.codehaus.mojo.mrm.api.maven.Artifact artifact)
          
 org.apache.maven.artifact.repository.metadata.Metadata getMetadata(String path)
          
 long getMetadataLastModified(String path)
          
 long getSize(org.codehaus.mojo.mrm.api.maven.Artifact artifact)
          
 Set getVersions(String groupId, String artifactId)
          
 void set(org.codehaus.mojo.mrm.api.maven.Artifact artifact, InputStream content)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryArtifactStore

public MemoryArtifactStore()
Method Detail

getGroupIds

public Set getGroupIds(String parentGroupId)

Specified by:
getGroupIds in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore

getArtifactIds

public Set getArtifactIds(String groupId)

Specified by:
getArtifactIds in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore

getVersions

public Set getVersions(String groupId,
                       String artifactId)

Specified by:
getVersions in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore

getArtifacts

public Set getArtifacts(String groupId,
                        String artifactId,
                        String version)

Specified by:
getArtifacts in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore

getLastModified

public long getLastModified(org.codehaus.mojo.mrm.api.maven.Artifact artifact)
                     throws IOException,
                            org.codehaus.mojo.mrm.api.maven.ArtifactNotFoundException

Specified by:
getLastModified in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore
Throws:
IOException
org.codehaus.mojo.mrm.api.maven.ArtifactNotFoundException

getSize

public long getSize(org.codehaus.mojo.mrm.api.maven.Artifact artifact)
             throws IOException,
                    org.codehaus.mojo.mrm.api.maven.ArtifactNotFoundException

Specified by:
getSize in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore
Throws:
IOException
org.codehaus.mojo.mrm.api.maven.ArtifactNotFoundException

get

public InputStream get(org.codehaus.mojo.mrm.api.maven.Artifact artifact)
                throws IOException,
                       org.codehaus.mojo.mrm.api.maven.ArtifactNotFoundException

Specified by:
get in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore
Throws:
IOException
org.codehaus.mojo.mrm.api.maven.ArtifactNotFoundException

set

public void set(org.codehaus.mojo.mrm.api.maven.Artifact artifact,
                InputStream content)
         throws IOException

Specified by:
set in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore
Overrides:
set in class org.codehaus.mojo.mrm.api.maven.BaseArtifactStore
Throws:
IOException

getMetadata

public org.apache.maven.artifact.repository.metadata.Metadata getMetadata(String path)
                                                                   throws IOException,
                                                                          org.codehaus.mojo.mrm.api.maven.MetadataNotFoundException

Specified by:
getMetadata in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore
Throws:
IOException
org.codehaus.mojo.mrm.api.maven.MetadataNotFoundException

getMetadataLastModified

public long getMetadataLastModified(String path)
                             throws IOException,
                                    org.codehaus.mojo.mrm.api.maven.MetadataNotFoundException

Specified by:
getMetadataLastModified in interface org.codehaus.mojo.mrm.api.maven.ArtifactStore
Throws:
IOException
org.codehaus.mojo.mrm.api.maven.MetadataNotFoundException


Copyright © 2009-2011 Codehaus. All Rights Reserved.