Interface SpecificTemplateStorage
-
- All Superinterfaces:
de.dytanic.cloudnet.common.INameable
- All Known Implementing Classes:
DefaultSpecificTemplateStorage
public interface SpecificTemplateStorage extends de.dytanic.cloudnet.common.INameable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @Nullable java.io.OutputStreamappendOutputStream(@NotNull java.lang.String path)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.OutputStream>appendOutputStreamAsync(@NotNull java.lang.String path)@Nullable java.util.zip.ZipInputStreamasZipInputStream()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.zip.ZipInputStream>asZipInputStreamAsync()booleancopy(@NotNull java.nio.file.Path directory)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>copyAsync(@NotNull java.nio.file.Path directory)booleancreate()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>createAsync()booleancreateDirectory(@NotNull java.lang.String path)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>createDirectoryAsync(@NotNull java.lang.String path)booleancreateFile(@NotNull java.lang.String path)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>createFileAsync(@NotNull java.lang.String path)booleandelete()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>deleteAsync()booleandeleteFile(@NotNull java.lang.String path)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>deleteFileAsync(@NotNull java.lang.String path)booleandeploy(@NotNull java.io.InputStream inputStream)default booleandeploy(@NotNull java.nio.file.Path directory)booleandeploy(@NotNull java.nio.file.Path directory, @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>deployAsync(@NotNull java.io.InputStream inputStream)default @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>deployAsync(@NotNull java.nio.file.Path directory)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>deployAsync(@NotNull java.nio.file.Path directory, @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)booleanexists()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>existsAsync()@Nullable FileInfogetFileInfo(@NotNull java.lang.String path)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo>getFileInfoAsync(@NotNull java.lang.String path)@NotNull ServiceTemplategetTargetTemplate()Gets the template this class is wrapping.@NotNull TemplateStoragegetWrappedStorage()Gets the storage this class is wrapping.booleanhasFile(@NotNull java.lang.String path)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean>hasFileAsync(@NotNull java.lang.String path)default @Nullable FileInfo[]listFiles()default @Nullable FileInfo[]listFiles(boolean deep)default @Nullable FileInfo[]listFiles(@NotNull java.lang.String dir)@Nullable FileInfo[]listFiles(@NotNull java.lang.String dir, boolean deep)default @NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo[]>listFilesAsync()default @NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo[]>listFilesAsync(boolean deep)default @NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo[]>listFilesAsync(@NotNull java.lang.String dir)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo[]>listFilesAsync(@NotNull java.lang.String dir, boolean deep)@Nullable java.io.InputStreamnewInputStream(@NotNull java.lang.String path)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.InputStream>newInputStreamAsync(@NotNull java.lang.String path)@Nullable java.io.OutputStreamnewOutputStream(@NotNull java.lang.String path)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.OutputStream>newOutputStreamAsync(@NotNull java.lang.String path)static @NotNull SpecificTemplateStorageof(@NotNull ServiceTemplate template)Creates a newSpecificTemplateStoragefor the given template.static @NotNull SpecificTemplateStorageof(@NotNull ServiceTemplate template, @NotNull TemplateStorage storage)Creates a newSpecificTemplateStoragefor the given template.@Nullable java.io.InputStreamzipTemplate()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.InputStream>zipTemplateAsync()
-
-
-
Method Detail
-
of
@NotNull static @NotNull SpecificTemplateStorage of(@NotNull @NotNull ServiceTemplate template)
Creates a newSpecificTemplateStoragefor the given template.- Parameters:
template- the template which should be wrapped by the given storage- Returns:
- a new instance of the
SpecificTemplateStorage - Throws:
java.lang.IllegalArgumentException- if the storage of the given template doesn't exist
-
of
@NotNull static @NotNull SpecificTemplateStorage of(@NotNull @NotNull ServiceTemplate template, @NotNull @NotNull TemplateStorage storage)
Creates a newSpecificTemplateStoragefor the given template.- Parameters:
template- the template which should be wrapped by the given storagestorage- theTemplateStorageinstance matching the name of the storage in the template- Returns:
- a new instance of the
SpecificTemplateStorage - Throws:
java.lang.IllegalArgumentException- if the name of the storage doesn't match the name of the storage in the template
-
getTargetTemplate
@NotNull @NotNull ServiceTemplate getTargetTemplate()
Gets the template this class is wrapping.
-
getWrappedStorage
@NotNull @NotNull TemplateStorage getWrappedStorage()
Gets the storage this class is wrapping.
-
deploy
boolean deploy(@NotNull @NotNull java.nio.file.Path directory, @Nullable @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)
-
deploy
default boolean deploy(@NotNull @NotNull java.nio.file.Path directory)
-
deploy
boolean deploy(@NotNull @NotNull java.io.InputStream inputStream)
-
copy
boolean copy(@NotNull @NotNull java.nio.file.Path directory)
-
asZipInputStream
@Nullable @Nullable java.util.zip.ZipInputStream asZipInputStream() throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.asZipInputStream(ServiceTemplate)
-
zipTemplate
@Nullable @Nullable java.io.InputStream zipTemplate() throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.zipTemplate(ServiceTemplate)
-
delete
boolean delete()
- See Also:
TemplateStorage.delete(ServiceTemplate)
-
create
boolean create()
- See Also:
TemplateStorage.create(ServiceTemplate)
-
exists
boolean exists()
- See Also:
TemplateStorage.has(ServiceTemplate)
-
appendOutputStream
@Nullable @Nullable java.io.OutputStream appendOutputStream(@NotNull @NotNull java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.appendOutputStream(ServiceTemplate, String)
-
newOutputStream
@Nullable @Nullable java.io.OutputStream newOutputStream(@NotNull @NotNull java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.newOutputStream(ServiceTemplate, String)
-
createFile
boolean createFile(@NotNull @NotNull java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.createFile(ServiceTemplate, String)
-
createDirectory
boolean createDirectory(@NotNull @NotNull java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.createDirectory(ServiceTemplate, String)
-
hasFile
boolean hasFile(@NotNull @NotNull java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.hasFile(ServiceTemplate, String)
-
deleteFile
boolean deleteFile(@NotNull @NotNull java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.deleteFile(ServiceTemplate, String)
-
newInputStream
@Nullable @Nullable java.io.InputStream newInputStream(@NotNull @NotNull java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException- See Also:
TemplateStorage.newInputStream(ServiceTemplate, String)
-
getFileInfo
@Nullable @Nullable FileInfo getFileInfo(@NotNull @NotNull java.lang.String path) throws java.io.IOException
- Throws:
java.io.IOException- See Also:
TemplateStorage.getFileInfo(ServiceTemplate, String)
-
listFiles
@Nullable @Nullable FileInfo[] listFiles(@NotNull @NotNull java.lang.String dir, boolean deep) throws java.io.IOException
- Throws:
java.io.IOException- See Also:
TemplateStorage.listFiles(ServiceTemplate, String, boolean)
-
listFiles
@Nullable default @Nullable FileInfo[] listFiles(boolean deep) throws java.io.IOException
- Throws:
java.io.IOException- See Also:
TemplateStorage.listFiles(ServiceTemplate, boolean)
-
listFiles
@Nullable default @Nullable FileInfo[] listFiles(@NotNull @NotNull java.lang.String dir) throws java.io.IOException
- Throws:
java.io.IOException- See Also:
TemplateStorage.listFiles(ServiceTemplate, String)
-
listFiles
@Nullable default @Nullable FileInfo[] listFiles() throws java.io.IOException
- Throws:
java.io.IOException- See Also:
TemplateStorage.listFiles(ServiceTemplate)
-
deployAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deployAsync(@NotNull @NotNull java.nio.file.Path directory, @Nullable @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)
-
deployAsync
@NotNull default @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deployAsync(@NotNull @NotNull java.nio.file.Path directory)
-
deployAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deployAsync(@NotNull @NotNull java.io.InputStream inputStream)
-
copyAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> copyAsync(@NotNull @NotNull java.nio.file.Path directory)
-
asZipInputStreamAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.zip.ZipInputStream> asZipInputStreamAsync()
-
zipTemplateAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.InputStream> zipTemplateAsync()
-
deleteAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deleteAsync()
-
createAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createAsync()
-
existsAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> existsAsync()
-
appendOutputStreamAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.OutputStream> appendOutputStreamAsync(@NotNull @NotNull java.lang.String path)
-
newOutputStreamAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.OutputStream> newOutputStreamAsync(@NotNull @NotNull java.lang.String path)
-
createFileAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createFileAsync(@NotNull @NotNull java.lang.String path)
-
createDirectoryAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> createDirectoryAsync(@NotNull @NotNull java.lang.String path)
-
hasFileAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> hasFileAsync(@NotNull @NotNull java.lang.String path)
-
deleteFileAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.lang.Boolean> deleteFileAsync(@NotNull @NotNull java.lang.String path)
-
newInputStreamAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.io.InputStream> newInputStreamAsync(@NotNull @NotNull java.lang.String path)
-
getFileInfoAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo> getFileInfoAsync(@NotNull @NotNull java.lang.String path)
-
listFilesAsync
@NotNull @NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo[]> listFilesAsync(@NotNull @NotNull java.lang.String dir, boolean deep)
-
listFilesAsync
@NotNull default @NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo[]> listFilesAsync(boolean deep)
-
listFilesAsync
@NotNull default @NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo[]> listFilesAsync(@NotNull @NotNull java.lang.String dir)
-
listFilesAsync
@NotNull default @NotNull de.dytanic.cloudnet.common.concurrent.ITask<FileInfo[]> listFilesAsync()
-
-