Package org.eclipse.aether.internal.impl
Class DefaultLocalPathComposer
- java.lang.Object
-
- org.eclipse.aether.internal.impl.DefaultLocalPathComposer
-
- All Implemented Interfaces:
LocalPathComposer
@Singleton @Named public final class DefaultLocalPathComposer extends java.lang.Object implements LocalPathComposer
Default implementation ofLocalPathComposer
.- Since:
- 1.8.1
-
-
Constructor Summary
Constructors Constructor Description DefaultLocalPathComposer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPathForArtifact(Artifact artifact, boolean local)
Gets the relative path for a locally installed (local=true) or remotely cached (local=false) artifact.java.lang.String
getPathForMetadata(Metadata metadata, java.lang.String repositoryKey)
Gets the relative path for locally installed (repositoryKey=local) or remotely cached metadata.private java.lang.String
insertRepositoryKey(java.lang.String metadataType, java.lang.String repositoryKey)
-
-
-
Method Detail
-
getPathForArtifact
public java.lang.String getPathForArtifact(Artifact artifact, boolean local)
Description copied from interface:LocalPathComposer
Gets the relative path for a locally installed (local=true) or remotely cached (local=false) artifact.- Specified by:
getPathForArtifact
in interfaceLocalPathComposer
- Parameters:
artifact
- The artifact for which to determine the path, must not benull
.local
-true
if artifact is locally installed orfalse
if artifact is remotely cached.- Returns:
- A relative path representing artifact path.
-
getPathForMetadata
public java.lang.String getPathForMetadata(Metadata metadata, java.lang.String repositoryKey)
Description copied from interface:LocalPathComposer
Gets the relative path for locally installed (repositoryKey=local) or remotely cached metadata. TherepositoryKey
should be used at caller discretion, it merely denotes the origin of the metadata, while value "local" usually means local origin, but again, this is not a must or enforced, just how things happened so far.- Specified by:
getPathForMetadata
in interfaceLocalPathComposer
- Parameters:
metadata
- The metadata for which to determine the path, must not benull
.repositoryKey
- The repository key, nevernull
.- Returns:
- A relative path representing metadata path.
-
insertRepositoryKey
private java.lang.String insertRepositoryKey(java.lang.String metadataType, java.lang.String repositoryKey)
-
-