public class PathArchiveRepository extends java.lang.Object implements ArchiveRepository
ArchiveRepository
implementation which stores ScriptArchive
s in
sub-directories a root directory.Modifier and Type | Class and Description |
---|---|
static class |
PathArchiveRepository.Builder |
protected class |
PathArchiveRepository.DefaultView |
Modifier and Type | Field and Description |
---|---|
protected static java.nio.file.DirectoryStream.Filter<java.nio.file.Path> |
DIRECTORY_FILTER
Directory filter which finds readable directories
|
Modifier | Constructor and Description |
---|---|
protected |
PathArchiveRepository(java.nio.file.Path rootDir,
java.lang.String repositoryId,
java.lang.String repositoryDescription,
ScriptModuleSpecSerializer moduleSpecSerializer) |
Modifier and Type | Method and Description |
---|---|
void |
deleteArchive(ModuleId moduleId)
Delete an archive by ID
|
RepositoryView |
getDefaultView()
The default view reports all archives inserted into this repository.
|
java.lang.String |
getRepositoryId()
Get the ID of this repository
|
java.util.Set<ScriptArchive> |
getScriptArchives(java.util.Set<ModuleId> moduleIds)
Get all of the
ScriptArchive s for the given set of moduleIds. |
RepositoryView |
getView(java.lang.String view)
No named views supported by this repository!
Throws UnsupportedOperationException.
|
void |
insertArchive(JarScriptArchive jarScriptArchive)
Insert a Jar into the repository
|
void |
insertArchive(JarScriptArchive jarScriptArchive,
java.util.Map<java.lang.String,java.lang.Object> initialDeploySpecs)
Unsupported.
|
protected static final java.nio.file.DirectoryStream.Filter<java.nio.file.Path> DIRECTORY_FILTER
protected PathArchiveRepository(java.nio.file.Path rootDir, java.lang.String repositoryId, java.lang.String repositoryDescription, ScriptModuleSpecSerializer moduleSpecSerializer)
public java.lang.String getRepositoryId()
ArchiveRepository
getRepositoryId
in interface ArchiveRepository
public RepositoryView getDefaultView()
getDefaultView
in interface ArchiveRepository
public RepositoryView getView(java.lang.String view)
getView
in interface ArchiveRepository
view
- the name of the view.RepositoryView
that matches the given name or null if
one wasn't found.public void insertArchive(JarScriptArchive jarScriptArchive) throws java.io.IOException
ArchiveRepository
insertArchive
in interface ArchiveRepository
jarScriptArchive
- script archive which describes the jar and
the ModuleSpec which should be insertedjava.io.IOException
public void insertArchive(JarScriptArchive jarScriptArchive, java.util.Map<java.lang.String,java.lang.Object> initialDeploySpecs) throws java.io.IOException
insertArchive
in interface ArchiveRepository
jarScriptArchive
- script archive which describes the jar and
the ModuleSpec which should be insertedinitialDeploySpecs
- a set of initial deployment specs.java.io.IOException
public java.util.Set<ScriptArchive> getScriptArchives(java.util.Set<ModuleId> moduleIds) throws java.io.IOException
ArchiveRepository
ScriptArchive
s for the given set of moduleIds.getScriptArchives
in interface ArchiveRepository
moduleIds
- keys to search forjava.io.IOException
public void deleteArchive(ModuleId moduleId) throws java.io.IOException
ArchiveRepository
deleteArchive
in interface ArchiveRepository
moduleId
- module id to deletejava.io.IOException