Package com.priint.pubserver.webservice
Class RepositoryDump
- java.lang.Object
-
- com.priint.pubserver.webservice.RepositoryDump
-
- All Implemented Interfaces:
java.io.Serializable
public class RepositoryDump extends java.lang.Object implements java.io.SerializableA repository dump format containing a list of files for export or import.
A file represents a repository entry with metadata and content. Files are identified by their full repository path.
Files can be marked for deletion. Deletions should be processed before upserts.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRepositoryDump.Filestatic classRepositoryDump.PostAction
-
Constructor Summary
Constructors Constructor Description RepositoryDump()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepositoryDumpaddFile(java.lang.String path, PluginConfig pluginConfig)RepositoryDumpaddFile(java.lang.String path, PluginConfig pluginConfig, ConfigFileProperties configFileProperties)RepositoryDumpaddFile(java.lang.String path, PluginConfig pluginConfig, ConfigFileProperties configFileProperties, RepositoryDump.PostAction postAction)RepositoryDumpaddFile(java.lang.String path, PluginConfig pluginConfig, RepositoryDump.PostAction postAction)RepositoryDumpaddFileForRemoval(java.lang.String path)java.lang.StringgetBasepath()java.lang.StringgetCreated()java.lang.BooleangetDeep()RepositoryDump.FilegetFile(java.lang.String path)Get file by its path.java.util.List<RepositoryDump.File>getFiles()java.net.URIgetRequest()java.lang.StringgetServer()voidsetBasepath(java.lang.String basepath)Base path for reading files from the repository.voidsetCreated(java.lang.String created)Time stamp when the dump was produced or null if not set.voidsetDeep(java.lang.Boolean deep)voidsetRequest(java.net.URI request)Request that was executed to produce the dump.voidsetServer(java.lang.String server)Server on which the dump was produced or null if not set.
-
-
-
Method Detail
-
addFile
public RepositoryDump addFile(java.lang.String path, PluginConfig pluginConfig)
- Parameters:
path- must not be nullpluginConfig-- Returns:
- RepositoryDump for method chaining. Throws a IllegalArgumentException if path is not set.
-
addFile
public RepositoryDump addFile(java.lang.String path, PluginConfig pluginConfig, RepositoryDump.PostAction postAction)
- Parameters:
path- must not be nullpluginConfig-postAction-- Returns:
- RepositoryDump for method chaining. Throws a IllegalArgumentException if path is not set.
-
addFile
public RepositoryDump addFile(java.lang.String path, PluginConfig pluginConfig, ConfigFileProperties configFileProperties)
- Parameters:
path- must not be nullpluginConfig-configFileProperties-- Returns:
- RepositoryDump for method chaining. Throws a IllegalArgumentException if path is not set.
-
addFile
public RepositoryDump addFile(java.lang.String path, PluginConfig pluginConfig, ConfigFileProperties configFileProperties, RepositoryDump.PostAction postAction)
- Parameters:
path- must not be nullpluginConfig-configFileProperties-postAction-- Returns:
- RepositoryDump for method chaining. Throws a IllegalArgumentException if path is not set.
-
addFileForRemoval
public RepositoryDump addFileForRemoval(java.lang.String path)
- Parameters:
path-- Returns:
- RepositoryDump for method chaining.
-
getBasepath
public java.lang.String getBasepath()
- Returns:
- Base path for reading files from the repository or null if not set.
-
getCreated
public java.lang.String getCreated()
- Returns:
- Time stamp when the dump was produced or null if not set.
-
getDeep
public java.lang.Boolean getDeep()
- Returns:
- "true" if dump creation was recursive, i.e. dump contains all files below the basepath. If deep is "null" or "false", then only the direct files within a folder are contained in a dump.
-
getFile
public RepositoryDump.File getFile(java.lang.String path)
Get file by its path. File path comparisons are case-sensitive.- Parameters:
path-- Returns:
- file or null if not found.
-
getFiles
public java.util.List<RepositoryDump.File> getFiles()
- Returns:
- files
-
getRequest
public java.net.URI getRequest()
- Returns:
- Request that was executed to produce the dump or null if not set.
-
getServer
public java.lang.String getServer()
- Returns:
- Server on which the dump was produced or null if not set.
-
setBasepath
public void setBasepath(java.lang.String basepath)
Base path for reading files from the repository.- Parameters:
basepath-
-
setCreated
public void setCreated(java.lang.String created)
Time stamp when the dump was produced or null if not set.- Parameters:
created-
-
setDeep
public void setDeep(java.lang.Boolean deep)
- Parameters:
deep-
-
setRequest
public void setRequest(java.net.URI request)
Request that was executed to produce the dump.- Parameters:
request-
-
setServer
public void setServer(java.lang.String server)
Server on which the dump was produced or null if not set.- Parameters:
server-
-
-