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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.maven.archetype.catalog.ArchetypeCataloglongvoidset(Artifact artifact, InputStream content) Create/update the specified artifact.voidsetArchetypeCatalog(InputStream content) voidsetMetadata(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, waitMethods 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:ArtifactStoreCreate/update the specified artifact. This is an optional method for implementers.- Specified by:
setin 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:ArtifactStoreCreate/update the specified metadata.- Specified by:
setMetadatain 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:
setArchetypeCatalogin 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:
getArchetypeCatalogin interfaceArtifactStore- Returns:
- ArchetypeCatalog
- Throws:
IOException- if an I/O error occurs.ArchetypeCatalogNotFoundException- if the archetypeCatalog does not exist.
-
getArchetypeCatalogLastModified
- Specified by:
getArchetypeCatalogLastModifiedin interfaceArtifactStore- Returns:
- long
- Throws:
IOException- if an I/O error occurs.ArchetypeCatalogNotFoundException- if the archetypeCatalog does not exist.
-