public class PathArchiveRepository extends java.lang.Object implements ArchiveRepository
ArchiveRepository implementation which stores ScriptArchives 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
ScriptArchives 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()
ArchiveRepositorygetRepositoryId in interface ArchiveRepositorypublic RepositoryView getDefaultView()
getDefaultView in interface ArchiveRepositorypublic RepositoryView getView(java.lang.String view)
getView in interface ArchiveRepositoryview - 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
ArchiveRepositoryinsertArchive in interface ArchiveRepositoryjarScriptArchive - script archive which describes the jar and
the ModuleSpec which should be insertedjava.io.IOExceptionpublic void insertArchive(JarScriptArchive jarScriptArchive, java.util.Map<java.lang.String,java.lang.Object> initialDeploySpecs) throws java.io.IOException
insertArchive in interface ArchiveRepositoryjarScriptArchive - script archive which describes the jar and
the ModuleSpec which should be insertedinitialDeploySpecs - a set of initial deployment specs.java.io.IOExceptionpublic java.util.Set<ScriptArchive> getScriptArchives(java.util.Set<ModuleId> moduleIds) throws java.io.IOException
ArchiveRepositoryScriptArchives for the given set of moduleIds.getScriptArchives in interface ArchiveRepositorymoduleIds - keys to search forjava.io.IOExceptionpublic void deleteArchive(ModuleId moduleId) throws java.io.IOException
ArchiveRepositorydeleteArchive in interface ArchiveRepositorymoduleId - module id to deletejava.io.IOException