Interface ElementInspectorService
- All Known Implementing Classes:
SuperUserElementInspectorService
public interface ElementInspectorService
Inspects an Element distribution (ELM file) and returns structural metadata describing its contents. The returned
ElementPathRecordMetadata describes the paths to all jars and classpath entries found within the
distribution, along with the element's manifest and attributes.
All three methods inspect the same logical artifact — an ELM file — sourced from different locations: a raw stream, a Maven artifact repository, or the large-object store.
-
Method Summary
Modifier and TypeMethodDescriptioninspectElement(InputStream inputStream) Inspects an ELM distribution read from the suppliedInputStream.inspectElementArtifact(String coordinates) Inspects an ELM distribution resolved from Maven artifact coordinates.inspectElementLargeObject(String largeObjectId) Inspects an ELM distribution previously stored in the large-object store.
-
Method Details
-
inspectElement
Inspects an ELM distribution read from the suppliedInputStream. The stream is expected to contain a valid ELM file (a zip-format archive). The stream is consumed but not closed by this method; the caller retains responsibility for closing it.- Parameters:
inputStream- the stream containing the ELM file contents; must not benull- Returns:
- a
ElementPathRecordMetadatadescribing the first element found within the distribution - Throws:
IOException- if there was an error reading from the supplied stream or writing to the temporary fileSdkElementNotFoundException- if the archive contains no recognisable element directories
-
inspectElementArtifact
Inspects an ELM distribution resolved from Maven artifact coordinates. The coordinates must be in standard Maven format (groupId:artifactId:versionorgroupId:artifactId:packaging:version). The artifact is resolved against the default repositories (Maven Central) and must be an ELM file.- Parameters:
coordinates- the Maven artifact coordinates identifying the ELM distribution; must not benull- Returns:
- a
ElementPathRecordMetadatadescribing the first element found within the distribution - Throws:
SdkArtifactNotFoundException- if the artifact cannot be resolvedSdkElementNotFoundException- if the artifact contains no recognisable element directories
-
inspectElementLargeObject
Inspects an ELM distribution previously stored in the large-object store. ThelargeObjectIdmust refer to an existing large object whose content is a valid ELM file.- Parameters:
largeObjectId- the id of the large object containing the ELM file; must not benull- Returns:
- a
ElementPathRecordMetadatadescribing the first element found within the distribution - Throws:
SdkElementNotFoundException- if the large object contains no recognisable element directoriesLargeObjectContentNotFoundException- if no content has been uploaded for the given large object id
-