public final class ChainedWorkspaceReader extends java.lang.Object implements WorkspaceReader
Modifier and Type | Class and Description |
---|---|
private static class |
ChainedWorkspaceReader.Key |
Modifier and Type | Field and Description |
---|---|
private java.util.List<WorkspaceReader> |
readers |
private WorkspaceRepository |
repository |
Constructor and Description |
---|
ChainedWorkspaceReader(WorkspaceReader... readers)
Creates a new workspace reader by chaining the specified readers.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
findArtifact(Artifact artifact)
Locates the specified artifact.
|
java.util.List<java.lang.String> |
findVersions(Artifact artifact)
Determines all available versions of the specified artifact.
|
WorkspaceRepository |
getRepository()
Gets a description of the workspace repository.
|
static WorkspaceReader |
newInstance(WorkspaceReader reader1,
WorkspaceReader reader2)
Creates a new workspace reader by chaining the specified readers.
|
private java.util.List<WorkspaceReader> readers
private WorkspaceRepository repository
public ChainedWorkspaceReader(WorkspaceReader... readers)
readers
- The readers to chain, may be null
.newInstance(WorkspaceReader, WorkspaceReader)
public static WorkspaceReader newInstance(WorkspaceReader reader1, WorkspaceReader reader2)
null
.reader1
- The first workspace reader, may be null
.reader2
- The second workspace reader, may be null
.null
if no workspace reader was supplied.public java.io.File findArtifact(Artifact artifact)
WorkspaceReader
findArtifact
in interface WorkspaceReader
artifact
- The artifact to locate, must not be null
.null
if the artifact is not available.public java.util.List<java.lang.String> findVersions(Artifact artifact)
WorkspaceReader
findVersions
in interface WorkspaceReader
artifact
- The artifact whose versions should be listed, must not be null
.null
.public WorkspaceRepository getRepository()
WorkspaceReader
getRepository
in interface WorkspaceReader
null
.