Package org.eclipse.aether.repository
Class LocalArtifactRegistration
- java.lang.Object
-
- org.eclipse.aether.repository.LocalArtifactRegistration
-
public final class LocalArtifactRegistration extends java.lang.Object
A request to register an artifact within the local repository. Certain local repository implementations can refuse to serve physically present artifacts if those haven't been previously registered to them.
-
-
Constructor Summary
Constructors Constructor Description LocalArtifactRegistration()Creates an uninitialized registration.LocalArtifactRegistration(Artifact artifact)Creates a registration request for the specified (locally installed) artifact.LocalArtifactRegistration(Artifact artifact, RemoteRepository repository, java.util.Collection<java.lang.String> contexts)Creates a registration request for the specified artifact.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactgetArtifact()Gets the artifact to register.java.util.Collection<java.lang.String>getContexts()Gets the resolution contexts in which the artifact is available.RemoteRepositorygetRepository()Gets the remote repository from which the artifact was resolved.LocalArtifactRegistrationsetArtifact(Artifact artifact)Sets the artifact to register.LocalArtifactRegistrationsetContexts(java.util.Collection<java.lang.String> contexts)Sets the resolution contexts in which the artifact is available.LocalArtifactRegistrationsetRepository(RemoteRepository repository)Sets the remote repository from which the artifact was resolved.
-
-
-
Constructor Detail
-
LocalArtifactRegistration
public LocalArtifactRegistration()
Creates an uninitialized registration.
-
LocalArtifactRegistration
public LocalArtifactRegistration(Artifact artifact)
Creates a registration request for the specified (locally installed) artifact.- Parameters:
artifact- The artifact to register, may benull.
-
LocalArtifactRegistration
public LocalArtifactRegistration(Artifact artifact, RemoteRepository repository, java.util.Collection<java.lang.String> contexts)
Creates a registration request for the specified artifact.- Parameters:
artifact- The artifact to register, may benull.repository- The remote repository from which the artifact was resolved ornullif the artifact was locally installed.contexts- The resolution contexts, may benull.
-
-
Method Detail
-
getArtifact
public Artifact getArtifact()
Gets the artifact to register.- Returns:
- The artifact or
nullif not set.
-
setArtifact
public LocalArtifactRegistration setArtifact(Artifact artifact)
Sets the artifact to register.- Parameters:
artifact- The artifact, may benull.- Returns:
- This request for chaining, never
null.
-
getRepository
public RemoteRepository getRepository()
Gets the remote repository from which the artifact was resolved.- Returns:
- The remote repository or
nullif the artifact was locally installed.
-
setRepository
public LocalArtifactRegistration setRepository(RemoteRepository repository)
Sets the remote repository from which the artifact was resolved.- Parameters:
repository- The remote repository ornullif the artifact was locally installed.- Returns:
- This request for chaining, never
null.
-
getContexts
public java.util.Collection<java.lang.String> getContexts()
Gets the resolution contexts in which the artifact is available.- Returns:
- The resolution contexts in which the artifact is available, never
null.
-
setContexts
public LocalArtifactRegistration setContexts(java.util.Collection<java.lang.String> contexts)
Sets the resolution contexts in which the artifact is available.- Parameters:
contexts- The resolution contexts, may benull.- Returns:
- This request for chaining, never
null.
-
-