Package org.codehaus.mojo.mrm.api.maven
Class BaseArtifactStore
java.lang.Object
org.codehaus.mojo.mrm.api.maven.BaseArtifactStore
- All Implemented Interfaces:
ArtifactStore
Base implementation of
ArtifactStore
.- Since:
- 1.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.maven.archetype.catalog.ArchetypeCatalog
long
void
set
(Artifact artifact, InputStream content) Create/update the specified artifact.void
setArchetypeCatalog
(InputStream content) void
setMetadata
(String path, org.apache.maven.artifact.repository.metadata.Metadata metadata) Create/update the specified metadata.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.codehaus.mojo.mrm.api.maven.ArtifactStore
get, getArtifactIds, getArtifacts, getGroupIds, getLastModified, getMetadata, getMetadataLastModified, getSize, getVersions
-
Constructor Details
-
BaseArtifactStore
public BaseArtifactStore()
-
-
Method Details
-
set
Description copied from interface:ArtifactStore
Create/update the specified artifact. This is an optional method for implementers.- Specified by:
set
in interfaceArtifactStore
- Parameters:
artifact
- the artifact to create/update.content
- the stream of contents (implementer is responsible for closing).- Throws:
IOException
- if the content could not be read/written.
-
setMetadata
public void setMetadata(String path, org.apache.maven.artifact.repository.metadata.Metadata metadata) throws IOException Description copied from interface:ArtifactStore
Create/update the specified metadata.- Specified by:
setMetadata
in interfaceArtifactStore
- Parameters:
path
- of the metadata (should not include themaven-metadata.xml
.metadata
- the metadata, nevernull
.- Throws:
IOException
- if an I/O error occurs.
-
setArchetypeCatalog
- Specified by:
setArchetypeCatalog
in interfaceArtifactStore
- Parameters:
content
- the content- Throws:
IOException
- if an I/O error occurs.
-
getArchetypeCatalog
public org.apache.maven.archetype.catalog.ArchetypeCatalog getArchetypeCatalog() throws IOException, ArchetypeCatalogNotFoundException- Specified by:
getArchetypeCatalog
in interfaceArtifactStore
- Returns:
- ArchetypeCatalog
- Throws:
IOException
- if an I/O error occurs.ArchetypeCatalogNotFoundException
- if the archetypeCatalog does not exist.
-
getArchetypeCatalogLastModified
- Specified by:
getArchetypeCatalogLastModified
in interfaceArtifactStore
- Returns:
- long
- Throws:
IOException
- if an I/O error occurs.ArchetypeCatalogNotFoundException
- if the archetypeCatalog does not exist.
-