class SimpleLocalRepositoryManager extends java.lang.Object implements LocalRepositoryManager
| Modifier and Type | Field and Description |
|---|---|
private LocalRepository |
repository |
| Constructor and Description |
|---|
SimpleLocalRepositoryManager(java.io.File basedir) |
SimpleLocalRepositoryManager(java.io.File basedir,
java.lang.String type) |
SimpleLocalRepositoryManager(java.lang.String basedir) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(RepositorySystemSession session,
LocalArtifactRegistration request)
Registers an installed or resolved artifact with the local repository.
|
void |
add(RepositorySystemSession session,
LocalMetadataRegistration request)
Registers installed or resolved metadata with the local repository.
|
LocalArtifactResult |
find(RepositorySystemSession session,
LocalArtifactRequest request)
Queries for the existence of an artifact in the local repository.
|
LocalMetadataResult |
find(RepositorySystemSession session,
LocalMetadataRequest request)
Queries for the existence of metadata in the local repository.
|
private java.lang.String |
getPath(Metadata metadata,
java.lang.String repositoryKey) |
(package private) java.lang.String |
getPathForArtifact(Artifact artifact,
boolean local) |
java.lang.String |
getPathForLocalArtifact(Artifact artifact)
Gets the relative path for a locally installed artifact.
|
java.lang.String |
getPathForLocalMetadata(Metadata metadata)
Gets the relative path for locally installed metadata.
|
java.lang.String |
getPathForRemoteArtifact(Artifact artifact,
RemoteRepository repository,
java.lang.String context)
Gets the relative path for an artifact cached from a remote repository.
|
java.lang.String |
getPathForRemoteMetadata(Metadata metadata,
RemoteRepository repository,
java.lang.String context)
Gets the relative path for metadata cached from a remote repository.
|
LocalRepository |
getRepository()
Gets the description of the local repository being managed.
|
(package private) java.lang.String |
getRepositoryKey(RemoteRepository repository,
java.lang.String context) |
private java.lang.String |
insertRepositoryKey(java.lang.String filename,
java.lang.String repositoryKey) |
SimpleLocalRepositoryManager |
setLogger(Logger logger) |
java.lang.String |
toString() |
private final LocalRepository repository
SimpleLocalRepositoryManager(java.io.File basedir)
SimpleLocalRepositoryManager(java.lang.String basedir)
SimpleLocalRepositoryManager(java.io.File basedir,
java.lang.String type)
public SimpleLocalRepositoryManager setLogger(Logger logger)
public LocalRepository getRepository()
LocalRepositoryManagergetRepository in interface LocalRepositoryManagernull.java.lang.String getPathForArtifact(Artifact artifact, boolean local)
public java.lang.String getPathForLocalArtifact(Artifact artifact)
LocalRepositoryManagergetPathForLocalArtifact in interface LocalRepositoryManagerartifact - The artifact for which to determine the path, must not be null.public java.lang.String getPathForRemoteArtifact(Artifact artifact, RemoteRepository repository, java.lang.String context)
LocalRepositoryManagergetPathForRemoteArtifact in interface LocalRepositoryManagerartifact - The artifact for which to determine the path, must not be null.repository - The source repository of the artifact, must not be null.context - The resolution context in which the artifact is being requested, may be null.public java.lang.String getPathForLocalMetadata(Metadata metadata)
LocalRepositoryManagergetPathForLocalMetadata in interface LocalRepositoryManagermetadata - The metadata for which to determine the path, must not be null.public java.lang.String getPathForRemoteMetadata(Metadata metadata, RemoteRepository repository, java.lang.String context)
LocalRepositoryManagergetPathForRemoteMetadata in interface LocalRepositoryManagermetadata - The metadata for which to determine the path, must not be null.repository - The source repository of the metadata, must not be null.context - The resolution context in which the metadata is being requested, may be null.java.lang.String getRepositoryKey(RemoteRepository repository, java.lang.String context)
private java.lang.String getPath(Metadata metadata, java.lang.String repositoryKey)
private java.lang.String insertRepositoryKey(java.lang.String filename,
java.lang.String repositoryKey)
public LocalArtifactResult find(RepositorySystemSession session, LocalArtifactRequest request)
LocalRepositoryManagerfind in interface LocalRepositoryManagersession - The repository system session during which the request is made, must not be null.request - The artifact request, must not be null.null.public void add(RepositorySystemSession session, LocalArtifactRegistration request)
LocalRepositoryManageradd in interface LocalRepositoryManagersession - The repository system session during which the registration is made, must not be null.request - The registration request, must not be null.public java.lang.String toString()
toString in class java.lang.Objectpublic LocalMetadataResult find(RepositorySystemSession session, LocalMetadataRequest request)
LocalRepositoryManagerfind in interface LocalRepositoryManagersession - The repository system session during which the request is made, must not be null.request - The metadata request, must not be null.null.public void add(RepositorySystemSession session, LocalMetadataRegistration request)
LocalRepositoryManageradd in interface LocalRepositoryManagersession - The repository system session during which the registration is made, must not be null.request - The registration request, must not be null.